111 lines
6.1 KiB
Plaintext
111 lines
6.1 KiB
Plaintext
=== tests/cases/compiler/tupleTypeInference.ts ===
|
|
declare var $q: IQService;
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>IQService : Symbol(IQService, Decl(tupleTypeInference.ts, 0, 26))
|
|
|
|
interface IQService {
|
|
>IQService : Symbol(IQService, Decl(tupleTypeInference.ts, 0, 26))
|
|
|
|
all<T1, T2, T3>(x: [IPromise<T1>, IPromise<T2>, IPromise<T3>]): IPromise<[T1, T2, T3]>;
|
|
>all : Symbol(all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 3, 8))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 3, 11))
|
|
>T3 : Symbol(T3, Decl(tupleTypeInference.ts, 3, 15))
|
|
>x : Symbol(x, Decl(tupleTypeInference.ts, 3, 20))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 3, 8))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 3, 11))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T3 : Symbol(T3, Decl(tupleTypeInference.ts, 3, 15))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 3, 8))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 3, 11))
|
|
>T3 : Symbol(T3, Decl(tupleTypeInference.ts, 3, 15))
|
|
|
|
all<T1, T2>(x: [IPromise<T1>, IPromise<T2>]): IPromise<[T1, T2]>;
|
|
>all : Symbol(all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 4, 8))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 4, 11))
|
|
>x : Symbol(x, Decl(tupleTypeInference.ts, 4, 16))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 4, 8))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 4, 11))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 4, 8))
|
|
>T2 : Symbol(T2, Decl(tupleTypeInference.ts, 4, 11))
|
|
|
|
all<T1>(x: [IPromise<T1>]): IPromise<[T1]>;
|
|
>all : Symbol(all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 5, 8))
|
|
>x : Symbol(x, Decl(tupleTypeInference.ts, 5, 12))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 5, 8))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T1 : Symbol(T1, Decl(tupleTypeInference.ts, 5, 8))
|
|
|
|
when<T>(t?: T): IPromise<T>;
|
|
>when : Symbol(when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>T : Symbol(T, Decl(tupleTypeInference.ts, 6, 9))
|
|
>t : Symbol(t, Decl(tupleTypeInference.ts, 6, 12))
|
|
>T : Symbol(T, Decl(tupleTypeInference.ts, 6, 9))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T : Symbol(T, Decl(tupleTypeInference.ts, 6, 9))
|
|
}
|
|
|
|
interface IPromise<T> {
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>T : Symbol(T, Decl(tupleTypeInference.ts, 9, 19))
|
|
|
|
then<TResult>(callback: (t: T) => TResult): IPromise<TResult>;
|
|
>then : Symbol(then, Decl(tupleTypeInference.ts, 9, 23))
|
|
>TResult : Symbol(TResult, Decl(tupleTypeInference.ts, 10, 9))
|
|
>callback : Symbol(callback, Decl(tupleTypeInference.ts, 10, 18))
|
|
>t : Symbol(t, Decl(tupleTypeInference.ts, 10, 29))
|
|
>T : Symbol(T, Decl(tupleTypeInference.ts, 9, 19))
|
|
>TResult : Symbol(TResult, Decl(tupleTypeInference.ts, 10, 9))
|
|
>IPromise : Symbol(IPromise, Decl(tupleTypeInference.ts, 7, 1))
|
|
>TResult : Symbol(TResult, Decl(tupleTypeInference.ts, 10, 9))
|
|
}
|
|
|
|
// Implicit different types
|
|
var a = $q.all([$q.when<string>(), $q.when<number>()]);
|
|
>a : Symbol(a, Decl(tupleTypeInference.ts, 14, 3))
|
|
>$q.all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
|
|
// Explicit different types
|
|
var b = $q.all<string, number>([$q.when<string>(), $q.when<number>()]);
|
|
>b : Symbol(b, Decl(tupleTypeInference.ts, 17, 3))
|
|
>$q.all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
|
|
// Implicit identical types
|
|
var c = $q.all([$q.when<string>(), $q.when<string>()]);
|
|
>c : Symbol(c, Decl(tupleTypeInference.ts, 20, 3))
|
|
>$q.all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>all : Symbol(IQService.all, Decl(tupleTypeInference.ts, 2, 21), Decl(tupleTypeInference.ts, 3, 91), Decl(tupleTypeInference.ts, 4, 69))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q.when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
>$q : Symbol($q, Decl(tupleTypeInference.ts, 0, 11))
|
|
>when : Symbol(IQService.when, Decl(tupleTypeInference.ts, 5, 47))
|
|
|