class C {
prop: string;
other = this['prop']; // this should be a finding
constructor(){
console.log(this.prop); // this is an error
console.log(this['prop']); // this should be a finding
this.prop = '';
}
}
The one in the property initializer should be pretty easy.
Note that checking the use in the constructor needs a complete control flow graph to check for assignments in all possible control flow graphs like o?.[this.prop = ''].prop ?? (this.prop = '');
The one in the property initializer should be pretty easy.
Note that checking the use in the constructor needs a complete control flow graph to check for assignments in all possible control flow graphs like
o?.[this.prop = ''].prop ?? (this.prop = '');