2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/arrayConcat2.ts ===
|
|
|
|
var a: string[] = [];
|
2015-04-16 01:44:20 +02:00
|
|
|
>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[]
|
2015-04-16 01:44:20 +02:00
|
|
|
>a.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>a : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
2015-04-13 21:36:11 +02:00
|
|
|
>"hello" : string
|
|
|
|
>'world' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a.concat('Hello');
|
|
|
|
>a.concat('Hello') : string[]
|
2015-04-16 01:44:20 +02:00
|
|
|
>a.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>a : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
2015-04-13 21:36:11 +02:00
|
|
|
>'Hello' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b = new Array<string>();
|
2015-04-16 01:44:20 +02:00
|
|
|
>b : string[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>new Array<string>() : string[]
|
2015-04-16 01:44:20 +02:00
|
|
|
>Array : ArrayConstructor
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
b.concat('hello');
|
|
|
|
>b.concat('hello') : string[]
|
2015-04-16 01:44:20 +02:00
|
|
|
>b.concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
|
|
|
>b : string[]
|
|
|
|
>concat : { <U extends string[]>(...items: U[]): string[]; (...items: string[]): string[]; }
|
2015-04-13 21:36:11 +02:00
|
|
|
>'hello' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|