15 lines
792 B
Text
15 lines
792 B
Text
=== tests/cases/compiler/genericInference1.ts ===
|
|
['a', 'b', 'c'].map(x => x.length);
|
|
>['a', 'b', 'c'].map(x => x.length) : number[]
|
|
>['a', 'b', 'c'].map : <U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[], Symbol(Array.map,Decl(lib.d.ts,1115,92))
|
|
>['a', 'b', 'c'] : string[]
|
|
>'a' : string
|
|
>'b' : string
|
|
>'c' : string
|
|
>map : <U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[], Symbol(Array.map,Decl(lib.d.ts,1115,92))
|
|
>x => x.length : (x: string) => number
|
|
>x : string, Symbol(x,Decl(genericInference1.ts,0,20))
|
|
>x.length : number, Symbol(String.length,Decl(lib.d.ts,414,19))
|
|
>x : string, Symbol(x,Decl(genericInference1.ts,0,20))
|
|
>length : number, Symbol(String.length,Decl(lib.d.ts,414,19))
|
|
|