English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

TypeScript 7.0: The Go-Rewritten Compiler Delivering 10x Speed — and Its One Big Catch

Forum topic · 小凯 · 2026-08-15

Summary

Microsoft shipped TypeScript 7.0 on July 8, 2026, porting the entire compiler from TypeScript/JavaScript to Go (Project Corsa), fulfilling Anders Hejlsberg's March 2025 promise of a 10x speedup. Unlike type-strippers such as esbuild, swc, or Biome, TypeScript 7 is a complete type checker and declaration file generator running at native speed. Real-world benchmarks on Microsoft's own codebases show VS Code checking in 10.6 seconds (down from 125.7, an 11.9x gain), with similar 7.7–8.9x wins on Sentry, Bluesky, Playwright, and tldraw. Slack cut CI type-checking from 7.5 minutes to 1.25 minutes; memory dropped about 18%. Because the port was nearly function-by-function, 7.0 behaves identically to 6.0. The major caveat: no stable programmatic API until 7.1, breaking typescript-eslint, vue-tsc, and Svelte/Astro/Angular tooling; Microsoft offers an npm compatibility alias as a bridge. This article covers benchmarks, the Go-versus-Rust decision, breaking config changes (ES5 target removal, stricter defaults), new --checkers and --builders flags, and a phased migration strategy via TypeScript 6.0.

On July 8, 2026, Microsoft pushed TypeScript to 7.0 — the most foundational rework since the language was born in 2012. The entire compiler was ported line by line from TypeScript/JavaScript to Go, under the internal codename Project Corsa. Anders Hejlsberg's March 2025 pledge of a "10x speedup" was delivered sixteen months later.

This is not yet another "type stripper." Tools like esbuild, swc, and Biome erase types, transpile, and skip checking; TypeScript 7 is a full type checker and declaration file generator, all running at native speed. It closes the awkward five-year era of the JS toolchain "working around tsc," where the fast path skipped type checking and the checking path was so slow it could only run in CI — teams like Slack burned minutes of CI time on every merge.

Benchmarks: 125.7 seconds down to 10.6

The numbers are not synthetic microbenchmarks; Microsoft fed its largest public codebases to the compiler:

  • VS Code (~2.3M lines): 125.7s → 10.6s, 11.9x
  • Sentry: 139.8s → 15.7s, 8.9x
  • Bluesky: 24.3s → 2.8s, 8.7x
  • Playwright: 12.8s → 1.47s, 8.7x
  • tldraw: 11.2s → 1.46s, 7.7x
Early adopters corroborate these results. Slack's CI type checking dropped from ~7.5 minutes to 1.25 minutes; Microsoft's own News Services team reports saving roughly 400 engineer-hours per month. About half the speedup comes from native code, half from shared-memory multithreading — which also explains why the editor got faster: on the VS Code codebase, opening a file with errors went from 17.5 seconds to under 1.3 seconds. Memory usage dropped ~18%, and language service crashes fell significantly.

Why Go instead of Rust? The community complained about this in 2025, but Go is precisely why delivery in sixteen months was possible. Hejlsberg's team did not redesign the compiler; they ported it nearly function by function — Go's garbage collector and structural style made this feasible, a Rust rewrite would not. Because it is a port rather than a rewrite, 7.0's checker behaves exactly like 6.0: the same type inference, the same errors, the same output. This property is what makes the 10x numbers credible rather than a footnote about "a new codebase."

The one big catch: the API arrives in 7.1

TypeScript 7.0 shipped without a stable programmatic API. This is not a footnote-level detail. typescript-eslint's type-aware rules, Vue's vue-tsc, and the language tooling for Svelte / Astro / MDX / Angular templates all drive the compiler API — and none of them can run on 7.0. Microsoft says the new API lands in 7.1, followed by releases roughly every three to four months.

The consequences are concrete. typescript-eslint's published peer range only allows TypeScript below 6.1.0, so installing 7.0 throws an ERESOLVE from npm. ts-morph's failure mode is the sneakiest: it doesn't error — it silently outputs wrong results. Microsoft shipped a compatibility package: npm install -D typescript@npm:@typescript/typescript6 keeps the old compiler and its API under an alias, while typescript points to 7. It works, but you now host two compilers in node_modules that can drift apart.

Framework status: React / Next.js fully supported, upgrade anytime. Vue, Svelte, Astro, and MDX have basic type checking, but editor template type checking must wait for 7.1. Angular is still evaluating. Webpack loaders must also wait for 7.1 due to the missing API surface.

Migration advice: bridge with 6.0, patch the gaps in 7.1

The migration path is deliberately designed: 6.0 is the bridge — old options become deprecation warnings there, and 7.0 turns them into hard errors. So upgrade to 6.x first, clear the warnings, then move to 7.0.

Config-level breakage is mostly beneficial. strict and module: esnext become defaults; target: es5, baseUrl, moduleResolution: node10, downlevelIteration, and the AMD/UMD/SystemJS module formats are removed entirely. If you're still emitting ES5, Microsoft has formally exited that business — use Babel or swc downstream. Budget a day for a medium-sized codebase, more if baseUrl references are everywhere.

Once on 7, the new CI parallelism knobs reveal their value: --checkers (default 4) controls concurrent type-checking threads, and --builders parallelizes project references. Raising --checkers on a beefy CI runner is free speed the old compiler could never give you.

The honest adoption verdict: if your toolchain is tsc plus a bundler, upgrade now — go through 6.0, then straight to 7. If you depend on type-aware linting or framework language tooling, use the compatibility alias to run builds on 7 while keeping the type-aware parts on 6, and fully switch once 7.1 solidifies the new API. Either way, stop treating "type checking is slow" as a physical constraint of your workflow — that constraint just expired.

Tags

#typescript#typescript-7#go#compiler#performance#migration#javascript-tooling

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178633523