Skip to content

[I] Model

Structured type with ordered own properties, optional indexing, and model inheritance.

PropertyModifierTypeDescriptionOverridesInherited from
baseModel?publicModelModel this model extends. This represent inheritance.--
creating?publictrueIf the type is currently being created.-BaseType.creating
decoratorspublicDecoratorApplication[]Applications used when finishing this type, including copied or synthesized applications.-DecoratedType.decorators
derivedModelspublicModel[]Direct children. This is the reverse relation of baseModel--
entityKindreadonly"Type"Distinguishes semantic types from values and parameter constraints.-BaseType.entityKind
expressionpublicbooleanWhether this model was declared in expression position (e.g. an anonymous model { ... } used as a type) rather than as a named statement.--
indexer?publicModelIndexerConstraint on indexed entries, if this model supports indexing.--
instantiationParameters?publicType[]Legacy instantiation metadata. The compiler’s type checker does not populate this field, so its absence does not indicate whether this type is a template instance.-BaseType.instantiationParameters
isFinishedpublicbooleanReflect if a type has been finished(Decorators have been called). There is multiple reasons a type might not be finished: - a template declaration will not - a template instance that argument that are still template parameters - a template instance that is only partially instantiated(like a templated operation inside a templated interface)-BaseType.isFinished
kindpublic"Model"Discriminant for structured model types.BaseType.kind-
namepublicstringDeclared name, or an empty string for an anonymous model.--
namespace?publicNamespaceNamespace containing a named declaration, when associated with one.--
node?public| ModelStatementNode | ModelExpressionNode | ModelDeclarationExpressionNode | ObjectLiteralNode | IntersectionExpressionNodeNode used to construct this type. If the node is undefined it means the type was dynamically built. With typekit for example.BaseType.node-
propertiespublicRekeyableMap<string, ModelProperty>The properties of the model. Properties are ordered in the order that they appear in source. Properties obtained via model is appear before properties defined in the model body. Properties obtained via ... are inserted where the spread appears in source. Properties inherited via model extends are not included. Use walkPropertiesInherited to enumerate all properties in the inheritance hierarchy.--
sourceModel?publicModelThe model that is referenced via model is.--
sourceModelspublicSourceModel[]Models that were used to build this model. This include any model referenced in model is, ... or when intersecting models.--
templateMapper?publicTypeMapperArgument substitutions for an instantiation; absent on an uninstantiated declaration.-TemplatedTypeBase.templateMapper
templateNode?publicNodeOriginating template node, when retained separately from the type’s source node.-TemplatedTypeBase.templateNode