Closed
Description
In #54056 we added checks for class fields; however, we don't issue the same error in JavaScript for properties inferred from assignments.
// @ts-check
class YaddaBase {
constructor() {
this.roots = "hi";
}
}
class DerivedYadda extends YaddaBase {
get rootTests() {
return super.roots; // no error?
}
}
console.log(new DerivedYadda().rootTests); // prints undefined!
Originally posted by @DanielRosenwasser in #55883 (comment)