facebook / facebook/flow

Reuse flow class declaration for class definition

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

Descrizione

Hi
how can I reuse my class declaration in this case without to copy paste all members in the class definition?

```
declare type A {
a: string;
}

class A extends EventEmitter {

foo() {
this.a // error property not found
}
}
```

I thought flow would recognize that `class` A is an instance of `type` A but it doesn't.

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.