export * from './types'; import type { Fn, MaybeRef } from './types'; export declare type TimeOutPromise = (time: number) => Promise; export declare type FunctionArgs = (...args: Args) => Return; export interface FunctionWrapperOptions { fn: FunctionArgs; args: Args; thisArg: This; } export declare type EventFilter = (invoke: Fn, options: FunctionWrapperOptions) => void; export interface DebounceFilterOptions { /** * The maximum time allowed to be delayed before it's invoked. * In milliseconds. */ maxWait?: number; } export declare const timeOutPromise: TimeOutPromise; /** * @internal */ export declare function createFilterWrapper(filter: EventFilter, fn: T): T; /** * Create an EventFilter that debounce the events * * @param ms * @param [maxWait=null] */ export declare function debounceFilter(ms: MaybeRef, options?: DebounceFilterOptions): EventFilter; /** * Create an EventFilter that throttle the events * * @param ms * @param [trailing=true] * @param [leading=true] */ export declare function throttleFilter(ms: MaybeRef, trailing?: boolean, leading?: boolean): EventFilter;