isFailedSingleTransactionPlanResult

function isFailedSingleTransactionPlanResult(
    plan,
): plan is FailedSingleTransactionPlanResult;

Checks if the given transaction plan result is a failed SingleTransactionPlanResult.

Parameters

ParameterTypeDescription
planTransactionPlanResultThe transaction plan result to check.

Returns

plan is FailedSingleTransactionPlanResult

true if the result is a failed single transaction plan result, false otherwise.

Example

const result: TransactionPlanResult = failedSingleTransactionPlanResult(message, error);
 
if (isFailedSingleTransactionPlanResult(result)) {
  console.log(result.status.error); // TypeScript knows this is a failed result.
}

See

On this page