Skip to content

Commit 040c121

Browse files
jablkorbuckton
andauthored
Better typings for Promise.resolve(), like microsoft#31117 (microsoft#33074)
* Better typings for Promise.resolve(), like microsoft#31117 * Add tests * Update to Awaited<T> * Fix issue with Awaited affecting jQuery, additional tests Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
1 parent 8493ea1 commit 040c121

File tree

84 files changed

+1895
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1895
-510
lines changed

src/lib/es2015.promise.d.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface PromiseConstructor {
2121
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
2222

2323
// see: lib.es2015.iterable.d.ts
24-
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
24+
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
2525

2626
/**
2727
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
@@ -32,7 +32,7 @@ interface PromiseConstructor {
3232
race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
3333

3434
// see: lib.es2015.iterable.d.ts
35-
// race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
35+
// race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
3636

3737
/**
3838
* Creates a new rejected promise for the provided reason.
@@ -46,13 +46,18 @@ interface PromiseConstructor {
4646
* @returns A resolved promise.
4747
*/
4848
resolve(): Promise<void>;
49-
5049
/**
5150
* Creates a new resolved promise for the provided value.
5251
* @param value A promise.
5352
* @returns A promise whose internal state matches the provided promise.
5453
*/
55-
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
54+
resolve<T>(value: T): Promise<Awaited<T>>;
55+
/**
56+
* Creates a new resolved promise for the provided value.
57+
* @param value A promise.
58+
* @returns A promise whose internal state matches the provided promise.
59+
*/
60+
resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
5661
}
5762

5863
declare var Promise: PromiseConstructor;

src/lib/es5.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,8 @@ interface Promise<T> {
15121512
*/
15131513
type Awaited<T> =
15141514
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
1515-
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1516-
F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
1515+
T extends object & { then(onfulfilled: infer F, ...args: infer _): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1516+
F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
15171517
Awaited<V> : // recursively unwrap the value
15181518
never : // the argument to `then` was not callable
15191519
T; // non-object or non-thenable

tests/baselines/reference/asyncArrowFunction11_es5.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class A {
88
>args : Symbol(args, Decl(asyncArrowFunction11_es5.ts, 2, 15))
99

1010
await Promise.resolve();
11-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
11+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
1212
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
13-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
13+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
1414

1515
const obj = { ["a"]: () => this }; // computed property name after `await` triggers case
1616
>obj : Symbol(obj, Decl(asyncArrowFunction11_es5.ts, 4, 13))

tests/baselines/reference/asyncArrowFunction11_es5.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class A {
1111
await Promise.resolve();
1212
>await Promise.resolve() : void
1313
>Promise.resolve() : Promise<void>
14-
>Promise.resolve : { (): Promise<void>; <T>(value: T | PromiseLike<T>): Promise<T>; }
14+
>Promise.resolve : { (): Promise<void>; <T>(value: T): Promise<Awaited<T>>; <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>; }
1515
>Promise : PromiseConstructor
16-
>resolve : { (): Promise<void>; <T>(value: T | PromiseLike<T>): Promise<T>; }
16+
>resolve : { (): Promise<void>; <T>(value: T): Promise<Awaited<T>>; <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>; }
1717

1818
const obj = { ["a"]: () => this }; // computed property name after `await` triggers case
1919
>obj : { a: () => this; }

tests/baselines/reference/asyncArrowFunction9_es2017.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es20
1616
!!! error TS1005: ',' expected.
1717
~~~~~~~
1818
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:78:13: 'Promise' was also declared here.
19+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
2020
~
2121
!!! error TS1005: ',' expected.
2222
~~

tests/baselines/reference/asyncArrowFunction9_es5.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(
1616
!!! error TS1005: ',' expected.
1717
~~~~~~~
1818
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:78:13: 'Promise' was also declared here.
19+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
2020
~
2121
!!! error TS1005: ',' expected.
2222
~~

tests/baselines/reference/asyncArrowFunction9_es6.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(
1616
!!! error TS1005: ',' expected.
1717
~~~~~~~
1818
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:78:13: 'Promise' was also declared here.
19+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
2020
~
2121
!!! error TS1005: ',' expected.
2222
~~

tests/baselines/reference/asyncFunctionReturnType.symbols

+20-20
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ async function fIndexedTypeForPromiseOfStringProp(obj: Obj): Promise<Obj["string
4646
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
4747

4848
return Promise.resolve(obj.stringProp);
49-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
49+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
5050
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
51-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
51+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
5252
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
5353
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 20, 50))
5454
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
@@ -62,9 +62,9 @@ async function fIndexedTypeForExplicitPromiseOfStringProp(obj: Obj): Promise<Obj
6262
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
6363

6464
return Promise.resolve<Obj["stringProp"]>(obj.stringProp);
65-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
65+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
6666
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
67-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
67+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
6868
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
6969
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
7070
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 24, 58))
@@ -92,9 +92,9 @@ async function fIndexedTypeForPromiseOfAnyProp(obj: Obj): Promise<Obj["anyProp"]
9292
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
9393

9494
return Promise.resolve(obj.anyProp);
95-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
95+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
9696
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
97-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
97+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
9898
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
9999
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 32, 47))
100100
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
@@ -108,9 +108,9 @@ async function fIndexedTypeForExplicitPromiseOfAnyProp(obj: Obj): Promise<Obj["a
108108
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
109109

110110
return Promise.resolve<Obj["anyProp"]>(obj.anyProp);
111-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
111+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
112112
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
113-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
113+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
114114
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
115115
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
116116
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 36, 55))
@@ -142,9 +142,9 @@ async function fGenericIndexedTypeForPromiseOfStringProp<TObj extends Obj>(obj:
142142
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
143143

144144
return Promise.resolve(obj.stringProp);
145-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
145+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
146146
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
147-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
147+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
148148
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
149149
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 44, 75))
150150
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
@@ -160,9 +160,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfStringProp<TObj extends Ob
160160
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
161161

162162
return Promise.resolve<TObj["stringProp"]>(obj.stringProp);
163-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
163+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
164164
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
165-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
165+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
166166
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
167167
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
168168
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 48, 83))
@@ -194,9 +194,9 @@ async function fGenericIndexedTypeForPromiseOfAnyProp<TObj extends Obj>(obj: TOb
194194
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
195195

196196
return Promise.resolve(obj.anyProp);
197-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
197+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
198198
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
199-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
199+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
200200
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
201201
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 56, 72))
202202
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
@@ -212,9 +212,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfAnyProp<TObj extends Obj>(
212212
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
213213

214214
return Promise.resolve<TObj["anyProp"]>(obj.anyProp);
215-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
215+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
216216
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
217-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
217+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
218218
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
219219
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
220220
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 60, 80))
@@ -255,9 +255,9 @@ async function fGenericIndexedTypeForPromiseOfKProp<TObj extends Obj, K extends
255255
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
256256

257257
return Promise.resolve(obj[key]);
258-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
258+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
259259
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
260-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
260+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
261261
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 68, 92))
262262
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 68, 102))
263263
}
@@ -277,9 +277,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfKProp<TObj extends Obj, K
277277
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
278278

279279
return Promise.resolve<TObj[K]>(obj[key]);
280-
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
280+
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
281281
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
282-
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
282+
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
283283
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
284284
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
285285
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 72, 100))

0 commit comments

Comments
 (0)