Skip to content

Commit

Permalink
Better typings for Promise executor, like microsoft#31117
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Aug 23, 2019
1 parent 5b59cfb commit 5ab6100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/es2015.promise.d.ts
Expand Up @@ -10,7 +10,7 @@ interface PromiseConstructor {
* a resolve callback used to resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
new <T>(executor: (resolve: (value?: T) => void, reject: (reason?: any) => void) => void): Promise<T extends PromiseLike<infer U> ? U : T>;

/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
Expand Down

0 comments on commit 5ab6100

Please sign in to comment.