Plan
Defined in: plan/plan.ts:52
Compiled, immutable execution plan.
Created by Planner.compile(). Execute with run(plan, ctx).
The Plan is immutable and can be reused across multiple executions. It contains:
- The AST defining the computation graph
- Injectors mapping emit nodes to their runtime behavior
Example
Section titled “Example”const plan = new Planner() .in(load({ name: 'test' })) .emit((out, $) => out.add('result', $.get('name').string())) .compile()
// Plan can be executed multiple timesconst result1 = await run(plan)const result2 = await run(plan)Type Parameters
Section titled “Type Parameters”Out
The output type this plan produces
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Plan<
Out>(ast,injectors):Plan<Out>
Defined in: plan/plan.ts:65
Create a new Plan.
Parameters
Section titled “Parameters”The compiled AST structure
injectors
Section titled “injectors”Map<NodeId, RuntimeInject> = ...
Map of node IDs to their runtime injectors
Returns
Section titled “Returns”Plan<Out>
Properties
Section titled “Properties”
readonlyast:PlanAst
Defined in: plan/plan.ts:67
The abstract syntax tree defining the computation graph
injectors
Section titled “injectors”
readonlyinjectors:Map<NodeId,RuntimeInject>
Defined in: plan/plan.ts:69
Map of emit node IDs to their runtime injection functions