2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/arrayConcat2.ts ===
|
|
|
|
var a: string[] = [];
|
|
|
|
>a : string[]
|
2014-10-13 15:56:58 +02:00
|
|
|
>[] : undefined[]
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a.concat("hello", 'world');
|
|
|
|
>a.concat("hello", 'world') : string[]
|
|
|
|
>a.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>a : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
|
|
|
|
a.concat('Hello');
|
|
|
|
>a.concat('Hello') : string[]
|
|
|
|
>a.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>a : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
|
|
|
|
var b = new Array<string>();
|
|
|
|
>b : string[]
|
|
|
|
>new Array<string>() : string[]
|
2014-10-29 05:21:47 +01:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
b.concat('hello');
|
|
|
|
>b.concat('hello') : string[]
|
|
|
|
>b.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>b : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
|