export interface UseDebounceOptions { initialValue?: T; leading?: boolean; /** * If true, string values will have leading and trailing whitespace trimmed. * Defaults to true for string types to maintain backwards compatibility. * Set to `false` if spaces should be strictly preserved (e.g. text inputs). * @default true */ trim?: boolean; } /** * Debounces a fast-changing state value. The returned value will only reflect * the latest value after the specified delay has passed without further updates. * * @param value - The state value to debounce. * @param delay - The delay in milliseconds (default: 300). * @param options - Additional options (`initialValue`, `leading`, and `trim`). * @returns The debounced value. * * @example * ```tsx * const [term, setTerm] = useState(""); * const debouncedTerm = useDebounce(term, 500); * // To preserve raw input whitespace without trimming: * const debouncedRaw = useDebounce(term, 500, { trim: false }); * ``` */ export declare function useDebounce(value: T, delay?: number, options?: UseDebounceOptions): T; export default useDebounce;