Transaction
Transaction<
In,Acc,E,EUndo> =WithKind<"Transaction"> &object
Defined in: Core/Transaction.ts:52
A reusable sequence of asynchronous steps with optional actions to undo completed work.
If a step returns an error, completed steps that have an undo action are undone in reverse
order. Undo actions can also fail; their errors are returned alongside the original error.
Type Parameters
Section titled “Type Parameters”In = void
The initial input payload supplied to the transaction on execution.
Acc extends Record<string, unknown> = Record<never, never>
The accumulated dictionary of step outputs available to downstream steps.
E = never
The union of forward execution error types across all registered steps.
EUndo = never
The union of error types that can occur during compensating undo actions.
Type Declaration
Section titled “Type Declaration”[_transactionBrand]
Section titled “[_transactionBrand]”
readonly[_transactionBrand]:object
[_transactionBrand]._acc
Section titled “[_transactionBrand]._acc”
readonly_acc: () =>Acc
Returns
Section titled “Returns”Acc
[_transactionBrand]._error
Section titled “[_transactionBrand]._error”
readonly_error: () =>E
Returns
Section titled “Returns”E
[_transactionBrand]._in
Section titled “[_transactionBrand]._in”
readonly_in: (_in) =>void
Parameters
Section titled “Parameters”In
Returns
Section titled “Returns”void
[_transactionBrand]._undoError
Section titled “[_transactionBrand]._undoError”
readonly_undoError: () =>EUndo
Returns
Section titled “Returns”EUndo