Remix.run Logo
satvikpendem 2 hours ago

A very interesting project because I always thought TypeScript or at least some subset of it should be natively compiled.

It looks like others had a similar idea too, adding a "sound mode" to TypeScript, such as this project which is converting tsgo to Rust, also with LLMs.

https://news.ycombinator.com/item?id=48189156#48189573

https://tsz.dev/

pjmlp 27 minutes ago | parent | next [-]

It already exists for years, it is part of Microsoft's MakeCode efforts for kids.

https://makecode.com/language

https://www.microsoft.com/en-us/research/publication/static-...

Much saner than a vibe coded compiler.

jeswin an hour ago | parent | prev [-]

> such as this project which is converting tsgo to Rust

If you'd like to follow, here's my attempt at converting tsgo to typescript (called tsts [1]). Admittedly there's AI involved, but it's a very mechanical job. Going from golang to ts is not a very difficult problem, the other way around would have been way harder. The plan is to then compile tsts to binary via tsonic.

[1]: https://github.com/tsoniclang/tsts

satvikpendem an hour ago | parent | next [-]

Interesting, seems to be a very roundabout way of doing it. Have you tried compiling the current TypeScript implementation which is still in TypeScript, as tsgo is for TS 7? If so, what were the results?

jeswin an hour ago | parent [-]

Yep. Too dynamic.

IshKebab an hour ago | parent | prev [-]

Uhm... You're trying to port Typescript's Typescript-to-Go port back to Typescript? Am I missing something?

jeswin an hour ago | parent [-]

Yes. :) With the goal of compiling it to native code.

It's mostly a mechanical port. Hoping to do a Show HN maybe in a month.