frontend
How I Use TypeScript Without Losing Flexibility
I get the most from TypeScript when types make a boundary easier to understand: the data a component expects, or the result a function can return.
I get less from a type so elaborate that I need to reverse-engineer it before editing the code. A little repetition can be clearer. I also try to remember that data arriving from outside the application still needs checking. A type declaration describes an expectation; it doesn't inspect a network response.