facebook / facebook/flow

Warn if properties not initialized in constructor

Aperta
#650 10 commenti 11 reazioni 0 assegnatari Vedi su GitHub
feature request
Lingua principale
Rust
Stelle
22.3k
Fork
1.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

[Example](http://tryflow.org/#f53da3ebbf00a0e4165231d3d59c22ae):

``` es6
class C {
x: number;
y: number;
constructor() {
this.x = 0;
}
}

new C().y.toString(); // should produce error
```

I know this is complicated (what about derived classes? what if there is `this.initializeY()`?) but I don't think I've seen it being discussed on the issue tracker so far...

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.