Destructuring parameters with defaults. function x({ foo, bar } = {}) { }
This commit is contained in:
committed by
Richard van Velzen
parent
084437bc6d
commit
5b553aafe2
@@ -136,8 +136,9 @@ default_arguments: {
|
||||
input: {
|
||||
function x(a = 6) { }
|
||||
function x(a = (6 + 5)) { }
|
||||
function x({ foo } = {}, [ bar ] = [ 1 ]) { }
|
||||
}
|
||||
expect_exact: "function x(a=6){}function x(a=6+5){}"
|
||||
expect_exact: "function x(a=6){}function x(a=6+5){}function x({foo}={},[bar]=[1]){}"
|
||||
}
|
||||
|
||||
concise_methods: {
|
||||
|
||||
Reference in New Issue
Block a user