Run this yourself. The legacy tsconfig from this guide and the TypeScript 7 replacement, pushed through
typescript@6.0.3andtypescript@7.0.2side by side so you can read what each compiler says:typescript-7-deprecations/in the Coding Dunia code-examples repo.
Correction, November 22, 2026. The first version of this guide, published on July 11, 2026, said TypeScript 7 cuts memory use by 50%. That number was wrong. Microsoft's TypeScript 7.0 announcement measures 6% to 26% lower memory across five real codebases: 6% on sentry, 18% on vscode and 26% on bluesky. I fixed the figure the next day but didn't leave a note on the page, and I should have. The guide now says up to 26%.
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 the VS Code codebase dropped from 125.7 seconds on TypeScript 6 to 10.6 seconds, an 11.9x speedup at the default four checkers (TypeScript Blog, July 2026 GA post). 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.
I've moved my own projects to TypeScript 7 and the native tsgo compiler, and the part I'd braced for went fastest: Claude Code worked through the migration and the API fixes it surfaced quickly. That's what happened in my repos, not a timing you should plan around, so the steps below still assume you'll read every error yourself.
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 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's explanation in the typescript-go repository was that the new codebase had to stay as compatible as possible in semantics and code structure. Languages that force a rethink of memory management and data structures, he wrote, suit a ground-up rewrite better than a port.
Here's what's different at the binary level:
tscis now a native binary, At GA the Go compiler ships under the standardtscname; the preview channel called ittsgo. The type checker no longer runs on Node.js, although the npm package'stscis still a small Node script that starts the native binary.- 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
--incrementalflag 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: 8.74.0, published on 23 November 2026, still declares a peer range of <6.1.0, and 8.73.0 refused 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.
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.
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 es5is gone. The lowest target 7.0.2 accepts is ES2015. If you still support IE11, you shouldn't. - AMD, UMD, SystemJS module output, What remains is
CommonJS,ES2015and later (ES2020,ES2022,ESNext),Preserve, and theNode16/NodeNextfamily. moduleResolution: "node10", Replaced by"bundler"or"nodenext".- Classic module resolution, The
"classic"strategy is fully removed. - Silent
strict, a tsconfig that doesn't mentionstrictnow gets it switched on (TypeScript 6 already does this), so implicitanyerrors appear in code that compiled on 5.x. Setstrictexplicitly either way.
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. Avoid pasting configs from the older Handbook tutorials, which still set target: es5; the TypeScript documentation map lists which pages to trust.
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 set baseUrl? That's another error in TS 7 (TS5102, "has been removed"); TypeScript 6 reports it as TS5101, and paths entries relative to the tsconfig replace it. Run tsc --noEmit on TypeScript 6 to catch every deprecated option before you switch; tsc --showConfig only prints the resolved config and exits 0 even on a legacy one.
TypeScript 5 against 7
TypeScript 7 is a new compiler for the same language. Between 5.x and 7 you get speed, new defaults and a shorter list of supported options, not new syntax to relearn. TypeScript 6 sits in the middle as the last JavaScript release: it still compiles what 5.x did, and it flags what 7 deletes.
| Area | TypeScript 5.x | TypeScript 7.0 |
|---|---|---|
| Compiler | JavaScript running on Node.js | Native Go binary, shipped as the regular tsc |
| Full-build speed | The JavaScript baseline | 7.7x to 11.9x faster than 6 on five codebases in Microsoft's July 2026 post; 4.4x to 5.8x on the three workspaces I measured |
| Memory | The JavaScript baseline | Lower in Microsoft's runs, by 6% to 26% depending on the codebase |
target: es5, AMD, UMD, SystemJS | Supported | Removed, TS5108 |
moduleResolution: node10 and classic | Supported | Removed |
baseUrl, esModuleInterop: false | Supported | No longer supported |
strict | Off unless you set it | On by default |
types | Every visible @types package loads | Defaults to [], so you list what you need |
rootDir default | Common root of the input files, so dist/index.js | The tsconfig directory, so dist/src/index.js and TS5011 |
| Programmatic API | Stable JavaScript API | Only under typescript/unstable/* in 7.0.2; the 7.1 beta adds typescript/sync and typescript/async |
The rootDir row is the one I ran myself (5.9.3 against 7.0.2); the rest comes from Microsoft's TypeScript 7.0 announcement. Until 7.1 is stable, tools that import typescript as a library stay on TypeScript 6 through the @typescript/typescript6 package, which is why the lint step in your CI may not move yet.
What didn't change is the type system. Generics, mapped types and NoInfer behave as they did, and the speed gain depends on the repo, which is why I'd measure your own before promising a number. The rows that cost you an afternoon are the quiet ones: types, strict and rootDir.
Upgrading from TypeScript 5 to 7
A two-phase migration through TypeScript 6 turns removed options into named errors: 6.0.3 reports
TS5107for each option TypeScript 7 drops (TS5101forbaseUrl) and acceptsignoreDeprecations: "6.0"while you fix them, whereas 7.0.2 reportsTS5108, "has been removed", with no escape hatch.
Most migration guides tell you to jump straight to TS 7. I wouldn't. The two-phase approach through TS 6 reports removed options as named TS5107 errors you can defer with ignoreDeprecations, instead of removals the native compiler gives you no way to defer. 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. I've taken an existing project from loose TS/JS to strict once, and it's work you want finished before the compiler changes underneath you, not mixed into the same diff.
When the compiler emits "Type 'number' is not assignable to type '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 (and TS5101, the code 6.0.3 uses for baseUrl). 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 the TypeScript 6 run so it orders types the way 7 does (7 always orders them that way and the flag can't be turned off there).
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"
}
}
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:
- Confirm your bundler strips types itself (Vite, esbuild) rather than shelling out to
tscfor compilation. - Update
moduleResolutiontobundlerin tsconfig, since both Vite and webpack expect it. - 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.
Edge cases after the obvious fixes
Clearing the removed options gets you a green tsc --noEmit. It doesn't get you a green project, because a few changes in the announcement change defaults instead of removing flags, and defaults fail quietly. I haven't reproduced every row below; they come from Microsoft's post, so treat them as a checklist of where to look, not as results.
| Change in 7.0 | What you'll notice | What to do |
|---|---|---|
types defaults to [] | Globals from @types packages (process, describe, it) stop resolving, with "cannot find name" errors | List the packages you need in types, or set ["*"] to restore the old behavior |
strict and noUncheckedSideEffectImports default to true | A project that never set strict suddenly reports new errors; unresolved import "./x.css" lines error | Set strict: false deliberately while you migrate, and add the missing type declarations for side-effect imports |
tsc file.ts in a folder with a tsconfig.json | The tsconfig is no longer silently ignored when you pass file paths | Pass --ignoreConfig if you really want a config-free compile |
baseUrl, esModuleInterop: false, alwaysStrict: false | Hard errors, same as target: es5 | Replace baseUrl with explicit paths, and drop the false values |
asserts on imports | Hard error | Use with instead: import data from "./x.json" with { type: "json" } |
JSDoc in .js files | Closure-style types, a bare ? type and postfix ! stop parsing | Rewrite them as normal TypeScript types in JSDoc, and use typeof for values in type positions |
| Template literal inference | An emoji now counts as one unit, not two | Re-test any string Length helper type that counted UTF-16 units |
The first row is the one I'd check before lunch. A missing types list produces errors far from the config that caused them, and it hits test setups hardest, because the describe and it globals live in an @types package. If you see a wall of "cannot find name" errors in spec files only, start there.
Tooling is the second edge. The 7.0 compiler ships without a stable programmatic API, so anything that imports typescript as a library needs the compatibility package. @typescript/typescript6 provides a tsc6 executable and re-exports the 6.0 API, and it's meant for tools like typescript-eslint. Editor support is the same story: Vue, MDX, Astro and Svelte projects keep using TypeScript 6.0 for now, and Angular template checking probably will too. For Angular projects the announcement suggests a split: TypeScript 7 for the project-wide tsc check and 6.0 for the editor.
My opinion: run the two compilers side by side for a full sprint before you delete the TS 6 pin. It costs one extra CI job, and it's the only way to catch the quiet default changes above before your users do.
Common 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 let you defer with ignoreDeprecations. Here's the shortlist, so your TypeScript 7 migration doesn't stall on the same walls. The first three rows, the TS7016 row and the rootDir row are what the compilers printed when I ran them for this page; the TS2307 row is the downstream error 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, strict mode switching on when the tsconfig is silent, and a changed default rootDir. Most surface twice, first as a deferrable TypeScript 6 deprecation error and later as a hard TypeScript 7 error, so the table below lists both wordings.
| Error message | Cause | Fix |
|---|---|---|
TS5108: Option 'target=ES5' has been removed | ES5 output was removed (TS 6 fails with TS5107) | Set target to ES2021 or newer |
TS5108: Option 'module=AMD' has been removed | AMD/UMD/SystemJS output dropped (TS 6 fails with TS5107) | Switch module to ESNext or NodeNext |
TS5108: Option 'moduleResolution=node10' has been removed | TypeScript 6 reports TS5107 here before 7 removes the option | Set moduleResolution to bundler or nodenext |
TS2307: Cannot find module after upgrade | moduleResolution: node10 removed | Set moduleResolution to bundler or nodenext |
TS7016: Could not find a declaration file | strict is now on when tsconfig doesn't mention it, so an npm package without types becomes an implicit any error | Install the package's @types, add declare module 'pkg'; in a .d.ts, or set strict explicitly |
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 reported. Run tsc --noEmit 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.
TypeScript 7.1 beta and a 7.0 migration
The beta asks nothing of you today. TypeScript 7.1 isn't released: on 20 November 2026 the npm latest tag is 7.0.2, the beta tag is 7.1.0-beta, and there's no release candidate. Microsoft's beta announcement says an RC follows about a month after the beta and the final release shortly after, with no dates. So migrate to 7.0.2 now, and read this section as a preview of what you'd inherit. The 7.1 beta checks I ran cover the one change that can fail a build.
I installed typescript@7.1.0-beta next to 7.0.2 in a scratch folder and ran whatever a single command could settle. The last column says which rows I ran and which are the announcement's word.
| 7.1.0-beta change | Ran it, or announcement says | What I saw |
|---|---|---|
--target es2026 and --lib es2026 | Ran it | The beta accepts both. 7.0.2 rejects them with TS6046, because its target list ends at es2025 and esnext. |
typescript/sync and typescript/async | Ran it | Both import on the beta. 7.0.2 only exports typescript/unstable/sync and its siblings, and typescript/sync fails with ERR_PACKAGE_PATH_NOT_EXPORTED. |
contentMappers in tsconfig.json | Ran it | Without --runExternalCode the beta stops with TS18068. With it and no mapper installed, TS18075. 7.0.2 ignores the key and exits 0. |
| Vue and Astro content mappers | Ran it | With @vue/content-mapper@4.0.0-alpha.0 or @astrojs/ts-content-mapper@0.2.0 installed, tsc --runExternalCode on the beta reported a deliberate type error inside a .vue and an .astro file. Both are early releases. |
| Stricter distributive conditional types | Ran it | A four-line helper compiled clean on 7.0.2 and failed on the beta with TS2344. |
| Mappers for Svelte, MDX, CSS Modules, Ember | Announcement says | Listed as prototyped or implemented. I didn't run any of them as tsc mappers. |
Import attributes in ambient modules, import source | Announcement says | Not run for this update. |
| Less time and memory, mui-docs 22.2 s to 11.9 s | Announcement says | Microsoft's figures, four checker threads. I didn't reproduce them. |
The row that matters for a migration is the distributive one. If your code has generic helpers whose constraints lean on a type parameter inside a conditional branch, 7.1 may flag them; 7.0.2 won't. The contentMappers row is the sneaky one: a config written for the beta passes quietly on 7.0.2, so a CI job pinned to 7.0.2 reads green without the mapper ever running. The framework support article linked above tracks which frameworks could use mappers.
The migration in short
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: 10.6 seconds instead of 125.7 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's 1989 rules of programming, which remain just as relevant for TypeScript optimization.
Related Guides
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.
- Wiring it into CI? TypeScript 7 in CI/CD sets up the native
tscin GitHub Actions and cuts type-check minutes. - Want the raw numbers first? TypeScript 7 benchmarks measure the speedup across small, medium, and large repos.
- Tightening day-to-day code? SOLID in TypeScript and TypeScript form validation go deeper than the compiler.
- Want the GA announcement itself? TypeScript 7.0 Is GA covers what actually shipped on July 8, 2026.
- The compiler changed, the syntax didn't. The TypeScript cheat sheet keeps the types, interfaces, generics, and tsconfig flags you'll still be writing afterwards in one scannable page.
- Changing package manager in the same sprint? pnpm vs Yarn vs npm benchmark times all four and lists what breaks, so you can keep the two migrations from blaming each other.
- Reviewing a lot of machine-written TypeScript? CI/CD quality gates for AI-generated code shows four GitHub Actions gates that sit well next to a faster type-check.
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.
Need to check package.json too, or want the full breakdown? Use the full TypeScript 7 Migration Readiness Checker.