interface MockTypedOperation<TInput, TResult, TFailure = never> An operation that a client started with start{Command}(), with typed input and results.
Properties
requestId
readonly requestId: string; No documentation.
input
readonly input: TInput; No documentation.
signal
readonly signal: AbortSignal; No documentation.
items
readonly items: readonly TResult[]; Stream values emitted so far.
progress
readonly progress: number | undefined; The latest progress the operation reported, from 0 to 1, or undefined.
Methods
reportProgress
reportProgress(value: number): void; Reports progress, clamped to 0 to 1; watching clients receive it as running with progress.
succeed
succeed(...result: [
TResult
] extends [
void
] ? [
] : [
result: TResult
]): void; No documentation.
failWith
failWith(failure: TFailure): void; Ends the operation with its declared failure (domain-failed).
cancel
cancel(): void; No documentation.
expire
expire(): void; Drops the finished operation's outcome, so it reports expired; throws while it runs.
forget
forget(): void; Forgets the request id, as a restarted window has, so it reports unknown.
emit
emit(...items: TResult[]): void; No documentation.