Bug Report
Current Behavior
Invalid destructuring assignment target exception with destructuring assignment with private fields
Input Code
class Foo {
#client
constructor(props) {
;({ client: this.#client } = props) // throws: Invalid destructuring assignment target
}
}
transpiles to (excerpt):
({
client: _classPrivateFieldGet(this, _client) // notice the getter
} = props);
Environment
update:
I suppose it would need to use _classPrivateFieldSet as well as transpile the ES2015 destructuring assignment? unless destructuring assignments work with a function call ... which I don't think it does?
var client = props.client
_classPrivateFieldSet(this, _client, client);
for what it's worth: works in node --harmony v11.6.0
Bug Report
Current Behavior
Invalid destructuring assignment targetexception with destructuring assignment with private fieldsInput Code
transpiles to (excerpt):
Environment
update:
I suppose it would need to use _classPrivateFieldSet as well as transpile the ES2015 destructuring assignment? unless destructuring assignments work with a function call ... which I don't think it does?
for what it's worth: works in
node --harmonyv11.6.0