LatestModule
PackageAxial.ElmishFlows
Latest
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Dispatch latest results | ||
| either | either key runtime workflow onSuccess onError | Runs a workflow keyed by key; starting a new run interrupts the previous one. |
| perform | perform key runtime workflow onSuccess | Runs a workflow that cannot fail with a typed error, keyed by key. |
| attempt | attempt key runtime workflow onError | Runs a workflow that succeeds only with unit, keyed by key. |
| Cancel commands | ||
| cancel | cancel key runtime | Interrupts the running command for key, if any, without dispatching. |
Dispatch latest results
kind:membertask:dispatch
Runs a workflow keyed by
key; starting a new run interrupts the previous one.Parameters
| Name | Type | Description |
|---|---|---|
| key | string | The latest-wins key. |
| 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, keyed by
key.Parameters
| Name | Type | Description |
|---|---|---|
| key | string | The latest-wins key. |
| 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, keyed by key.Parameters
| Name | Type | Description |
|---|---|---|
| key | string | The latest-wins key. |
| 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>

