Destructuring parameters with defaults. function x({ foo, bar } = {}) { }

This commit is contained in:
Fábio Santos
2015-11-22 18:02:35 +00:00
committed by Richard van Velzen
parent 084437bc6d
commit 5b553aafe2
3 changed files with 15 additions and 10 deletions

View File

@@ -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: {