-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version:
3.0.3
3.1.0-dev.20180829
Search Terms:
private fields destructuring
private members destructuring
Code
class Foo {
private prop;
}
const foo = new Foo();
const bar = { foo };
// Errors
foo.prop;
const { prop: prop1 } = foo;
// No error
const { foo: { prop: prop2 } } = bar;
Expected behavior:
Nested destructuring of private and protected members causes an error
Actual behavior:
It doesn't
Related Issues:
#7124
mudassir0909
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue