import type { AnyFunction } from '../types.js';
export interface Cancelable {
    cancel: () => void;
    flush: () => void;
}
export interface ThrottleOptions {
    /**
     * @default true
     */
    leading?: boolean;
    /**
     * @default true
     */
    trailing?: boolean;
}
export interface DebounceOptions {
    /**
     * @default false
     */
    leading?: boolean;
    /**
     * @default true
     */
    trailing?: boolean;
    /**
     *
     */
    maxWait?: number;
}
export declare function _debounce<T extends AnyFunction>(func: T, wait: number, opt?: DebounceOptions): T & Cancelable;
export declare function _throttle<T extends AnyFunction>(func: T, wait: number, opt?: ThrottleOptions): T & Cancelable;
