facebook / facebook/flow

[question] Extend module types

Aperta
#4,667 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
Rust
Stelle
22.3k
Fork
1.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

It's a question that should be asked on SO, but I can't get a response there..

In a React Native app I am assigning a custom method to the `console` e.g. `console.foo = (string) => {}`. The console module type is already [defined here](https://github.com/facebook/react-native/blob/master/flow/console.js). So I get the error: `Property not found in object type`. How can I extend a console module with a custom method type?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.