/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Access, Conformance, Constraint, Quality } from "../aspects/index.js"; import { ElementTag } from "../common/index.js"; import { RequirementElement } from "../elements/index.js"; import { FieldModel } from "./FieldModel.js"; import { Model } from "./Model.js"; export declare class RequirementModel extends Model implements RequirementElement { #private; tag: RequirementElement.Tag; element: RequirementElement.ElementType; default?: any; instance?: number; location?: RequirementElement.Location; get discriminator(): RequirementElement.ElementType; /** * The instance this requirement is one of, where it states a number that counts instances. * * Instances are numbered from one, so a number that counts none states no instance at all. This is the only * reading of {@link instance}: a requirement is told apart by the instance it belongs to, so a number that means * nothing must not make two requirements that are the same look different. */ get instanceNumber(): number | undefined; get constraint(): Constraint; set constraint(definition: Constraint | Constraint.Definition); get conformance(): Conformance; set conformance(definition: Conformance | Conformance.Definition); get access(): Access; set access(definition: Access | Access.Definition); get quality(): Quality; set quality(definition: Quality | Quality.Definition); /** * Condition requirements may derive from ConditionElement models via qualified types * (e.g. type: "RootNode.AclExtensionCond"). */ get allowedBaseTags(): ElementTag[]; get requirements(): RequirementModel[]; /** * The numeric range the requirement's constraint states, such as the number of endpoints a component device type * requirement requires. * * Undefined when the constraint bounds no number (`all`, `desc` or no constraint at all) and when it has several * parts (e.g. `1 to 2, 4`). An exact number (e.g. `1`) is both bounds. An undefined bound means there is no bound * on that side. */ get componentCountRange(): RequirementModel.CountRange | undefined; /** * Is the element mandatory? */ get isMandatory(): boolean; /** * Is the element disallowed? */ get isDisallowed(): boolean; /** * Is the element obsolete? * * @see {@link Conformance.isObsolete} */ get isObsolete(): boolean; constructor(definition: Model.Definition, ...children: Model.ChildDefinition[]); toElement(omitResources?: boolean, extra?: Record): RequirementElement; static Tag: ElementTag; } export declare namespace RequirementModel { type Child = RequirementModel | FieldModel; /** * The range of {@link RequirementModel.componentCountRange}, inclusive at both ends. */ interface CountRange { /** * The lowest number allowed, or undefined if there is no lower bound. */ min?: number; /** * The highest number allowed, or undefined if there is no upper bound. */ max?: number; } } //# sourceMappingURL=RequirementModel.d.ts.map