Files
emaui/node_modules/@mantine/hooks/lib/use-debounced-callback/use-debounced-callback.d.ts
2026-05-29 15:23:46 +03:00

15 lines
548 B
TypeScript

export interface UseDebouncedCallbackOptions {
delay: number;
flushOnUnmount?: boolean;
leading?: boolean;
}
export type UseDebouncedCallbackReturnValue<T extends (...args: any[]) => any> = ((...args: Parameters<T>) => void) & {
flush: () => void;
cancel: () => void;
};
export declare function useDebouncedCallback<T extends (...args: any[]) => any>(callback: T, options: number | UseDebouncedCallbackOptions): ((...args: Parameters<T>) => void) & {
flush: () => void;
cancel: () => void;
_isFirstCall: boolean;
};