UNPKG

rollun-ts-utils

Version:
17 lines (16 loc) 460 B
/** * waiter. it waits... * Function return promise, that resolves in {duration} milliseconds. * Usage Example: * const foo = async () => { * try { * // will 'freeze' function execution for 1000 milliseconds * await wait(1000); * const data = await someAsyncDataFetch(); * } catch (e) { * // some error handling... * } * } */ declare const wait: (duration: number) => Promise<unknown>; export default wait;