//#region src/utils/timeout.d.ts /** * Races a promise against a timer and clears the timer however the race settles, * so a finished operation never leaves a pending timeout keeping the event loop alive. * @param promise - The operation to bound * @param ms - Milliseconds to wait before rejecting * @param error - Error to reject with when the timer wins * @returns The promise's value, or a rejection with `error` on timeout */ declare const withTimeout: (promise: Promise, ms: number, error: Error) => Promise; /** * Restart delay for the n-th consecutive failure: exponential from `baseMs`, capped at `maxMs`. * @param attempt - 1 for the first restart, 2 for the second, and so on */ declare const retryDelay: (attempt: number, baseMs: number, maxMs: number) => number; //#endregion export { retryDelay, withTimeout }; //# sourceMappingURL=timeout.d.cts.map