Files and imports
DefinitionBase
The language-neutral coordination surface of a registered, named definition.
The cross-generator cache reads only this surface - the definition's identifier (the (name, exportPath) cache key), its value, and the generatorKey (via SnippetBase) for the integrity check. How a definition renders - the export const X = … wrapper, JSDoc, the export/visibility keyword - is the concrete subclass's concern, so toString() is abstract here.
Concrete rendering subclasses live in the language packages (TsDefinition in @skmtc/lang-typescript); Drivers construct them through the Lang factories (lang.toDefinition).
Signature
import { DefinitionBase } from '@skmtc/core'
abstract class DefinitionBase<V extends GeneratedValue = GeneratedValue> extends SnippetBaseConstructor
constructor
constructor(args: DefinitionBaseArgs<V>)Properties
The identifier for this definition
The generated value content
The model lowest on the pending stack that this Definition's model led back to while its projection was being constructed (PendingDefinition.leadsTo). A reference to this model is inside a cycle for as long as that cycle is open (toOpenEnd). Set by the ModelDriver; undefined for a model that led back to none, and for a Definition the Driver did not construct.
Methods
toString
toString(): stringRenders the definition's code. Implemented by the concrete subclass.