53 lines
3.3 KiB
Text
53 lines
3.3 KiB
Text
=== tests/cases/compiler/promiseIdentityWithConstraints.ts ===
|
|
interface IPromise<T, V> {
|
|
>IPromise : IPromise<T, V>, Symbol(IPromise,Decl(promiseIdentityWithConstraints.ts,0,0))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,0,19))
|
|
>V : V, Symbol(V,Decl(promiseIdentityWithConstraints.ts,0,21))
|
|
|
|
then<U extends T, W extends V>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
|
>then : <U extends T, W extends V>(callback: (x: T) => IPromise<U, W>) => IPromise<U, W>, Symbol(then,Decl(promiseIdentityWithConstraints.ts,0,26))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,1,9))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,0,19))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,1,21))
|
|
>V : V, Symbol(V,Decl(promiseIdentityWithConstraints.ts,0,21))
|
|
>callback : (x: T) => IPromise<U, W>, Symbol(callback,Decl(promiseIdentityWithConstraints.ts,1,35))
|
|
>x : T, Symbol(x,Decl(promiseIdentityWithConstraints.ts,1,46))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,0,19))
|
|
>IPromise : IPromise<T, V>, Symbol(IPromise,Decl(promiseIdentityWithConstraints.ts,0,0))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,1,9))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,1,21))
|
|
>IPromise : IPromise<T, V>, Symbol(IPromise,Decl(promiseIdentityWithConstraints.ts,0,0))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,1,9))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,1,21))
|
|
}
|
|
interface Promise<T, V> {
|
|
>Promise : Promise<T, V>, Symbol(Promise,Decl(promiseIdentityWithConstraints.ts,2,1))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,3,18))
|
|
>V : V, Symbol(V,Decl(promiseIdentityWithConstraints.ts,3,20))
|
|
|
|
then<U extends T, W extends V>(callback: (x: T) => Promise<U, W>): Promise<U, W>;
|
|
>then : <U extends T, W extends V>(callback: (x: T) => Promise<U, W>) => Promise<U, W>, Symbol(then,Decl(promiseIdentityWithConstraints.ts,3,25))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,4,9))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,3,18))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,4,21))
|
|
>V : V, Symbol(V,Decl(promiseIdentityWithConstraints.ts,3,20))
|
|
>callback : (x: T) => Promise<U, W>, Symbol(callback,Decl(promiseIdentityWithConstraints.ts,4,35))
|
|
>x : T, Symbol(x,Decl(promiseIdentityWithConstraints.ts,4,46))
|
|
>T : T, Symbol(T,Decl(promiseIdentityWithConstraints.ts,3,18))
|
|
>Promise : Promise<T, V>, Symbol(Promise,Decl(promiseIdentityWithConstraints.ts,2,1))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,4,9))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,4,21))
|
|
>Promise : Promise<T, V>, Symbol(Promise,Decl(promiseIdentityWithConstraints.ts,2,1))
|
|
>U : U, Symbol(U,Decl(promiseIdentityWithConstraints.ts,4,9))
|
|
>W : W, Symbol(W,Decl(promiseIdentityWithConstraints.ts,4,21))
|
|
}
|
|
|
|
// Error because constraint V doesn't match
|
|
var x: IPromise<string, number>;
|
|
>x : IPromise<string, number>, Symbol(x,Decl(promiseIdentityWithConstraints.ts,8,3),Decl(promiseIdentityWithConstraints.ts,9,3))
|
|
>IPromise : IPromise<T, V>, Symbol(IPromise,Decl(promiseIdentityWithConstraints.ts,0,0))
|
|
|
|
var x: Promise<string, boolean>;
|
|
>x : IPromise<string, number>, Symbol(x,Decl(promiseIdentityWithConstraints.ts,8,3),Decl(promiseIdentityWithConstraints.ts,9,3))
|
|
>Promise : Promise<T, V>, Symbol(Promise,Decl(promiseIdentityWithConstraints.ts,2,1))
|
|
|