import { type DelayOptions } from "futurise"; import type { MaybeDelayedFunction } from "../types/MaybeDelayedFunction.js"; import type { Name, NevoProps, ValueMutator } from "../types.js"; /** * Delays calls of the value mutator `onChange` while immediately updating the local `value`. * * If `onChange` changes while a delayed call is pending, the pending call will be canceled to avoid calling the outdated `onChange`. Therefore, it is important to ensure that the `onChange` function is stable (e.g., by using `useCallback`) when using this hook to prevent unintended cancellations. * * @param props - Properties according to the NEVO pattern. * @param duration - The delay duration in milliseconds. * @param options - Optional configuration for the delay behavior. See {@link DelayOptions} for details. * @returns Properties according to the NEVO pattern, with `onChange` being a debounced value mutator. */ export declare function useDelay(props: Pick, "value" | "name" | "onChange">, duration?: number, options?: DelayOptions): { value: T; name?: Name; onChange?: MaybeDelayedFunction>; };