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
TypeScript Version: 3.9.1-rc, 4.0.0-dev.20200428
Search Terms: cannot reference identifier
cannot reference identifier
Code
function test0({ a = 0, b = a } = {}) { return { a, b }; } function test1({ c: { a = 0, b = a } = {} } = {}) { return { a, b }; }
Expected behavior: Doesn't fail
Actual behavior: Fails with Parameter '{ a = 0, b = a }' cannot reference identifier 'a' declared after it.(2373)
Parameter '{ a = 0, b = a }' cannot reference identifier 'a' declared after it.(2373)
Playground Link: https://www.typescriptlang.org/play/?noImplicitAny=false&ts=4.0.0-dev.20200428&ssl=8&ssc=1&pln=1&pc=1#code/GYVwdgxgLglg9mABFApgZygBgBQG9ECGiAvIpgDSIBGJhiAvrbvQJSK4BQi3iATilBC8k+ApRr0A3B3ocOoSLATJ0UAIx5EEAFzs6pCtVpFGpZgyat2XHv0HC9Yo1JkcgA
Related Issues: #38130
The text was updated successfully, but these errors were encountered:
rbuckton
Successfully merging a pull request may close this issue.
TypeScript Version: 3.9.1-rc, 4.0.0-dev.20200428
Search Terms:
cannot reference identifier
Code
Expected behavior: Doesn't fail
Actual behavior: Fails with
Parameter '{ a = 0, b = a }' cannot reference identifier 'a' declared after it.(2373)
Playground Link: https://www.typescriptlang.org/play/?noImplicitAny=false&ts=4.0.0-dev.20200428&ssl=8&ssc=1&pln=1&pc=1#code/GYVwdgxgLglg9mABFApgZygBgBQG9ECGiAvIpgDSIBGJhiAvrbvQJSK4BQi3iATilBC8k+ApRr0A3B3ocOoSLATJ0UAIx5EEAFzs6pCtVpFGpZgyat2XHv0HC9Yo1JkcgA
Related Issues: #38130
The text was updated successfully, but these errors were encountered: