Handle object rest parameters in the corejs3-usage plugin (#9724)
Fixes #9713
This commit is contained in:
parent
c259ec5408
commit
92fcd31eac
@ -189,10 +189,12 @@ export default function(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const property of path.get("properties")) {
|
for (const property of path.get("properties")) {
|
||||||
const key = resolveKey(property.get("key"));
|
if (property.isObjectProperty()) {
|
||||||
// const { keys, values } = Object
|
const key = resolveKey(property.get("key"));
|
||||||
// const { keys, values } = [1, 2, 3]
|
// const { keys, values } = Object
|
||||||
this.addPropertyDependencies(source, key);
|
// const { keys, values } = [1, 2, 3]
|
||||||
|
this.addPropertyDependencies(source, key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
function test({ ...others }) {}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"../../../../lib",
|
||||||
|
{
|
||||||
|
"useBuiltIns": "usage",
|
||||||
|
"corejs": 3,
|
||||||
|
"targets": { "node": "8.10.0" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
function test({ ...others
|
||||||
|
}) {}
|
||||||
Loading…
x
Reference in New Issue
Block a user