#typescriptoverloading kết quả tìm kiếm
⚡️ Elegant TypeScript Solutions in Practice! → Union `|` → Conditional `?:` → Intersection `&` → Generics `<T>` → Constraints `extends` → Literals `'exact'` → Optional `?` See it in action 👇 #TypeScript #WebDev #JavaScript

Do you want to know how much of your TypeScript code is type-safe? If yes, use type-coverage. Why? See more in 🧵 👇

Writing perfect TypeScript types for 3 hours... then fixing one error with as any 💀

this is a good example of why it's hard to switch off of @convex_dev In just a few lines of Typescript I get 1) Authentication 2) Authorization 3) App logic which is separate from the implementation of the actual function It's beautiful 🥲

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

Wanna speed up your TypeScript builds and improve your IDE's TypeScript language server performance? Replace type intersections with interfaces. Here's how: 1. Search for this: & { 2. Replace the type intersections with an interface. Why? Because type intersections are slow.…

Unpopular opinion, but for real, once you get good with TypeScript, it's hard to go back to JavaScript. TypeScript types feel like a huge upgrade, for example. Fewer bugs in production, the codebase is more scalable. TypeScript --> JavaScript
TypeScript tip: use `as const` after literals to: ‣ Recursively set object properties to readonly ‣ Make arrays readonly tuples ‣ Disable type widening

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

Nope! Typescript is not a standalone programing language. Typescript is JavaScript with a sprinkle of salt. Even though you write in TS, it must be transpiled(compiled) to JS to get the work done.
🔥 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.
One of the hardest pills to swallow as a developer: "11" + 1 // "111" "11" - 1 // 10 JavaScript never fails to surprise us with type coercion. Pro Tip: Always be mindful of implicit type coercion and use Number(), String(), or parseInt() explicitly to avoid unexpected results.

Just found out I can create these files where I put the typescript types/interfaces and never import them! Forget about `import type {}` or relative paths! This approach works well, and all these types are available globally👍

TypeScript's type system is very powerful because it allows us to express types in terms of other types, including generics I was looking at the implementation of the TS utilities & learned lots about how to implement generics, so I wanted to share my learnings /thread 🧵👇🏾

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

Problem: You want to know how much of your TypeScript code is type safe. Solution: type-coverage This CLI tool reports the percentage of your code that’s type safe. It reports usage of: 🚩 any 🚩 as assertions (foo as string) 🚩 type assertions (<string>foo) 🚩 Non-null…

Something went wrong.
Something went wrong.
United States Trends
- 1. #JoyForum 1,655 posts
- 2. #2025MAMAVOTE 444K posts
- 3. Good Thursday 21.6K posts
- 4. Mila 17.5K posts
- 5. Brevis ZK 137K posts
- 6. Happy Friday Eve N/A
- 7. Deport Harry Sisson 13.7K posts
- 8. #thursdaymotivation 1,894 posts
- 9. #ThursdayThoughts 1,333 posts
- 10. #thursdayvibes 2,121 posts
- 11. Ninja Gaiden 13.1K posts
- 12. Tomonobu Itagaki 8,509 posts
- 13. Deloitte 9,918 posts
- 14. MC FELIX FRIDGE INTERVIEW 15.4K posts
- 15. DuPont 2,155 posts
- 16. Dead or Alive 11.6K posts
- 17. BNB Chain 19.9K posts
- 18. Bernie 37.7K posts
- 19. Jennifer Welch 4,422 posts
- 20. Pelosi 150K posts