3 ms·
Does Flow offer type definition files?
by MadcapJake 11y ago
Does 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.