@appello/common
Version:
Common package with many useful features for web and mobile development
13 lines (12 loc) • 387 B
TypeScript
import { AnyFunction } from '../../types';
import { DebounceOptions } from './types';
export declare function useDebounceCallback<T extends AnyFunction>(fn: T, options?: DebounceOptions): {
debounce: {
(...args: Parameters<T>): any;
cancel: () => void;
flush: () => any;
pending: () => boolean;
};
cancel: () => void;
flush: () => any;
};