We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms: Optional chaining, argument default this
Code
class Test { public c(a = this.a?.b) {} }
Expected behavior:
Shouldn't throw reference error
Actual behavior:
Throws reference error for _a
c(a = (_a = this.a) === null || _a === void 0 ? void 0 : _a.b) { var _a; }
Playground Link: https://www.typescriptlang.org/play/index.html#code/FAYwNghgzlAEAqBTKAXWBvYtuwA4FcAjMASxFglgF4NZCAuWARlgF9gOc8jTyQAKSjRQALElAB0EAPwTCASgycc7dsAB2iAO4JkKfvIkD5QA
The text was updated successfully, but these errors were encountered:
Duplicate of #36295
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms: Optional chaining, argument default this
Code
Expected behavior:
Shouldn't throw reference error
Actual behavior:
Throws reference error for _a
Playground Link: https://www.typescriptlang.org/play/index.html#code/FAYwNghgzlAEAqBTKAXWBvYtuwA4FcAjMASxFglgF4NZCAuWARlgF9gOc8jTyQAKSjRQALElAB0EAPwTCASgycc7dsAB2iAO4JkKfvIkD5QA
The text was updated successfully, but these errors were encountered: