Skip to content

Commit

Permalink
Fix the TypeScript overloading for map
Browse files Browse the repository at this point in the history
Co-Authored-By: gcanti <giulio.canti@gmail.com>
  • Loading branch information
Avaq and gcanti committed Nov 18, 2019
1 parent b9701a8 commit 0e28c8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ declare module 'fluture' {
/** Set up a cleanup Future to run after the given action has settled. See https://github.com/fluture-js/Fluture#lastly */
export function lastly<L>(cleanup: FutureInstance<L, any>): <R>(action: FutureInstance<L, R>) => FutureInstance<L, R>

/** Map over the resolution value of the given Future. See https://github.com/fluture-js/Fluture#map */
export function map<RA, RB>(mapper: (value: RA) => RB): <L>(source: FutureInstance<L, RA>) => FutureInstance<L, RB>

/** Map over the resolution value of the given ConcurrentFuture. See https://github.com/fluture-js/Fluture#map */
export function map<RA, RB>(mapper: (value: RA) => RB): <L>(source: ConcurrentFutureInstance<L, RA>) => ConcurrentFutureInstance<L, RB>
/** Map over the resolution value of the given Future or ConcurrentFuture. See https://github.com/fluture-js/Fluture#map */
export function map<RA, RB>(mapper: (value: RA) => RB): {
<L>(source: FutureInstance<L, RA>): FutureInstance<L, RB>
<L>(source: ConcurrentFutureInstance<L, RA>): ConcurrentFutureInstance<L, RB>
}

/** Map over the rejection reason of the given Future. See https://github.com/fluture-js/Fluture#maprej */
export function mapRej<LA, LB>(mapper: (reason: LA) => LB): <R>(source: FutureInstance<LA, R>) => FutureInstance<LB, R>
Expand Down

0 comments on commit 0e28c8f

Please sign in to comment.