import { Expr } from "./expression";
import type { FunctionlessNode } from "./node";
import { BlockStmt, Stmt } from "./statement";
import { DeterministicNameGenerator } from "./util";
import "./node-clone";
/**
 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
 *
 * @param node The Node whose children will be visited.
 * @param visitor The callback used to visit each child.
 * @param context A lexical environment context for the visitor.
 */
export declare function visitEachChild<T extends FunctionlessNode>(node: T, visit: (node: FunctionlessNode) => FunctionlessNode | FunctionlessNode[] | undefined): T;
/**
 * Walks each of the children in {@link node} and calls {@link visit}.
 *
 * If {@link visit} returns a truthy value, then walking is immediately terminated.
 *
 * @param node the node to walk children of
 * @param visit callback to call with each child node
 */
export declare function forEachChild(node: FunctionlessNode, visit: (node: FunctionlessNode) => any): void;
/**
 * Like {@link visitEachChild} but it only visits the statements of a block.
 *
 * Provides the hoist function that allows hoisting expressions into variable statements above the current statement.
 */
export declare function visitBlock(block: BlockStmt, cb: (stmt: Stmt, hoist: (expr: Expr) => Expr) => Stmt, nameGenerator: DeterministicNameGenerator): BlockStmt;
/**
 * Starting at the root, explore the children without processing until one or more start nodes are found.
 *
 * For each Start nodes, apply {@link visitEachChild} to it with the given callback.
 */
export declare function visitSpecificChildren<T extends FunctionlessNode>(root: T, starts: Expr[], cb: (node: FunctionlessNode) => FunctionlessNode | FunctionlessNode[] | undefined): T;
export declare const deploymentOnlyModule = true;
//# sourceMappingURL=visit.d.ts.map