3 ms·
Flow only type-checks files that have opted into it with the //@flow comment. It will have some trouble dealing with the compiled output of another tool like Ty
by AgentME 10y ago
Flow only type-checks files that have opted into it with the //@flow comment. It will have some trouble dealing with the compiled output of another tool like Typescript. For example, it probably wouldn't understand that output of how Typescript compiles classes into ES5 represents a class.
Even if using both of them on the same code worked, Flow and Typescript are both a bit anal about certain dynamic javascript patterns, and I think any possible extra gains from having both check your code would be canceled out by having to write your code in ways to please both type-systems.
- labrador 10y agoI made the necessary mods (flow doc is not very clear by the way) and thought it was funny flow complained about TypeScript emitting this: var live_items = new Array(); ^^^^^^^^^^^ Use array literal instead of new Array(..)