Skip to content

Commit 5ab6100

Browse files
authored
Better typings for Promise executor, like microsoft#31117
1 parent 5b59cfb commit 5ab6100

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
@@ -10,7 +10,7 @@ interface PromiseConstructor {
1010
* a resolve callback used to resolve the promise with a value or the result of another promise,
1111
* and a reject callback used to reject the promise with a provided reason or error.
1212
*/
13-
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
13+
new <T>(executor: (resolve: (value?: T) => void, reject: (reason?: any) => void) => void): Promise<T extends PromiseLike<infer U> ? U : T>;
1414

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

0 commit comments

Comments
 (0)