import {type AwaiterParams} from '../awaiter/AwaiterParams'; import {awaiter} from '../awaiter/awaiter'; export const waitFor = async (fn: () => Promise | boolean, paramsOrTimeout?: AwaiterParams | number) => { return awaiter(fn, { ...(typeof paramsOrTimeout === 'number' ? {timeout: paramsOrTimeout} : paramsOrTimeout), awaiterName: 'waitFor', expect: true, }); };