This opinion is one of the many things that are wrong with the JavaScript ecosystem today. Static typing as provided by TypeScript is a safety net, not "fascism".
This opinion is one of the many things that are wrong with the JavaScript ecosystem today. Static typing as provided by TypeScript is a safety net, not "fascism".
Also, Angular 2 claims to be TS vs. ES6 agnostic, but practically, all documentation and resources are TS-orientated. That's more what I meant by fascism.
As far as the language premiums offered by TS: if I otherwise had to write ES5, I could see the value. With all the improvements offered by ES6—sure, type safety is not among them, but alas—I don't see any reason to use TS.
Sure, fast turnaround is good. Being able to maintain and refactor what you made a year later is even better. I'm currently refactoring an app that has ~30k sloc TypeScript, and doing it without types would be a lot worse.
However, my app is not built in Angular, so my experience here may be quite different.
But that's no reason to force its use as a precondition of using a notionally JS framework.
Yes, yes, I know—it's (2.x) a superset of ES6. But just you try writing Angular 2 code in such "ES6". No, you have to play ball with generics and the full gamut of Java features.
I am avoiding Angular entirely (I'm not a fan of the "and the kitchen sink" approach it promotes), so I can't comment if they're taking TS too far.
Yeah, it has structural typing, some type inference and pinky swearing type guards. It is better in those regards. But you still don't get very far without annotations. C# had inference for anonymous objects and return values too, and TypeScript is only a little further ahead on that one.
Though the main problem with TS is how it actually gets used. You certainly CAN do java-like garbage with it, and god do people do. If you're not stuck with people doing that, it's not half bad.
Flow is my favorite too, i much prefer its type system, but its no surprise its "losing".
you probably don't see that phrase in their marketing materials.