1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
=== tests/cases/compiler/promiseIdentityWithAny.ts ===
interface IPromise<T, V> {
>IPromise : IPromise<T, V>
>T : T
>V : V
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
>then : <U, W>(callback: (x: T) => IPromise<U, W>) => IPromise<U, W>
>U : U
>W : W
>callback : (x: T) => IPromise<U, W>
>x : T
>T : T
>IPromise : IPromise<T, V>
>U : U
>W : W
>IPromise : IPromise<T, V>
>U : U
>W : W
}
interface Promise<T, V> {
>Promise : Promise<T, V>
>T : T
>V : V
then<U, W>(callback: (x: T) => Promise<any, any>): Promise<any, any>;
>then : <U, W>(callback: (x: T) => Promise<any, any>) => Promise<any, any>
>U : U
>W : W
>callback : (x: T) => Promise<any, any>
>x : T
>T : T
>Promise : Promise<T, V>
>Promise : Promise<T, V>
}
// Should be ok because signature type parameters get erased to any
var x: IPromise<string, number>;
>x : IPromise<string, number>
>IPromise : IPromise<T, V>
var x: Promise<string, boolean>;
>x : IPromise<string, number>
>Promise : Promise<T, V>
|