News for hackers. Stuff that matters.
Re:If TypeScript is so great, how come all notable ReactJS p... by logicchains on Tuesday September 20, 2016 @10:35AM (#12539821)
>Care to elaborate on that?

I'm not the OP, but TypeScript supports union types (A | B ; a type that can be either type A or type B) and intersection types (A & B ; a type that is both A and B), while Dart doesn't. https://www.typescriptlang.org/docs/handbook/advanced-types....

Typescript also has structural types, like Go and OCaml, which many people find nicer than nominal types. Structural types mean if I have an interface Blaz with two methods Foo and Bar, if I have an object MyObject with Foo and Bar methods of the same types then my object counts as a Blaz, while nominal types mean I have to write something like MyObject extends Blaz.

There are no comments on this comment yet.