Bug Report
Current Behavior
Compiler throw error: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got "CallExpression
Input Code
let { bar, foo } = { foo: "aaa", bar: "bbb" };
Expected behavior/code
Working
Babel Configuration (.babelrc, package.json, cli command)
{
"presets": [
["@babel/preset-env", {
"ignoreBrowserslistConfig": true
}]
],
"plugins": [
["@babel/plugin-proposal-object-rest-spread"],
["@babel/plugin-transform-block-scoping", {
"tdz": true
}]
]
}
Environment
- Babel version(s): @babel/core v7.2.2
- Node/npm version: Node 10.14.2/npm 6.4.1
- OS: OSX 10.14.2
- Monorepo: no
- How you are using Babel: cli 7.2.3
Possible Solution
Additional context/Screenshots
It's working If remove tdz config.
Thank you.