vvek

TypeScript 7 in practice: the native compiler, the new defaults, and a safe way to upgrade

TypeScript 7.0 is a native Go port of the compiler. What changed, which options are removed, what tooling still needs 6.0, and how to run both side by side.

TypeScript 7.0 came out on July 8, 2026, and it is a different kind of release. The language did not change much. The compiler underneath did: it is now a native port written in Go, with shared-memory multithreading, and it ships as the ordinary tsc.

This post is a working developer's guide to what that means for your project: what got faster, what the new defaults do, what was removed, and how to upgrade without breaking your editor.

What changed, in one paragraph

The TypeScript team ported the existing compiler rather than redesigning the type checker, and says it kept the structure and logic of the original code so results stay consistent with TypeScript 6. In other words, the same program should produce the same errors. What you get is speed: parallel type checking, parallel project builds and a native file watcher.

If you have read our tour of Go 1.27, the irony is not lost: the most visible Go news of the year for many web developers is a tool they use without writing any Go.

The numbers, with a caveat

The release post lists full-build times for TypeScript 6 against 7 at the default of four checkers. These are Microsoft's own measurements on their chosen projects:

Project TypeScript 6 TypeScript 7 Speed-up
vscode 125.7 s 10.6 s 11.9x
sentry 139.8 s 15.7 s 8.9x
bluesky 24.3 s 2.8 s 8.7x
playwright 12.8 s 1.47 s 8.7x
tldraw 11.2 s 1.46 s 7.7x

Memory use dropped in every listed project, from 6% to 26%. In the editor, the time to the first error in a file of the VS Code codebase went from about 17.5 seconds to under 1.3 seconds.

Treat these as a guide, not a promise. Your project, your machine and your CI runner will give different results. Measure your own build before and after.

New flags

Three flags control the parallelism:

  • --checkers sets how many type-checker workers run. The default is 4, the minimum is 1.
  • --builders sets how many project-reference builds run in parallel under --build.
  • --singleThreaded turns parallelism off.

On a small CI container, more checkers may not help and can use more memory. On a laptop with many cores, raising the number is cheap to try. In the release post, eight checkers brought the vscode build down to 7.5 seconds.

New defaults

Several defaults changed. If your tsconfig.json relied on the old ones, you will notice.

  • strict is now true.
  • module defaults to esnext.
  • noUncheckedSideEffectImports is true.
  • types defaults to an empty list, so @types packages are no longer picked up automatically.
  • rootDir defaults to the directory containing the config.

That types change is the one most likely to surprise you. If globals like describe or process suddenly stop being found, list the packages you need explicitly:

{
  "compilerOptions": {
    "types": ["node", "vitest/globals"]
  }
}

Removed options

Some old options are now hard errors, not warnings. Among them:

  • target: es5 and downlevelIteration
  • moduleResolution set to node, node10 or classic
  • module set to amd, umd, systemjs or none
  • baseUrl
  • esModuleInterop: false and allowSyntheticDefaultImports: false

Two smaller changes are easy to miss. Import asserts is gone, so use with instead. And if the current directory has a tsconfig.json, passing file names on the command line is now refused unless you add --ignoreConfig.

Note

JavaScript checking was also reworked. Closure-style function types and standalone ? types are no longer supported, and @enum is no longer treated specially. If you check JS files with JSDoc, run the new compiler over them early.

What does not work yet

TypeScript 7.0 has no programmatic API. The team expects one in 7.1, and it will differ from the 6.0 API. Anything that imports typescript as a library depends on it:

  • Editor tooling for Vue, MDX, Astro and Svelte
  • Angular template checking in the editor (the CLI check with tsc works)
  • Webpack loaders

Those should stay on 6.0 for now.

A safe way to upgrade

You do not have to choose one version for the whole repository. The official guidance is to use npm aliases, so tools that need the library keep 6.0 while tsc runs 7.0:

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

The @typescript/typescript6 package also provides a tsc6 executable, so you can compare outputs from both compilers on the same code.

A sensible order:

  1. Create a branch and install 7.0 next to 6.0 as above.
  2. Run tsc and tsc6 on the same project and compare the error lists. They should match.
  3. Fix the config errors from removed options. Do this one option at a time.
  4. Add the types list if globals went missing.
  5. Move your CI type-check step to 7.0 first. It is the easiest win and carries no editor risk.
  6. Switch the editor and other tools once their support lands.
flowchart LR
  A[Install 7.0 beside 6.0] --> B[Compare tsc and tsc6 errors]
  B --> C[Fix removed options]
  C --> D[CI type-check on 7.0]
  D --> E[Editor and plugins when ready]

Is it worth doing now?

For a pure TypeScript project that builds with tsc or a bundler that only strips types, almost certainly yes. The CI saving alone tends to pay for the afternoon. For a project built around Vue, Svelte or Astro tooling, keep 6.0 for the editor and use 7.0 for the command-line check.

Either way, the change is mostly about configuration, not code. Your source files should compile as they did before.

Sources

Keep reading

A short email when we publish. Confirm once, unsubscribe any time.