TypeScript 7's native Go compiler type-checked this site 5x faster, while a demo service with an older tsconfig broke in five places. What changed in 7.0 and the 7.1 beta, the ESLint and next build traps, a preflight script and a one-week migration plan.
- Published
- Reading
- 16 min
- Author
- Yaroslav Tsarenko

TypeScript 7 shipped on July 8 with a promise of 8–12x faster builds. On October 20 the 7.1 beta followed with a new API for tools, and a release candidate is due "in about a month." So this is the week a lot of teams are asking the same question: move now, or wait?
I tried both outcomes. On a copy of this site's codebase (Next.js 16, 2,379 files in the program including types from node_modules), tsc --noEmit finished in 1.4 seconds instead of 7.4. Zero new errors, zero tsconfig edits. A small Node service with a typical 2023 tsconfig, on the other hand, failed with three config errors, then two more, and then built into the wrong folder. Sound familiar? Spoiler: your code is almost certainly fine. What breaks is the config and the tooling around it.
Below: what changed, where the traps are (including a non-obvious one in next build), a script that finds the problems before you upgrade, and a one-week plan. Every output in this article is real: macOS, Apple M1 Pro, Node.js 25.7, TypeScript 5.9.3, 6.0.2, 7.0.2 and 7.1.0-beta.
What happened: TypeScript 7.0, the 7.1 beta and why now
TypeScript 7 is the compiler rewritten from scratch in Go. Same language, same types, but tsc is now a native binary that checks files on several threads. The timeline:
| Date | Event |
|---|---|
| March 23, 2026 | TypeScript 6.0: the last JavaScript-based release, every deprecated option flagged |
| June 18, 2026 | TypeScript 7.0 RC |
| July 8, 2026 | TypeScript 7.0, stable |
| August 3, 2026 | Next.js 16.3: next build can type-check with TypeScript 7 |
| October 20, 2026 | TypeScript 7.1 beta: a new API, es2026, faster again |
| ≈ end of 2026 | 7.1 RC and final (my estimate from the team's wording; no dates given) |
Why is this a November question? Because 7.1 closes the biggest gap in 7.0. TypeScript 7.0 has no JavaScript API: you can't require("typescript") and ask it for the types of a file anymore. That's exactly what typescript-eslint, the Vue and Svelte tooling and plenty of in-house scripts depend on. 7.1 brings an API back, but a completely different one. Which makes now the right moment to get the project ready: pay off the config debt, move the CLI to 7.0, and switch the tools over as they catch up.
Removed, now an error
- baseUrlpaths are now relative: ./src/*
- moduleResolution nodeonly nodenext or bundler
- target es5, AMD, UMDand downlevelIteration
New defaults (since 6.0)
- types: []@types are no longer picked up
- rootDir: ./output may land in dist/src
- strict and side-effect import checkson by default
Tooling
- tsc8–12x faster
- JavaScript APInone in 7.0, a new one in 7.1
How much faster, really
The official numbers from the 7.0 announcement, full builds, 4 checker threads (the default):
| Project | TypeScript 6 | TypeScript 7 | Speedup |
|---|---|---|---|
| vscode | 125.7 s | 10.6 s | 11.9x |
| sentry | 139.8 s | 15.7 s | 8.9x |
| bluesky | 24.3 s | 2.8 s | 8.7x |
| playwright | 12.8 s | 1.47 s | 8.7x |
| tldraw | 11.2 s | 1.46 s | 7.7x |
The same post quotes teams in production: Slack's CI type check went from about 7.5 minutes to 1.25, and Canva's time to the first error in the editor dropped from about 58 seconds to 4.8.
My own numbers are more modest, which is expected: the smaller the project, the bigger the share of process startup. Five runs of tsc --noEmit -p . --incremental false on a copy of this site, median:
- TypeScript 5.9.3: 7.38 s, 865 MB of memory;
- TypeScript 7.0.2: 1.40 s, 730 MB, 5.3x faster;
- TypeScript 7.1.0-beta: 1.14 s, 540 MB.
In next build, the "Running TypeScript" step went from 6.9 s to 1.26 s. On a single build that's a rounding error. But CI runs on every pull request and the editor type-checks on every keystroke. On a codebase like AllShip, with 290 tests and dozens of routes, a faster edit-check loop is something you feel every day. And if you write code with AI agents, they run tsc after every edit too, so the gain compounds.
What breaks in tsconfig: a live example
Take a typical Node API from 2023. TypeScript 5.9 compiles it without a single warning:
{
"compilerOptions": {
"target": "ES2022",
"module": "commonjs",
"moduleResolution": "node",
"baseUrl": ".",
"paths": { "@lib/*": ["src/lib/*"] },
"esModuleInterop": true,
"strict": true,
"outDir": "dist"
},
"include": ["src"]
}Install typescript@7.0.2 and run tsc -p . --noEmit:
tsconfig.json(5,25): error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.
tsconfig.json(6,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
Use '"paths": {"*": ["./*"]}' instead.
tsconfig.json(7,27): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?Three errors before the compiler has even looked at your code. The fix: set module and moduleResolution to nodenext, delete baseUrl, make the paths targets relative ("./src/lib/*"). Run it again:
src/index.ts(2,8): error TS2882: Cannot find module or type declarations for side-effect import of './polyfills'.
src/lib/env.ts(1,28): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.Both come from new defaults, and both are useful:
noUncheckedSideEffectImports: true. The lineimport "./polyfills"pointed at a file that didn't exist. TypeScript 5.9 stayed quiet for years; TypeScript 7 caught the dead import on the first run.types: []. TypeScript used to load every package innode_modules/@typesautomatically. Now it loads none: list your globals explicitly, e.g."types": ["node"]or["node", "jest"].["*"]restores the old behaviour, but an explicit list is better: fewer stray globals leaking in from some transitive@typespackage.
To be fair, both of these changes, and rootDir below, actually arrived in TypeScript 6.0. I ran the same config on 6.0.2 and got identical errors. The difference is elsewhere: 6.0 let you postpone the removed options with "ignoreDeprecations": "6.0", and 7.0 doesn't. So if you're on 5.x, moving to 7 is two jumps at once.
Add "types": ["node"], create the missing file, and this time run a real build, not just a check.
The sneakiest change: rootDir
tsconfig.json(9,5): error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
Visit https://aka.ms/ts6 for migration information.Read this one carefully. There's an error, but tsc still wrote the files (exit code 2 means "errors, output emitted anyway"). And it wrote them somewhere else:
| TypeScript 5.9 | TypeScript 7.0 without rootDir | |
|---|---|---|
| Entry file | dist/index.js |
dist/src/index.js |
| Modules | dist/lib/env.js |
dist/src/lib/env.js |
rootDir used to be inferred as the common folder of all input files, here src. Now it defaults to the folder containing tsconfig. If your Dockerfile or npm start runs node dist/index.js and your CI doesn't treat exit code 2 as a failure, you'll ship a container that doesn't boot. One line fixes it: "rootDir": "./src". After that the build is clean and the files are back where they were.
The rest of the new defaults worth knowing:
strict: true. If you never turned strict on, you may see hundreds of errors after the upgrade. Set"strict": falseexplicitly for now and enable the flags one at a time.module: esnext, andtargetdefaults to the latest stable ECMAScript version. If you relied on the defaults instead of writing them down, your output will change.- Removed outright:
target: es5,downlevelIteration,moduleset toamd,umd,systemjsornone,esModuleInterop: false,moduleResolution: classicandnode10. The full list is in the 7.0 announcement. - Template literal types no longer split emoji and other characters outside the Basic Multilingual Plane in half. If you have clever type-level string-length utilities, re-check them.
Next.js projects get better news. The config that create-next-app generates already uses moduleResolution: "bundler" with no baseUrl, and next-env.d.ts pulls in Next.js's own types. That's why TypeScript 7 went through this site without a single tsconfig change.
Should you move now? A short decision tree
Not every project should upgrade this week. Here's how I decide:
- Next.js or Node.js, no type-aware ESLint rules: move now. An hour of work for a daily win.
- typescript-eslint with type-aware rules (
recommendedTypeChecked,no-floating-promises): move, using the alias described below. - Vue, Svelte, Astro, MDX or Angular templates: use 7.0 for
tscin CI today, keep TypeScript 6 in the editor until 7.1. Content mappers in 7.1 exist precisely for these files. - Custom transformers, ts-morph, code generators that
require("typescript"): wait for 7.1, then port them to the new API. The old one isn't coming back.
The script further down shows who in your dependency tree talks to the compiler API. The list is usually longer than you'd guess.
Next.js: what next build does with TypeScript 7
Since Next.js 16.3, next build doesn't load the compiler API anymore; it runs your local tsc as a child process. The useTypeScriptCli docs describe this as the default, so upgrading is one command:
npm install -D typescript@^7The 16.2 line got a backport: there you enable CLI mode with experimental.useTypeScriptCli: true. Without it, next build with TypeScript 7 crashed with no explanation (SIGSEGV or SIGABRT), so update to the latest patch of that line.
Three things to know about CLI mode before your first red build:
- errors are printed by
tscitself, without the usual Next.js code frames; - the whole project described by your tsconfig is checked, tests and
.next/dev/typesincluded, not just the files in the build; typescript.ignoreBuildErrorsskips this step too.
The ESLint trap, and the alias trap behind it
Here's where it gets interesting. If you use typescript-eslint, npm i -D typescript@7 first prints npm peer-dependency warnings, and then:
typescript-eslint does not support TS 7.0.
Please see https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0 to run typescript-eslint using the TS 6 API.
Oops! Something went wrong! :(
Error: typescript-eslint does not support TS 7.0.typescript-eslint 8.72.2 declares peerDependencies: typescript >=4.8.4 <6.1.0. Support for 7.1 is in progress: on September 29 a maintainer wrote that the WIP version was looking more and more stable, and warned that the first version will perform roughly on par with TypeScript 6, because ESLint lacks batch type-query APIs.
The TypeScript team's official workaround is two packages under different names:
{
"devDependencies": {
"typescript": "npm:@typescript/typescript6@^6.0.2",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript-eslint": "^8.72.2"
}
}Check it:
$ npx tsc -v
Version 7.0.2
$ npx tsc6 -v
Version 6.0.3
$ node -p "require('typescript').version"
6.0.3The tsc command runs TypeScript 7, require("typescript") returns the 6.x API, and ESLint is happy. Problem solved, right?
Now run next build with that package.json:
Running TypeScript ...
Finished TypeScript in 7.1s ...Not 1.26 s. 7.1. I opened next/dist/lib/typescript/runTypeScriptCli.js (Next.js 16.3.8): it resolves typescript/package.json and runs the binary from that package's bin field, tsc or tsc6. The package named typescript is now version 6, so the build quietly type-checks with the old compiler. Nothing breaks; the speedup just disappears, and nobody notices.
What works: type-check as a separate step with the 7.x tsc, and skip that step inside next build. Only if CI runs the typecheck before the build:
{
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"build": "next build"
}
}import type { NextConfig } from "next";
const nextConfig: NextConfig = {
typescript: { ignoreBuildErrors: process.env.CI === "true" },
};
export default nextConfig;In CI the order is npm run typecheck && npm run lint && npm run build. GitHub Actions sets CI=true for you. Wherever the variable isn't set, locally for example, next build keeps type-checking on its own, just slower. Want the simple route? Leave everything as is and accept the slower step inside next build until typescript-eslint ships 7.1 support. Both choices are honest; what matters is knowing which one you've made.
What the 7.1 beta brings, and whether to install it yet
Install it with npm i -D typescript@beta. The headlines:
- A new API: entry points
typescript/sync,typescript/async,typescript/astand more.APIandProgramobjects implementDisposable, so you close them withusing, or memory leaks on the Go side. It's a new contract: old scripts need a rewrite. - Content mappers for
.vue,.svelte,.astroand.mdxfiles: an official extension point instead of hacks. - Faster again: on mui-docs the check went from 22.2 to 11.9 s and memory from 8,093 to 4,079 MiB. On my copy of this site it was 1.14 s versus 1.40 on 7.0.
--target es2026is stable.- One breaking change in the type system: inside a distributive conditional branch, the type parameter is now treated as a new, narrower type, so some intricate generic types will start failing.
There's an easy-to-miss trap with es2026. TypeScript checks types but polyfills nothing. Here's code using two ES2026 APIs, Map.prototype.getOrInsertComputed and Error.isError:
type Order = { customer: string; total: number };
const orders: Order[] = [
{ customer: "acme", total: 120 },
{ customer: "globex", total: 75 },
{ customer: "acme", total: 30 },
];
const byCustomer = new Map<string, number[]>();
for (const o of orders) {
byCustomer.getOrInsertComputed(o.customer, () => []).push(o.total);
}
console.log(Object.fromEntries(byCustomer));
console.log(Error.isError(new TypeError("boom")), Error.isError({ message: "boom" }));With "target": "es2026" it compiles cleanly. On Node.js 26:
{ acme: [ 120, 30 ], globex: [ 75 ] }
true falseOn Node.js 24, the same file crashes:
TypeError: byCustomer.getOrInsertComputed is not a functionI checked every API from the ES2026 list on three Node versions:
| API | Node 24.22 | Node 25.7 | Node 26.13 |
|---|---|---|---|
Error.isError, Array.fromAsync, JSON.rawJSON |
yes | yes | yes |
Uint8Array.fromBase64 |
no | yes | yes |
Iterator.concat, Map#getOrInsertComputed |
no | no | yes |
Math.sumPrecise |
no | no | no |
The takeaway: target and lib describe the environment your code will run in, not your TypeScript version. If production runs Node 24, stay on es2024 or lower. How to move to Node 26 and what's new there is in my Node.js 26 upgrade guide.
Should the 7.1 beta go into your production CI? I wouldn't. But running it locally on your project takes five minutes and tells you right away whether the distributive-types change bites you.
Preflight script: find the problems before you upgrade
Rather than fixing errors one at a time, I wrote a script that reads tsconfig and node_modules and reports everything at once: removed options, bad paths, a missing rootDir or types, packages that load the compiler API. It runs directly on Node.js 22.18+ (TypeScript files, no build step):
import { readFileSync, readdirSync, existsSync } from "node:fs";
import { join } from "node:path";
type Finding = { level: "error" | "warn"; message: string };
function readJsonc(path: string): any {
const text = readFileSync(path, "utf8");
let out = "";
let inString = false;
for (let i = 0; i < text.length; i++) {
const c = text[i];
if (inString) {
out += c;
if (c === "\\") out += text[++i];
else if (c === '"') inString = false;
} else if (c === '"') {
inString = true;
out += c;
} else if (c === "/" && text[i + 1] === "/") {
while (i < text.length && text[i] !== "\n") i++;
out += "\n";
} else if (c === "/" && text[i + 1] === "*") {
i = text.indexOf("*/", i + 2) + 1;
} else out += c;
}
return JSON.parse(out.replace(/,\s*([}\]])/g, "$1"));
}
const removed: Record<string, (v: unknown) => boolean> = {
baseUrl: () => true,
downlevelIteration: () => true,
target: (v) => /^es(3|5)$/i.test(String(v)),
moduleResolution: (v) => /^(node|node10|classic)$/i.test(String(v)),
module: (v) => /^(amd|umd|system|systemjs|none)$/i.test(String(v)),
esModuleInterop: (v) => v === false,
allowSyntheticDefaultImports: (v) => v === false,
alwaysStrict: (v) => v === false,
};
function checkTsconfig(dir: string): Finding[] {
const findings: Finding[] = [];
const config = readJsonc(join(dir, "tsconfig.json"));
const opts = config.compilerOptions ?? {};
if (config.extends) findings.push({ level: "warn", message: `extends "${config.extends}": check that file too` });
for (const [key, isRemoved] of Object.entries(removed)) {
if (key in opts && isRemoved(opts[key])) findings.push({ level: "error", message: `${key}: ${JSON.stringify(opts[key])} is removed in TS 7` });
}
for (const [alias, targets] of Object.entries<string[]>(opts.paths ?? {})) {
for (const t of targets) {
if (!t.startsWith("./") && !t.startsWith("../")) findings.push({ level: "error", message: `paths["${alias}"] → "${t}" must start with ./` });
}
}
if (opts.outDir && !opts.rootDir) findings.push({ level: "warn", message: "outDir without rootDir: TS 7 defaults rootDir to ./ (dist/src/...)" });
if (!opts.types) {
const typesDir = join(dir, "node_modules", "@types");
const installed = existsSync(typesDir) ? readdirSync(typesDir) : [];
findings.push({ level: "warn", message: `no "types": TS 7 loads none by default; installed @types: ${installed.join(", ") || "none"}` });
}
if (opts.strict === undefined) findings.push({ level: "warn", message: "strict is not set: TS 7 turns it on" });
return findings;
}
function apiConsumers(dir: string): string[] {
const root = join(dir, "node_modules");
if (!existsSync(root)) return [];
const names = readdirSync(root).flatMap((n) => (n.startsWith("@") ? readdirSync(join(root, n)).map((s) => `${n}/${s}`) : [n]));
return names.filter((name) => {
const pkgPath = join(root, name, "package.json");
if (!existsSync(pkgPath) || name === "typescript") return false;
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
return Boolean(pkg.peerDependencies?.typescript ?? pkg.dependencies?.typescript);
});
}
const dir = process.argv[2] ?? ".";
const findings = checkTsconfig(dir);
for (const f of findings) console.log(`${f.level === "error" ? "ERROR" : "warn "} ${f.message}`);
const consumers = apiConsumers(dir);
if (consumers.length) console.log(`warn packages that load the TypeScript API: ${consumers.join(", ")}`);
console.log(`\n${findings.filter((f) => f.level === "error").length} errors, ${findings.filter((f) => f.level === "warn").length + (consumers.length ? 1 : 0)} warnings`);
process.exitCode = findings.some((f) => f.level === "error") ? 1 : 0;Running it on the same 2023 Node API (with a comment and a trailing comma in tsconfig, as real configs tend to have):
$ node ts7-preflight.ts legacy
ERROR baseUrl: "." is removed in TS 7
ERROR moduleResolution: "node" is removed in TS 7
ERROR paths["@lib/*"] → "src/lib/*" must start with ./
warn outDir without rootDir: TS 7 defaults rootDir to ./ (dist/src/...)
warn no "types": TS 7 loads none by default; installed @types: estree, istanbul-lib-coverage, istanbul-lib-report, istanbul-reports, jest, json-schema, node, stack-utils, yargs, yargs-parser
warn strict is not set: TS 7 turns it on
warn packages that load the TypeScript API: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, @typescript-eslint/project-service, @typescript-eslint/tsconfig-utils, @typescript-eslint/type-utils, @typescript-eslint/typescript-estree, @typescript-eslint/utils, ts-api-utils, typescript-eslint
3 errors, 4 warningsLook at the @types list: of ten packages you need two (node and jest); the rest are transitive. That's exactly why types: [] as a default is a good thing. The script doesn't replace tsc; it puts everything in one list so you can size the work before you start. It exits with code 1 on errors, so you can drop it into CI for the migration week.
A one-week migration plan
For a typical mid-sized Next.js or Node.js project:
- day 1Auditpreflight script, clean build on TS 6.0
- day 1tsconfigrootDir, types, paths, moduleResolution
- day 2Toolingalias for ESLint, separate typecheck
- days 3–5Side-by-side CITS 7 and TS 6, compare errors
- after 7.1Drop the aliasonce typescript-eslint supports 7.1
- Clean build on TypeScript 6.0. If you're still on 5.x, move to 6.0 first and clear every deprecation warning. The TypeScript team recommends this step explicitly: code that compiles cleanly on 6.0 without
ignoreDeprecationsshould compile the same on 7.0. - Run the preflight script and fix tsconfig from its list:
rootDir,types,paths,moduleResolution. - Tooling. typescript-eslint with type-aware rules: the alias plus a separate
typecheck. Vue, Svelte or MDX: TypeScript 7 for the CLI only. - Side-by-side CI. For a week, run both
tsc6 --noEmitandtsc --noEmit. Any difference in errors is a signal to dig in before you drop version 6. - Diff the output if
tscemits JavaScript:diff -rof the old and newdistshows right away whether paths or target changed. - Once 7.1 ships and typescript-eslint supports it, drop the alias, and
next buildtype-checks on its own again.
A word on AI assistants. If your project is written together with Cursor or Claude Code, a fast tsc is the cheapest guardrail you can add: the agent verifies each edit in a second instead of seven. I wrote about guardrails like this for AI-built apps in vibe coding an MVP.
Pre-upgrade checklist
- The project builds cleanly on TypeScript 6.0 without
ignoreDeprecations - No
baseUrl; everypathstarget starts with./ -
moduleResolutionisnodenextorbundler -
rootDiris set explicitly whenever there's anoutDir -
typesis an explicit list (node,jest,vitest/globals...) -
strictis set explicitly,trueor temporarilyfalse - You know every package that calls
require("typescript") - typescript-eslint runs through the alias, and
tsc -vprints 7.x -
next buildreally type-checks with TypeScript 7 (check the TypeScript step's time in the log), or CI runstypecheckseparately -
targetandlibmatch the Node.js version in production, not the TypeScript version - CI fails on exit code 2, not only 1
What to do this week
Run the preflight script on your repo. Zero errors, or two or three? Move to 7.0 today; it's an hour of work. Long list? Start with TypeScript 6.0 and come back to 7 alongside 7.1.
And if you have a Next.js product where framework, TypeScript and Node.js upgrades have piled up and nobody wants to touch the config, that's familiar territory for me. More on how I run projects like that on the Next.js development page, and on running the App Router in production in my App Router guide.
Was this useful?
– likes · – views
Questions people ask
Is TypeScript 7 ready for production?
Yes, for type checking and builds. TypeScript 7.0 shipped as a stable release on July 8, 2026, and the current version is 7.0.2. The one gap is that 7.0 has no JavaScript API, so tools that call require('typescript'), such as typescript-eslint, keep running on TypeScript 6 through an npm alias for now.
Does Next.js support TypeScript 7?
Yes. Since Next.js 16.3 (August 3, 2026), next build type-checks by running your local tsc, so installing typescript@^7 is enough. On the 16.2 line the same mode is behind experimental.useTypeScriptCli. Type errors are then printed by tsc itself, without Next.js formatting.
Why does ESLint crash after upgrading to TypeScript 7?
typescript-eslint 8.x requires typescript below 6.1 and loads the compiler's JavaScript API, which 7.0 doesn't ship. The TypeScript team's workaround is to install @typescript/typescript6 under the name typescript and TypeScript 7 under another name, such as @typescript/native.
Should I upgrade to TypeScript 6 first?
It's the recommended path. Everything deprecated in 6.0 is a hard error in 7.0. If your project compiles cleanly on 6.0 without ignoreDeprecations, moving to 7.0 is usually a few lines in tsconfig.
When will TypeScript 7.1 be released?
The 7.1 beta shipped on October 20, 2026. The team said a release candidate would follow in about a month and the final release shortly after, which points to roughly the end of 2026. The announcement gives no exact dates.