|
|
|
|
|
by samwgoldman
4052 days ago
|
|
TypeScript is great, but you might look again at flow. ES6 features are being added (I'm adding let/const support) and many already exist. Import/export (incl. types) are in, fat arrow syntax, destructuring, shorthand syntax for objects. I get the most value of Flow through statically typed React component props, which is usable today with both `React.createClass`-style and `React.Component`-style components. In my experience, Flow will infer much more about "plainly" written JavaScript than TypeScript, which will fall back to `any` unless code is annotated. A small example, function types are contravariant in the negative position in Flow, but bivariant in TS—much weaker! TLDR, if you haven't looked at Flow recently, look again! |
|