export type DebounceOptions = { leading?: boolean; trailing?: boolean; }; type DebounceConfig = DebounceOptions & { maxWait?: number; }; export type Debounced void> = ((...args: Parameters) => void) & { cancel: () => void; flush: () => void; }; /** * Lodash-compatible debounce: trailing by default, optional leading, cancel, flush. * `maxWait` is what makes throttle a real throttle (invoke at least every wait in a burst). */ export declare function debounce void>(fn: T, wait: number, options?: DebounceConfig): Debounced; /** Throttle is debounce with maxWait = wait. Defaults: leading and trailing both on. */ export declare function throttle void>(fn: T, wait: number, options?: DebounceOptions): Debounced; export {};