Skip to content

Commit

Permalink
Fixed type definition for Promise.finally
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretiel authored May 13, 2019
1 parent 9869a4b commit b5d584e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions es6-promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;

/**
* onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
* onSettled is invoked when/if the "promise" settles (either rejects or fulfills).
* The returned promise is settled when the `Thenable` returned by `onFinally`
*
* @param onFinally called when/if "promise" settles
*/
finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
finally (onFinally?: () => any | Thenable<any>): Promise<R>;

/**
* Make a new promise from the thenable.
Expand Down

0 comments on commit b5d584e

Please sign in to comment.