tuil
ReferencePackages@mwillbanks/tuil-workflowAPI

WorkflowPersistence

interface exported by @mwillbanks/tuil-workflow.

View rawEdit

interface

Public interface exported by @mwillbanks/tuil-workflow.

export interface WorkflowPersistence<TState> {
  readonly load: (
    id: string,
    signal: AbortSignal,
  ) =>
    | PersistedWorkflow<TState>
    | undefined
    | Promise<PersistedWorkflow<TState> | undefined>;
  readonly save: (
    id: string,
    value: PersistedWorkflow<TState>,
    signal: AbortSignal,
  ) => void | Promise<void>;
  readonly remove?: (id: string, signal: AbortSignal) => void | Promise<void>;
}

Members

MemberTypeRequiredDescriptionRelated types
load(id: string, signal: AbortSignal) => PersistedWorkflow<TState> | undefined | Promise<PersistedWorkflow<TState> | undefined>YesThe load member uses the (id: string, signal: AbortSignal) => PersistedWorkflow<TState> | undefined | Promise<PersistedWorkflow<TState> | undefined> contract.PersistedWorkflow
save(id: string, value: PersistedWorkflow<TState>, signal: AbortSignal) => void | Promise<void>YesThe save member uses the (id: string, value: PersistedWorkflow<TState>, signal: AbortSignal) => void | Promise<void> contract.PersistedWorkflow
remove((id: string, signal: AbortSignal) => void | Promise<void>) | undefinedNoThe remove member uses the ((id: string, signal: AbortSignal) => void | Promise<void>) | undefined 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-workflow

On this page