-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor cleanup and some related tests
- Loading branch information
Showing
5 changed files
with
561 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//// [awaitedOfT.ts] | ||
type T1 = Awaited<number>; // number (same as 'await') | ||
type T2 = Awaited<Promise<number>>; // number (same as 'await') | ||
type T3 = Awaited<Promise<Promise<number>>>; // number (same as 'await') | ||
type T4 = Awaited<Promise<Promise<Promise<number>>>>; // number (same as 'await') | ||
type T5 = Awaited<PromiseLike<number>>; // number (same as 'await') | ||
type T6 = Awaited<PromiseLike<PromiseLike<number>>>; // number (same as 'await') | ||
type T7 = Awaited<PromiseLike<PromiseLike<PromiseLike<number>>>>; // number (same as 'await') | ||
type T8 = Awaited<Promise<PromiseLike<number>>>; // number (same as 'await') | ||
type T9 = Awaited<PromiseLike<Promise<number>>>; // number (same as 'await') | ||
type T10 = Awaited<{ then: any; }>; // never (no way to know what this might resolve to, differs from 'await') | ||
type T11 = Awaited<{ then: number; }>; // { then: number; } (same as 'await') | ||
type T12 = Awaited<{ then(): void; }>; // never (no way to know what this might resolve to, error for 'await') | ||
type T13 = Awaited<{ then(x: any): void; }>; // never (no way to know what this might resolve to, error for 'await') | ||
type T14 = Awaited<{ then(x: number): void; }>; // never (cannot be resolved correctly, error for 'await') | ||
type T15 = Awaited<{ then(x: () => void): void; }>; // never (no way to know what this might resolve to) | ||
type T16 = Awaited<{ then(x: (y: any) => void): void; }>; // any (same as 'await') | ||
type T17 = Awaited<{ then(x: (y: number) => void): void; }>; // number (same as 'await') | ||
type T18 = Awaited<{ then(x: (y: { then: any; }) => void): void; }>; // { then: any; } (no recursive unwrap, differs from 'await') | ||
type T19 = Awaited<{ then(x: (y: { then: number; }) => void): void; }>; // { then: number; } (no recursive unwrap, differs from 'await') | ||
type T20 = Awaited<{ then(x: (y: { then(): void; }) => void): void; }>; // { then(): void; } (no recursive unwrap, differs from 'await') | ||
type T21 = Awaited<{ then(x: (y: { then(x: any): void; }) => void): void; }>; // { then(x: any): void; } (no recursive unwrap, differs from 'await') | ||
type T22 = Awaited<{ then(x: (y: { then(x: number): void; }) => void): void; }>; // { then(x: number): void; } (no recursive unwrap, differs from 'await') | ||
type T23 = Awaited<{ then(x: (y: { then(x: () => void): void; }) => void): void; }>; // { then(x: () => void): void; } (no recursive unwrap, differs from 'await') | ||
type T24 = Awaited<{ then(x: (y: { then(x: (y: any) => void): void; }) => void): void; }>; // { then(x: (y: any) => void): void; } (no recursive unwrap, differs from 'await') | ||
type T25 = Awaited<{ then(x: (y: { then(x: (y: number) => void): void; }) => void): void; }>; // { then(x: (y: number) => void): void; } (no recursive unwrap, differs from 'await') | ||
|
||
// self recursive bad promise | ||
type T26 = Awaited<BadPromise>; // BadPromise (no recursive unwrap, differs from 'await') | ||
interface BadPromise { then(cb: (value: BadPromise) => void): any; } | ||
|
||
// mutually recursive bad promises | ||
type T27 = Awaited<BadPromiseA>; // BadPromiseB (no recursive unwrap, differs from 'await') | ||
interface BadPromiseA { then(cb: (value: BadPromiseB) => void): any; } | ||
interface BadPromiseB { then(cb: (value: BadPromiseA) => void): any; } | ||
|
||
type T28 = Awaited<never>; // never (same as 'await') | ||
type T29 = Awaited<number | Promise<string>>; // string | number (same as 'await') | ||
type T30 = Awaited<number | Promise<never>>; // number (same as 'await') | ||
type T31 = Awaited<PromiseLike<number> | Promise<string>>; // string | number (same as 'await') | ||
type T32 = Awaited<Awaited<number>>; // number (same as 'await') | ||
type T33 = Awaited<Promise<Awaited<Promise<number>>>>; // number (same as 'await') | ||
|
||
//// [awaitedOfT.js] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
=== tests/cases/compiler/awaitedOfT.ts === | ||
type T1 = Awaited<number>; // number (same as 'await') | ||
>T1 : Symbol(T1, Decl(awaitedOfT.ts, 0, 0)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T2 = Awaited<Promise<number>>; // number (same as 'await') | ||
>T2 : Symbol(T2, Decl(awaitedOfT.ts, 0, 26)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T3 = Awaited<Promise<Promise<number>>>; // number (same as 'await') | ||
>T3 : Symbol(T3, Decl(awaitedOfT.ts, 1, 35)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T4 = Awaited<Promise<Promise<Promise<number>>>>; // number (same as 'await') | ||
>T4 : Symbol(T4, Decl(awaitedOfT.ts, 2, 44)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T5 = Awaited<PromiseLike<number>>; // number (same as 'await') | ||
>T5 : Symbol(T5, Decl(awaitedOfT.ts, 3, 53)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T6 = Awaited<PromiseLike<PromiseLike<number>>>; // number (same as 'await') | ||
>T6 : Symbol(T6, Decl(awaitedOfT.ts, 4, 39)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T7 = Awaited<PromiseLike<PromiseLike<PromiseLike<number>>>>; // number (same as 'await') | ||
>T7 : Symbol(T7, Decl(awaitedOfT.ts, 5, 52)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T8 = Awaited<Promise<PromiseLike<number>>>; // number (same as 'await') | ||
>T8 : Symbol(T8, Decl(awaitedOfT.ts, 6, 65)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T9 = Awaited<PromiseLike<Promise<number>>>; // number (same as 'await') | ||
>T9 : Symbol(T9, Decl(awaitedOfT.ts, 7, 48)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T10 = Awaited<{ then: any; }>; // never (no way to know what this might resolve to, differs from 'await') | ||
>T10 : Symbol(T10, Decl(awaitedOfT.ts, 8, 48)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 9, 20)) | ||
|
||
type T11 = Awaited<{ then: number; }>; // { then: number; } (same as 'await') | ||
>T11 : Symbol(T11, Decl(awaitedOfT.ts, 9, 35)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 10, 20)) | ||
|
||
type T12 = Awaited<{ then(): void; }>; // never (no way to know what this might resolve to, error for 'await') | ||
>T12 : Symbol(T12, Decl(awaitedOfT.ts, 10, 38)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 11, 20)) | ||
|
||
type T13 = Awaited<{ then(x: any): void; }>; // never (no way to know what this might resolve to, error for 'await') | ||
>T13 : Symbol(T13, Decl(awaitedOfT.ts, 11, 38)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 12, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 12, 26)) | ||
|
||
type T14 = Awaited<{ then(x: number): void; }>; // never (cannot be resolved correctly, error for 'await') | ||
>T14 : Symbol(T14, Decl(awaitedOfT.ts, 12, 44)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 13, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 13, 26)) | ||
|
||
type T15 = Awaited<{ then(x: () => void): void; }>; // never (no way to know what this might resolve to) | ||
>T15 : Symbol(T15, Decl(awaitedOfT.ts, 13, 47)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 14, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 14, 26)) | ||
|
||
type T16 = Awaited<{ then(x: (y: any) => void): void; }>; // any (same as 'await') | ||
>T16 : Symbol(T16, Decl(awaitedOfT.ts, 14, 51)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 15, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 15, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 15, 30)) | ||
|
||
type T17 = Awaited<{ then(x: (y: number) => void): void; }>; // number (same as 'await') | ||
>T17 : Symbol(T17, Decl(awaitedOfT.ts, 15, 57)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 16, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 16, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 16, 30)) | ||
|
||
type T18 = Awaited<{ then(x: (y: { then: any; }) => void): void; }>; // { then: any; } (no recursive unwrap, differs from 'await') | ||
>T18 : Symbol(T18, Decl(awaitedOfT.ts, 16, 60)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 17, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 17, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 17, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 17, 34)) | ||
|
||
type T19 = Awaited<{ then(x: (y: { then: number; }) => void): void; }>; // { then: number; } (no recursive unwrap, differs from 'await') | ||
>T19 : Symbol(T19, Decl(awaitedOfT.ts, 17, 68)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 18, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 18, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 18, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 18, 34)) | ||
|
||
type T20 = Awaited<{ then(x: (y: { then(): void; }) => void): void; }>; // { then(): void; } (no recursive unwrap, differs from 'await') | ||
>T20 : Symbol(T20, Decl(awaitedOfT.ts, 18, 71)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 19, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 19, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 19, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 19, 34)) | ||
|
||
type T21 = Awaited<{ then(x: (y: { then(x: any): void; }) => void): void; }>; // { then(x: any): void; } (no recursive unwrap, differs from 'await') | ||
>T21 : Symbol(T21, Decl(awaitedOfT.ts, 19, 71)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 20, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 20, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 20, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 20, 34)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 20, 40)) | ||
|
||
type T22 = Awaited<{ then(x: (y: { then(x: number): void; }) => void): void; }>; // { then(x: number): void; } (no recursive unwrap, differs from 'await') | ||
>T22 : Symbol(T22, Decl(awaitedOfT.ts, 20, 77)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 21, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 21, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 21, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 21, 34)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 21, 40)) | ||
|
||
type T23 = Awaited<{ then(x: (y: { then(x: () => void): void; }) => void): void; }>; // { then(x: () => void): void; } (no recursive unwrap, differs from 'await') | ||
>T23 : Symbol(T23, Decl(awaitedOfT.ts, 21, 80)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 22, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 22, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 22, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 22, 34)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 22, 40)) | ||
|
||
type T24 = Awaited<{ then(x: (y: { then(x: (y: any) => void): void; }) => void): void; }>; // { then(x: (y: any) => void): void; } (no recursive unwrap, differs from 'await') | ||
>T24 : Symbol(T24, Decl(awaitedOfT.ts, 22, 84)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 23, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 23, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 23, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 23, 34)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 23, 40)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 23, 44)) | ||
|
||
type T25 = Awaited<{ then(x: (y: { then(x: (y: number) => void): void; }) => void): void; }>; // { then(x: (y: number) => void): void; } (no recursive unwrap, differs from 'await') | ||
>T25 : Symbol(T25, Decl(awaitedOfT.ts, 23, 90)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 24, 20)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 24, 26)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 24, 30)) | ||
>then : Symbol(then, Decl(awaitedOfT.ts, 24, 34)) | ||
>x : Symbol(x, Decl(awaitedOfT.ts, 24, 40)) | ||
>y : Symbol(y, Decl(awaitedOfT.ts, 24, 44)) | ||
|
||
// self recursive bad promise | ||
type T26 = Awaited<BadPromise>; // BadPromise (no recursive unwrap, differs from 'await') | ||
>T26 : Symbol(T26, Decl(awaitedOfT.ts, 24, 93)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>BadPromise : Symbol(BadPromise, Decl(awaitedOfT.ts, 27, 31)) | ||
|
||
interface BadPromise { then(cb: (value: BadPromise) => void): any; } | ||
>BadPromise : Symbol(BadPromise, Decl(awaitedOfT.ts, 27, 31)) | ||
>then : Symbol(BadPromise.then, Decl(awaitedOfT.ts, 28, 22)) | ||
>cb : Symbol(cb, Decl(awaitedOfT.ts, 28, 28)) | ||
>value : Symbol(value, Decl(awaitedOfT.ts, 28, 33)) | ||
>BadPromise : Symbol(BadPromise, Decl(awaitedOfT.ts, 27, 31)) | ||
|
||
// mutually recursive bad promises | ||
type T27 = Awaited<BadPromiseA>; // BadPromiseB (no recursive unwrap, differs from 'await') | ||
>T27 : Symbol(T27, Decl(awaitedOfT.ts, 28, 68)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>BadPromiseA : Symbol(BadPromiseA, Decl(awaitedOfT.ts, 31, 32)) | ||
|
||
interface BadPromiseA { then(cb: (value: BadPromiseB) => void): any; } | ||
>BadPromiseA : Symbol(BadPromiseA, Decl(awaitedOfT.ts, 31, 32)) | ||
>then : Symbol(BadPromiseA.then, Decl(awaitedOfT.ts, 32, 23)) | ||
>cb : Symbol(cb, Decl(awaitedOfT.ts, 32, 29)) | ||
>value : Symbol(value, Decl(awaitedOfT.ts, 32, 34)) | ||
>BadPromiseB : Symbol(BadPromiseB, Decl(awaitedOfT.ts, 32, 70)) | ||
|
||
interface BadPromiseB { then(cb: (value: BadPromiseA) => void): any; } | ||
>BadPromiseB : Symbol(BadPromiseB, Decl(awaitedOfT.ts, 32, 70)) | ||
>then : Symbol(BadPromiseB.then, Decl(awaitedOfT.ts, 33, 23)) | ||
>cb : Symbol(cb, Decl(awaitedOfT.ts, 33, 29)) | ||
>value : Symbol(value, Decl(awaitedOfT.ts, 33, 34)) | ||
>BadPromiseA : Symbol(BadPromiseA, Decl(awaitedOfT.ts, 31, 32)) | ||
|
||
type T28 = Awaited<never>; // never (same as 'await') | ||
>T28 : Symbol(T28, Decl(awaitedOfT.ts, 33, 70)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T29 = Awaited<number | Promise<string>>; // string | number (same as 'await') | ||
>T29 : Symbol(T29, Decl(awaitedOfT.ts, 35, 26)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T30 = Awaited<number | Promise<never>>; // number (same as 'await') | ||
>T30 : Symbol(T30, Decl(awaitedOfT.ts, 36, 45)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T31 = Awaited<PromiseLike<number> | Promise<string>>; // string | number (same as 'await') | ||
>T31 : Symbol(T31, Decl(awaitedOfT.ts, 37, 44)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
||
type T32 = Awaited<Awaited<number>>; // number (same as 'await') | ||
>T32 : Symbol(T32, Decl(awaitedOfT.ts, 38, 58)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type T33 = Awaited<Promise<Awaited<Promise<number>>>>; // number (same as 'await') | ||
>T33 : Symbol(T33, Decl(awaitedOfT.ts, 39, 36)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) | ||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) | ||
|
Oops, something went wrong.