mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
24 lines
513 B
TypeScript
24 lines
513 B
TypeScript
// @downlevelIteration: true
|
|
function f0() {
|
|
var a = [1, 2, 3];
|
|
var a1 = [...a];
|
|
var a2 = [1, ...a];
|
|
var a3 = [1, 2, ...a];
|
|
var a4 = [...a, 1];
|
|
var a5 = [...a, 1, 2];
|
|
var a6 = [1, 2, ...a, 1, 2];
|
|
var a7 = [1, ...a, 2, ...a];
|
|
var a8 = [...a, ...a, ...a];
|
|
}
|
|
|
|
function f1() {
|
|
var a = [1, 2, 3];
|
|
var b = ["hello", ...a, true];
|
|
var b: (string | number | boolean)[];
|
|
}
|
|
|
|
function f2() {
|
|
var a = [...[...[...[...[...[]]]]]];
|
|
var b = [...[...[...[...[...[5]]]]]];
|
|
}
|