interface CommandHandle<TArgs extends readonly unknown[], TResult, TFailure = BridgeOutcomeFailure<TResult>> No documentation.
Properties
pending
readonly pending: Signal<boolean>; True while a run is in flight.
error
readonly error: Signal<unknown>; Why the latest run failed unexpectedly, until the next run starts.
failure
readonly failure: Signal<TFailure | undefined>; The declared failure of the latest run, for a command that resolves a BridgeOutcome, until the next run starts. A superseded run sets neither.
Methods
run
run(...args: TArgs): Promise<TResult | undefined>; Runs the command. Resolves to its result, including a BridgeOutcome with a declared failure, which failure then holds, or to undefined after an unexpected failure, which error then holds. Never rejects.
reset
reset(): void; Clears error and failure.