Skip to content

InliningOptimizer

InliningOptimizer replaces variables with checked expression definitions.

A single occurrence is replaced directly. Multiple bindable occurrences are replaced with an expanded cel.bind expression at their least common ancestor so the definition is evaluated once.

new InliningOptimizer(options?): InliningOptimizer

constructor configures the optimizer from a plain option object.

InliningOptimizerOptions = {}

InliningOptimizer

optimize(context, ast): AST

optimize applies each variable definition to the checked AST.

OptimizerContext

AST

AST

ASTOptimizer.optimize