import { type Context } from '@dxos/context'; /** * Times out after delay. */ export declare const sleep: (ms: number) => Promise; export declare const sleepWithContext: (ctx: Context, ms: number) => Promise; /** * Can be used in long-running tasks to let other callbacks be invoked. */ export declare const asyncReturn: () => Promise; /** * Wait for promise or throw error. */ export declare const asyncTimeout: (promise: Promise, timeout: number, err?: Error | string) => Promise; /** * In Node.JS, `unref` prevents the timeout from blocking the process from exiting. Not available in browsers. * https://nodejs.org/api/timers.html#timeoutunref */ export declare const unrefTimeout: (timeoutId: NodeJS.Timeout) => void; //# sourceMappingURL=timeout.d.ts.map