/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { DefinitionError } from "#common/DefinitionError.js"; import type { ElementTag } from "#common/ElementTag.js"; import type { Specification } from "#common/Specification.js"; import { CrossReference } from "./CrossReference.js"; import type { Model } from "./Model.js"; /** * Model specification details. * * Model resources are a parallel data model that is not required for operational purposes. If loaded, the model * provides additional metadata about elements. * * You can load resources for the standard data model using `import "@matter/model/resources"`. */ export declare class Resource { /** * @deprecated A resource does not carry errors; a model keeps the errors its definition states, see `Model.errors` */ errors?: DefinitionError[]; asOf?: Specification.Revision; until?: Specification.Revision; matchTo?: { id?: string | number; name?: string; }; pics?: string; description?: string; xref?: Specification.CrossReference; details?: string; constructor(resources?: Resource.Definition); } /** * A pool of loaded resources. * * Resources are indexed logically via a (tag, name) tuple in the context of the parent and if necessary for * discrimination, conformance. Models that do not have their own resource definition installed will search this * pool to fulfill resource properties. */ export declare class ResourceBundle { #private; get(model: Model): Readonly | undefined; add(resource: Resource.Named): void; static readonly default: ResourceBundle; } export declare namespace Resource { interface Named extends Definition { tag: `${ElementTag}`; name: string; discriminator?: string; children?: Named[]; } type Definition = Omit & { xref?: CrossReference.Definition; }; function add(named: Named): void; function discriminatorFor(model: Model): string | undefined; } //# sourceMappingURL=Resource.d.ts.map