/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes } from "#util/Bytes.js";
import { MaybePromise } from "../util/Promises.js";
import { Storage } from "./Storage.js";
import { SupportedStorageTypes } from "./StringifyTools.js";
export interface StorageContextFactory {
    createContext(context: string): StorageContext;
}
export declare class StorageContext implements StorageContextFactory {
    protected readonly storage: Storage;
    readonly thisContexts: string[];
    constructor(storage: Storage, thisContexts: string[]);
    get<T extends SupportedStorageTypes>(key: string, defaultValue?: T): MaybePromise<T>;
    has(key: string): MaybePromise<boolean>;
    set(key: string, value: SupportedStorageTypes): MaybePromise<void>;
    set(values: Record<string, SupportedStorageTypes>): MaybePromise<void>;
    delete(key: string): MaybePromise<void>;
    createContext(context: string): StorageContext;
    keys(): MaybePromise<string[]>;
    values(): MaybePromise<Record<string, SupportedStorageTypes>>;
    contexts(): MaybePromise<string[]>;
    /** Clears all keys in this context */
    clear(): PromiseLike<void> | undefined;
    /** Clears all keys in this context and all created sub-contexts. */
    clearAll(): MaybePromise<void>;
    openBlob(key: string): MaybePromise<Blob>;
    writeBlobFromStream(key: string, stream: ReadableStream<Bytes>): MaybePromise<void>;
}
//# sourceMappingURL=StorageContext.d.ts.map