On this pageInterfaces
Command/Interruptible
/**
* An Interrupt Command definition derived from an interruptible Command
* definition with no declared args. Call as `Definition.Interrupt(toMessage)`
* to produce a Command that interrupts every holder of the definition's key.
*/
interface InterruptDefinitionNoArgs {
[CommandDefinitionTypeId]: typeof CommandDefinitionTypeId
name: `${Name}.Interrupt`
}/**
* An Interrupt Command definition derived from an interruptible Command
* definition with declared args. Call as
* `Definition.Interrupt(keyArgs, toMessage)` to produce a Command that
* interrupts every holder of the key derived from `keyArgs`.
*/
interface InterruptDefinitionWithArgs {
[CommandDefinitionTypeId]: typeof CommandDefinitionTypeId
name: `${Name}.Interrupt`
}/**
* The result of interrupting a key. `Outcome.Interrupted` means at least one
* in-flight Command was stopped and will not dispatch its result Message.
* `Outcome.NotFound` means no Command held the key. The interrupt operation
* itself cannot fail.
*/
const Outcome: TaggedUnion<{
Interrupted: {}
NotFound: {}
}>