UNPKG

saga-transaction-lib

Version:

A TypeScript library for implementing the Saga pattern to manage distributed transactions and complex workflows

10 lines (9 loc) 372 B
import { IStep } from "../interfaces/step.interface"; export declare class TransactionContext<TContext> { readonly data: TContext; readonly metadata: Record<string, any>; private successfulSteps; constructor(data: TContext, metadata?: Record<string, any>); addSuccessfulStep(step: IStep<TContext>): void; getSuccessfulSteps(): IStep<TContext>[]; }