TransformRegistry
Defined in: transform/transform-registry.ts:78
Registry for transform implementations.
Maps namespace:name keys to their TransformImpl executors.
The execution engine uses this to resolve AST nodes to runnable code.
Example
Section titled “Example”const registry = new TransformRegistry()registry.register(parseJsonImpl)
// Later, during execution:const impl = registry.get(node.transform)const output = await impl.execute(input)Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransformRegistry():
TransformRegistry
Returns
Section titled “Returns”TransformRegistry
Methods
Section titled “Methods”get(
ast):TransformImpl
Defined in: transform/transform-registry.ts:120
Get a transform implementation by its AST specification.
Parameters
Section titled “Parameters”The transform AST specification
Returns
Section titled “Returns”The registered implementation
Throws
Section titled “Throws”Error if no implementation is registered for the transform
Example
Section titled “Example”const impl = registry.get({ kind: 'transform', namespace: 'core', name: 'parseJson' })const result = await impl.execute(jsonString)register()
Section titled “register()”register(
impl):void
Defined in: transform/transform-registry.ts:96
Register a transform implementation.
Parameters
Section titled “Parameters”The transform implementation to register
Returns
Section titled “Returns”void
Example
Section titled “Example”registry.register({ namespace: 'mypackage', name: 'myTransform', execute(input) { return transform(input) }})