OperationContext
interface exported by @mwillbanks/tuil-operations.
interface
Public interface exported by @mwillbanks/tuil-operations.
export interface OperationContext {
readonly signal: AbortSignal;
readonly attempt: number;
readonly updateProgress: (progress: OperationProgress) => void;
readonly log: (line: string) => void;
readonly runChild: <T>(definition: OperationDefinition<T>) => Promise<T>;
readonly block: (message: string) => never;
readonly waitFor: <T>(work: Promise<T>) => Promise<T>;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
signal | AbortSignal | Yes | The signal member uses the AbortSignal contract. | — |
attempt | number | Yes | The attempt member uses the number contract. | — |
updateProgress | (progress: OperationProgress) => void | Yes | The updateProgress member uses the (progress: OperationProgress) => void contract. | OperationProgress |
log | (line: string) => void | Yes | The log member uses the (line: string) => void contract. | — |
runChild | <T>(definition: OperationDefinition<T>) => Promise<T> | Yes | The runChild member uses the <T>(definition: OperationDefinition<T>) => Promise<T> contract. | OperationDefinition |
block | (message: string) => never | Yes | The block member uses the (message: string) => never contract. | — |
waitFor | <T>(work: Promise<T>) => Promise<T> | Yes | The waitFor member uses the <T>(work: Promise<T>) => Promise<T> contract. | — |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference