> And the React ecosystem tends to either lack typings or provide poor/broken typings. React integrates really well with flow[1] (which is not surprising because they're both developed at Facebook) and in my experience flow's typesystem is more powerful (OCaml inspired) than TypeScript one (C# inspired): - non-nullable types by default is a big deal (they added support for non-nullable types in TypeScript 2, but enab…
> React integrates really well with flow[1] (which is not surprising because they're both developed at Facebook) It can integrate just as well with TypeScript. > flow's typesystem is more powerful (OCaml inspired) It lacks access control for class properties/methods, I wouldn't call that powerful. https://flow.org/en/docs/types/classes/
You mean `private` and such ? Well JavaScript don't support taht either yet, and flow is a type-system for JavaScript, it's not a new language on its own.
About the «powerful» word: Flow has had an algebraic data type (ADT) from the beginning, the kind of type system you'd find in functional programming languages, whereas TypeScript has and Object-Oriented type-system (à la Java or C#). ADT are usually considered «more powerful» since it offers more ways to write logical invariants in your code. The recent versions of TypeScript tries to retro-fit some features of ADTs into it, like non-nullable types or sum types, but it's a bit hacky IHMO[1].
[1]: https://www.typescriptlang.org/docs/handbook/advanced-types....