32 lines
858 B
Text
32 lines
858 B
Text
=== 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[])[]) => string[]
|
|
>a : string[]
|
|
>concat : (...items: (string | string[])[]) => string[]
|
|
>"hello" : string
|
|
>'world' : string
|
|
|
|
a.concat('Hello');
|
|
>a.concat('Hello') : string[]
|
|
>a.concat : (...items: (string | string[])[]) => string[]
|
|
>a : string[]
|
|
>concat : (...items: (string | string[])[]) => string[]
|
|
>'Hello' : string
|
|
|
|
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[])[]) => string[]
|
|
>b : string[]
|
|
>concat : (...items: (string | string[])[]) => string[]
|
|
>'hello' : string
|
|
|