Anders Hejlsberg, the chief architect of the Typescript language, known for creating languages such as C#, Delphi, and Turbo Pascal, recently introduced a new project aimed at developing a new compiler for Typescript called typescript-go (TSGO), built in GO. This new project, like the old compiler, is distributed under the Apache 2.0 license.
The current Typescript compiler, written in Typescript and compiled into JavaScript, poses scaling issues for large projects. Developers face significant delays when loading and checking code in integrated development environments, often sacrificing development convenience to reduce these delays. This leads to turning off code checking features in editors and the need for command line tools to quickly compile code for performance evaluation.
The proposed native compiler and tools for Typescript are expected to greatly increase compilation speed, reduce memory usage, and decrease code editor launch times. These high-performance tools will enhance the development process in modern code editors, allowing for quicker code checks across projects and enabling the implementation of advanced refactoring and code analysis techniques that were previously resource-intensive.
Developers anticipate that the new tools will result in a tenfold reduction in compilation time. The new TSC compiler prototype currently processes the VS CODE project base in 7.5 seconds, compared to the old compiler’s 77.8 seconds for the same operation. For other projects like Playwright, Typeorm, Date-FNS, TRPC, and RXJS, compilation times have also significantly decreased.
The development of the new compiler project began in October 2024 with a team of 9 Microsoft employees. A working prototype is already available for testing, and a preliminary version of command line tools with the new TSC implementation supporting type checking is set to be released by mid-year. The first full-function version capable of compiling projects and providing LSP services for development environments is expected by the end of the year.