Skip to content

2 min read

TypeScript 7 — the Go compiler ships

TypeScript 7 is a native port of the compiler in Go, with full builds about 10× faster. What changed from 6.0, what was removed, and how to upgrade.

  • typescript
  • tooling
  • release

TypeScript 7.0 shipped on July 8. It is the result of Project Corsa: the TypeScript compiler ported from TypeScript to Go. It is the same type checker, but it runs as native code and uses multiple CPU cores.

How much faster

Full builds, TypeScript 6 vs 7, from the announcement:

Codebase TS 6 TS 7 Speedup
VS Code 125.7 s 10.6 s 11.9×
Sentry 139.8 s 15.7 s 8.9×
Bluesky 24.3 s 2.8 s 8.7×
Playwright 12.8 s 1.47 s 8.7×

Memory use also went down in every case. In the editor, the time to see the first error after opening a file in the VS Code codebase dropped from about 17.5 seconds to under 1.3.

Parsing, type checking and emitting now run in parallel. The new --checkers flag (default 4) sets how many type-checker workers run, --builders does the same for project references, and --singleThreaded turns it all off for debugging.

Installing

No new package name: npm install -D typescript@^7, then run tsc as usual. The tsgo binary and @typescript/native-preview package from the preview are no longer needed.

What changed from 6.0

TypeScript 6.0 was the bridge release, and 7.0 makes its deprecations final. If your project compiles cleanly on 6.0 with no ignoreDeprecations, it should behave the same on 7.0. Otherwise, expect:

  • New defaults: strict: true, module: esnext, types: [] and rootDir: ./. If you rely on global types like node or jest, list them in types.
  • Now errors: target: es5, baseUrl, downlevelIteration, node/node10 and classic module resolution, AMD/UMD/SystemJS output, and setting esModuleInterop to false.
  • Import assertions with asserts are gone; use with.

The catch: no API yet

TypeScript 7.0 has no programmatic API; a new one is planned for 7.1. Tools that call into the compiler, such as typescript-eslint and the editor plugins for Vue, Svelte, Astro, Angular and MDX, still need 6.0. The official answer is to install both versions side by side:

{
  "devDependencies": {
    "@typescript/native": "npm:typescript@^7.0.2",
    "typescript": "npm:@typescript/typescript6@^6.0.2"
  }
}

Tools that import typescript get the 6.0 API, and you run the fast compiler for type checking.

Bottom line

For plain TypeScript and React projects, upgrade. Clean up 6.0 deprecation warnings first, then switch, and CI type checking gets about ten times faster. If you rely on Vue, Svelte or Angular tooling, or anything else that uses the compiler API, keep 6.0 alongside it until 7.1.

Contact

Building something with this?

We help teams pick the right tools and ship. Tell us what you are working on.

What should it do, who is it for, and is there a deadline?

We use your details only to reply to your enquiry. See our privacy policy.