Treat the Compiler with Compassion
summary
Explains why TypeScript deliberately sacrifices guarantees: the type system is not sound (refinements can be invalidated across function calls, so a null can slip through), not complete (inference avoids complex cross‑assignment reasoning so mutable “data” can be flagged), and undecidable in edge cases. Shows concrete examples (nullable capital, object.keys producing string[]), lists practical levers: strict mode, TypeScript‑ESLint no‑unsafe rules, and libraries like ts-reset/DS‑reset to push the safety dial.
AI-written summary · about
