Allow patterns as argument of RestElement (#8414)
This commit is contained in:
committed by
Nicolò Ribaudo
parent
d9149aa2f3
commit
9eef660daa
5
packages/babel-plugin-transform-parameters/test/fixtures/parameters/rest-patterns/exec.js
vendored
Normal file
5
packages/babel-plugin-transform-parameters/test/fixtures/parameters/rest-patterns/exec.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
function foo(...{ length }) {
|
||||
return length;
|
||||
}
|
||||
|
||||
expect(foo(1, 2, 3)).toEqual(3);
|
||||
Reference in New Issue
Block a user