OfFlowModule
PackageAxial.ElmishFlows
OfFlow
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Dispatch results | ||
| either | either name runtime workflow onSuccess onError | Runs a workflow and dispatches either its value or its typed failure. |
| perform | perform name runtime workflow onSuccess | Runs a workflow that cannot fail with a typed error and dispatches its value. |
| attempt | attempt name runtime workflow onError | Runs a workflow that succeeds only with unit and dispatches its typed failure. |
| Start commands | ||
| start | start name runtime workflow | Starts a fire-and-forget workflow as a named fiber in the runtime's root scope. |
Dispatch results
kind:membertask:dispatch
Runs a workflow and dispatches either its value or its typed failure.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The diagnostic name for the command fiber. |
| runtime | ElmishRuntime<'a> | The runtime that owns the command's root scope. |
| workflow | Flow<'a, 'b, 'c> | The flow to run, passed positionally. |
| onSuccess | 'c -> 'd | Maps a successful value to a message. |
| onError | 'b -> 'd | Maps a typed failure to a message. |
Returns
Cmd<'d>
kind:membertask:dispatch
Runs a workflow that cannot fail with a typed error and dispatches its value.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The diagnostic name for the command fiber. |
| runtime | ElmishRuntime<'a> | The runtime that owns the command's root scope. |
| workflow | Flow<'a, Never, 'b> | The Flow<'env, Never, 'value> to run, passed positionally. |
| onSuccess | 'b -> 'c | Maps a successful value to a message. |
Returns
Cmd<'c>
kind:membertask:dispatch
Runs a workflow that succeeds only with
unit and dispatches its typed failure.Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The diagnostic name for the command fiber. |
| runtime | ElmishRuntime<'a> | The runtime that owns the command's root scope. |
| workflow | Flow<'a, 'b, unit> | The flow to run, passed positionally. |
| onError | 'b -> 'c | Maps a typed failure to a message. |
Returns
Cmd<'c>
Start commands
kind:membertask:start
Starts a fire-and-forget workflow as a named fiber in the runtime's root scope.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The diagnostic name for the command fiber. |
| runtime | ElmishRuntime<'env> | The runtime that owns the command's root scope. |
| workflow | Flow<'env, Never, unit> | The Flow<'env, Never, unit> to run, passed positionally. |
Returns
Cmd<'msg>

