When you're working with generic types and run into a seemingly unavoidable error, there's a trick that can often make it go away: intersect what you have with whatever TypeScript wants it to be. Your errors will melt away! Read on for examples and caveats.| effectivetypescript.com
This series will present a few tips and tricks for working with TypeScript generics that I've picked up over the past year. This post looks at how you can use classes and currying to combine explicit type parameters and type inference.| effectivetypescript.com
About the difference between "having types" and "being type-safe"...| tkdodo.eu
We talk all the time about how to define and use types in TypeScript, but we rarely talk about how TypeScript chooses to display our types. There are often several possible ways to display the same type, and the choice can have a big impact on the usability of your library. TypeScript tries to make good decisions on its own about type display, but it also gives us a few very obscure levers by which we can control it ourselves. Let's dive in to the strange world of type display!| effectivetypescript.com
I've written many words about TypeScript and I'm sure I've read even more. Here are four words that make me cringe every time I see them. If you write about TypeScript, please steer clear of these!| effectivetypescript.com