We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
And vice-versa.
Inspired by #33621
Code
declare class Properties { set val(x: number); } class BadProps implements Properties { private _val: number = 42; get val() { return this._val; } } declare class Properties2 { get val(): number; } class BadProps2 implements Properties2 { private _val: number = 42; set val(x: number) { this._val = 2; } } const x: Properties = new BadProps(); x.val; x.val = 12; const x2: Properties2 = new BadProps2(); x2.val; x2.val = 12;
Expected behavior: Error on BarProps for incorrectly implementing Properties. Error on BarProps2 for incorrectly implementing Properties2.
BarProps
Properties
BarProps2
Properties2
Actual behavior: No error, even with "useDefineForClassFields": true.
"useDefineForClassFields": true
The text was updated successfully, but these errors were encountered:
We have eleventydozen issues on this already; let's reopen an existing one if we want to change how it works.
Sorry, something went wrong.
No branches or pull requests
And vice-versa.
Inspired by #33621
Code
Expected behavior:
Error on
BarProps
for incorrectly implementingProperties
.Error on
BarProps2
for incorrectly implementingProperties2
.Actual behavior:
No error, even with
"useDefineForClassFields": true
.The text was updated successfully, but these errors were encountered: