TypeScript 7.0 Rewrites the Compiler in Go for Up to 12x Faster Builds

Microsoft’s latest TypeScript release brings a native Go-based compiler, promising dramatically faster builds and lower memory use.

Microsoft has announced the release of TypeScript 7.0, one of the most significant updates in the language’s history. Unlike many previous releases, the big story this time is not a long list of new syntax features. Instead, TypeScript 7.0 focuses on speed.

The headline change is that the new version introduces a native port of the TypeScript compiler and tooling, written in Go. According to Microsoft, the new implementation brings native-code performance, shared-memory multithreading, and a series of optimizations that typically result in 8x to 12x faster full builds on large real-world projects.

Microsoft says TypeScript 7.0 was designed to stay compatible with the existing compiler while moving the implementation to native code. The new Go-based port was written as faithfully as possible to the original codebase, keeping the same structure and logic where practical to preserve consistent results between the old and new compilers.

The performance numbers are more than impressive. In Microsoft’s benchmarks, the VS Code codebase dropped from 125.7 seconds with TypeScript 6.0 to 10.6 seconds with TypeScript 7.0, an 11.9x improvement. Sentry dropped from 139.8 seconds to 15.7 seconds, while Bluesky, Playwright, and tldraw saw speedups ranging from 7.7x to 8.9x.

TypeScript 7 is now 10 times faster.
TypeScript 7 is now 10 times faster.

Memory usage has also improved. In the same tests, TypeScript 7.0 used less aggregate memory across several large projects, with reductions from 6% to 26%.

Editor responsiveness is another improved area. Microsoft says opening a file with an error in the VS Code codebase previously took about 17.5 seconds before the first error appeared. With TypeScript 7.0, that time is under 1.3 seconds, making the experience over 13x faster.

The new release also introduces parallelization controls. TypeScript 7.0 can perform many build steps in parallel, including parsing, type-checking, and emitting. By default, it uses four type-checking workers, but developers can adjust this with the new --checkers flag. On systems with more CPU cores, increasing checkers can deliver higher performance, usually at the cost of more memory usage.

For monorepos and projects using project references, TypeScript 7.0 adds a new --builders flag, allowing multiple project reference builders to run at once. However, Microsoft warns that the interaction between --checkers and --builders should be handled carefully, since increasing both can multiply active type-checking workers.

There is also a new --singleThreaded option to disable parallelization entirely. This can be useful for debugging, comparing behavior between TypeScript versions, or running builds in limited environments where extra worker processes are not desirable.

Another important improvement is the completely rebuilt --watch mode. TypeScript 7.0 now uses a new file-watching foundation based on Parcel’s watcher, ported to Go.

There are also several configuration and compatibility changes to watch for. TypeScript 7.0 adopts TypeScript 6.0’s newer defaults and turns some previously deprecated options into hard errors. Notably, strict is now enabled by default, module defaults to esnext, and stableTypeOrdering is enabled by default and cannot be turned off.

Beyond performance and configuration changes, TypeScript 7.0 also brings more natural handling of Unicode code points in template literal types. Previously, certain Unicode characters represented by surrogate pairs could be split in ways that were technically consistent with JavaScript’s UTF-16 indexing but not usually what developers intended. TypeScript 7.0 now handles these cases more naturally during type inference.

For additional details, see the official announcement on Microsoft’s Dev Blogs.

Image credits: Microsoft

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *