mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 14:43:33 +03:00
15 lines
274 B
TypeScript
15 lines
274 B
TypeScript
// valid uses of array literals
|
|
|
|
var x = [];
|
|
var x = new Array(1);
|
|
|
|
var y = [1];
|
|
var y = [1, 2];
|
|
var y = new Array<number>();
|
|
|
|
var x2: number[] = [];
|
|
var x2: number[] = new Array(1);
|
|
|
|
var y2: number[] = [1];
|
|
var y2: number[] = [1, 2];
|
|
var y2: number[] = new Array<number>(); |