Skip to content

Commit

Permalink
feat(flow): adds Task#then flow types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsasharegan committed Sep 1, 2019
1 parent 3e7742e commit 75079a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flow-typed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,13 @@ declare export class Task<T, E> {
* or throws it's error value.
*/
try(): Promise<T>;
/**
* Conforms to the Promise A+ spec.
*/
then<TResult1 = T, TResult2 = empty>(
onfulfilled?: ?((value: T) => TResult1 | Promise<TResult1>),
onrejected?: ?((reason: any) => TResult2 | Promise<TResult2>)
): Promise<TResult1 | TResult2>;
/**
* `tap` allows you to do side-effects with the value
* when the Task is executed and is on the success path.
Expand Down

0 comments on commit 75079a0

Please sign in to comment.