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