Skip to content

Commit

Permalink
Add finally method to Promise flow definition
Browse files Browse the repository at this point in the history
The `finally` method definition was missing, while it really exists causing a flow error when using it.
  • Loading branch information
Bhullnatik authored Sep 27, 2017
1 parent 70c6700 commit 310b35f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flow/Promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ declare class Promise<+R> {
static race<T>(promises: Array<Promise<T>>): Promise<T>;

// Non-standard APIs
finally<U>(
onSettled?: ?(value: any) => Promise<U> | U
): Promise<U>;

done<U>(
onFulfill?: ?(value: R) => mixed,
onReject?: ?(error: any) => mixed
Expand Down

0 comments on commit 310b35f

Please sign in to comment.