is PropertyName updated?
# Yusuke SUZUKI (11 years ago)
Oops, sorry, I've missed PropertyName : BindingElement. So when using computed property name as PropertyName, shorthanded style cannot be used.
Thank you
Oops, sorry, I've missed PropertyName : BindingElement. So when using computed property name as PropertyName, shorthanded style cannot be used.
Thank you
Seeing the latest rev 27 draft, PropertyName is defined in the 12.2.5,
PropertyName[Yield,GeneratorParameter] : LiteralPropertyName [+GeneratorParameter] ComputedPropertyName [~GeneratorParameter] ComputedPropertyName[?Yield]
And BindingProperty in the ObjectBindingPattern is defined as follows,
BindingProperty[Yield,GeneratorParameter] : SingleNameBinding[?Yield, ?GeneratorParameter] PropertyName[?Yield, ?GeneratorParameter] : BindingElement[?Yield, ?GeneratorParameter]
So, is it well-formed ECMAScript? Or simply it is not fixed yet?
var { [value] } = obj;
If it is well-formed, it means that we can define binding dynamically.