Edgar
Edgar

Reputation: 927

Flow / flowtype - how to extend a declared module

In a React Native app I am assigning a custom method to the console e.g. console.foo = () => {}. The console module type is already defined here. So I get the error: Property not found in object type. How can I extend & declare a console module with a custom method type?

Upvotes: 1

Views: 572

Answers (1)

Zachary Ryan Smith
Zachary Ryan Smith

Reputation: 2758

Unfortunately, Flow does not support extending/overriding flow/lib types:

https://github.com/facebook/flow/issues/396

Upvotes: 3

Related Questions