/**
 * Global state store. Acts as a wrapper around localStorage.
 *
 * Supports a simple key-value store with subscriptions and async value replacement,
 * while ensuring that only one replacement is in progress at a time.
 */
declare class GlobalStore {
    #private;
    constructor();
    /**
     * Clear the store.
     * Removes all values and subscribers.
     */
    clear(): void;
    /**
     * Get the value for a key.
     * If the value is being replaced, the promise for the new value is returned.
     *
     * @param key - key to get value for
     */
    getValue(key: string): Promise<string | null>;
    /**
     * Get the value for a key synchronously.
     * Even if the value is being replaced, the current value is returned.
     *
     * @param key - key to get value for
     */
    getValueSync(key: string): string | null;
    /**
     * Set the value for a key.
     *
     * @param key - key to set value for
     * @param value - value to set
     */
    setValue(key: string, value: string | null): void;
    /**
     * Replace the value for a key.
     * If the value is being replaced, the promise for the new value is returned.
     *
     * @param key - key to replace value for
     * @param fn - function to get the new value
     */
    replaceValue(key: string, fn: () => Promise<string>): Promise<string | null>;
    /**
     * Subscribe to changes to a key.
     *
     * @param key - key to subscribe to changes to
     * @param callback - callback invoked when the value is updated
     */
    subscribe(key: string, callback: (val: string | null) => void): () => void;
}
declare const store: GlobalStore;
export default store;
//# sourceMappingURL=global-state-store.d.ts.map