fix: object-rest-spread should not transform array rest (#11282)
This commit is contained in:
parent
375847b671
commit
d60802bf73
@ -329,7 +329,7 @@ export default declare((api, opts) => {
|
||||
|
||||
const hasRest = declaration
|
||||
.get("declarations")
|
||||
.some(path => hasRestElement(path.get("id")));
|
||||
.some(path => hasObjectPatternRestElement(path.get("id")));
|
||||
if (!hasRest) return;
|
||||
|
||||
const specifiers = [];
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
export var { b, ...c } = asdf2;
|
||||
// Skip
|
||||
export var { bb, cc } = ads;
|
||||
export var [ dd, ee ] = ads;
|
||||
export var [ dd, ee, ...ff ] = ads;
|
||||
|
||||
@ -9,4 +9,4 @@ export var {
|
||||
bb,
|
||||
cc
|
||||
} = ads;
|
||||
export var [dd, ee] = ads;
|
||||
export var [dd, ee, ...ff] = ads;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user