Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaq committed Aug 3, 2017
1 parent 9b77cd1 commit 59f9d06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,21 @@ declare module 'fluture' {
export function value<R>(resolve: ResolveFunction<R>, source: Future<never, R>): Cancel
export function value<R>(resolve: ResolveFunction<R>): (source: Future<never, R>) => Cancel

/** Create a Future from a possibly cancellable computation. See https://github.com/fluture-js/Fluture#future */
interface Fluture {

/** Create a Future from a possibly cancellable computation. See https://github.com/fluture-js/Fluture#future */
<L, R>(computation: (
reject: RejectFunction<L>,
resolve: ResolveFunction<R>
) => Cancel | void): Future<L, R>

/** Create a Future from a possibly cancellable computation. See https://github.com/fluture-js/Fluture#future */
new <L, R>(computation: (
reject: RejectFunction<L>,
resolve: ResolveFunction<R>
) => Cancel | void): Future<L, R>

/** Implementation of Fantasy Land ChainRec. */
chainRec<L, I, R>(iterator: (next: (value: I) => Next<I>, done: (value: R) => Done<R>, value: I) => Future<L, Next<I> | Done<R>>, initial: I): Future<L, R>

ap: typeof ap
Expand All @@ -312,7 +314,7 @@ declare module 'fluture' {
export const Future: Fluture
export default Fluture

/** Convert a regular Future to a ConcurrentFuture. See https://github.com/fluture-js/Fluture#concurrentfuture */
/** Create a ConcurrentFuture using a Future. See https://github.com/fluture-js/Fluture#concurrentfuture */
export function Par<L, R>(source: Future<L, R>): ConcurrentFuture<L, R>

}

0 comments on commit 59f9d06

Please sign in to comment.