Should we migrate our JavaScript codebase to TypeScript?
A February 2026 study of AI‑written TypeScript found that coding agents reach for the any escape hatch 9 times more often than human developers, yet their pull requests were accepted 1.8 times more often (Lee et al., 2026). Types only help your coding agents when strict rules stop them from switching the checks off.
I migrate file by file with AI coding agents working under enforced rules. Tests pin today’s behavior first, strict mode goes on one folder at a time, and a person approves every merge, so releases can continue during the migration. In January 2024 I enabled TypeScript for a product’s Cloudflare Workers, and in March 2026 took a backend to TypeScript 6, where CommonJS is deprecated.
