OperationState interface

Module @runic-artifex/views in @runic-artifex/views 0.23.0

interface OperationState<TResult, TFailure = never>

Feedback for the latest run; pending includes every run still being observed.

Properties

pending

readonly pending: boolean;

No documentation.

admitting

readonly admitting: boolean;

The latest Start has not returned its operation handle yet.

operation

readonly operation: BridgeOperation<TResult, TFailure> | undefined;

No documentation.

status

readonly status: BridgeOperationStatus<TResult, TFailure> | undefined;

No documentation.

progress

readonly progress: number | undefined;

How far the latest run's operation got, from 0 to 1, while it is running and reports progress (BridgeOperation.subscribe); undefined while the progress is unknown and once the run ended.

outcome

readonly outcome: BridgeOutcome<TResult, TFailure> | undefined;

No documentation.

failure

readonly failure: TFailure | undefined;

No documentation.

error

readonly error: unknown;

An unexpected failure, including a failed or timed-out status. Never a cancelled status.

cancelled

readonly cancelled: boolean;

The latest run ended with a cancelled status, whoever requested it. This is a normal terminal state: outcome, failure and error stay undefined.

cancellationRequested

readonly cancellationRequested: boolean;

No documentation.

cancelling

readonly cancelling: boolean;

A cancellation callback is in flight; its response does not establish completion.

cancellation

readonly cancellation: BridgeOperationCancelResult | undefined;

No documentation.

cancelError

readonly cancelError: unknown;

No documentation.