import type { EditorState, Transaction } from "../../../pm/state.js";
export type SharedStateKeySpec = {
    name?: string;
};
export declare class SharedStateKey<T extends object> {
    #private;
    /**
     * Define a new key.
     * If you create two keys with the same name, they will refer to the same value from the state.
     * If name not passed, a unique one will be generated.
     */
    static define<T extends object>(spec?: SharedStateKeySpec): SharedStateKey<T>;
    /** Add metadata to transaction to change data in state */
    readonly appendTransaction: Readonly<{
        /** Set or replace data stored by current key */
        set: (tr: Transaction, data: T) => Transaction;
        /** Update (patch) data stored by current key */
        update: (tr: Transaction, data: Partial<T>) => Transaction;
        /** Delete data stored by current key */
        delete: (tr: Transaction) => Transaction;
    }>;
    private constructor();
    getNotifier(state: EditorState): {
        subscribe(fn: (data: T | undefined) => void): () => void;
        unsubscribe(fn: (data: T | undefined) => void): void;
    };
    getValue(state: EditorState): T | undefined;
    private appendTrMeta;
}
