logoalt Hacker News

jerf • today at 1:55 PM • 2 replies • view on HN

One was not rewritten in Go. Typescript rewrote its compiler in Go, but that doesn't affect which runtime you use for the resulting Javascript code. Moreover this isn't producing a fork in Typescript as it is a replacement for the previous compiler, at least once they're done with it. The JS runtime forks and churn are not related to Typescript per se.


Replies

gen2brain • today at 2:20 PM

Yeah, after I posted I realized that Go remark was not correct, but again, I am confused how do you combine all that. JS I can read and understand (well, understand), I have seen it already, TS, I compile TS to JS right, and then I can choose any of the current available runtimes to run that code, correct? And final fat binary that is deployed has what, whatever runtime I choose to be? Huh, I think I guessed that right, I do use such apps, but never bothered to understand how they are actually packed.

mschuster91 • today at 2:34 PM

> Typescript rewrote its compiler in Go, but that doesn't affect which runtime you use for the resulting Javascript code.

It unfortunately has other implications, ts-loader (used by webpack) for example is not compatible with the new Go crap so you need to do weird pinning down to v6 to get your builds working again [1].

[1] https://github.com/TypeStrong/ts-loader/issues/1671

➕ show 2 replies