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'll switch back to the Rust version

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.

The source code diverges anyway

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.

With the Go version, I had to port needless parts too.

I found myself porting functions related to e.g. emitting JavaScript code, but it’s not going to be used. But as the similarity of the code base matters, I couldn't skip them.

I'm not sure how fast the Go version would be

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 develop it as an open-source project

I'll release the source code as open-source, and the license will be Apache 2.0. This decision also has several reasons.

About monetization, I decided I don’t care.

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.

I want to promote swc/turbopack

As the creator of the swc project, I want to see it take the world over. The new TypeScript type checker is based on swc and it will integrate with swc smoothly.

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.

I expect a decent amount of contributions

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.

Repository: https://github.com/dudykr/stc

As a side note, this is under active development and it's far from done.