import { AbortablePromise } from './AbortablePromise'; import { AbortableCallback } from './types'; /** * Returns a promise that is fulfilled with a produced value, or rejected after the timeout elapses. * * @param cb A callback that receives a signal that is aborted if the timeout elapses, or a promise-like object. * @param ms The timeout after which the returned promise is rejected. * @returns The promise that is fulfilled before a timeout elapses, or rejected with a * {@link https://developer.mozilla.org/en-US/docs/Web/API/DOMException#timeouterror TimeoutError}. * @template T The value returned from the callback or promise. */ export declare function timeout(cb: AbortableCallback | PromiseLike, ms: number): AbortablePromise;