Treat the Compiler With Compassion
summary
Explains why TypeScript purposely trades off soundness and completeness, citing the GitHub non-goal page, concrete code that compiles but crashes (null narrowing broken by intervening calls), the object.keys indexing gotcha, and the inference choice that refuses flow-based union widening. Shows how enabling strict mode or using tools like TS reset or linters moves the dial toward safety, and demonstrates the verbose, impractical code that would be required to make the vanilla compiler fully sound.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:44Compiler as misunderstood dragon
- 3:51Why TypeScript frustrates
- 5:59Soundness completeness decidability
- 8:05TypeScript not sound by design
- 13:44Practicality vs correctness
- 16:15TypeScript not complete
- 19:24Misunderstandings vs flaws
- 20:49Object.keys gotcha
- 22:56Treat compiler with compassion
related talks
21mThe long-tail of type safety
19mYou don't know TS: often unknown parts of TypeScript
27mThe TypeScript Completeness Conundrum
24mTypeScript for JavaScripties
59mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
51mTypeScript - Beyond the Basics
43mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
01h 01mDeconstructing TypeScript’s Type System
