/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { MaybePromise } from "#util/Promises.js"; import { Environment } from "../environment/Environment.js"; import { Environmental } from "../environment/Environmental.js"; import { Diagnostic } from "../log/Diagnostic.js"; import { Storage } from "./Storage.js"; import { StorageManager } from "./StorageManager.js"; /** * Service adapter for the Matter.js storage API. */ export declare class StorageService { #private; [Diagnostic.value]: () => (string | (Record & Diagnostic))[]; constructor(environment: Environment, factory?: (namespace: string) => MaybePromise, resolver?: (...paths: string[]) => string); static [Environmental.create](environment: Environment): StorageService; /** * Open storage. The storage is initialized but the caller must take ownership. * * @param namespace a unique namespace identifier such as a root node ID */ open(namespace: string): Promise; /** * Install a factory for opening storage. Without such a factory storage is unavailable. */ set factory(factory: (namespace: string) => MaybePromise); /** * The storage location. Only used for diagnostic purposes. */ get location(): string | undefined; set location(location: string | undefined); /** * Join one or more relative paths to some platform-dependent notion of an absolute storage path. */ resolve: (...paths: string[]) => string; } //# sourceMappingURL=StorageService.d.ts.map