mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
//// [tests/cases/compiler/declarationEmitDestructuring1.ts] ////
|
|
|
|
//// [declarationEmitDestructuring1.ts]
|
|
function foo([a, b, c]: [string, string, string]): void { }
|
|
function far([a, [b], [[c]]]: [number, boolean[], string[][]]): void { }
|
|
function bar({a1, b1, c1}: { a1: number, b1: boolean, c1: string }): void { }
|
|
function baz({a2, b2: {b1, c1}}: { a2: number, b2: { b1: boolean, c1: string } }): void { }
|
|
|
|
|
|
//// [declarationEmitDestructuring1.js]
|
|
"use strict";
|
|
function foo([a, b, c]) { }
|
|
function far([a, [b], [[c]]]) { }
|
|
function bar({ a1, b1, c1 }) { }
|
|
function baz({ a2, b2: { b1, c1 } }) { }
|
|
|
|
|
|
//// [declarationEmitDestructuring1.d.ts]
|
|
declare function foo([a, b, c]: [string, string, string]): void;
|
|
declare function far([a, [b], [[c]]]: [number, boolean[], string[][]]): void;
|
|
declare function bar({ a1, b1, c1 }: {
|
|
a1: number;
|
|
b1: boolean;
|
|
c1: string;
|
|
}): void;
|
|
declare function baz({ a2, b2: { b1, c1 } }: {
|
|
a2: number;
|
|
b2: {
|
|
b1: boolean;
|
|
c1: string;
|
|
};
|
|
}): void;
|