mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
354 B
TypeScript
18 lines
354 B
TypeScript
//// [tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts] ////
|
|
|
|
//// [optionalBindingParameters1.ts]
|
|
function foo([x,y,z]?: [string, number, boolean]) {
|
|
|
|
}
|
|
|
|
foo(["", 0, false]);
|
|
|
|
foo([false, 0, ""]);
|
|
|
|
//// [optionalBindingParameters1.js]
|
|
"use strict";
|
|
function foo([x, y, z]) {
|
|
}
|
|
foo(["", 0, false]);
|
|
foo([false, 0, ""]);
|