import type { Step } from "../../types"; import { executeStep } from "../executeStep"; export const whenStep = async ( context: T, step: Step | undefined, ): Promise => { try { await executeStep(context, step); return undefined; } catch (e) { return e as Error; } };