For over a decade, TypeScript has been the backbone of large-scale JavaScript applications, offering a robust type system, reliable tooling, and improved maintainability. However, developers working on massive projects have long shared one frustration—the TypeScript compiler (tsc) can be painfully slow.
Now, Microsoft is making a bold move to change that. The tech giant has officially confirmed that TypeScript’s compiler is being rewritten in Go. Codenamed “Project Corsa,” this transition is set to revolutionize TypeScript’s performance, with early benchmarks suggesting a staggering 10x improvement in compilation speeds.
Why Is Microsoft Rewriting TypeScript in Go?
Currently, the TypeScript compiler is written in TypeScript and runs on Node.js. While functional, it struggles with performance as projects grow. Microsoft’s decision to rewrite it in Go is primarily driven by speed and efficiency.
According to Microsoft, this rewrite won’t impact TypeScript’s syntax, language features, or JavaScript output. Instead, the new Go-based compiler will act as a standalone binary, removing the dependency on Node.js and drastically cutting down compile times.
Go vs. Rust vs. C++: Why Did Microsoft Choose Go?
Many developers expected Microsoft to choose Rust or C++ for this transition, but the company opted for Go due to several key advantages:
Familiar Structure: Go’s programming style aligns well with TypeScript’s existing architecture, making the migration smoother while keeping optimizations intact.
Memory Management Benefits: Unlike Rust, which requires manual memory handling, Go offers automatic garbage collection, reducing developer overhead.
Efficient Graph Processing & AST Traversal: TypeScript’s type-checking and compilation heavily rely on complex tree structures, which Go handles effectively.
Long-Term API Flexibility: Microsoft wants more control over internal compiler APIs, and Go’s design supports this goal.
Mind-Blowing Performance Gains—10x Faster Compilation
The most exciting aspect of this rewrite is the drastic boost in performance. Microsoft’s internal benchmarks reveal some jaw-dropping results:
Visual Studio Code (1.5 million lines of TypeScript) now compiles in just 7.5 seconds, down from 78 seconds—a 10x speedup!
Other major projects, including Playwright and TypeORM, have reported compilation speeds improving by 10x-13x.
While these results are based on Microsoft’s internal testing, they paint an optimistic picture for developers worldwide.
How Will This Impact Developers?
Microsoft is prioritizing a smooth transition to ensure minimal disruption to existing tools.
TypeScript’s ecosystem is deeply integrated with bundlers like Webpack, Vite, and esbuild, as well as various IDEs and language servers. To avoid breaking workflows, Microsoft has confirmed that:
Both the current JavaScript-based compiler and the new Go-based compiler will coexist temporarily.
Developers can switch to the faster Go-based compiler at their own pace.
Read also: BlockDAG Raises $200.5 Million: A new milestone that could set them apart
TypeScript’s API changes will be minimal, ensuring compatibility with existing projects.
When Can You Expect the New Compiler?
Microsoft has laid out a rough timeline for the transition:
Mid-2025: A preview release with basic type-checking.
Late 2025: A fully feature-complete version ready for production.
2026 & Beyond: Gradual phasing out of the JavaScript-based compiler as the Go version reaches full adoption.
For now, TypeScript 6.x will continue receiving updates, while TypeScript 7.0 will ship with the Go-based compiler.
The Future of TypeScript: Blazing-Fast Builds Ahead
This rewrite doesn’t change how developers write TypeScript—it only supercharges compilation speeds. Faster builds mean better developer productivity, improved CI/CD pipelines, and reduced wait times when working on large projects.
Microsoft is making one of the most significant improvements to TypeScript since its inception. While real-world benchmarks may vary, one thing is clear: TypeScript’s future is faster, leaner, and more efficient than ever before.
Stay tuned as we track further updates from Microsoft. The days of slow TypeScript compilation may soon be a thing of the past!