TypeScript 7.0 RC Debuts Go-Based Compiler with 10x Speedups
The Microsoft team ports the compiler to Go, introducing shared-memory parallelism while maintaining structural parity with version 6.0.
The development team behind TypeScript has announced the Release Candidate (RC) for TypeScript 7.0, marking one of the most fundamental architectural shifts in the language's history. Over the past year, the compiler has been ported from its bootstrapped TypeScript implementation (which compiled to JavaScript) over to Go.
By leveraging native execution and shared-memory parallelism, the new compiler delivers performance improvements that are often up to 10 times faster than TypeScript 6.0. The release candidate is highly stable, having been tested against a decade-old test suite and deployed within massive, multi-million line-of-code production codebases.
The Go Port and Semantic Parity
Rewriting a compiler from scratch often introduces subtle bugs, behavioral drift, and regressions in type safety. To mitigate this risk, the TypeScript team chose to methodically port the existing codebase rather than start from a blank slate. As a result, the type-checking logic in TypeScript 7.0 is structurally identical to that of TypeScript 6.0.
This architectural parity ensures that the compiler enforces the exact same type semantics that developers currently rely on. Before reaching the RC stage, pre-release builds of the Go-based compiler were evaluated by internal Microsoft teams and external partners, including Bloomberg, Canva, Figma, Google, Lattice, Linear, Miro, Notion, Slack, Vanta, Vercel, and VoidZero. These teams reported drastic reductions in build times and a more fluid local development experience.
Parallelization Under the Hood
TypeScript 7.0 introduces parallel execution across several key compilation phases, including parsing, type-checking, and emitting.
- Parsing and Emitting: These phases are highly parallelizable because they can operate on individual files independently with minimal overhead, scaling efficiently with the number of available CPU cores.
- Type-Checking: Unlike parsing, type-checking involves complex, cross-file dependencies. The team has implemented specialized checker parallelization to coordinate these dependencies across threads, though it remains a more complex optimization target than file-isolated phases.
Managing the Transition and Side-by-Side Tooling
Because TypeScript 7.0 RC does not yet expose a stable programmatic API—which is slated for release with TypeScript 7.1 in several months—teams must carefully manage how they integrate the new compiler into existing toolchains. To facilitate this transition, Microsoft has released a compatibility package called @typescript/typescript6.
This package provides a tsc6 executable and re-exports the TypeScript 6.0 API, allowing developers to run both versions side-by-side. For tools like typescript-eslint that rely on peer dependencies pointing directly to the typescript package, the recommended approach is to use npm aliases.
To configure this, you can modify your package.json to map the default typescript import to the 6.0 compatibility layer while exposing the 7.0 compiler under a separate alias:
{
"devDependencies": {
"typescript": "npm:@typescript/typescript6@^6.0.0",
"typescript-7": "npm:typescript@rc"
}
}
With this configuration, running npx tsc will invoke the TypeScript 7.0 compiler, while external tooling that relies on the programmatic API will safely fall back to the TypeScript 6.0 compatibility layer.
Editor Support and Nightly Builds
For developers wanting to test the editing experience, the "TypeScript Native Preview" extension is available for VS Code. Built on the Language Server Protocol (LSP), this engine can also integrate with other modern editors and command-line tools like Copilot CLI.
Currently, nightly builds are published under the @typescript/native-preview package on npm, which exposes a binary named tsgo. Once TypeScript 7.0 reaches general availability, all stable releases, pre-releases, and nightlies will consolidate back under the standard typescript package on npm, and the binary will revert to the standard tsc name.
Sources & further reading
- TypeScript 7.0 RC — devblogs.microsoft.com
Ji-ho covers the increasingly tangled overlap between cloud architecture and security, drawing on a background as a penetration tester to keep his reporting grounded in real-world attack paths. He never lets a vendor claim go unquestioned and insists that every buzzword come with a proof of concept.
Discussion 0
No comments yet
Be the first to weigh in.