import type { AnyFunc } from "./basic.js"; export type ThrottleOptions = { /** * time frame for throttle * * @defaultValue 0 */ wait?: number; /** * whether to invoke the function at the start of each period * * @defaultValue true */ leading?: boolean; /** * whether to invoke the function at the end of each period * * @defaultValue true */ trailing?: boolean; }; export type ThrottledFn = { /** * The throttled function. */ (this: ThisParameterType, ...args: Parameters): ReturnType | undefined; /** * Cancels the throttled function. * * @deprecated Use `throttled.cancel()` instead. */ clear: () => void; /** * Cancels the throttled function. */ cancel: () => void; /** * Invokes the debounced function immediately. */ flush: () => ReturnType | undefined; }; /** * Creates a throttled function that only invokes the provided function at most once per every `wait` milliseconds. * * @from lodash/throttle */ export declare function throttle(fn: T, options?: ThrottleOptions): ThrottledFn;