DEV Community

Discussion on: Let's rewrite Typescript in Rust!

Collapse
 
willm profile image
Will Munn

This is a very important point and it's the same for SWC. From what I've seen all it does is strip the types. You can quite happily "compile" what's actually invalid typescript:

const name: number = 'foo';
Enter fullscreen mode Exit fullscreen mode

to

var name = 'foo';
Enter fullscreen mode Exit fullscreen mode

So really this is not an alternative to tsc, you might as well write javascript. What would be really cool is if their was a true typescript compiler written in rust/c++/go. I've been searching for this, but I don't think it exists.

Thread Thread
 
doitadrian profile image
Adrian Smijulj

Do you know maybe, was there any movement in the meantime?

Was searching for the same thing, and could not find anything.