OfFlowModule

PackageAxial.ElmishFlows

OfFlow

Contents

Summary

NameSignatureSynopsis
Dispatch results
eithereither name runtime workflow onSuccess onErrorRuns a workflow and dispatches either its value or its typed failure.
performperform name runtime workflow onSuccessRuns a workflow that cannot fail with a typed error and dispatches its value.
attemptattempt name runtime workflow onErrorRuns a workflow that succeeds only with unit and dispatches its typed failure.
Start commands
startstart name runtime workflowStarts a fire-and-forget workflow as a named fiber in the runtime's root scope.

Dispatch results

kind:membertask:dispatch

either

either name runtime workflow onSuccess onError
Member
Runs a workflow and dispatches either its value or its typed failure.

Parameters

NameTypeDescription
namestringThe diagnostic name for the command fiber.
runtimeElmishRuntime<'a>The runtime that owns the command's root scope.
workflowFlow<'a, 'b, 'c>The flow to run, passed positionally.
onSuccess'c -> 'dMaps a successful value to a message.
onError'b -> 'dMaps a typed failure to a message.

Returns

Cmd<'d>
kind:membertask:dispatch

perform

perform name runtime workflow onSuccess
Member
Runs a workflow that cannot fail with a typed error and dispatches its value.

Parameters

NameTypeDescription
namestringThe diagnostic name for the command fiber.
runtimeElmishRuntime<'a>The runtime that owns the command's root scope.
workflowFlow<'a, Never, 'b>The Flow<'env, Never, 'value> to run, passed positionally.
onSuccess'b -> 'cMaps a successful value to a message.

Returns

Cmd<'c>
kind:membertask:dispatch

attempt

attempt name runtime workflow onError
Member
Runs a workflow that succeeds only with unit and dispatches its typed failure.

Parameters

NameTypeDescription
namestringThe diagnostic name for the command fiber.
runtimeElmishRuntime<'a>The runtime that owns the command's root scope.
workflowFlow<'a, 'b, unit>The flow to run, passed positionally.
onError'b -> 'cMaps a typed failure to a message.

Returns

Cmd<'c>

Start commands

kind:membertask:start

start

start name runtime workflow
Member
Starts a fire-and-forget workflow as a named fiber in the runtime's root scope.

Parameters

NameTypeDescription
namestringThe diagnostic name for the command fiber.
runtimeElmishRuntime<'env>The runtime that owns the command's root scope.
workflowFlow<'env, Never, unit>The Flow<'env, Never, unit> to run, passed positionally.

Returns

Cmd<'msg>