Skip to content

Commit

Permalink
Better typings for Promise.resolve(), like microsoft#31117
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Aug 25, 2019
1 parent 25f609b commit 2c5d22e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/es2015.promise.d.ts
Expand Up @@ -120,7 +120,7 @@ interface PromiseConstructor {
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
resolve<T>(value: T): Promise<T extends PromiseLike<infer U> ? U : T>;

/**
* Creates a new resolved promise .
Expand Down

0 comments on commit 2c5d22e

Please sign in to comment.