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

WorkflowRuntimeState overview

Added in v1.0.0


Table of contents


utils

Completed (class)

Signature

export declare class Completed<A, E>

Added in v1.0.0

NotStarted (class)

Signature

export declare class NotStarted

Added in v1.0.0

Replay (class)

Signature

export declare class Replay<A, E>

Added in v1.0.0

Running (class)

Signature

export declare class Running<A, E>

Added in v1.0.0

WorkflowRuntimeState (type alias)

Signature

export type WorkflowRuntimeState<A, E> = NotStarted | Replay<A, E> | Running<A, E> | Yielding<A, E> | Completed<A, E>

Added in v1.0.0

Yielding (class)

Signature

export declare class Yielding<A, E>

Added in v1.0.0

initialState

Signature

export declare const initialState: <A extends Message.Message.Any>() => WorkflowRuntimeState<
  Message.Message.Success<A>,
  Message.Message.Error<A>
>

Added in v1.0.0

match

Signature

export declare function match<A, E, B, C = B, D = C, F = D, G = F>(
  fa: WorkflowRuntimeState<A, E>,
  fns: {
    onReplay: (state: Replay<A, E>) => B
    onRunning: (state: Running<A, E>) => C
    onYielding: (state: Yielding<A, E>) => D
    onCompleted: (state: Completed<A, E>) => F
    onNotStarted: (state: NotStarted) => G
  }
)

Added in v1.0.0