Skip to main content

EntityReference

A parsed entity reference: a domain, a chain of typed components ancestor-first, and an optional path. Frozen -- treat instances as values.

Index

Properties

readonly__entityReference

__entityReference: true

Type-only brand; no such property exists at runtime. It keeps a hand-built literal from passing as a reference the grammar has validated, so one comes only from parse, tryParse or a function over an existing reference. A string-literal key rather than a unique symbol, so the declarations from two physical copies of this module still agree structurally.

readonlycomponents

components: readonly EntityComponent[]

The chain of typed components, ancestor-first. Never empty.

readonlydomain

domain: string

The owning service, e.g. twin.

readonlypath

path: readonly string[]

Path segments addressing something with no identity of its own; empty when absent.