UNPKG

es-toolkit

Version:

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

14 lines (9 loc) 314 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const delay = require('./delay.js'); const TimeoutError = require('../error/TimeoutError.js'); async function timeout(ms) { await delay.delay(ms); throw new TimeoutError.TimeoutError(); } exports.timeout = timeout;