Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task overview

Handles the execution of asynchronous effectful operations.

See the Task Elm package.

Added in v0.5.0


Table of contents


utils

attempt

Executes a Task that can fail as a Cmd mapping the result (Either) to a Msg.

Signature

export declare function attempt<E, A, Msg>(f: (e: Either<E, A>) => Msg): (task: Task<Either<E, A>>) => Cmd<Msg>

Added in v0.5.0

perform

Executes a Task as a Cmd mapping the result to a Msg.

Signature

export declare function perform<A, Msg>(f: (a: A) => Msg): (t: Task<A>) => Cmd<Msg>

Added in v0.5.0