import type { StateObserver } from "./types"; import type { StateEvent } from "../../storage/types"; import type { Transaction } from "../../storage/idb/Transaction"; import { BaseObservableValue } from "../../../observable/value"; /** * Observable value for a state event with a given type and state key. * Unsubscribes when last subscription is removed */ export declare class ObservedStateKeyValue extends BaseObservableValue implements StateObserver { private readonly type; private readonly stateKey; private event?; private removeCallback?; constructor(type: string, stateKey: string); /** @internal */ load(roomId: string, txn: Transaction): Promise; /** @internal */ handleStateEvent(event: StateEvent): void; get(): StateEvent | undefined; setRemoveCallback(callback: () => void): void; onUnsubscribeLast(): void; } export declare function tests(): Promise<{ "test load and update": (assert: any) => Promise; }>;