2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/arrayConstructors1.ts ===
|
|
|
|
var x: string[];
|
|
|
|
>x : string[]
|
|
|
|
|
|
|
|
x = new Array(1);
|
|
|
|
>x = new Array(1) : any[]
|
|
|
|
>x : string[]
|
|
|
|
>new Array(1) : any[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x = new Array('hi', 'bye');
|
|
|
|
>x = new Array('hi', 'bye') : string[]
|
|
|
|
>x : string[]
|
|
|
|
>new Array('hi', 'bye') : string[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x = new Array<string>('hi', 'bye');
|
|
|
|
>x = new Array<string>('hi', 'bye') : string[]
|
|
|
|
>x : string[]
|
|
|
|
>new Array<string>('hi', 'bye') : string[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var y: number[];
|
|
|
|
>y : number[]
|
|
|
|
|
|
|
|
y = new Array(1);
|
|
|
|
>y = new Array(1) : any[]
|
|
|
|
>y : number[]
|
|
|
|
>new Array(1) : any[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
y = new Array(1,2);
|
|
|
|
>y = new Array(1,2) : number[]
|
|
|
|
>y : number[]
|
|
|
|
>new Array(1,2) : number[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
y = new Array<number>(1, 2);
|
|
|
|
>y = new Array<number>(1, 2) : number[]
|
|
|
|
>y : number[]
|
|
|
|
>new Array<number>(1, 2) : number[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|