27 lines
505 B
Text
27 lines
505 B
Text
=== tests/cases/compiler/inferentialTypingWithFunctionType.ts ===
|
|
declare function map<T, U>(x: T, f: (s: T) => U): U;
|
|
>map : <T, U>(x: T, f: (s: T) => U) => U
|
|
>T : T
|
|
>U : U
|
|
>x : T
|
|
>T : T
|
|
>f : (s: T) => U
|
|
>s : T
|
|
>T : T
|
|
>U : U
|
|
>U : U
|
|
|
|
declare function identity<V>(y: V): V;
|
|
>identity : <V>(y: V) => V
|
|
>V : V
|
|
>y : V
|
|
>V : V
|
|
>V : V
|
|
|
|
var s = map("", identity);
|
|
>s : string
|
|
>map("", identity) : string
|
|
>map : <T, U>(x: T, f: (s: T) => U) => U
|
|
>"" : string
|
|
>identity : <V>(y: V) => V
|
|
|