BridgeOperation interface

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

interface BridgeOperation<TResult = void, TFailure = never>

A recoverable .NET command execution identified by its request id.

Properties

requestId

readonly requestId: string;

No documentation.

completion

readonly completion: Promise<BridgeOperationStatus<TResult, TFailure>>;

The terminal status. A failed observation is retried by the next read.

Methods

status

status(): Promise<BridgeOperationStatus<TResult, TFailure>>;

No documentation.

wait

wait(options?: BridgeOperationWaitOptions): Promise<BridgeOperationStatus<TResult, TFailure>>;

Waits for the terminal status. With timeout, resolves to a timedOut status after cancelling the operation, unless it finished first.

cancel

cancel(): Promise<BridgeOperationCancelResult>;

No documentation.

outcome

outcome(options?: BridgeOperationWaitOptions): Promise<BridgeOutcome<TResult, TFailure>>;

Waits like wait() and resolves to the result, or to the declared failure. Rejects with BridgeError for failed (failed), cancelled (cancelled), timedOut (timeout) and a result or failure that could not be delivered (failed), and with BridgeOperationUncertainError for expired and unknown: the outcome is unknown, so do not retry blindly.