When should I use TypeScript?
Alex Ewerlöf

The “TS is a strict superset of ES6” thing has been said for aeons at this point, and while it’s getting close (very close now), it isn’t quite true.

People said that back then when it was still using namespaces and stuff instead of ES6 module, and that really stingned when they finally came to par.

There’s a few other things, like features missing, and places where it doesn’t follow specs (eg: in TypeScript, class members are enumerable. In ES6, they are not. I assume they did it because non-enumerable class member compilation result in very ugly output). That means if you were to switch out of it, it wouldn’t be simply a matter of stripping out the extra features. There will be some small, obscure bugs in there too caused by those differences.

That is in opposition to, let say, Flow, that is simply an annotation system and a type checker, deferring all actual behavior to the underlying runtime (Babel, the browser, or whatever), so it will never diverge.

That won’t matter to the vast majority of users, but it is important understand.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.