33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
=== tests/cases/compiler/arrayConcat2.ts ===
|
|
var a: string[] = [];
|
|
>a : string[]
|
|
>[] : undefined[]
|
|
|
|
a.concat("hello", 'world');
|
|
>a.concat("hello", 'world') : string[]
|
|
>a.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>a : string[]
|
|
>concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>"hello" : "hello"
|
|
>'world' : "world"
|
|
|
|
a.concat('Hello');
|
|
>a.concat('Hello') : string[]
|
|
>a.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>a : string[]
|
|
>concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>'Hello' : "Hello"
|
|
|
|
var b = new Array<string>();
|
|
>b : string[]
|
|
>new Array<string>() : string[]
|
|
>Array : ArrayConstructor
|
|
|
|
b.concat('hello');
|
|
>b.concat('hello') : string[]
|
|
>b.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>b : string[]
|
|
>concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; }
|
|
>'hello' : "hello"
|
|
|