/**
 * Creates a debounced function that delays invoking the provided function until
 * after `delay` milliseconds have passed since the last time the debounced
 * function was called. The debounced function returns a function that can be
 * used to cancel the pending call to the underlying function.
 *
 * @param fn The function to debounce.
 * @param delay The number of milliseconds to delay calling the function.
 * @returns A debounced function with an extra `cancel` method to cancel the pending call.
 */
export declare function debounce<T extends (...args: any[]) => void>(fn: T, delay: number): T & {
    cancel: () => void;
};
