import { A as AsyncState, j as StateBase } from '../types-5EvFF6wb.cjs'; import 'keyweaver'; import 'react'; declare const onValueChange: { /** * Registers a callback to be invoked when the value of a single {@link state} changes. * * @param state - The state to monitor for changes. * @param cb - The callback function invoked with the new value of the state. * @returns a function to unsubscribe from the value change event. * */ (state: AsyncState, cb: (value: T | undefined) => void): () => void; /** * Registers a callback to be invoked when the value of a single {@link state} changes. * * @param state - The state to monitor for changes. * @param cb - The callback function invoked with the new value of the state. * @returns a function to unsubscribe from the value change event. * */ (state: StateBase, cb: (value: T) => void): () => void; /** * Registers a callback to be invoked when the values of multiple {@link states} change. * * @param states - The states to monitor for changes. * @param cb - The callback function invoked with the new values of the states. * @returns a function to unsubscribe from the values change event. */ (states: S, cb: (values: { [index in keyof S]: S[index] extends StateBase ? K | (S[index] extends AsyncState ? undefined : never) : never; }) => void): () => void; }; export = onValueChange;