In a destructuring assignment, a property assignment is not an assignment target. Its initialiser is. For example: ```ts ({ source: target} = o); ``` Here, `target` is the assignment target. `source` is not. Previously, both were assignment targets.
8 lines
133 B
TypeScript
8 lines
133 B
TypeScript
// test for #10668
|
|
function qux(bar: { value: number }) {
|
|
let foo: number;
|
|
({ value: foo } = bar);
|
|
let x = () => bar;
|
|
}
|
|
|