Bug Report
🔎 Search Terms
override, property, esnext
🕗 Version & Regression Information
Bug in new feature of version 4.3
💻 Code
class Base {
state?: string;
}
export default class TestClass extends Base {
override state = "string";
}
🙁 Actual behavior
Compiling this code for target esnext the override keyword on properties is preserved:
tsc -t esnext TestClass.ts
class Base {
state;
}
export default class TestClass extends Base {
override state = "string";
}
🙂 Expected behavior
The override keyword should be removed from the javascript output, as it is already done correctly for methods.
(Compiling for other targets (e.g. es2021) works correctly as the property is transformed to a constructor initialization.)
Maybe related to #43535
Bug Report
🔎 Search Terms
override, property, esnext
🕗 Version & Regression Information
Bug in new feature of version 4.3
💻 Code
🙁 Actual behavior
Compiling this code for target esnext the override keyword on properties is preserved:
🙂 Expected behavior
The
overridekeyword should be removed from the javascript output, as it is already done correctly for methods.(Compiling for other targets (e.g. es2021) works correctly as the property is transformed to a constructor initialization.)
Maybe related to #43535