Open-sourcing the new TypeScript type checker
For context, I'm the creator of the swc project and I previously announced that I would use Go for the new TypeScript type checker.
I'm announcing two things about the new TypeScript type checker.
I was working on the Rust-based TypeScript type checker before switching to Go. But I decided to switch back to Rust. There are several reasons for this.
While working on the Go version, I found that the code was diverging from the official TypeScript compiler source code. Therefore, I would have to do a lot of work on each release anyway. Of course, updating the Go version would be easier as the code is similar, but updating the Rust-based one is not a hard task for me anyway.
As it's based on codegen, there is an enormous amount of inefficient code. But the Rust version is different. It's not highly optimized, but still, it's fast.
I'll release the source code as open-source, and the license will be Apache 2.0. This decision also has several reasons.
This is the most important reason. I wanted a fair reward for my hard work, but I also agree that a fast TypeScript type checker is similar to infra, and should be open-sourced as someone said. And I concluded that this point was more important.
Turbopack, a successor of Webpack, is also based on swc and it also uses the system of swc. As type checking is one of the slowest part of the development cycle, I think Turbopack can provide a gratifying developer experience.
There are lots of people suffering from the slowness of the official TypeScript type checker, especially large companies. Once it's ready, they will be able to save an enormous amount of time. I expect large companies to donate or provide developer time afterwards.
As a side note, this is under active development and it's far from done.© DongYoon Kang.RSS