import { type ThrottledFunction, throttle } from "es-toolkit"; type Dep = Array; type Callback = (...args: Args) => Return; export type ThrottleOptions = Parameters[2]; /** * Returns a memoized throttled function. * * @remarks * This hook wraps `es-toolkit`'s `throttle` function. * The callback is always up-to-date (via ref), so you don't need to include it in deps. * * @typeParam Args - The arguments of the callback. * @typeParam Return - The return type of the callback. * @param cb - The function to throttle. * @param wait - The throttle wait time in milliseconds. * @param dep - Additional dependencies to recreate the throttled function. * @param options - Throttle options (leading, trailing, etc.). * @returns The throttled function. * * @example * ```tsx * const throttledScroll = useThrottleCallback((e) => { * console.log("Scroll event", e); * }, 100); * ``` */ export declare function useThrottleCallback(cb: Callback, wait: number, dep?: Dep, options?: ThrottleOptions): ThrottledFunction>; export {};