UNPKG

@widergy/web-utils

Version:
11 lines (10 loc) 703 B
export declare const polling: (func: Function, interval?: number, timeout?: number, timeoutCallback?: Function) => number; export declare const debounce: (func: Function, wait: number | undefined, immediate: boolean) => (this: any, ...args: any) => void; export declare const throttle: (func: Function, limit?: number) => (this: any, ...args: any) => void; interface FunctionUtils { polling: (func: Function, interval: number, timeout?: number, timeoutCallback?: Function) => number; debounce: (func: Function, wait: number, immediate: boolean) => Function; throttle: (func: Function, limit: number) => Function; } declare const FUNCTION_UTILS: FunctionUtils; export default FUNCTION_UTILS;