/** * Debounces a function, i.e. creates a wrapper that only invokes the original * once a certain amount of time has elapsed without being invoked. * * @param func The original function. * @param wait The amount of time to wait for inactivity (in milliseconds). * @param immediate If true, trigger the function on the leading edge, instead * of the trailing. * @param abortSignal Optionally specify an abortSignal for the throttled * function. */ export declare function debounce(func: (...args: [...T]) => void, wait: number, immediate?: boolean, abortSignal?: AbortSignal): (...args: [...T]) => void; /** * Same as `debounce()`, but optimized for animation and rendering. * * @param func The function to debounce. * @param abortSignal Optionally specify an abortSignal for the throttled * function. */ export declare function debounceAnimation(func: (...args: [...T]) => void, abortSignal?: AbortSignal): (...args: [...T]) => void; /** * Returns a debounced and memoized version of the callback that only changes if * one of the `deps` has changed. * * @param callback The function to debounce and memoize. * @param timeout The debounce delay. * @param deps The dependencies of the callback. */ export declare function useDebounce(callback: (...args: [...T]) => void, timeout: number, deps: unknown[]): (...args: [...T]) => void;