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