标签: flowtype
在React Native应用中,我正在为console分配自定义方法,例如console.foo = () => {}。控制台模块类型已为defined here。所以我收到错误:Property not found in object type。我怎样才能扩展&使用自定义方法类型声明console模块?
React Native
console
console.foo = () => {}
Property not found in object type
答案 0 :(得分:2)
不幸的是,Flow不支持扩展/覆盖流/ lib类型:
https://github.com/facebook/flow/issues/396