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 committed Sep 29, 2017
1 parent 70c6700 commit 20cb8e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flow/Promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ declare class Promise<+R> {
static race<T>(promises: Array<Promise<T>>): Promise<T>;

// Non-standard APIs

// See https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/__forks__/Promise.native.js#L21
finally<U>(
onFinally?: ?(value: any) => Promise<U> | U
): Promise<U>;

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

0 comments on commit 20cb8e9

Please sign in to comment.