UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

15 lines 384 B
/** * @public * Returns a `Promise` which will resolve to `resolveWith` after a delay of `delay` (in milliseconds). * * @remarks * See {@link promiseDelay}. */ export function promiseDelay(resolveWith, delay = 4) { return new Promise((done) => { setTimeout(() => { done(resolveWith); }, delay); }); } //# sourceMappingURL=promise-delay.js.map