Built by Facebook
Stats for past month: 0 merged PRs, 30 Proposed PRs, 50 closed issues, 135 new issues, SO Questions ~0.9k
Used by: Facebook...
Created: 2014
PROS
- π Built by Facebook, just like React β in practice, this doesnβt seem to provide a marked advantage for flow
- π Babel integration
- π No real learning curve
- π Inference of types
- π support for JSX
CONS
- π No βout-of-the-boxβ integration with any editor
- π Poor error messaging
- π Poor tooling (Getting Flow to run is not easy)
- π bug with JSX spread operator (
<Component {...props} />
) - π Does it detect unused vars? βNo. Use a linter.β -A Flow developer response :(
- π non-native watch mode
- π
.js
files could be flow, could be normal JS β not obvious at a glance
MEHs
- π /π Flow is highly interested in creating a provably correct type system
- π /π ~400 typed third-party libraries
Built by Microsoft
Stats for past month: 215 merged PRs, 46 Proposed PRs, 440 closed issues, 215 new issues, SO Questions ~38k
Used by: Lyft, Microsoft, Google, Asana
Created: 2012
PROS
- π Out-of-the-box, first class VSCode integration
- π Easier to setup
- π Used by default in Angular2
- π Helpful error messaging
- π
.ts
files easy to distinguish between.js
files - π (as of 2.3) ability to type-check non-TS files with
--checkJs
- π support for JSX
- π Babel integration
- π Native watch-mode (file specific)
- πππ ~3,000 third-party libraries
CONS
- π Possible increased language complexity --> learning curve
- π In my experience there are frequent breaking changes from version to version (not sure if this is still a problem)
MEHs
- π/π More frequent releases, this can introduce breaking changes
- π/π Typescript is not interested in creating a βprovably correctβ type system β instead tries to strike balance between correctness and productivity
- https://engineering.tumblr.com/post/165261504692/flow-and-typescript
- https://jan.varwig.org/2017/02/15/flow-vs-typescript.html
- https://eng.lyft.com/typescript-at-lyft-64f0702346ea
- https://medium.com/@ckoster22/migrating-from-flow-to-typescript-b065796797db
- https://www.reaktor.com/blog/refactoring-30000-lines-js-types/