logoalt Hacker News

dminikyesterday at 11:07 AM1 replyview on HN

Maybe because TypeScript is not valid JavaScript (yet)? If you don't strip types, your code doesn't work.


Replies

wildpeaksyesterday at 12:25 PM

It depends on the runtime: Node can run Typescript because it automatically strips types (which is so convenient during development).

But in browser, for now only the more limited JSDoc-style types can be shipped as-is indeed.