mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
683 B
TypeScript
24 lines
683 B
TypeScript
//// [tests/cases/compiler/declarationEmitDestructuringWithOptionalBindingParameters.ts] ////
|
|
|
|
//// [declarationEmitDestructuringWithOptionalBindingParameters.ts]
|
|
function foo([x,y,z]?: [string, number, boolean]) {
|
|
}
|
|
function foo1( { x, y, z }?: { x: string; y: number; z: boolean }) {
|
|
}
|
|
|
|
//// [declarationEmitDestructuringWithOptionalBindingParameters.js]
|
|
"use strict";
|
|
function foo([x, y, z]) {
|
|
}
|
|
function foo1({ x, y, z }) {
|
|
}
|
|
|
|
|
|
//// [declarationEmitDestructuringWithOptionalBindingParameters.d.ts]
|
|
declare function foo([x, y, z]?: [string, number, boolean]): void;
|
|
declare function foo1({ x, y, z }?: {
|
|
x: string;
|
|
y: number;
|
|
z: boolean;
|
|
}): void;
|