Rest
...children: Model<BaseElement>[]Optional
asOptional
descriptionOptional
detailsOptional
errorsOptional
isOptional
isIndicates that an element defines a datatype.
Optional
isIndicates that an element may have type definitions as children.
Optional
mfgOptional
operationalOptional
typeOptional
untilOptional
xrefStatic
typesFactory support. Populated by derivatives upon definition.
The set of tags from which this model may derive.
Get a model for my base type as defined by type, if any.
Children of models are always models.
Children of models are always models.
Obtain a discriminator that differentiates different models with the same name
Allows subclasses to pull a working ID from an alternate source.
In some circumstances the base type can be inferred. This inference happens here.
Does not recurse so only returns the direct base type.
A local or parent xref.
Get the first global base type. This may have semantic meaning more specific than the base primitive type.
Determine if this model resides in the global namespace.
Get a string that uniquely identifies this model. This is normally the effective ID but some models require a generated identifier.
The structural parent. This is the model for the element that contains this element's definition.
The path ("." delimited) in the Matter tree.
This is informational and generally tries to adhere to JS API conventions.
Get shadow model, if any. A "shadow" is an element in my parent's inheritance hierarchy that I override.
Did validation find errors?
Create an operational extension of the model. This creates a new model that inherits from this model for operational purposes.
Optional
properties: Partial<Omit<SemanticNamespaceElement, "tag"> & Partial<Pick<SemanticNamespaceElement, "tag">>>Freeze the model hierarchy rooted at this model.
When using a model as operational schema we implement various optimizations that assume the schema is immutable. This function enforces that assumption.
To make changes to a frozen model use clone.
Retrieve a specific child by ID or name.
Does this model derive from another?
Search the inheritance chain for a child property.
Optional
allowedTags: ElementTag[]Retrieve a model of a specific type from the ownership hierarchy.
Find all children that reference a specific type.
Convert model to JSON.
Convert to non-class structure.
Apply a function to all tree elements.
Static
createCreate a model for an element.
A "model" is a class that implements runtime functionality associated with the corresponding element type.