CommandState interface

Namespace @runic-artifex/views · @runic-artifex/views 0.7.0-preview.5

interface CommandState<TFailure = never>

One consistent reading of a CommandController.

Properties

pending

readonly pending: boolean;

True while at least one run is in flight.

error

readonly error: unknown;

Why the most recently started run failed unexpectedly, or undefined while it runs or after it succeeded. A declared failure is failure instead.

failure

readonly failure: TFailure | undefined;

The declared failure of the most recently started run, for a command that resolves a BridgeOutcome; undefined while it runs or after it succeeded.