π Search Terms
override ambient type declaration class dts noImplicitOverride late bindable index signatures
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?noImplicitOverride=true&ts=5.8.0-dev.20241128#code/PTAEAEDsHsEkFsAOAbAlgY1QFwPIDcBTAJyNQBMCAuULIgVwIChH1pIBnLUdgT3mt7wARtGSgAvKADKfEcgAUASgDczdMgCG7dqABCWggEZQAb0ahQAbUEBdJaYC+jJy03bQAEWKpCZYwQAPLAJIMh19diNTc1BoQhJyAitbexMnF3UtcIMAJmiLaz47RUdnNTcdL1JfPMDg0OzIvLMClJK0stcsvQMAZlKu9yqfAjJ+upCwnsj+ltj40gpkotT0oA
π» 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 under noImplicitOverride
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
π Search Terms
override ambient type declaration class dts noImplicitOverride late bindable index signatures
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?noImplicitOverride=true&ts=5.8.0-dev.20241128#code/PTAEAEDsHsEkFsAOAbAlgY1QFwPIDcBTAJyNQBMCAuULIgVwIChH1pIBnLUdgT3mt7wARtGSgAvKADKfEcgAUASgDczdMgCG7dqABCWggEZQAb0ahQAbUEBdJaYC+jJy03bQAEWKpCZYwQAPLAJIMh19diNTc1BoQhJyAitbexMnF3UtcIMAJmiLaz47RUdnNTcdL1JfPMDg0OzIvLMClJK0stcsvQMAZlKu9yqfAjJ+upCwnsj+ltj40gpkotT0oA
π» Code
π Actual behavior
No errors are raised
π Expected behavior
I'd expect either:
overridewith dynamic namesoverrideundernoImplicitOverrideAdditional 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