Skip to content

Commit 2c5d22e

Browse files
authored
Better typings for Promise.resolve(), like microsoft#31117
1 parent 25f609b commit 2c5d22e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/es2015.promise.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ interface PromiseConstructor {
120120
* @param value A promise.
121121
* @returns A promise whose internal state matches the provided promise.
122122
*/
123-
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
123+
resolve<T>(value: T): Promise<T extends PromiseLike<infer U> ? U : T>;
124124

125125
/**
126126
* Creates a new resolved promise .

0 commit comments

Comments
 (0)