« All posts

TypeScript 7.0: a green tsc check isn't a safe migration

TypeScript 7.0's native Go compiler is fast, but tsc --noEmit misses two real migration risks: removed tsconfig flags and tools that depend on the Compiler API.

TypeScript 7.0 has landed on npm with tsgo, its native Go-based compiler, marketed mainly for speed. But the check most teams rely on to judge migration safety, tsc --noEmit, is structurally blind to the two failure modes that actually matter, because the type system itself barely changed between 6 and 7.

The first risk is tsconfig options deprecated across the 5.x line and now fully removed in 7.0 (importsNotUsedAsValues, keyofStringsOnly, ignoreDeprecations, and others), which now throw hard errors instead of silent warnings — and in monorepos a single shared base config can break every package at once. The second, sneakier risk is tooling that imports the TypeScript Compiler API directly: ts-morph, typedoc, type-aware typescript-eslint rules, ts-patch/ttypescript, and schema generators stop working not because your code is wrong, but because the full programmatic API hasn't shipped yet in this initial 7.0 release.

For decorator- and metadata-heavy frameworks (NestJS, TypeORM, InversifyJS), the advice is to verify rather than panic: build under 7.0 and run the real integration/e2e suite, since that's the only way to catch runtime metadata issues that --noEmit can't see. The recommended sequence is: grep tsconfig for removed flags first, then audit for Compiler API consumers (keeping TypeScript 6.x side-by-side where needed), then run tsc --noEmit, and finally build and run the full test suite. --noEmit belongs at step three, not step one.