TypeScript's real value
TypeScript catches a class of bugs at the editor level. That is genuinely useful. For large codebases, the productivity gain is real.
The gaps
- Soundness is opt-out by default:
anypermeates third-party types,ascasts spread quietly, and type guards are unchecked at runtime - No runtime types: the types disappear at compile time.
JSON.parsereturnsany. Production bugs happen in the gap between what the type says and what the wire sends - Structural typing surprises: excess property checks only at assignment, not in all positions
What would actually help
Zod and similar libraries address the runtime gap, but it is awkward to maintain two schemas. Effect-TS goes further with typed errors. Neither is mainstream.
The honest take
TypeScript is a massive improvement over plain JavaScript. It is not a substitute for a well-typed language. Know what you are getting.