Skip to content

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

TypeScript 7 migration guide: how to upgrade from TS 5.x to the 10x faster native Go compiler, with tsconfig changes and breaking-change fixes.

· · 12 min read

Updated: August 8, 2026

Monitor displaying a programming language file

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.

Run this yourself. The legacy tsconfig from this guide and the TypeScript 7 replacement, pushed through [email protected] and [email protected] side by side so you can read what each compiler says: typescript-7-deprecations/ in the Coding Dunia code-examples repo.

Corsa is the internal codename for TypeScript 7's ground-up native port of the compiler and language service from JavaScript to Go. 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 77.8 seconds to 7.5 seconds, a 10.4x 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, and production monorepo migrations keep proving it. 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.

Before you touch a single line, paste your own config into the TypeScript 7 Migration Readiness Checker. It reads your tsconfig.json and package.json in the browser, nothing gets uploaded, and scores exactly which of the changes below apply to your project, with a copy-ready fix for each one.

Want the whole picture rather than one guide? The TypeScript 7 hub lays out every article here in migration order, from the release overview through the framework support matrix to the benchmarks, with the readiness checker built into the page.

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 named for me first, as TS5107, with the option spelled out and an ignoreDeprecations switch to keep the build moving while I worked through them. 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.

Would rather not hand-write it? Our tsconfig generator builds a TypeScript 7-ready config from a few toggles, so you can copy a known-good baseline and adjust from there.

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 Upgrade from TypeScript 5 to 7 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

Clear every TS5107. TS 6 reports exactly the options and patterns that TS 7 removes, think of it as a migration linter you cannot silently ignore; "ignoreDeprecations": "6.0" buys you a green build in the meantime, and the goal is to delete that line before you move to 7. 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. Check your bundler in this order to confirm what actually needs to change:

  1. Confirm your bundler strips types itself (Vite, esbuild) rather than shelling out to tsc for compilation.
  2. Update moduleResolution to bundler in tsconfig, since both Vite and webpack expect it.
  3. Bump ts-loader to v10+ if you're on webpack, older versions depend on the removed Strada compiler API.

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

What Are the Most Common TypeScript 7 Migration Errors?

Deprecation debt is the accumulated set of compiler options and legacy patterns a codebase never cleaned up, and it's exactly what surfaces as a wall of errors the moment TypeScript 7 removes the flags TypeScript 6 only warned about. Across the three monorepos I moved to Corsa, the same five errors showed up first, in roughly the same order, every single time. 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.

What's the Bottom Line on the TypeScript 7 Migration?

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 Should You Go Next?

You've got the migration steps, and where you head next depends on your stack, the CI pipeline, the raw numbers, or the day-to-day patterns that made the compiler upgrade worth doing in the first place. Three follow-up guides cover the pieces this one intentionally left out, wiring the native compiler into GitHub Actions, benchmarking the speedup on repos your own size, and tightening the type patterns you write daily now that the checker runs ten times faster.

Check Your Own tsconfig.json

Paste it below for an instant readiness score against everything TypeScript 7 removed or changed. Runs in your browser, nothing is uploaded.

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 turns strict mode on by default when your tsconfig is silent, as TypeScript 6 already does. TypeScript 6 serves as the bridge release, upgrade to 6 first and clear every TS5107 deprecation 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 77.8 seconds on TypeScript 6 to 7.5 seconds on TypeScript 7, a 10.4x 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.
Can I migrate directly from TypeScript 5 to 7?
You can try, but don't. A direct TypeScript 5 to 7 migration hits every removed flag at once with cryptic native-compiler errors. The reliable path is 5 to 6 to 7: TypeScript 6 reports each option TS 7 removes as TS5107, naming the option and the version that drops it, and ignoreDeprecations 6.0 keeps builds green while you fix them one by one.
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.