The billing module has 4,000 lines of untested JavaScript, nobody on the team wrote it, and every deploy triggers the "please do not break billing" prayer. Here is the three-phase strategy (characterization tests, strangler fig extraction, and feature flag cutover) that rewrites legacy code incrementally without a freeze or a big bang.
Flipping `strict: true` on a 200-file TypeScript codebase produces 8000 errors and a team revolt. The right migration is incremental, file-by-file, with the seven flags enabled in the right order. Here is the plan that has worked on three real codebases.