type DebouncedFunction<T extends (...args: any[]) => void> = {
    (...args: Parameters<T>): void;
    cancel: () => void;
    flush: () => void;
};
declare function debounce<T extends (...args: any[]) => void>(fn: T, wait: number, immediate?: boolean): DebouncedFunction<T>;

export { debounce };
