TypeScript does two things:
- Compiles TypeScript to JavaScript ("transpiling").
- Performs static type analysis on your code.
If it feels like you're "fighting" the type checker, then you're not using TypeScript well.
There's almost always a better way!