import type { ASTNode, VisitorHandlers, VisitorContext } from './types.js';
declare class VisitorContextImpl implements VisitorContext {
    private _skipped;
    private _stopped;
    private _replaced;
    private _hasReplacement;
    private _path;
    private _parent;
    private _scope;
    constructor(path?: (string | number)[], parent?: ASTNode | null);
    skip(): void;
    stop(): void;
    replace(node: ASTNode | ASTNode[] | null): void;
    getPath(): (string | number)[];
    getParent(): ASTNode | null;
    getScope(): Map<string, any>;
    setScope(key: string, value: any): void;
    get skipped(): boolean;
    get stopped(): boolean;
    get replacement(): ASTNode | ASTNode[] | null | undefined;
    get hasReplacement(): boolean;
    createChild(key: string | number, parent: ASTNode): VisitorContextImpl;
}
export declare class ASTVisitor {
    private handlers;
    constructor(handlers: VisitorHandlers);
    visit(node: ASTNode, context: VisitorContextImpl): ASTNode | ASTNode[] | null;
    private visitChildren;
    private isASTNode;
}
export declare function visit(ast: ASTNode | null, visitor: ASTVisitor): ASTNode | null;
export declare function findNodes(ast: ASTNode | null, predicate: (node: ASTNode) => boolean): ASTNode[];
export declare function findFirst(ast: ASTNode | null, predicate: (node: ASTNode) => boolean): ASTNode | null;
export declare function getAncestors(ast: ASTNode | null, targetNode: ASTNode): ASTNode[];
export declare function createTypeCollector(types: string[]): ASTVisitor;
export declare function measureDepth(ast: ASTNode): number;
export declare function countNodeTypes(ast: ASTNode): Record<string, number>;
export declare function createVisitorContext(): VisitorContextImpl;
export { VisitorContextImpl };
//# sourceMappingURL=visitor.d.ts.map