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.

· · 14 min read

Updated: October 1, 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 typescript@6.0.3 and typescript@7.0.2 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: every removed option then shows up at once, as a hard error. New to the release? The TypeScript 7 overview covers the big picture; this guide is the step-by-step migration.

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. typescript-eslint has no TypeScript 7 release yet: its latest version, 8.71.0, still declares a peer range of <6.1.0 and refuses to start against 7.0.2, so the lint step needs a two-alias setup until upstream catches up. Niche tools may lag behind in the same way.

How much of that speed you'll see is a separate question. Our benchmark write-up, linked at the end of this guide, measured the native tsc on the three TypeScript workspaces of the monorepo behind this site, and the gain landed between 4.4x and 5.8x, not the 10x on the announcement slide. The imported type surface decided the time far more than line count did. I'd plan around your own number, and measure it before you promise anyone a figure.

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

TypeScript 7 changes the compiler, not the language: the same type system on a native Go binary, so the upgrade work is mostly removed tsconfig options rather than new syntax to relearn.

Share this Post on X Bluesky

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 didn't want to argue this from the changelog, so I ran the shortcut. One legacy config (target: es5, module: amd, moduleResolution: node10), pushed through typescript@6.0.3 and typescript@7.0.2 on Node 20.19.5, the same script that sits behind the example linked at the top. TypeScript 6 fails with one TS5107 per option, names the option and offers "ignoreDeprecations": "6.0" to keep the build moving while you work through them. TypeScript 7 fails with TS5108, "has been removed", and there's no switch to flip. Same config, and only one of the two lets you defer the cleanup. 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 is now the directory that holds tsconfig.json, no longer the common root of your input files. I checked it with a two-file project: src/index.ts, outDir set to dist, no rootDir. TypeScript 5.9.3 emits dist/index.js. TypeScript 6.0.3 and 7.0.2 both emit dist/src/index.js and report TS5011, which names the setting you need but not the fact that your output layout just moved. Set rootDir explicitly and it never comes back.

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

A two-phase migration through TypeScript 6 turns removed options into named errors: 6.0.3 reports TS5107 for each option TypeScript 7 drops and accepts ignoreDeprecations: "6.0" while you fix them, whereas 7.0.2 reports TS5108, "has been removed", with no escape hatch.

Share this Post on X Bluesky

Most migration guides tell you to jump straight to TS 7. Bad idea. The two-phase approach through TS 6 reports removed options with clear deprecation messages instead of the hard errors the native compiler gives you. 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. If you're on webpack with ts-loader, read that loader's release notes before upgrading. It imports the compiler as a library rather than calling the binary, and TypeScript 7.0 ships without a stable programmatic API.

The whole build chain, tool by tool, including tsup, Rollup, SWC and Turbopack, is in TypeScript 7 and your bundler.

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 is fine with esbuild-loader, which has no TypeScript peer dependency and no interest in the compiler at all. ts-loader is the one to check: it loads the compiler as a library, and TypeScript 7.0 does not yet expose a stable programmatic API, so its readiness is a fact about the loader release you install rather than about your TypeScript version. The TypeScript 7 compatibility registry tracks that package by package, so you can check ts-loader before you touch the build.

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.

The type system itself is the part that didn't move. The code behind our TypeScript generics guide is pinned to typescript@7.0.2: I re-ran it while updating this page, it compiles under strict, executes with its assertions intact, and its four must-fail files still fail with the same codes the guide names. Generic constraints, mapped types and NoInfer behave as they did on 6. That's one small example set, not a proof about your codebase, but it fits the team's stated priority of behavioral parity over new features.

If you're using advanced utility type patterns, test them with tsc --noEmit early and diff the diagnostics against TypeScript 6. Deeply nested conditional types are where I'd look first, because they're where a rewritten checker is most likely to differ. I haven't seen it happen in the examples I've run, and I wouldn't take that as a guarantee for yours.

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. Here's the shortlist, so your TypeScript 7 migration doesn't stall on the same walls. The first three rows and the rootDir row are what the compilers printed when I ran them for this page; the TS2307 and TS7016 rows are the downstream errors I'd expect and haven't reproduced in the example. Monorepos add their own build-ordering gotchas, walked through in migrating a TypeScript monorepo.

Five changes account for nearly every TypeScript 7 migration stall: removed ES5 targeting, dropped AMD/UMD module output, removed node10 module resolution, implicit any now erroring in .js files, and a changed default rootDir. Most surface twice, first as a TypeScript 6 deprecation warning and later as a hard TypeScript 7 error, so the table below lists both wordings.

Share this Post on X Bluesky
Error messageCauseFix
TS5108: Option 'target=ES5' has been removedES5 output was removed (TS 6 warns with TS5107)Set target to ES2021 or newer
TS5108: Option 'module=AMD' has been removedAMD/UMD/SystemJS output dropped (TS 6 warns with TS5107)Switch module to ESNext or NodeNext
TS5108: Option 'moduleResolution=node10' has been removedTypeScript 6 reports TS5107 here before 7 removes the optionSet moduleResolution to bundler 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
TS5011: The common source directory of 'tsconfig.json' is './src'Default rootDir is now the tsconfig directory, so output moves to dist/src/Set 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 worth stealing: 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. How long the migration takes depends on how much deprecation debt your tsconfig carries, and TypeScript 6 is where you find out. The speed improvement alone makes it worth the effort: 7.5 seconds instead of 77.8 on the VS Code codebase 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. The follow-up guides below 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. On webpack, esbuild-loader is the safe path because it never touches the compiler; ts-loader imports it as a library, so check that loader's own release notes first. The key change either way is setting moduleResolution to bundler in your tsconfig, which both tools expect.