-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
We currently enforce this rule:
class Base {
foo() {
}
}
class Derived extends Base {
// Error, cannot override method with property
foo: () => { };
}
This breaks two real scenarios:
- You can't declare 'foo' as a property and then mix it in later (Mixins use problem with React #6147)
- You need to implement
foo
as an arrow function because you have some unbound callers that your base class didn't
The reverse case is important to continue to enforce, but no one can remember why we have this rule.
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript