tuil
ReferencePackages@mwillbanks/tuil-operationsAPI

OperationContext

interface exported by @mwillbanks/tuil-operations.

View rawEdit

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

MemberTypeRequiredDescriptionRelated types
signalAbortSignalYesThe signal member uses the AbortSignal contract.
attemptnumberYesThe attempt member uses the number contract.
updateProgress(progress: OperationProgress) => voidYesThe updateProgress member uses the (progress: OperationProgress) => void contract.OperationProgress
log(line: string) => voidYesThe log member uses the (line: string) => void contract.
runChild<T>(definition: OperationDefinition<T>) => Promise<T>YesThe runChild member uses the <T>(definition: OperationDefinition<T>) => Promise<T> contract.OperationDefinition
block(message: string) => neverYesThe block member uses the (message: string) => never contract.
waitFor<T>(work: Promise<T>) => Promise<T>YesThe 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.

Source

View the secondary source reference

Package

@mwillbanks/tuil-operations

On this page