import type { Step } from "../types"; const executeStep = (context: T, step: Step | undefined) => Object.values(step ?? {}).reduce( // @ts-ignore (previous, func) => previous.then(() => func.bind(context)()), Promise.resolve(), ); export { executeStep };