Hacker News new | ask | show | jobs
by hc-taway 1938 days ago
That the output is (or can be, with the right settings, anyway) very reasonable looking JS that would be easy to navigate and work on for anyone who'd been working on the same project in TS is a huge selling point. It's a nearly-instant, high-quality escape hatch if you decide you hate TypeScript, even if you're deeply into your project and have a ton of TS code already written. It's why comparisons to things like CoffeeScript don't hold up well, and (part of) why it's easier to sell to technical management than something like PureScript. Switching from TS to JS is very low-cost.

It's not just that the output is well-formed and sensible JS, it's that it's structured so similarly to the TS. With a recent EcmaScript version as your output, it's practically just the TypeScript with the type-related keywords & blocks stripped out.

As much as it could provide more and better features by breaking that guarantee, I think it's a brilliant decision & guideline, at least until WebAssembly is far more mature and the space starts to open up.

1 comments

It could provide a separate but official and supported parsing library. Going back to JS would not be a problem.