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

TypeScript 7.0: Go-Rewritten Compiler Delivers 10x Speedup, With One Big Catch

Forum topic · 小凯 · 2026-08-15

Summary

On July 8, 2026, Microsoft released TypeScript 7.0, the deepest restructuring since the language's 2012 debut: the entire compiler was ported line-by-line from TypeScript/JavaScript to Go under 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 full type checker and declaration emitter running at native speed. Real benchmarks show VS Code (about 2.3M lines) dropping from 125.7s to 10.6s (11.9x), with Sentry, Bluesky, Playwright, and tldraw seeing 7.7–8.9x gains. Slack cut CI type checks from ~7.5 to 1.25 minutes; Microsoft's News Services team reports ~400 engineer-hours saved monthly. Gains come roughly half from native code and half from shared-memory multithreading. The major limitation: 7.0 ships no stable programmatic API, so typescript-eslint, vue-tsc, and Svelte/Astro tooling cannot run on it until 7.1. Migration guidance: upgrade to 6.0 first to clear deprecation warnings, then move to 7.0, using the @typescript/typescript6 compatibility alias where needed.

On July 8, 2026, Microsoft pushed TypeScript to 7.0 — the most fundamental restructuring 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. The "10x speedup" pledge that Anders Hejlsberg made in March 2025 was fulfilled sixteen months later.

This is not another "type stripper." Tools like esbuild, swc, and Biome erase types, transpile, and skip checking; TypeScript 7 is a complete type checker and declaration file generator, all running at native speed. It closes out the awkward situation of the past five years of the JS toolchain "bypassing tsc": the fast path didn't check types, and the checking path was so slow it could only run in CI — teams like Slack burned minutes of CI on every merge.

Benchmarks: 125.7s down to 10.6s

These numbers are not synthetic micro-benchmarks; they are real results from feeding Microsoft's 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 adopter feedback corroborates this. Slack's CI type checking dropped from ~7.5 minutes to 1.25 minutes; Microsoft's own News Services team claims to save 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.5s to under 1.3s. Memory usage dropped ~18%, and language service crashes fell significantly.

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

The one big pitfall: the API arrives in 7.1

TypeScript 7.0 ships 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 are all driven by the compiler API, and none of them can run on 7.0. Microsoft says the new API will land in 7.1, with releases roughly every three to four months afterward.

The consequences are concrete. typescript-eslint's published peer range only allows TypeScript below 6.1.0, so installing 7.0 makes npm throw ERESOLVE directly. ts-morph has the nastiest failure mode: it doesn't produce errors — 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 have two compilers living in your node_modules, and the two versions may drift.

Framework status: React / Next.js fully supported, upgrade anytime. Vue, Svelte, Astro, and MDX basic type checking works, but editor template type checking must wait for 7.1. Angular is still evaluating. webpack loaders also need to wait for 7.1 because there is no API surface.

Migration advice: 6.0 as the bridge, 7.1 fills the gap

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

The config-level breakages are 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 is formally out of that business — downstream transpilation goes through Babel or swc. Budget a day for a mid-sized codebase; more if baseUrl references are everywhere.

After moving to 7, the new parallelism knobs show their value in CI: --checkers (default 4) controls concurrent type-checking threads, and --builders parallelizes project references. Cranking up --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 first, then straight to 7. If you depend on type-aware linting or framework language tools, use the compatibility alias so 7 runs the builds while the type-aware parts stay on 6, and switch fully once 7.1 lands 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#project-corsa#performance#migration#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