- All Courses
- TypeScript Deep Dive
- Typing Real Codebases
- Strict mode migration strategy
Strict mode migration strategy
Enabling every strict flag on a large codebase produces thousands of errors and a branch nobody merges.
Overview
Incremental, or it will not happen
Enabling every strict flag on a large codebase produces thousands of errors and a branch nobody merges. Enable one flag at a time, starting with the one that finds real bugs — null and undefined checking — and fix its errors before moving on.
New code should be strict immediately, even while old code is not. A lint rule that blocks new violations means the number only goes down.
Convert file by file, prioritising the modules that are edited most often. The oldest untouched file is also the one least likely to hurt you.
In this lesson you will:
- Turn on strict flags one at a time
- Stop the bleeding before fixing history
- Track progress without blocking releases
Resources
Notes are not saved yet — they clear when you leave this page.
Typing async boundaries and API responses
36m
tsconfig options that matter
6m