sequentialTransactionPlanResult

function sequentialTransactionPlanResult<TContext>(plans): Readonly<{
    divisible: boolean;
    kind: 'sequential';
    plans: TransactionPlanResult<TContext>[];
}> &
    object;

Creates a divisible SequentialTransactionPlanResult from an array of nested results.

This function creates a sequential result with the divisible property set to true, indicating that the nested plans were executed sequentially but could have been split into separate transactions or batches.

Type Parameters

Type ParameterDefault typeDescription
TContext extends TransactionPlanResultContextTransactionPlanResultContextThe type of the context object that may be passed along with successful results

Parameters

ParameterTypeDescription
plansTransactionPlanResult<TContext>[]The child results that were executed sequentially

Returns

Readonly<{ divisible: boolean; kind: "sequential"; plans: TransactionPlanResult<TContext>[]; }> & object

Example

const result = sequentialTransactionPlanResult([
  singleResultA,
  singleResultB,
]);
result satisfies SequentialTransactionPlanResult & { divisible: true };

See

SequentialTransactionPlanResult

On this page