To meet those goals, we’ve begun work on a native port of the TypeScript compiler and tools. The native implementation will drastically improve editor startup, reduce most build times by 10x, and substantially reduce memory usage. By porting the current codebase, we expect to be able to preview a native implementation of
↫ Anders Hejlsbergtsc
capable of command-line typechecking by mid-2025, with a feature-complete solution for project builds and a language service by the end of the year.
It seems Microsoft is porting TypeScript to Go, and WILL eventually offer both “TypeScript (JS)” and “TypeScript (native)” alongside one another during a transition period. TypeScript 6.x will be the JavaScript-based one and will continue to be developed until TypeScript 7.0, the Go-one, is mature enough. During the 6.x release cycle, however, there will be breaking changes and deprecations in preparation for 7.0.
Those are some serious performance improvements, but I’m sure quite a few projects are going to run into issues during the transition period. I hope for them that the 6.x branch remains maintained for long enough to reasonably get everyone on board the new Go version.
I seem to remember that the person who started swc had their sights set on extending their TypeScript transpiler to also support type checking to improve development speed by removing the reliance on tsc for that.
I’ll have to look into what became of that effort.
I’m still not sure how this is supposed to work. Is this a toolchain written in Go which turns TS in WASM? Is this transpiling TS into Go?
It turns TS into JS, I guess. It does exactly the same thing as the old TSC.
No, nothing like that. The typescript compiler was itself written in typescript. What’s new is that they’ve ported this compiler codebase to Go. So the compiler has been rewritten in Go from scratch, but following the structure and semantics of the original as much as possible to ensure total compatibility.
I think the most interesting aspect here is that they will now finally properely implement the LSP protocol. This should hopefully improve editor support outside of VSCode.
It’s cool, but one has to wonder the wisdom of implementing the compiler in javascript/typescript to begin with. Yeah, you gain some advantages with self-hosting but still…