TypeScript 7 is the TypeScript compiler rewritten in Go and shipped as a native program. The language is the same, the command is still tsc, and the npm package is still typescript; what changes is speed (full builds about ten times faster), a set of new defaults, and the removal of options that TypeScript 6 deprecated. TypeScript 7.0 was released on July 8, 2026, and the version on npm is 7.0.2.
npm install --save-dev typescript@latest
npx tsc --version
Version 7.0.2
One of the few differences you can see at the type level is how template literal types split strings. JavaScript stores strings as UTF-16 code units, and an emoji such as 😀 takes two of them:
TypeScript 6 split template literal types by code unit, like text[0]. TypeScript 7 splits them by code point, like [...text], so the emoji stays whole:
type HeadTail<S> = S extends `${infer Head}${infer Tail}` ? [Head, Tail] : never;
type Result = HeadTail<"😀abc">;
// TypeScript 7: ["😀", "abc"]
// TypeScript 6: ["\ud83d", "\ude00abc"]
Why TypeScript Was Rewritten in Go
Through version 6, the TypeScript compiler was itself written in TypeScript and ran on Node.js. On large codebases that meant slow builds, slow editor startup and high memory use.
Anders Hejlsberg announced the native port on March 11, 2025, in a post titled "A 10x Faster TypeScript". The new codebase was code-named Corsa, and the JavaScript one Strada. The team ported the existing compiler's code rather than redesigning the type checker, so the new compiler follows the same rules and reports the same errors. TypeScript 6.0 (March 2026) was the last release of the JavaScript codebase and served as a bridge: it deprecated everything TypeScript 7 would remove. TypeScript 7.0 followed on July 8, 2026.
How Much Faster TypeScript 7 Is
Full builds of open source projects, as published with the 7.0 release:
| Project | TypeScript 6 | TypeScript 7 | Speedup | Memory |
|---|---|---|---|---|
| VS Code | 125.7 s | 10.6 s | 11.9x | 5.2 GB to 4.2 GB |
| Sentry | 139.8 s | 15.7 s | 8.9x | 4.9 GB to 4.6 GB |
| Bluesky | 24.3 s | 2.8 s | 8.7x | 1.8 GB to 1.3 GB |
| Playwright | 12.8 s | 1.47 s | 8.7x | 1.0 GB to 0.9 GB |
| tldraw | 11.2 s | 1.46 s | 7.7x | 0.6 GB to 0.5 GB |
Those runs used the default of 4 type-checking workers. With --checkers 8 on the same machine, the VS Code build took 7.51 s (16.7x) and tldraw 1.06 s (10.6x), at the cost of more memory.
The editor gains as much. The language service now runs as a native language server: in the VS Code codebase, the time from opening the editor to seeing the first error in a file went from about 17.5 seconds to under 1.3 seconds. The speedup matters most for monorepos, CI pipelines and editors on big codebases.
What Stays the Same
- The command and the package.
npm install --save-dev typescriptandnpx tsc. On install, npm picks a prebuilt binary for your platform from optional dependencies such as@typescript/typescript-linux-x64, so there is nothing else to set up. - The language. The same syntax, the same type system, the same error codes.
- The results. The release notes state that practically any code that compiles cleanly with TypeScript 6.0, with the
stableTypeOrderingflag on and without anyignoreDeprecationssetting, should compile identically in TypeScript 7.0.
New Defaults
TypeScript 6.0 changed these defaults and TypeScript 7 keeps them. They only matter for options your tsconfig.json does not set:
| Option | New default | Effect if you relied on the old one |
|---|---|---|
strict | true | Projects that never set strict now get strict null checks, noImplicitAny and the rest |
target | es2025, the newest version before esnext | Output keeps modern syntax unless you set an older target |
module | esnext | ES module output unless you set nodenext or commonjs |
types | [] | Installed @types packages are no longer loaded automatically: add "types": ["node"] (["*"] restores the old behavior) |
rootDir | ./, the folder that holds tsconfig.json | With outDir set and the sources in src, error TS5011 until you set "rootDir": "./src" |
noUncheckedSideEffectImports | true | A side-effect import such as import "./styles.css" needs a module declaration (declare module "*.css";), which framework type packages usually provide |
stableTypeOrdering | Always on, cannot be turned off | Types are ordered the same way on every run, so error messages and .d.ts output do not depend on check order |
Removed Options and Syntax
Options deprecated in TypeScript 6 are errors in TypeScript 7:
target: es5, anddownlevelIteration, which only existed for ES5 output.moduleResolution: node(also callednode10) andclassic. Usenodenextorbundler.module: amd,umd,systemandnone.baseUrl(writepathsrelative to the tsconfig file) andoutFile(use a bundler).esModuleInterop: false,allowSyntheticDefaultImports: falseandalwaysStrict: false; all three are always on.
The compiler says exactly what to remove:
error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.
Two old syntax forms are errors too: module Foo { } for a namespace (write namespace Foo { }; declare module "foo" for a package is unaffected) and import assertions (assert { type: "json" } becomes with { type: "json" }).
index.ts(2,8): error TS1540: A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.
Changing module to namespace on line 2 fixes it, and the program prints 4.
On the command line, tsc file.ts in a folder that has a tsconfig.json now stops with error TS5112 instead of silently ignoring the config. Run tsc alone, or pass --ignoreConfig. In JavaScript files checked with JSDoc, TypeScript 7 reads types more like TypeScript does: @enum is no longer recognized, and a value used as a type needs typeof. The tsconfig page shows the replacement for each removed option.
Tools That Still Need TypeScript 6
TypeScript 7.0 does not ship a stable JavaScript API. require("typescript") returns only version information (version and versionMajorMinor), and the compiler functions that other tools call (createProgram, the language service) are not there; the package's typescript/unstable/* entry points are experimental and not a replacement. The release notes say the team expects TypeScript 7.1 to ship a new, different API. Until then, anything that imports the compiler as a library keeps using TypeScript 6:
- typescript-eslint (type-aware lint rules)
- Language tooling for Vue, Svelte and Astro files, Angular's template type checking, and MDX
- ts-node, which crashes on startup with TypeScript 7 installed
For those, TypeScript ships a compatibility package, @typescript/typescript6, which installs TypeScript 6 with its full API and a tsc6 command. With npm aliases, one project can have both: TypeScript 7 does the builds, and tools that import typescript get version 6.
{
"devDependencies": {
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
}
After npm install:
$ npx tsc --version
Version 7.0.2
$ npx tsc6 --version
Version 6.0.3
If you do not use any of those tools, install plain typescript and skip this.
New Command Line Options
The native compiler parses, checks and emits in parallel. Three new flags control it, and the release notes call --checkers and --builders experimental:
| Flag | What it does |
|---|---|
--checkers N | Number of type-checking workers per project (default 4). More can help on machines with many cores and costs memory; fewer suits small CI runners. |
--builders N | Number of projects built at the same time in a --build of project references. It multiplies with --checkers: 4 builders with 4 checkers can run 16 checkers at once. |
--singleThreaded | Turns all parallelism off, for debugging or tight memory limits. |
--watch was rewritten as well, on a Go port of the file watcher from the Parcel bundler.
Editor Support
For VS Code, the TypeScript team publishes a dedicated TypeScript 7 extension; once installed it becomes the default, and the command palette's "Disable TypeScript 7 Language Server" switches back to TypeScript 6. The latest Visual Studio enables TypeScript 7 automatically based on the workspace, and other editors (Neovim, Zed, Sublime Text, Emacs) connect to it through the Language Server Protocol. Projects that use Vue, Svelte, Astro or MDX files, or Angular templates, keep TypeScript 6 based editor support until TypeScript 7 exposes an API those tools can use. An Angular project can still run TypeScript 7's tsc for fast whole-project checks.
How to Upgrade to TypeScript 7
- Upgrade to TypeScript 6 first, if you are on 5.x:
npm install --save-dev typescript@6. Fix every deprecation error it reports instead of silencing it with"ignoreDeprecations": "6.0". - Turn on
"stableTypeOrdering": trueunder TypeScript 6 and fix anything it changes. This is the configuration the team states compiles identically in 7. - Set the options whose defaults changed if you depended on the old values, for example
"types": ["node"]and"rootDir": "./src". - Install TypeScript 7:
npm install --save-dev typescript@latest. RemovestableTypeOrderingafterwards if you like; it is always on in 7. - Check your tooling. If you use typescript-eslint, ts-node or a framework with template type checking, set up the TypeScript 6 alias shown above.
- Confirm the version with
npx tsc --version, and make sure CI installs from the updated lockfile.
tsgo and the Preview Builds
Before the release, the native compiler was published as @typescript/native-preview, whose command was tsgo, so it could be tried next to the JavaScript tsc. Articles from 2025 and early 2026 refer to tsgo. With 7.0 that name is gone from everyday use: the native compiler is tsc, and its nightly builds are published as typescript@next (7.1 development versions today).
Frequently Asked Questions
What is TypeScript 7?
TypeScript 7 is the first release of the TypeScript compiler rewritten in Go and compiled to a native program, instead of running as JavaScript on Node.js. It type-checks the same language with the same tsc command, and the release notes report full builds typically 8 to 12 times faster than TypeScript 6. It was released on July 8, 2026.
Is TypeScript 7 written in Go?
Yes. The compiler and language service were ported from TypeScript to Go (the project was code-named Corsa, and the JavaScript codebase Strada). You still install it from npm as the typescript package; npm picks a prebuilt native binary for your operating system and CPU.
Do I need to change my code for TypeScript 7?
Usually not the code, sometimes the config. TypeScript 7 removes options that 6.0 deprecated (target: es5, moduleResolution: node, baseUrl, outFile and others) and changes defaults such as strict: true and types: []. Code that compiles cleanly with TypeScript 6.0, with stableTypeOrdering on and no ignoreDeprecations, should compile identically.
What is tsgo?
tsgo was the command name of the native compiler's preview builds, published as the npm package @typescript/native-preview before the 7.0 release. In TypeScript 7 the native compiler is simply tsc in the typescript package, and nightly builds come from typescript@next.
Does typescript-eslint work with TypeScript 7?
Not directly. TypeScript 7.0 ships no stable JavaScript API, and tools like typescript-eslint, ts-node and the Vue, Svelte and Angular template checkers call that API. Keep TypeScript 6 installed for them through the @typescript/typescript6 package (an npm alias), and use TypeScript 7's tsc for builds. The TypeScript team expects TypeScript 7.1 to ship a new, different API.