As stated in the “Gotcha Syntax” section of understandes6 , you will need to wrap it with parentheses because otherwise it will generate a syntax error. An opening brace is usually the beginning of a block, and blocks cannot be part of an assignment expression.
This one worked for me:
var bar;
({ foo: bar } = { foo: 123 });
console.log(bar);
I also tried:
var bar;
({ foo: bar }) = { foo: 123 };
console.log(bar);
es6lint, , .