DEV Community

Cover image for TypeScript 7 Upgrade Guide: Migrating to the Go Compiler
Muhammad Moiz
Muhammad Moiz

Posted on Originally published at muhammadmoiz.dev

TypeScript 7 Upgrade Guide: Migrating to the Go Compiler

Originally published at muhammadmoiz.dev.

The TypeScript 7 upgrade is worth doing now for most projects. Version 7.0 (currently 7.0.2) swaps the JavaScript compiler for a native one written in Go, and full builds typically run 8 to 12 times faster. If your code already compiles cleanly on TypeScript 6.0, it should compile the same way on 7.0. What can break are your tsconfig defaults and any tool that calls the TypeScript API, so plan for those two things before you bump the version.

This guide covers what changed, which projects should upgrade first, the tsconfig settings that now fail, and a step-by-step migration that keeps ESLint and framework tooling working. Everything here was checked against the official release notes and the npm registry in November 2026.

What is TypeScript 7, and why is it so much faster?

TypeScript 7 is the "native port" the TypeScript team has been building over the last couple of years. It keeps the type system and command line from 6.0, but the compiler itself now runs as a compiled Go binary instead of JavaScript inside Node.js. Two things make it fast: native code, and parallel type checking spread across several worker threads.

The release post publishes benchmarks on well-known open source codebases. These are full builds, TypeScript 6 against TypeScript 7 with the default settings:

Codebase TypeScript 6 TypeScript 7 Speedup
VS Code 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

Memory use also dropped, by between 6% and 26% on those projects. In the editor, Microsoft says the time to see the first error after opening a file in the VS Code repo went from about 17.5 seconds to under 1.3 seconds.

For a business, that translates into shorter CI runs, faster pull request checks and an editor that stops freezing on large monorepos. On a small app the gain is smaller in absolute terms, but it still shows up every time a developer saves a file.

New flags you can tune

TypeScript 7 adds a few experimental controls for parallelism:

  • --checkers sets how many type-checker workers run. The default is 4.
  • --builders sets how many project references build in parallel under --build.
  • --singleThreaded turns parallelism off, which helps when debugging or on small CI machines.

Be careful combining them. Four checkers multiplied by four builders can mean up to 16 checkers competing for CPU and memory at once.

Should you upgrade to TypeScript 7 yet?

It depends on what your toolchain looks like. TypeScript 7.0 ships without a programmatic API, and any tool that imports typescript as a library to read types cannot use 7.0 directly yet. A new, different API is planned for 7.1, which is in beta as of this writing.

Here is a quick way to decide:

Your setup Recommendation
Plain tsc for type checking (Next.js, React, Node.js backends) Upgrade, and keep 6.0 installed alongside for tools
typescript-eslint with type-aware rules Run 7.0 for tsc, keep 6.0 for ESLint
Vue, Svelte, Astro or MDX (Volar-based tooling) Stay on 6.0 in the editor for now
Angular Use 7.0 for CLI type checks, 6.0 for editor template checking
Custom scripts or codegen using the compiler API Wait for the 7.1 API, then rewrite against it

The typescript-eslint point matters for most teams. Its maintainers confirmed in July that the linter is not compatible with TypeScript 7 because there is no API to build on, and the package's peer dependency range stops below 6.1. If you replace typescript with 7.0 in place, npm install complains and ESLint can crash.

The tsconfig changes that will break your build

TypeScript 6.0 deprecated a list of old options. In 7.0 those deprecations became hard errors. Several defaults also changed, which can surprise you even if your config looks fine.

Defaults that changed

  • strict is now on by default. Projects that never set it will suddenly get strict checks.
  • module defaults to esnext, and target defaults to the ECMAScript version just before esnext.
  • types defaults to an empty array, so global types like @types/node or @types/jest are no longer picked up automatically. Use ["*"] to get the old behaviour, or better, list what you need.
  • rootDir defaults to the folder containing tsconfig.json. If your sources live in src/ and you emit to dist/, set rootDir explicitly or your output paths will shift.
  • noUncheckedSideEffectImports is on, so a side-effect import like import "./polyfills" must resolve to a real file.

Options that now fail

  • target: "es5" and downlevelIteration
  • moduleResolution: "node" (also called node10) and moduleResolution: "classic"
  • module set to amd, umd, systemjs or none
  • baseUrl (rewrite paths so they are relative to the project root)
  • esModuleInterop: false, allowSyntheticDefaultImports: false and alwaysStrict: false
  • assert on imports (switch to with) and the module keyword for namespaces

Here is an illustrative before-and-after for a typical older Node.js project:

 {
   "compilerOptions": {
-    "target": "es5",
-    "moduleResolution": "node",
-    "baseUrl": ".",
-    "paths": { "@/*": ["src/*"] },
+    "target": "es2022",
+    "module": "nodenext",
+    "moduleResolution": "nodenext",
+    "paths": { "@/*": ["./src/*"] },
+    "rootDir": "./src",
+    "types": ["node"],
     "outDir": "./dist",
     "strict": true
   }
 }
Enter fullscreen mode Exit fullscreen mode

If you write type definitions in JavaScript with JSDoc, also review the JavaScript changes: @enum is gone, values can no longer be used as types (use typeof), and some Closure-style syntax is no longer understood. The TypeScript team tracks the full list in a CHANGES.md file in the typescript-go repository.

Two monitors on a desk showing source code in a dark-themed editor
Photo: Fotis Fotopoulos on Unsplash

How to upgrade to TypeScript 7, step by step

This is the order I recommend. It keeps every step small enough to roll back.

  1. Get to TypeScript 6.0 first. Run npm install -D typescript@6 and fix every deprecation warning. Remove any ignoreDeprecations setting and turn on stableTypeOrdering, since 7.0 always behaves that way. Microsoft says code that is clean under those conditions should compile identically on 7.0.
  2. Fix your tsconfig. Set rootDir, list your types, replace baseUrl and move off node10 resolution, as described above.
  3. Install 7.0 next to 6.0. Microsoft publishes a compatibility package, @typescript/typescript6, that provides a tsc6 binary and re-exports the 6.0 API. Aliasing it lets ESLint and other API consumers keep importing typescript while your build uses 7.0.
  4. Point your scripts at the native compiler. Update package.json so CI and local checks run the 7.0 tsc, with tsc6 available as a fallback.
  5. Switch the editor. In VS Code, install the "TypeScript 7" extension (TypeScriptTeam.native-preview). If you use Vue, Svelte, Astro or MDX, keep the 6.0 language service for those files for now.
  6. Compare results in CI. Run both compilers on one branch for a few days. If the errors match, remove the 6.0 type-check step.

A package.json set up this way could look like the example below. Check the exact versions on npm before you copy it.

{
  "devDependencies": {
    "typescript": "npm:@typescript/typescript6@^6.0.2",
    "@typescript/native": "npm:typescript@^7.0.2"
  },
  "scripts": {
    "typecheck": "tsc --noEmit",
    "typecheck:legacy": "tsc6 --noEmit"
  }
}
Enter fullscreen mode Exit fullscreen mode

Confirm which compiler runs: In this setup the 7.0 package supplies the tsc command and the compatibility package supplies tsc6. After installing, run npx tsc -v and npx tsc6 -v to confirm each one reports the version you expect before you trust the CI results.

What's coming in TypeScript 7.1

TypeScript 7.1 entered beta on October 20, 2026 (install it with npm install -D typescript@beta). As of November 26, npm shows 7.0.2 as the latest stable version and 7.1.0-beta as the beta, with no release candidate yet. The team said the RC would come about a month after the beta.

The headline changes:

  • A new programmatic API, split into entry points such as typescript/sync and typescript/async. It is a different shape from the old one, so tools like typescript-eslint will need real work to adopt it. Notably, it does not load tsconfig.json by itself.
  • Content mappers, a plugin point meant for file types that embed TypeScript, like Vue, Svelte, Astro and MDX. This is the path for those frameworks to move to 7.x.
  • --target es2026, covering features like Array.fromAsync() and Math.sumPrecise().
  • More speed. The beta reports --noEmit runs about 1.2x to 1.9x faster than 7.0, with 15% to 50% less memory on the sample projects.
  • One stricter check. Distributive conditional types now narrow the type parameter more aggressively inside a branch, which can produce new errors in heavily generic code.

If you maintain tooling, start testing against the 7.1 beta now. If you only run tsc, upgrading to 7.0 today and moving to 7.1 when it lands is a sensible path.

What this means for app owners

If you own a product rather than write the code, the TypeScript 7 upgrade is one of the rare tooling changes with a clear payback: faster builds, shorter CI bills and developers who spend less time waiting. It is also a good time to clear out years of old config, because 7.0 forces it anyway.

The risk is in the details. A missed rootDir can change your build output, and swapping the typescript package without the 6.0 alias can quietly break linting in CI. Treat it like any dependency upgrade: do it on a branch, run both compilers side by side and roll out once the results match.

If your React or Next.js codebase needs this kind of upgrade along with a general health check, I can help through my React development and Next.js development services. If you're running a Node.js backend, it's worth pairing this upgrade with the patches from the Node.js October 2026 security release.

Sources


I'm Muhammad Moiz, a full-stack developer who builds web apps, SaaS and POS systems, and takes AI-built apps (Lovable, Bolt, Replit) to production. Get in touch.

Top comments (0)