-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Help WantedYou can do thisYou can do thischeckJsRelates to checking JavaScript using TypeScriptRelates to checking JavaScript using TypeScript
Milestone
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)
ArthurKa
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Help WantedYou can do thisYou can do thischeckJsRelates to checking JavaScript using TypeScriptRelates to checking JavaScript using TypeScript