2 ANOTHER TITLE TES I think we can all agree that using TypeScript is a good idea. Who doesn't like type-safety? It's a great way to catch bugs early on, and it allows us to offload some complexity of our apps to the type definitions so that we don't have to keep them in our heads forever.

2 ANOTHER TITLE TES I think we can all agree that using TypeScript is a good idea. Who doesn't like type-safety? It's a great way to catch bugs early on, and it allows us to offload some complexity of our apps to the type definitions so that we don't have to keep them in our heads forever.
The level of type-safety can drastically vary from project to project. After all, every valid JavaScript code can be valid TypeScript code - depending on the TS settings. And there is also a big difference between "having types" and "being type-safe".
To truly leverage the power of TypeScript, there is one thing that you need above all:

Trust

We need to be able to trust our type definitions. If we don't, our types become a mere suggestion - we can't rely on them to be accurate. So we go above and beyond to make sure we can trust them:
We enable the strictest of TypeScript settings.
We add typescript-eslint to forbid the any type as well as ts-ignore.
We point out all type assertions in code reviews.
And still - we are probably lying. A LOT. Even if we adhere to all the above things.

Generics

Generics are essential in TypeScript. As soon as you want to implement something remotely complex, you will have to reach for them - especially when you're writing a reusable library.
However, as a user of a library, you ideally shouldn't need to care about their Generics. They are an implementation detail. So whenever you provide a generic "manually" to a function via the angle brackets, it's kinda bad for one of two reasons:

Testing nesting

nest 1
nest 2
nest 3
nest 4