import type { Getter, MaybeGetter } from "../../internal/types.js"; /** * A wrapper over {@link useDebounce} that creates a debounced state. * It takes a "getter" function which returns the state you want to debounce. * Every time this state changes a timer (re)starts, the length of which is * configurable with the `wait` arg. When the timer ends the `current` value * is updated. * * @see https://runed.dev/docs/utilities/debounced * * @example * * * *
* *

You searched for: {debounced.current}

*
*/ export declare class Debounced { #private; /** * @param getter A function that returns the state to watch. * @param wait The length of time to wait in ms, defaults to 250. */ constructor(getter: Getter, wait?: MaybeGetter); /** * Get the debounced value. */ get current(): T; /** * Whether a timer is currently pending. */ get pending(): boolean; /** * Cancel the latest timer. */ cancel(): void; /** * Run the debounced function immediately. */ updateImmediately(): Promise; /** * Set the `current` value without waiting. */ setImmediately(v: T): void; }