/**
 * Call a function only after it has not been called for n milliseconds
 * @param fn    - function to call
 * @param delay - delay in milliseconds
 */
export declare const debounce: <F extends (...args: any[]) => any>(fn: F, delay: number) => {
    (...args: Parameters<F>): Promise<ReturnType<F> | null>;
    flush: (...args: Parameters<F>) => Promise<ReturnType<F> | null>;
    invoke: (...args: Parameters<F>) => Promise<ReturnType<F> | null>;
    cancel: (...args: Parameters<F>) => Promise<ReturnType<F> | null>;
    getStatus: () => "pending" | "idle" | "cancelled" | "flushed" | "invoked";
};
/**
 * Helper method to inline setTimeout as an await in async functions
 */
export declare function timeout(ms: number): Promise<unknown>;
