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.1.0-dev.20180808
Search Terms: private destructuring
Code
class Foo { private bar = 1; } let foo = new Foo(); let bar: number; ({bar} = foo); // no error ({bar: bar} = foo); // no error
Expected behavior:
Error on both destructuring assignments.
Since element access on private properties is allowed (#26328), how would you expect the following to behave?
({'bar': bar} = foo); ({['bar']: bar} = foo);
Actual behavior:
No error
Playground Link: https://agentcooper.github.io/typescript-play/#code/MYGwhgzhAEBiD29oG8BQ0PQA4CcCWAbmAC4Cm0ARmDtALzQCMA3KgL6oinHQBmid0AHakA7nEQAKAJQsOXStQBcQgK4BbCqRwsJyKjlYC+8GdAD0ZoUi054OVLv3L9h+sdMWr0G3aA
Related Issues: #26328
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
TypeScript Version: 3.1.0-dev.20180808
Search Terms: private destructuring
Code
Expected behavior:
Error on both destructuring assignments.
Since element access on private properties is allowed (#26328), how would you expect the following to behave?
Actual behavior:
No error
Playground Link: https://agentcooper.github.io/typescript-play/#code/MYGwhgzhAEBiD29oG8BQ0PQA4CcCWAbmAC4Cm0ARmDtALzQCMA3KgL6oinHQBmid0AHakA7nEQAKAJQsOXStQBcQgK4BbCqRwsJyKjlYC+8GdAD0ZoUi054OVLv3L9h+sdMWr0G3aA
Related Issues: #26328
The text was updated successfully, but these errors were encountered: