mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Accepting new baselines
This commit is contained in:
parent
34c4b312f9
commit
2b58a239d1
@ -10,9 +10,9 @@
|
||||
// more args not allowed
|
||||
var r2 = foo({ cb: <T>(x: T, y: T) => '' }); // error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! Argument of type '{ cb: <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: any) => string; }'.
|
||||
!!! Argument of type '{ cb: <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'.
|
||||
!!! Types of property 'cb' are incompatible:
|
||||
!!! Type '<T>(x: T, y: T) => string' is not assignable to type '(t: any) => string'.
|
||||
!!! Type '<T>(x: T, y: T) => string' is not assignable to type '(t: {}) => string'.
|
||||
var r3 = foo({ cb: (x: string, y: number) => '' }); // error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'.
|
||||
|
||||
@ -20,10 +20,10 @@ declare function identity<V>(y: V): V;
|
||||
>V : V
|
||||
|
||||
var s = map("", () => { return { x: identity }; });
|
||||
>s : any
|
||||
>map("", () => { return { x: identity }; }) : any
|
||||
>s : string
|
||||
>map("", () => { return { x: identity }; }) : string
|
||||
>map : <T, U>(x: T, f: () => { x: (s: T) => U; }) => U
|
||||
>() => { return { x: identity }; } : () => { x: <V>(y: V) => V; }
|
||||
>() => { return { x: identity }; } : () => { x: (y: string) => string; }
|
||||
>{ x: identity } : { x: <V>(y: V) => V; }
|
||||
>x : <V>(y: V) => V
|
||||
>identity : <V>(y: V) => V
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user