type Cancellor = (catchPayload: unknown) => void; type CancellablePromise = Promise & { /** * Rejects the promise with optional `catchPayload`. * * Default value for `catchPayload` is `new Error('cancelled')` */ cancel: Cancellor; }; /** * Returns a Promise that resolves after `duration` milliseconds * * The returned Promise has a `.cancel()` method to reject the promise. */ export declare const wait: (duration: number) => CancellablePromise; /** * Returns a "then"-function that adds lag/delay to a promise chain, * passing the promise payload through. */ export declare const addLag: (duraction: number) => (payload: T) => Promise; export {};