Skip to content
chornous.dev

Type two or more letters. Esc closes.

Index of sheets
Theme

Sheet 03 · Writing

All notes

TypeScript 7: the compiler moved to Go, and 6.0's warnings became errors

TypeScript 7.0 ships the native Go port with builds up to twelve times faster. It keeps the defaults 6.0 introduced, turns 6.0's deprecations into hard errors, and has no programmatic API yet, which matters if you use MDX, Vue, Svelte or Astro.

Pl. 41 · tree drawing generated from the slug “typescript-7-native-compiler”

The TypeScript team shipped 7.0 on July 8, 2026. It's the native port of the compiler to Go that Microsoft announced in 2025, and the team calls it a port: code that compiles on 6.0 with the stableTypeOrdering flag on should compile the same way on 7.0, in a fraction of the time.

The speed claims come with named projects, which I trust more than a synthetic benchmark.

VS Code full build, 125.7s → 10.6s
11.9×
Sentry, 139.8s → 15.7s
8.9×
Playwright, 12.8s → 1.47s
8.7×
less memory across the tested projects
6–26%

The editor side improved as well. The language server now speaks LSP and runs multithreaded, and the announcement reports more than 80% fewer failing commands and more than 60% fewer server crashes than 6.0.

Coming from 6.0 or from 5.x

TypeScript 7.0 keeps the defaults that 6.0 introduced and turns everything 6.0 deprecated into a hard error. The team recommends moving to 6.0 first. If you skipped 6.0, you meet all of these on your first tsc run:

Selected changes from the 7.0 announcement
OptionBehavior on 7.0What to do
stricton by defaultset it in your config if you relied on the old default
moduledefaults to esnextpin it if you emit CommonJS
rootDirdefaults to ./set "src" if your sources live there
typesdefaults to []list "node", "jest" and friends by name
baseUrl, AMD/UMD, ES5removedmove to paths and a modern target

Most teams will trip over the types: [] default first. Global types that used to arrive for free, like Node's process or a test runner's describe, now need an explicit entry:

{
  "compilerOptions": {
    "strict": true,
    "rootDir": "src",
    "types": ["node", "vitest/globals"]
  }
}

Two smaller changes deserve a test run: stableTypeOrdering can no longer be switched off, and template literal types now infer emoji as whole code points, so type utilities that parse strings can resolve differently than on 6.0.

No API until 7.1

TypeScript 7.0 ships without a programmatic API. The team says 7.1 will bring "a new (and different) API", so anything that drives the compiler from code has to wait. That includes the embedded-language tooling for MDX, Vue, Svelte, Astro and Angular.

This site is one of those cases. Its posts are MDX, so it stays on TypeScript 5.9, pinned in package.json so no install pulls 7.0 by accident, and moves to 6.0 first, as the team advises.

How I'd roll it out

  1. Jun 18, 2026

    7.0 RC. Run it in CI next to 6.0 and diff the diagnostics.
  2. Jul 8, 2026

    7.0 stable. Switch the CI type-check first, where the speedup pays back fastest.
  3. 7.1, expected 3–4 months after 7.0

    New programmatic API. Move editors and framework tooling once your frameworks support it.
  1. Move to 6.0 if you haven't, and fix its deprecation warnings there, one release at a time.
  2. Run npx tsc --noEmit on 7.0 in a branch. Most of what it surfaces is configuration.
  3. Switch the CI type-check step to 7.0. Your team will run a one-minute check before every push.
  4. Keep 6.0 through the compatibility package wherever a tool calls the compiler API, and revisit after 7.1.

Code that compiles on 6.0, with stableTypeOrdering on and no ignoreDeprecations, should compile the same on 7.0. The rest of the migration lives in tsconfig.json.

Sources

Volodymyr Chornous