Warn if properties not initialized in constructor
Open
feature request
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
[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...
Contributor guide
Assessment
This issue has not been assessed yet.