UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

10 lines (7 loc) 199 B
import { delay } from './delay.mjs'; import { TimeoutError } from '../error/TimeoutError.mjs'; async function timeout(ms) { await delay(ms); throw new TimeoutError(); } export { timeout };