niieani / typescript-vs-flowtype

Differences between Flowtype and TypeScript -- syntax and usability
MIT License
1.73k stars 78 forks source link

Expand on "typings for public libraries" #70

Open Brianzchen opened 4 years ago

Brianzchen commented 4 years ago

TS: plenty of well maintained typings Flow: a handful of mostly incomplete typings

For flow, this may be true for libraries but is an understatement for typings. Maybe this can be expanded to reference definitely-typed vs flow-typed.

Flow-typed is definitely lagging behind, but there's definitely support for commonly used libraries.

devinrhode2 commented 4 years ago

when you investigate using ts typings in flow, you learn that this won't really work as expected, because ts is not sound, there is not enough information in ts types to create flow types (because flow is sound). However, the inverse is easy, since flow types have more information. Perhaps, flow is best for hard-core libs that are used very widely, and ts is good for end-user programmers that aren't creating a quick hacky thing/need to make stable/robust software.