import { InitializerOptions } from '../../viewer';
import { StorageDriver } from './storage-driver';
export type StorageServiceOptions = {
    key: string;
    drivers: StorageDriver[];
    onLoaded?: (deserialized: any) => void;
    onUpdated?: (serialized: string, data: any) => void;
    onError?: (e: any) => void;
};
export declare class StorageService<Data extends Record<string, any> = InitializerOptions> {
    readonly options: StorageServiceOptions;
    private key;
    private _loaded;
    private data;
    constructor(options: StorageServiceOptions);
    get loaded(): boolean;
    getKey(): string;
    setKey(key: string): void;
    load(): Promise<Data>;
    save(force?: boolean): Promise<void>;
    get<K extends keyof Data>(key: K, defaultValue?: Data[K]): Data[K] | undefined;
    set<K extends keyof Data>(keyOrProperties: K | Partial<Data>, value?: Data[K]): void;
}
