import { type AtomConfig, type AtomType } from "./atom"; /** * delayAtom — a reactive atom whose `set()` and `update()` calls are applied * after a fixed `delay` in milliseconds. * * Unlike `debouncedAtom`, **every call fires** — there is no cancellation of * previous pending writes. Each call schedules its own independent timeout. * This makes it useful for "apply this value after N ms" patterns rather than * "apply only the last value after N ms of silence". * * Accepts either a plain initial value or a source {@link AtomType}. When a * source atom is provided the delay atom mirrors the source's value, applying * the delay to every propagated change. * * All pending timeouts are cancelled automatically when the atom is disposed * via `registerCleanup`. * * @param initialAtomOrState - A plain initial value, or a source atom to mirror. * @param delay - How long to wait (ms) before each `set` / `update` is applied. * @param config - Optional atom configuration forwarded to the underlying atom. * * @example * // Every set fires independently after 1 second: * const status = delayAtom("idle", 1000); * status.set("loading"); // applied after 1 s * status.set("done"); // also applied after 1 s (both fire, in order) * * @example * // Mirror a source with delay: * const immediate = atom(0); * const delayed = delayAtom(immediate, 500); * immediate.set(42); // delayed reflects 42 after 500 ms * * @example * // Useful with disappear — update state after the animation finishes: * const visible = delayAtom(true, 300); * visible.set(false); // hides the element 300 ms later (after CSS transition) */ export declare function delayAtom(initialAtomOrState: T | AtomType, delay: number, config?: AtomConfig): AtomType; //# sourceMappingURL=delayAtom.d.ts.map