rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
18 lines • 852 B
TypeScript
import { UnknownFunction } from "@/types/utils";
import type { DebouncedFunc, DebounceSettings } from "lodash";
/**
* Debounce hook
* Debounces a function
*
* @param callback The callback to debounce
* @param wait The duration to debounce
* @param options The options object.
* @param options.leading Specify invoking on the leading edge of the timeout.
* @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked.
* @param options.trailing Specify invoking on the trailing edge of the timeout.
* @returns Returns the new debounced function.
* @see https://react-hooks.org/docs/useDebounce
*/
declare function useDebounce<T extends UnknownFunction>(callback: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>;
export { useDebounce };
//# sourceMappingURL=useDebounce.d.ts.map