isParallelTransactionPlan

function isParallelTransactionPlan(
    plan,
): plan is Readonly<{ kind: 'parallel'; plans: TransactionPlan[] }>;

Checks if the given transaction plan is a ParallelTransactionPlan.

Parameters

ParameterTypeDescription
planTransactionPlanThe transaction plan to check.

Returns

plan is Readonly<{ kind: "parallel"; plans: TransactionPlan[] }>

true if the plan is a parallel transaction plan, false otherwise.

Example

const plan: TransactionPlan = parallelTransactionPlan([messageA, messageB]);
 
if (isParallelTransactionPlan(plan)) {
  console.log(plan.plans.length); // TypeScript knows this is a ParallelTransactionPlan.
}

See

On this page