/** * Type of throttle wrappers. * (When invocation gap is less than specific value, * the callback won't be invoked * and `undefined` will be returned.) */ export interface ThrottleWrapper any> { (...args: Parameters): ReturnType | undefined; throttleGap: number; } /** dts2md break */ /** * Create a throttle wrapper. */ export declare const throttle: any>(gap: number, callback: T) => ThrottleWrapper; /** dts2md break */ /** * Type of debounce wrappers. * (Invokes the callback after specific timeout. * Duplicate invocation resets the timer.) */ export interface DebounceWrapper any> { (...args: Parameters): void; debounceTimeout: number; } /** dts2md break */ /** * Create a debounce wrapper. */ export declare const debounce: any>(timeout: number, callback: T) => DebounceWrapper; /** dts2md break */ /** * Type of lock wrappers. * (If `disabled` is `false`(default state), set it to `true` * and invoke the callback; otherwise, return `undefined`. * You will need to manually reset `disabled` to `false`, * to make the callback available again.) */ export interface LockWrapper any> { (...args: Parameters): ReturnType | undefined; disabled: boolean; } /** dts2md break */ /** * Create a lock wrapper. */ export declare const lock: any>(callback: T) => LockWrapper;