TemplateDefinition
Describes one Template as the compiler emits it, adding behavior to the structure: Events, Grants, Roles, states and parent Listeners.
- Data model
- TemplateBuilder for declaring a Template
- ReadTemplate for the Template inside an execution
Extends
Section titled “Extends”Properties
Section titled “Properties”description?
Section titled “description?”
readonlyoptionaldescription?:string
Description set with setDescription, or undefined.
Inherited from
Section titled “Inherited from”BasicTemplateDefinition.description
events
Section titled “events”
readonlyevents:Record<string,EventDefinition>
Events declared on the Template, keyed by Event key.
fromRelations
Section titled “fromRelations”
readonlyfromRelations:Record<string,RelationDefinition>
Relations declared on this Template, keyed by Relation key.
Inherited from
Section titled “Inherited from”BasicTemplateDefinition.fromRelations
grants
Section titled “grants”
readonlygrants: readonlyTemplateGrantDefinition[]
Grants that make Items visible to Roles and decide which Properties each Role may read.
isExtensible
Section titled “isExtensible”
readonlyisExtensible:boolean
Whether Items of this Template accept extension Properties, which are stored on the parent Item and shared by its children of this Template.
readonlykey:string
Key of the Template, unique within its App.
parentListeners
Section titled “parentListeners”
readonlyparentListeners:Record<string,EventParentListenerDefinition>
Listeners on this Template for Events of child Items, keyed by Listener key.
readonlyprn:string
PRN of the Template, prn::<app>:template/<key>.
Inherited from
Section titled “Inherited from”properties
Section titled “properties”
readonlyproperties:Record<string,PropertyDefinition>
Properties of the Template, keyed by Property key.
Inherited from
Section titled “Inherited from”BasicTemplateDefinition.properties
readonlyroles:Record<string,TemplateRoleDefinition>
Template Roles, keyed by Role key.
states
Section titled “states”
readonlystates:Record<string,StateDefinition>
States of the state machine, keyed by state key; empty when the Template has no states.
toRelations
Section titled “toRelations”
readonlytoRelations:Record<string,RelationDefinition>
Relations that target this Template, directly or through a Union, keyed by their toKey; filled once every App is built.
Inherited from
Section titled “Inherited from”BasicTemplateDefinition.toRelations
unionPrns
Section titled “unionPrns”
readonlyunionPrns: readonlystring[]
PRNs of the Unions this Template belongs to; filled once every App is built.

