LatestModule

PackageAxial.ElmishFlows

Latest

Summary

NameSignatureSynopsis
Dispatch latest results
eithereither key runtime workflow onSuccess onErrorRuns a workflow keyed by key; starting a new run interrupts the previous one.
performperform key runtime workflow onSuccessRuns a workflow that cannot fail with a typed error, keyed by key.
attemptattempt key runtime workflow onErrorRuns a workflow that succeeds only with unit, keyed by key.
Cancel commands
cancelcancel key runtimeInterrupts the running command for key, if any, without dispatching.

Dispatch latest results

kind:membertask:dispatch

either

either key runtime workflow onSuccess onError
Member
Runs a workflow keyed by key; starting a new run interrupts the previous one.

Parameters

NameTypeDescription
keystringThe latest-wins key.
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 key runtime workflow onSuccess
Member
Runs a workflow that cannot fail with a typed error, keyed by key.

Parameters

NameTypeDescription
keystringThe latest-wins key.
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 key runtime workflow onError
Member
Runs a workflow that succeeds only with unit, keyed by key.

Parameters

NameTypeDescription
keystringThe latest-wins key.
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>

Cancel commands

kind:membertask:cancel

cancel

cancel key runtime
Member
Interrupts the running command for key, if any, without dispatching.

Parameters

NameTypeDescription
keystring
runtimeElmishRuntime<'env>

Returns

Cmd<'msg>