# Flow vs. Typescript ## Flow _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... > 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 ( `` ) - πŸ‘Ž 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 ## Typescript _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 > 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 ### Links - 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/