OperationSnapshot
interface exported by @mwillbanks/tuil-operations.
interface
Public interface exported by @mwillbanks/tuil-operations.
export interface OperationSnapshot<TResult = unknown> {
readonly id: string;
readonly title: string;
readonly description?: string;
readonly status: OperationStatus;
readonly progress?: OperationProgress;
readonly attempt: number;
readonly startedAt?: number;
readonly completedAt?: number;
readonly result?: TResult;
readonly error?: OperationError;
readonly children: readonly OperationSnapshot[];
readonly metadata: Readonly<Record<string, unknown>>;
readonly logs: readonly string[];
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
id | string | Yes | The id member uses the string contract. | — |
title | string | Yes | The title member uses the string contract. | — |
description | string | undefined | No | The description member uses the string | undefined contract. | — |
status | OperationStatus | Yes | The status member uses the OperationStatus contract. | OperationStatus |
progress | OperationProgress | undefined | No | The progress member uses the OperationProgress | undefined contract. | OperationProgress |
attempt | number | Yes | The attempt member uses the number contract. | — |
startedAt | number | undefined | No | The startedAt member uses the number | undefined contract. | — |
completedAt | number | undefined | No | The completedAt member uses the number | undefined contract. | — |
result | TResult | undefined | No | The result member uses the TResult | undefined contract. | — |
error | OperationError | undefined | No | The error member uses the OperationError | undefined contract. | OperationError |
children | readonly OperationSnapshot<unknown>[] | Yes | The children member uses the readonly OperationSnapshot<unknown>[] contract. | OperationSnapshot |
metadata | Readonly<Record<string, unknown>> | Yes | The metadata member uses the Readonly<Record<string, unknown>> contract. | — |
logs | readonly string[] | Yes | The logs member uses the readonly string[] 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