#typescripttips resultados da pesquisa

⚡ 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 👇

A cheatsheet with handy TypeScript built-in types

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

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 🤝🏼

フォントの形を揃えるだけなのに、意外と難しい……。曲線や字間の感覚を、ゲーム感覚で楽しく鍛えられる「Shape Type」。デザイナーなら、ぜひ腕試しに一度は挑戦してみてほしい。


Need your numbers to line up? Or prefer old-school serif-style numerals? CSS has a property for that: font-variant-numeric // font-variant-numeric: tabular-nums; ✅ Tabular vs proportional ✅ Lining vs oldstyle ✅ Even supports slashed zero Read more 👇 developer.mozilla.org/en-US/docs/Web…


TypeScript vs Zod why use TypeScript if Zod exists? why use Zod if TypeScript exists? let me explain the actual difference 🧵👇

skharal4_s's tweet image. TypeScript vs Zod

why use TypeScript if Zod exists?
why use Zod if TypeScript exists?

let me explain the actual difference 🧵👇

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'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)

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!

NebraskaJS - Advanced TypeScript (Lincoln) meets tonight at 6:00 PM google.com/calendar/event…


Here's a handy guide for understanding some of TypeScript's utility types:

mattpocockuk's tweet image. Here's a handy guide for understanding some of TypeScript's utility types:

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

Did you know you can type safe your positive/negative numbers in #TypeScript ? #typescripttips

ishmam_dev's tweet image. Did you know you can type safe your positive/negative numbers in #TypeScript ?

#typescripttips
ishmam_dev's tweet image. Did you know you can type safe your positive/negative numbers in #TypeScript ?

#typescripttips

TypeScript syntax is often inspired by JavaScript. In some cases, TS even uses the exact same syntax as JS for a different purpose. The difference? JS features focus on values. TS features focus on types. Here's a few examples.


TypeScript tip: Avoid prefixing interfaces with "I". The "I" prefix is a C# convention, but not a TypeScript convention. In TypeScript, prefixing with "I" isn't necessary, and it makes the code clumsier to read and write.

housecor's tweet image. TypeScript tip: Avoid prefixing interfaces with "I".

The "I" prefix is a C# convention, but not a TypeScript convention.

In TypeScript, prefixing with "I" isn't necessary, and it makes the code clumsier to read and write.

zenn.dev/bmth/articles/… TypeScriptで型を定義する際、interfaceを使うべき理由を解説しています。 typeを使うとパフォーマンスが悪化する問題を、ReactのPropsを例に説明しています。 基本はinterfaceを使い、Union型などinterfaceで表現できない場合のみtypeを使うことを推奨しています。


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

Amp's CLI is now a proper, full-on TUI. Best part for me personally? No more Ink, no more flicker.


TS 5 update: satisfies + variadic tuple improvements. #TypeScriptTips #WebDev #Programming


Lock tuple literals: as const + tuple = immutable. #TypeScriptTips #WebDev #CodingHacks


🚀 TypeScript's Smarter Types! *Inference improvements* in TS 5.x reduce boilerplate, leading to cleaner, more robust code through automatic type understanding. Are your types writing themselves yet? #TypeScriptTips #DevProductivity devblogs.microsoft.com/typescript


Dynamic strings = template literal + union types. #TypeScriptTips #WebDev #Programming


Remove unwanted types: Exclude<T,U>. #TypeScriptTips #WebDev #Programming


ReturnType<T> = extract function return type. #TypeScriptTips #WebDev #CodingHacks


Combine unknown + typeof = safest runtime type check. #TypeScriptTips #WebDev #CodingHacks


Dynamic type-safe keys with keyof + generics. #TypeScriptTips #WebDev #TS


Mapped types = transform types programmatically. #TypeScriptTips #WebDev #CodingTips


Union types + type guards = runtime safety. #TypeScriptTips #WebDev #Programming


Optional chaining: obj?.prop = no more runtime crashes. #TypeScriptTips #CodingHacks #TS


Shortcut object typing: Record<K,V> = less code, more safety. #TypeScriptTips #TS #Programming


¿Cómo podrías usar conditional types y mapped types en TypeScript para crear un tipo que, a partir de un tipo string | number, devuelva string si number nunca aparece como prop del objeto asociado? 🤔 #TypeScript #Generics #TypescriptTips


Interface : defines shape: properties & methods without implementation. Great for contracts & API design. Type : can do interfaces + unions + primitives—super flexible! Use it for complex types or aliases. #TypeScriptTips #DevTalk #JavaScript


#Typescript keyof typeof = type-safe dynamic object keys. #TypeScriptTips #WebDev #programmingjobs


Pro TS Tip ⚡: Use as const to keep object types precise: const roles = ["admin", "user"] as const; type Role = typeof roles[number]; 👉 No more unsafe strings! #TypeScriptTips


TypeScript generics permiten escribir código reusable y tipado para múltiples tipos de datos sin duplicación. Evitan casting innecesario y mejoran la seguridad del tipo en tiempo de compilación. #TypeScript #Generics #TypescriptTips 🚀 (Seed: 8562)


🔍 Real-world uses of interfaces: Type React props & API responses Build utility contracts (like loggers, services) Model array-based data like to-dos or products Less guessing. More confidence. #TypeScriptTips


Nenhum resultado para "#typescripttips"

Did you know you can type safe your positive/negative numbers in #TypeScript ? #typescripttips

ishmam_dev's tweet image. Did you know you can type safe your positive/negative numbers in #TypeScript ?

#typescripttips
ishmam_dev's tweet image. Did you know you can type safe your positive/negative numbers in #TypeScript ?

#typescripttips

🚀 Exploring #TypeScript Tuples! 🤔 Did you know that [string] is different from string[]? #TypeScriptTips #WebDevelopment #CodingFun 🖥️💡

TandanBhaumik's tweet image. 🚀 Exploring #TypeScript Tuples! 🤔 Did you know that [string] is different from string[]?

#TypeScriptTips #WebDevelopment #CodingFun 🖥️💡

#TypescriptTips when conditional types went haywire just ignore it, it's fine 🐕‍🦺🔥

dr_sensor's tweet image. #TypescriptTips when conditional types went haywire

just ignore it, it&apos;s fine 🐕‍🦺🔥

Small @typescript pro tip, use const enums when possible, it has almost zero-cost and compiles to plain numbers. #typescript @TypeScriptDaily #typescripttips

ShekoHex's tweet image. Small @typescript pro tip, use const enums when possible, it has almost zero-cost and compiles to plain numbers. 

#typescript @TypeScriptDaily #typescripttips
ShekoHex's tweet image. Small @typescript pro tip, use const enums when possible, it has almost zero-cost and compiles to plain numbers. 

#typescript @TypeScriptDaily #typescripttips

👨‍💻TypeScript tip: optional chaining, No more unnecessary 'if' statements. 💪🏽 code snippet: #typescripttips

Jirarilarbi's tweet image. 👨‍💻TypeScript tip:
optional chaining, No more unnecessary &apos;if&apos; statements. 💪🏽 code snippet: 
 #typescripttips

In TypeScript, always prefer interfaces over types when you can! They're faster to compile and extendable, which can save you loads of time when your project scales up. Trust me, your future self will thank you! ✨ #TypeScriptTips #CodeWisdom #DevCommunity

geezy_tim's tweet image. In TypeScript, always prefer interfaces over types when you can! They&apos;re faster to compile and extendable, which can save you loads of time when your project scales up. Trust me, your future self will thank you! ✨ #TypeScriptTips #CodeWisdom #DevCommunity

¿Sabías que en TypeScript puedes utilizar 'readonly' para crear propiedades de solo lectura en tus objetos? Asegura la inmutabilidad y mejora la robustez de tu código. 💡 #TypeScriptTips #WebDev #CodeQuality #TypeScriptTricks #Programming #JavaScript #SoftwareDevelopment

dev_leos's tweet image. ¿Sabías que en TypeScript puedes utilizar &apos;readonly&apos; para crear propiedades de solo lectura en tus objetos? Asegura la inmutabilidad y mejora la robustez de tu código. 💡 #TypeScriptTips #WebDev #CodeQuality #TypeScriptTricks #Programming #JavaScript #SoftwareDevelopment

🔆 Rise & Shine, TypeScript devs! Here's a quick morning gem to kick off your day: 💡 Simplify object type definitions using Mapped Types. Like this. 🌟 Mapped Types allow dynamic type creation, keeping your code flexible & DRY. #TypeScriptTips #MorningCode

omarbelghith2's tweet image. 🔆 Rise &amp;amp; Shine, TypeScript devs! Here&apos;s a quick morning gem to kick off your day:

💡 Simplify object type definitions using Mapped Types. Like this.

🌟 Mapped Types allow dynamic type creation, keeping your code flexible &amp;amp; DRY. #TypeScriptTips #MorningCode

👨‍💻 #TypeScript tip: 'never' type is super useful for catching potential errors in your code. Check out this code snippet #typescripttips

Jirarilarbi's tweet image. 👨‍💻 #TypeScript tip:
&apos;never&apos; type is super useful for catching potential errors in your code. Check out this code snippet
#typescripttips

🚀 Excited to start our #TypeScript journey this week! 📚 Get ready for daily tips on mastering this powerful language. Let's dive in with a key concept: Interfaces. #CodeBetter #TypeScriptTips

espanajose_fdev's tweet image. 🚀 Excited to start our #TypeScript journey this week! 📚 Get ready for daily tips on mastering this powerful language. Let&apos;s dive in with a key concept: Interfaces. #CodeBetter #TypeScriptTips

💡 TypeScript tip: Use unknown type to avoid any and enforce type-checking. #TypeScript #TypeScriptTips

galiullin_airat's tweet image. 💡 TypeScript tip: Use unknown type to avoid any and enforce type-checking. 

#TypeScript #TypeScriptTips

2/7 Let's start simple with a generic identity function. It takes any type `T` and returns it. Notice the angle brackets <> #TypeScriptTips #CodingIsFun

thesleebit's tweet image. 2/7 Let&apos;s start simple with a generic identity function. It takes any type `T` and returns it. Notice the angle brackets &amp;lt;&amp;gt;

#TypeScriptTips #CodingIsFun

4/7 Generics also apply to interfaces. Define one interface to describe functions or objects with varied types. #CleanCode #TypeScriptTips

thesleebit's tweet image. 4/7 Generics also apply to interfaces. Define one interface to describe functions or objects with varied types.  

#CleanCode #TypeScriptTips

4/7 Discriminated Unions pair nicely with switch statements. Define a common property & TypeScript can narrow down to the correct type. #TypeScriptTips #WebDev

thesleebit's tweet image. 4/7 Discriminated Unions pair nicely with switch statements.

 Define a common property &amp;amp; TypeScript can narrow down to the correct type.  

#TypeScriptTips #WebDev

3/7 Use Generics in interfaces to define properties that work with multiple types. This creates a blueprint for a range of typed objects. #TypeScriptTips #WebDevelopment

thesleebit's tweet image. 3/7 Use Generics in interfaces to define properties that work with multiple types.

 This creates a blueprint for a range of typed objects.  

#TypeScriptTips #WebDevelopment

2/7 Readonly<T> is your go-to when you want to lock down any modifications to your objects, making all properties readonly. Ideal for ensuring immutability! #DevCommunity #TypeScriptTips

thesleebit's tweet image. 2/7 Readonly&amp;lt;T&amp;gt; is your go-to when you want to lock down any modifications to your objects, making all properties readonly.

 Ideal for ensuring immutability!  

#DevCommunity #TypeScriptTips

2/7 By using generics, you can avoid code duplication and improve maintainability. See how easy it is to handle different types with a single function. #CodeQuality #TypeScriptTips

thesleebit's tweet image. 2/7 By using generics, you can avoid code duplication and improve maintainability.

 See how easy it is to handle different types with a single function.

#CodeQuality #TypeScriptTips

Use the keyof operator to create type-safe code that works with object keys. Using keyof can help prevent errors and make your code more maintainable. #TypeScript #TypeScriptTips

jeffersonlicet's tweet image. Use the keyof operator to create type-safe code that works with object keys. Using keyof can help prevent errors and make your code more maintainable.

#TypeScript #TypeScriptTips

1/6 Discriminated unions combine multiple types with a common literal property. This 'discriminator' field makes type narrowing easy. Check how to define them: #TypeScriptTips #Coding

thesleebit's tweet image. 1/6 Discriminated unions combine multiple types with a common literal property.

 This &apos;discriminator&apos; field makes type narrowing easy. Check how to define them:

#TypeScriptTips #Coding

Loading...

Something went wrong.


Something went wrong.


United States Trends