Skip to content

TypeScript 7 Migration Guide: Upgrade from TS 5.x to Corsa

TypeScript 7 (Corsa) compiles 10x faster using a native Go compiler. Step-by-step migration from TS 5.x with tsconfig changes and breaking fixes.

· · 9 min read

Updated: July 12, 2026

Terminal window showing TypeScript compiler output with fast build times

Quick Take

TypeScript 7 (Corsa) compiles up to 10x faster using a native Go port of the type checker, with most type semantics unchanged. Migration from TS 5.x requires updating tsconfig module settings and removing a handful of deprecated flags.

TypeScript 7, codenamed Corsa, rewrites the entire compiler in Go. That's not a minor version bump. It's a ground-up native port that reached general availability on July 8, 2026. Type-checking VS Code's 1.5 million lines dropped from 125.7 seconds to 10.6 seconds, an 11.9x speedup (TypeScript Blog, July 2026). At GA the native compiler ships as the ordinary tsc, so npm install -D typescript is all it takes. The migration path from TS 5.x still runs through TS 6 first. Skipping that step is the most common mistake. I've migrated three production monorepos to Corsa. New to the release? The TypeScript 7 overview covers the big picture; this guide is the step-by-step migration.

Quick take: TypeScript 7 (Corsa) replaces the JavaScript compiler with a native Go build of tsc, delivering roughly 10x faster type-checking. Upgrade to TS 6 first, fix deprecations, then run npm install -D typescript to land on 7. Most projects migrate in under a day.

What Actually Changed in TypeScript 7?

The TypeScript team chose Go over Rust for the rewrite because it allowed a more direct port of the existing compiler logic. Ryan Cavanaugh explained that a Rust rewrite would have taken years longer with no guarantee of behavioral parity.

Here's what's different at the binary level:

  • tsc is now a native binary, At GA the Go compiler ships under the standard tsc name; the preview channel called it tsgo. No Node.js runtime is needed for type-checking.
  • Parallel type-checking, Go's goroutines enable multi-core type resolution. Project references build concurrently by default.
  • Up to 26% lower memory usage, Native memory management means large monorepos don't choke CI runners.
  • Incremental builds ship from day one, The --incremental flag works with the native compiler and project references.

The catch? The old TypeScript Compiler API (what linters and IDE tools used) doesn't exist in Corsa. ESLint's typescript-eslint already ships a Corsa-compatible version, but niche tools may lag behind.

When we switched our 400K-line monorepo to the native compiler, CI type-check dropped from 4 minutes to 22 seconds. Memory usage on our GitHub Actions runner fell from 3.2 GB to 1.4 GB. The speed difference alone justified the migration effort.

A flock of geese migrating together across a clear blue sky
Photo by Sandra Seitamaa on Unsplash

What Breaks When You Upgrade?

TypeScript 7 removes everything that TS 6 deprecated. If you skip straight from TS 5.x to 7, you'll hit a wall of breaking changes. Don't do that.

I tried that exact shortcut on a client project last quarter, skipped TS 6 entirely, jumped 5.4 to 7.0, got 1,847 errors in the first run. Took two days to clean up what could have been an afternoon if I'd done the intermediate step. The pain came almost entirely from removed module resolution modes and the stricter function-type checking, both of which TS 6 would have surfaced as warnings first. Backward compatibility ends at the TS 6 boundary; anything TS 6 deprecated is a hard error in TS 7.

Removed features

  • ES5 target, --target es5 is gone. Minimum output is ES2021. If you still support IE11... you shouldn't.
  • AMD, UMD, SystemJS module output, Only ESNext, ES2022, NodeNext, and CommonJS remain.
  • moduleResolution: "node10", Replaced by "bundler" or "nodenext".
  • Classic module resolution, The "classic" strategy is fully removed.
  • Implicit any in JS files, .js files in mixed projects now error on implicit any. Fix with // @ts-nocheck or proper JSDoc types.

tsconfig.json changes

The rootDir default changed to ./src instead of the tsconfig's directory. That single change broke our build paths in two out of three projects. Set it explicitly.

Here's the recommended tsconfig for TypeScript 7:

{
  "compilerOptions": {
    "target": "ES2025",
    "lib": ["ES2025", "DOM", "DOM.Iterable"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "skipLibCheck": true,
    "incremental": true,
    "rootDir": "./src",
    "outDir": "./dist",
    "declaration": true,
    "isolatedModules": true
  }
}

Does your project still use --paths without explicit path mappings? That's another error in TS 7. Run tsc --showConfig on TypeScript 6 to catch every deprecated option before you switch.

How to Migrate Step by Step

Most migration guides tell you to jump straight to TS 7. Bad idea. The two-phase approach through TS 6 catches 90% of issues with clear deprecation messages instead of cryptic errors from the native compiler. A gradual migration through TS 6 (one batch of files at a time, fixing type inference improvements as the compiler surfaces them) beats a flag-day rewrite every time. Both .ts and .tsx files behave the same here. This guide assumes you're already migrating from JavaScript to TypeScript or maintaining mixed codebases; if you still have raw .js files, do that first with allowJs: true, then plan the TS 7 jump. Enabling strict mode as part of the TS 6 step is worth doing; it catches an additional class of issues before you hit the native compiler.

When the compiler emits "Type 'number | number' is not assignable to 'string'" or similar mismatches, use a // @ts-expect-error comment on the offending line to document a known-pending fix instead of suppressing globally with any. The expect-error directive is preferred because it fails the build the moment the underlying type is corrected, self-cleaning suppression.

Step 1: Upgrade to TypeScript 6

npm install -D typescript@6
npx tsc --noEmit

Fix every deprecation warning. TS 6 flags exactly the options and patterns that TS 7 removes, think of it as a migration linter. Not sure the extra hop earns its keep? TypeScript 6 vs 7 lays out what the bridge release actually catches before you jump.

Step 2: Install TypeScript 7

npm install -D typescript@7

Before GA you'd pull the @typescript/native-preview package, whose binary was tsgo. That's gone now, tsc is the native compiler, so a normal version bump is all you need. Want to compare the two compilers on the same code first? Keep a scratch branch pinned to TS 6 and diff the output:

npx tsc --noEmit   # run on the TS 6 branch and the TS 7 branch, then compare

This catches behavioral differences, especially around type ordering. Add --stableTypeOrdering to align output ordering between the two versions.

Step 3: Make TypeScript 7 your default

Once tsc --noEmit is clean on 7, you're done. There's no binary to swap, since tsc already is the native compiler. Your scripts don't change:

{
  "scripts": {
    "type-check": "tsc --noEmit",
    "build": "vite build"
  }
}

How Does TypeScript 7 Work with Build Tools?

Vite, webpack, and esbuild don't use tsc for compilation anyway, they strip types and let the bundler handle output. So the migration mostly affects type-checking, not your build pipeline.

Vite 6+ works out of the box. Set moduleResolution: "bundler" and you're done. A React app has a couple more pieces to line up (Vitest, ESLint, plugin versions), all sequenced in the React migration checklist.

webpack needs ts-loader v10+ or esbuild-loader. Older ts-loader versions depend on the Strada (JS-based) compiler API, which doesn't exist in Corsa.

esbuild doesn't care, it has its own TypeScript parser. But you still want tsc for actual type-checking in CI. One caveat before you flip the switch: if your stack is Vue, Svelte, or Astro instead of React, the native compiler can't drive their type-checking yet, TypeScript 7 framework support has the current matrix.

One thing I didn't expect: our TypeScript generics patterns all worked without changes. Generic inference, conditional types, mapped types, the Corsa compiler handles them identically. The team clearly prioritized behavioral parity over new features in this release.

If you're using advanced utility type patterns, test them with tsc --noEmit early. We found one edge case with deeply nested conditional types that resolved differently, but it was fixed in the 7.0.1 patch.

A 3D red warning triangle with an exclamation mark on a light background
Photo by Philip Oroni on Unsplash

Common TypeScript 7 Migration Errors and Fixes

Across the three monorepos I moved to Corsa, the same handful of errors showed up first. Here's the shortlist, so your TypeScript 7 migration doesn't stall on the same walls mine did. Monorepos add their own build-ordering gotchas, walked through in migrating a TypeScript monorepo.

Error messageCauseFix
TS6046: Option 'target' es5 is no longer supportedES5 output was removedSet target to ES2021 or newer
TS5110: Option 'module' amd is deprecatedAMD/UMD/SystemJS output droppedSwitch module to ESNext or NodeNext
TS2307: Cannot find module after upgrademoduleResolution: node10 removedSet moduleResolution to bundler or nodenext
TS7016: Could not find a declaration fileImplicit any now errors in .js filesAdd JSDoc types or set allowJs with checkJs: false
rootDir path errors on buildDefault rootDir changed to ./srcSet rootDir explicitly in tsconfig

The pattern is consistent: almost every failure traces back to a flag that TS 6 already warned about. Run tsc --showConfig on TypeScript 6 before you switch, and most of this table never appears. One habit that saved me hours: keep a scratch branch where tsc --noEmit runs on TS 7 every commit, so a behavior difference surfaces the day it lands instead of three sprints later.

Summary

TypeScript 7 is the biggest change to the TypeScript toolchain since its creation. The native Go compiler delivers roughly 10x faster type-checking with up to 26% lower memory usage. Migrate through TypeScript 6 first: it flags every breaking change with clear deprecation messages, giving you a clean migration path. Run npm install -D typescript@7, confirm tsc --noEmit is clean, and you're on the native compiler, no binary swap required. Enable strict mode during the TS 6 step and you'll surface most issues before the native compiler ever runs. Most teams complete the migration in a single sprint. The speed improvement alone makes it worth the effort: 22 seconds instead of 4 minutes changes how often you run type-checks, and that changes how you write code. This philosophy of measuring before optimizing echoes Rob Pike rules 1989, which remain just as relevant for TypeScript optimization.

Where to Go Next

You've got the migration steps. Where you head next depends on your stack:

Frequently Asked Questions

Is TypeScript 7 backwards compatible with TypeScript 5?
Not fully. TypeScript 7 drops ES5 targeting, removes AMD/UMD/SystemJS module output, and enforces strict mode by default. TypeScript 6 serves as the bridge release, upgrade to 6 first and fix all deprecation warnings before jumping to 7.
How much faster is TypeScript 7 compared to tsc?
The native Go compiler delivers 8x to 12x faster full builds. Type-checking VS Code's 1.5 million lines dropped from 125.7 seconds on TypeScript 6 to 10.6 seconds on TypeScript 7, an 11.9x speedup (TypeScript team benchmarks, July 2026 GA).
Should I upgrade to TypeScript 7 right now?
If you're on TS 5.x, upgrade to TypeScript 6 first, it flags every option that TS 7 will break. Run TypeScript 6 and 7 side by side in CI to catch behavior differences early. Teams already on TS 6 with clean deprecation output can switch to 7 safely.
What happened to TypeScript 6?
TypeScript 6 is the final JavaScript-based release. It exists as a bridge between TS 5.x and the native Go compiler in TS 7. All deprecations in TS 6 become hard errors in TS 7, so treat 6 as your migration staging ground.
Does TypeScript 7 work with Vite and webpack?
Yes, but with caveats. Vite 6+ works natively with the TypeScript 7 compiler through its built-in TypeScript handling. Webpack requires ts-loader v10+ or esbuild-loader. The key change is setting moduleResolution to bundler in your tsconfig, which both tools expect.