UNPKG

@mmcodemark/fuselage-hooks

Version:

React hooks for Fuselage, Rocket.Chat's design system and UI toolkit

15 lines 577 B
import type { DependencyList } from 'react'; /** * Hook to memoize a debounced version of a callback. * * @param callback - the callback to debounce * @param delay - the number of milliseconds to delay * @param deps - the hook dependencies * @returns a memoized and debounced callback * @public */ export declare const useDebouncedCallback: <P extends unknown[]>(callback: (...args: P) => unknown, delay: number, deps?: DependencyList) => ((...args: P) => unknown) & { flush: () => void; cancel: () => void; }; //# sourceMappingURL=useDebouncedCallback.d.ts.map