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