4 ms·
I have a project that uses Flow. I've had no complaints with it so far, but I've been craving the IDE support of TypeScript. What's the difference between the t
by picardo 10y ago
I have a project that uses Flow. I've had no complaints with it so far, but I've been craving the IDE support of TypeScript. What's the difference between the type system of TypeScript and Flow? Would it be worthwhile to switch?
Part of me wants to wait out the Flow team come up with better IntelliSense support. The `flow ide` command in the release 0.42 is a big step in the right direction. But it seems like TypeScript already has this, and if the delta between the two type systems is small, I might just go ahead and switch.
- Rusky 10y agoTypeScript's type system is intentionally unsound in a handful of places- function parameters are bivariant, for example. I believe Flow is at least closer to being sound. I suspect switching from Flow to TypeScript would be relatively straightforward as far as the types go, but going the other direction would not.
- lfischer 10y agoThe delta between the type systems is small enough that people have tried to automatically convert TypeScript type definitions to Flow. One notable difference is that Flow supports declaring types as covariant/contravariant. I suspect that as far as most application code bases go (as opposed to libraries), you would almost see no difference.
- kej 10y ago>What's the difference between the type system of TypeScript and Flow? This presentation [1] was posted to HN recently and gave a pretty good overview of the differences between TypeScript and Flow. [1] https://djcordhose.github.io/flow-vs-typescript/flow-typescript-2.html#/ https://djcordhose.github.io/flow-vs-typescript/flow-typescr...
- picardo 10y agoAwesome prez! Thanks for the link!