import type { Expressions, StrictExpressions, StrictTypedExpression, TypedExpression } from "../expression.js"; import { ExpressionVisitor } from "./expression-visitor.js"; import type { IVisitable } from "../visitable.js"; /** * Replaces occurrences of a specific expression with another during traversal. * This visitor updates an expression tree by substituting the original expression with the new one. */ export declare class ExpressionUpdater extends ExpressionVisitor { private original; private newExp; /** * Creates an instance of ExpressionUpdater. * @param original - The expression to be replaced in the tree. * @param newExp - The new expression that replaces the original. */ constructor(original: Expressions, newExp: Expressions); private rootCall; /** * Performs the expression replacement during traversal. * @param expression - The current expression being visited. * @returns The updated expression after potential substitution. */ visit(expression: StrictTypedExpression): StrictTypedExpression; visit(expression: TypedExpression): TypedExpression; visit(expression: StrictExpressions): StrictExpressions; visit(expression: IVisitable): Expressions; }