import { AStepper, OK, TNamed, TWorld } from '@haibun/core/build/lib/defs.js'; import { actionNotOK } from '@haibun/core/build/lib/util/index.js'; import WTW from './lib/WTW.js'; class WTWStepper extends AStepper { async setWorld(world: TWorld, steppers: AStepper[]) { await super.setWorld(world, steppers); } steps = { WTW: { gwta: `your test phrase {what}`, action: async ({ what }: TNamed) => { const value = await WTW(what); if (value.ok === true) { return OK; } const { message } = value.error; return actionNotOK(message } }); } }, } } export default WTWStepper;