Hacker News new | ask | show | jobs
by ceronman 3557 days ago
If you implement TypeScript as a Babel plugin, you would likely lose all the superb IDE support that TypeScript has. Which is one of the major selling points of TypeScript IMO. When your language is unstable like in a typical Babel setup, any number of features might be on or off, the static analysis done by IDEs becomes almost impossible. Performance would be affected too.
1 comments

Microsoft has absolutely done an amazing job with typescript IDE integration. But are there any end-user IDE benefits to typescript over flow/eslint? (Not being snarky.)

I've been using both on separate projects (with MS IDEs) and haven't noticed anything major.

The design of TypeScript is explicitly so that it can provide a good API (called "language service") to IDEs and other tools. And not just "give me all the errors/warnings in this file" but also to give detailed information about the types at specific positions of the source code, and the whole design is so that it can efficiently recheck a whole project if you change one part of a file. One of the lead engineers of TypeScript talked about that in one of his techtalks (can't find the link right now).
im a Flow fan, but Flow's IDE support is pretty bad. WebStorm only souped it up recently, and aside for that, outside of Nucleide (and even there!) its pretty awkward/slow/clunky and in many cases downright buggy.

TypeScript's type system is very bleh, but its IDE integration IS pretty good across many editors (not just VSCode)

I've had good experiences with https://marketplace.visualstudio.com/items?itemName=rtorr.vs... so far, but perhaps I've gotten lucky. When I first tried flow out a few months ago I was also very unhappy with the tooling.
just tried it again...its better than last time, for sure. Still weak in the refactoring department though.