3 ms·
The problem is with the author's assertion that all libraries should be using TypeScript and not, say, Flow, or some other alternative that achieves the same go
by robert_tweed 11y ago
The problem is with the author's assertion that all libraries should be using TypeScript and not, say, Flow, or some other alternative that achieves the same goals, perhaps better.
- MadcapJake 11y agoDoes Flow offer type definition files?
- AgentME 11y agoYes. Also, there isn't a need to maintain a separate definitions file[1] if the library was developed as Flow-typed code. I've made a few small libraries[2] that were written with Flow-typed code, and are built so that the types are automatically enforced if you use the library in a Flow-typed project. [1] A hand-maintained definitions file: https://github.com/facebook/immutable-js/blob/master/type-definitions/Immutable.d.ts https://github.com/facebook/immutable-js/blob/master/type-de... . Sure, it's nice as documentation, but that is a lot of redundant effort if you already have separate documentation, and types and documentation in the original source code too. [2] https://github.com/AgentME/contain-by-screen https://github.com/AgentME/contain-by-screen is one simple example.