logoalt Hacker News

zarzavatlast Sunday at 1:23 PM1 replyview on HN

Yes, in the Monaco editor (https://microsoft.github.io/monaco-editor/).

It's not just typechecking, the typescript library is also the reference parser for TypeScript and reference emit. Emitting JS from TypeScript is non-trivial and non-local.

It's not just in browsers, you might want to run the typescript library on the edge or in some restricted environment where JS/WASM is OK but native code is not.

You may want to use the typescript library as a dependency in your own package. TypeScript becoming non-pure JS means that your library also becomes non-pure JS.


Replies

anon7000last Sunday at 3:18 PM

NodeJS can strip types internally without a straight TS dependency. I don’t think this matters, TS was a huge bottleneck for many build pipelines because it never parallelized well

show 1 reply