September 9, 2026
Notes on TypeScript Strict Mode
The strict compiler flags I actually turn on, and the habits they force.
- typescript
- tooling

strict: true is the floor, not the ceiling. A few extra flags catch most of
the bugs I used to find in production.
Flags worth turning on
noUncheckedIndexedAccess— array and record access becomesT | undefined.exactOptionalPropertyTypes—undefinedstops sneaking into optional keys.noImplicitOverrideandnoFallthroughCasesInSwitch— cheap correctness.
The habit it forces
You stop guessing. If a value can be missing, the types say so, and you handle it at the edge instead of at the crash.
const first = items[0];
if (!first) return; // now required, and now obvious