logoalt Hacker News

halaprotoday at 6:56 PM1 replyview on HN

Because TypeScript is a (legacy) mess.

There's effort towards "erasable syntax" but in practice not many really want to run anything more than basic TS in the browser, simply because you lose things like 'import _ from "lodash", which requires further setup (import maps) or is impractical in larger projects.

The real reason however is that TS is just a language, not part of any standard, and browsers are not just going to support random languages headed by corporations (Microsoft) and that are not community projects.


Replies

nikeeetoday at 8:00 PM

The "types as comments" proposal has a stated goal to not codify any semantics to the annotations.

This is not only due to implementation complexity, but also to keep TS to be able to change. Or even to build an entire different JS superset. With that proposal, even flow could be natively executed.

show 1 reply