import type { DebounceOptions } from '../use-debounce/index.js'; import { type HookErrorHandler } from '../utils/errors.js'; /** Controls a debounced function invocation. @public */ export interface DebouncedFunction { readonly run: (...args: Args) => void; readonly cancel: () => void; readonly flush: () => Result | undefined; readonly pending: boolean; } /** Options for {@link useDebounceFn}. @public */ export interface DebounceFnOptions extends DebounceOptions { /** Observes callback failures before they are rethrown. */ readonly onError?: HookErrorHandler; } /** Debounces calls to the latest function. @public */ export declare function useDebounceFn(fn: (...args: Args) => Result, options: DebounceFnOptions): DebouncedFunction;