File: declarationEmitDestructuring5.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (31 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//// [declarationEmitDestructuring5.ts]
function baz([, z, , ]) { }
function foo([, b, ]: [any, any]): void { }
function bar([z, , , ]) { }
function bar1([z, , , ] = [1, 3, 4, 6, 7]) { }
function bar2([,,z, , , ]) { }

//// [declarationEmitDestructuring5.js]
function baz(_a) {
    var z = _a[1];
}
function foo(_a) {
    var b = _a[1];
}
function bar(_a) {
    var z = _a[0];
}
function bar1(_a) {
    var _b = _a === void 0 ? [1, 3, 4, 6, 7] : _a, z = _b[0];
}
function bar2(_a) {
    var z = _a[2];
}


//// [declarationEmitDestructuring5.d.ts]
declare function baz([, z, ,]: [any, any, any?]): void;
declare function foo([, b,]: [any, any]): void;
declare function bar([z, , ,]: [any, any?, any?]): void;
declare function bar1([z, , ,]?: [number, number, number, number, number]): void;
declare function bar2([, , z, , ,]: [any, any, any, any?, any?]): void;