Warn if properties not initialized in constructor
Offen
feature request
- Vorherrschende Sprache
- Rust
- Sterne
- 22.3k
- Forks
- 1.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
[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...
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.