javascript - 使用 FlowType 进行 native react : Exporting and importing js interfaces

标签 javascript reactjs react-native flowtype

我在 React native 项目上使用 FlowType,我想将 JavaScript 接口(interface)放入其自己的文件中,以便在整个项目中共享。想法?

最佳答案

诀窍是使用导出类型导入类型

我在这里找到了答案:

https://flowtype.org/docs/modules.html#type-imports--exports

关于javascript - 使用 FlowType 进行 native react : Exporting and importing js interfaces,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40559077/

相关文章:

react-native - 按下按钮时 react 原生添加事件类

javascript - 错误 : exportArchive: The data couldn’t be read because it isn’t in the correct format

javascript - 如何知道 Angular2 应用程序已经完成渲染

javascript - 使用 Web Worker 进行字符串化

javascript - React,调用无状态函数来组织代码,但是这个怎么绑定(bind)呢?

reactjs - 当我尝试显示组件 onClick 时,React State 保持不可变

javascript - Expo + React Native : Draw line between coordinates on two type of views

javascript - Backbone.js 分组集合

javascript - 如何写入特定区域/部门?

javascript - jquery .each() 在 IE 9 中不起作用