#typescripttricks ผลการค้นหา

Turns out it’s possible to implement TypeScript’s type system in TypeScript’s type system 😳 Check out github.com/ronami/HypeScr…

ronenamiel's tweet image. Turns out it’s possible to implement TypeScript’s type system in TypeScript’s type system 😳

Check out github.com/ronami/HypeScr…

if you want to learn typescript, here's a detailed course 🤝🏼

_devJNS's tweet image. if you want to learn typescript, here's a detailed course 🤝🏼

⚡ This TypeScript pattern will level up your code: ✨ [C in Union]: Type[C] See it in action 👇

KaraBharat's tweet image. ⚡ This TypeScript pattern will level up your code:

✨ [C in Union]: Type[C]

See it in action 👇

🔥 TypeScript Tip #5 🔥 The 'extends' keyword is very powerful in TypeScript. Here, I use it to narrow the value of a generic to enable some beautiful autocomplete/inference.


TypeScript tip: use `as const` after literals to: ‣ Recursively set object properties to readonly ‣ Make arrays readonly tuples ‣ Disable type widening

mgechev's tweet image. TypeScript tip: use `as const` after literals to:
‣ Recursively set object properties to readonly
‣ Make arrays readonly tuples
‣ Disable type widening

⚡ TypeScript trick that'll level up your team's code! See the advanced patterns in action 👇 #TypeScript #WebDev #CleanCode

KaraBharat's tweet image. ⚡ TypeScript trick that'll level up your team's code!

See the advanced patterns in action 👇

#TypeScript #WebDev #CleanCode

A cheatsheet with handy TypeScript built-in types

mgechev's tweet image. A cheatsheet with handy TypeScript built-in types

Here's two TypeScript tips rolled into one: 1. TypeScript magic is everywhere, even in Node's built-in types 2. I bet you didn't know this was legal TS: error: [message: string]


Stop memorizing TypeScript utility types. Here's the clean cheat sheet you'll need! 🔥 Bookmark this!👇

KaraBharat's tweet image. Stop memorizing TypeScript utility types. 
Here's the clean cheat sheet you'll need!

🔥 Bookmark this!👇

You’re writing extra code if you’re not using this TypeScript trick!

KaraBharat's tweet image. You’re writing extra code if you’re not using this TypeScript trick!

If you're using Tailwind, don't sleep on child selectors. They clean up your styles and eliminate repetition. Vibe coding agents aren't smart enough to do this. (if you're using CSS, keep scrolling)

DavidKPiano's tweet image. If you're using Tailwind, don't sleep on child selectors. They clean up your styles and eliminate repetition.

Vibe coding agents aren't smart enough to do this.

(if you're using CSS, keep scrolling)

using keyof/typeof is my favorite way to keep TypeScript types in sync with options:

benawad's tweet image. using keyof/typeof is my favorite way to keep TypeScript types in sync with options:

In tech, everything is a wrapper: • Next.js is a wrapper over React • React is a wrapper over JavaScript • JavaScript is a wrapper over C++ • C++ is a wrapper over Assembly • Assembly is a wrapper over 1s and 0s


TypeScript tip: stop using optional properties so much in your internal app logic. ❌ prop?: string; ✅ prop: string | undefined; Being explicit about undefined values eliminates the silent bugs that happen when you forget to provide a value.

DavidKPiano's tweet image. TypeScript tip: stop using optional properties so much in your internal app logic.

❌ prop?: string;
✅ prop: string | undefined;

Being explicit about undefined values eliminates the silent bugs that happen when you forget to provide a value.

TypeScript tip: Avoid making a property optional when the property isn’t valid in a certain case. Instead, declare 2 separate types, and use Omit to avoid copy/paste. Example: Many objects lack an id until they're saved. So declare a separate "Unsaved" type. #typescript

housecor's tweet image. TypeScript tip:

Avoid making a property optional when the property isn’t valid in a certain case.

Instead, declare 2 separate types, and use Omit to avoid copy/paste.

Example: Many objects lack an id until they're saved. So declare a separate "Unsaved" type.

#typescript

💡TypeScript trick: Require at least one field

KaraBharat's tweet image. 💡TypeScript trick: Require at least one field

Quick JavaScript Tip: If you're writing JavaScript in @code, add `// @ts-check` to the top of your file to gain some benefits of TypeScript checking #vscode #javascript #typescript #programming

hashtagcoder's tweet image. Quick JavaScript Tip: If you're writing JavaScript in @code, add `// @ts-check` to the top of your file to gain some benefits of TypeScript checking

#vscode #javascript #typescript #programming

Few handy built-in TypeScript types: 🔸 Partial - makes all props of the type parameter optional 🔸 Omit - omits the specified properties in the second type parameter from the first one 🔸 Parameters - gets the parameter types of a function

mgechev's tweet image. Few handy built-in TypeScript types:

🔸 Partial - makes all props of the type parameter optional
🔸 Omit - omits the specified properties in the second type parameter from the first one
🔸 Parameters - gets the parameter types of a function

20 Essential TypeScript Tips for 2025 Typescript ebook; codewithdhanian.gumroad.com/l/ujdmy

e_opore's tweet image. 20 Essential TypeScript Tips for 2025

Typescript ebook; codewithdhanian.gumroad.com/l/ujdmy

Did you know? In TypeScript, you can use the `&` symbol to create a readonly version of an interface! Example: #Typescript #TypeScriptTricks #HiddenGem #ProgrammingTips #SoftwareDevelopment #DevCommunity #CodeSnippets #ReadonlyInterfaces #TypeScriptHelp #TypeScriptTutorials

i_amrrs's tweet image. Did you know? In TypeScript, you can use the `&` symbol to create a readonly version of an interface! 
Example:

#Typescript #TypeScriptTricks #HiddenGem #ProgrammingTips #SoftwareDevelopment #DevCommunity #CodeSnippets #ReadonlyInterfaces #TypeScriptHelp #TypeScriptTutorials

Ahora viene la magia del tipado genérico 🪄 Esto genera métodos como addMovie y addSong automáticamente! 🤯 #CodeMagic #TypeScriptTricks

ronnyfreites's tweet image. Ahora viene la magia del tipado genérico 🪄

Esto genera métodos como addMovie y addSong automáticamente! 🤯 #CodeMagic #TypeScriptTricks

6/7 Combine generics with mapped types for ultra flexible code. You can transform properties while keeping type info intact! #DevTools #TypeScriptTricks

thesleebit's tweet image. 6/7 Combine generics with mapped types for ultra flexible code. You can transform properties while keeping type info intact!  

#DevTools #TypeScriptTricks

Type safe way of filtering out nullish values from an array without writing a type guard #typescript #typescripttricks #devtricks

notanortherngay's tweet image. Type safe way of filtering out nullish values from an array without writing a type guard #typescript #typescripttricks #devtricks

With TypeScript you can use const assertions to create readonly arrays. ✨ #TypeScript #TypeScriptTricks #100DaysOfCode 👇

typescripttv's tweet image. With TypeScript you can use const assertions to create readonly arrays. ✨ #TypeScript #TypeScriptTricks #100DaysOfCode 👇

Type Aliases in #TypeScript are very useful when you want to distinguish primitive data types in an array. See example! 👇 #TypeScript101 #TypeScriptTricks

bennycode's tweet image. Type Aliases in #TypeScript are very useful when you want to distinguish primitive data types in an array. See example! 👇 #TypeScript101 #TypeScriptTricks

ไม่พบผลลัพธ์สำหรับ "#typescripttricks"

Type Aliases in #TypeScript are very useful when you want to distinguish primitive data types in an array. See example! 👇 #TypeScript101 #TypeScriptTricks

bennycode's tweet image. Type Aliases in #TypeScript are very useful when you want to distinguish primitive data types in an array. See example! 👇 #TypeScript101 #TypeScriptTricks

With TypeScript you can use const assertions to create readonly arrays. ✨ #TypeScript #TypeScriptTricks #100DaysOfCode 👇

typescripttv's tweet image. With TypeScript you can use const assertions to create readonly arrays. ✨ #TypeScript #TypeScriptTricks #100DaysOfCode 👇

Did you know? In TypeScript, you can use the `&` symbol to create a readonly version of an interface! Example: #Typescript #TypeScriptTricks #HiddenGem #ProgrammingTips #SoftwareDevelopment #DevCommunity #CodeSnippets #ReadonlyInterfaces #TypeScriptHelp #TypeScriptTutorials

i_amrrs's tweet image. Did you know? In TypeScript, you can use the `&` symbol to create a readonly version of an interface! 
Example:

#Typescript #TypeScriptTricks #HiddenGem #ProgrammingTips #SoftwareDevelopment #DevCommunity #CodeSnippets #ReadonlyInterfaces #TypeScriptHelp #TypeScriptTutorials

Watch out! TypeScript 4.4 changes the default type for errors caught in catch clauses from `any` to `unkown`. This means that you can no longer access properties such as `message` without asserting a type first (i.e. `(error as Error)`. #TypeScriptTricks #TypeScript #DEVCommunity

typescripttv's tweet image. Watch out! TypeScript 4.4 changes the default type for errors caught in catch clauses from `any` to `unkown`. This means that you can no longer access properties such as `message` without asserting a type first (i.e. `(error as Error)`. #TypeScriptTricks #TypeScript #DEVCommunity

Type safe way of filtering out nullish values from an array without writing a type guard #typescript #typescripttricks #devtricks

notanortherngay's tweet image. Type safe way of filtering out nullish values from an array without writing a type guard #typescript #typescripttricks #devtricks

Loading...

Something went wrong.


Something went wrong.


United States Trends