-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Closed
Copy link
Labels
Help WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
Description
π Search Terms
override ambient type declaration class dts noImplicitOverride late bindable index signatures
π Version & Regression Information
- This changed in commit or PR: Support interpreting non-literal computed properties in classes as implicit index signaturesΒ #59860
β― Playground Link
π» Code
// @noImplicitOverride: true
const sym: symbol = Symbol();
class Base1 {
[sym]() {}
}
class Derived1 extends Base1 {
override [sym]() {}
}
class Base2 {
[sym]() {}
}
class Derived2 extends Base2 {
[sym]() {}
}
class Base3 {}
class Derived3 extends Base3 {
override [sym]() {}
}
π Actual behavior
No errors are raised
π Expected behavior
I'd expect either:
- errors on
override
with dynamic names - errors raised on override members without
override
undernoImplicitOverride
Additional information about the issue
I implemented the first suggestion here f334978 but since I don't know if this is the desired behavior I didn't open a PR with this change yet, cc @weswigham
Metadata
Metadata
Assignees
Labels
Help WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases