Hacker News new | ask | show | jobs
by whatever_dude 3404 days ago
> Same cannot be said about typescript considering various language features and syntactic sugar TS offers

I think you're vastly misinterpreting what TS is.

It's not anything like CoffeeScript. It's JS plus types and a few other features like Interfaces or advanced ECMAScript features when targetting older versions of the standard.

If you strip away types by exporting to your ECMAScript target of choice, you'll get real JavaScript with the same style as it was written in TypeScript.

It's exactly the same thing you'd get with Flow in that sense. The only additional code you'd get would be for polyfills, but a) those are minimal and b) those will only appear if you export to an older ECMAScript version than the one you wrote it in.

There is no vendor lock.

1 comments

there are a few minor things like enums and decorators that will need to be compiled because they're not standard and are not just types either (well, const enums are i think?, but the rest are not?).

That's about it though.