Why Microsoft Is Rebuilding TypeScript in Go for 10× Faster Compilation
Microsoft announced a native Go implementation of the TypeScript compiler that dramatically cuts build times and memory usage, promising a ten‑fold speed boost for large projects and laying the groundwork for next‑generation AI‑assisted development tools.
Microsoft announced that it will continue to develop a native implementation of the TypeScript compiler and tooling, a move expected to significantly improve editor startup time, reduce build time, and dramatically lower memory consumption.
TypeScript is built on JavaScript, and according to chief architect Anders Hejlsberg, JavaScript has inherent limitations. He explained that while JavaScript is optimized for UI and browser workloads, it is not well‑suited for compute‑intensive tasks such as compilers and system‑level tools.
Hejlsberg noted that developers frequently encounter out‑of‑memory errors as codebases grow, suggesting that JavaScript may have reached its performance ceiling for this scenario.
The codebase is currently being ported to Go to achieve a native implementation. Hejlsberg highlighted that Go provides low‑level language features, precise data‑layout control, garbage‑collected memory management, and strong concurrent access capabilities, all of which are ideal for their goals.
The full native version is slated for release later this year, but the early implementation already supports many popular TypeScript repositories, including VS Code, Playwright, TypeORM, and date‑fns.
Performance benchmarks show the JavaScript‑based TypeScript compiler needs 77.8 seconds to compile the VS Code codebase, whereas the native implementation completes the same task in just 7.5 seconds—a ten‑fold improvement. For Playwright, compilation time dropped from 11.1 seconds to 1.1 seconds.
In a blog post, Hejlsberg expressed excitement about the opportunities this speed boost creates, stating that previously unattainable features are now within reach, enabling instant, comprehensive error reporting, advanced refactoring, and deeper insights that were once too costly to compute. He also mentioned that this new foundation will empower the next generation of AI tools to enhance the developer experience.
Microsoft plans to release the native implementation as TypeScript 7.0 once it reaches feature parity with the current JavaScript‑based TypeScript 5.8. The JavaScript version will continue as the 6.x series, with deprecations and changes to keep it aligned with the native codebase.
Some projects will migrate to native TypeScript 7 upon its release, while others may remain on the JavaScript‑based 6.x series due to API dependencies or legacy configurations. Hejlsberg reassured developers that the 6.x line will be maintained until TypeScript 7+ matures sufficiently for a smooth upgrade path.
Microsoft will share more details in the coming months, with a FAQ already prepared and a live announcement scheduled for March 13 on the TypeScript Discord channel.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
