import { BehaviorSubject } from 'rxjs';
type VariableUpdate = {
    type: 'initial';
    value: any;
} | {
    isReset: boolean;
    nodeKey: string;
    oldValue: any;
    type: 'update';
    value: any;
};
/**
 * State synchronizer singleton
 *
 * Used to synchronize changes across atoms of the same family
 */
export declare class StateSynchronizer {
    #private;
    constructor();
    /**
     * Register a key in the state synchronizer
     *
     * @param key key to register
     * @param defaultValue value to register
     */
    register(key: string, defaultValue: any): void;
    /**
     * Check if a given key is registered in the state synchronizer
     *
     * @param key key to check if registered
     */
    isRegistered(key: string): boolean;
    /**
     * Get the current state for a given key
     *
     * @param key key to get the current value for
     */
    getCurrentState(key: string): VariableUpdate | null;
    /**
     * Subscribe to changes on a given key
     *
     * @param key key to subscribe to
     */
    subscribe(key: string, subscription: Parameters<BehaviorSubject<VariableUpdate>['subscribe']>[0]): () => void;
    /**
     * Notify listeners for a given key
     *
     * @param key key to notify listeners for
     * @param update update to notify about
     */
    notify(key: string, update: VariableUpdate): void;
}
export {};
//# sourceMappingURL=state-synchronizer.d.ts.map