frontend/.pnpm-store/v3/files/48/83c290d74f5cb32ac75d96ee899da479dcd6e901d07f562b7e971fbc3da0cfc18b521b212d6fe7d20d501ad9a2f60bc75f7368224d879c0e9298da0b78d09a

53 lines
1.6 KiB
Plaintext

import { Fork, Omit } from "../types";
import { ASTNode } from "./types";
import { NodePath } from "./node-path";
export interface PathVisitor {
_reusableContextStack: any;
_methodNameTable: any;
_shouldVisitComments: any;
Context: any;
_visiting: any;
_changeReported: any;
_abortRequested: boolean;
visit(...args: any[]): any;
reset(...args: any[]): any;
visitWithoutReset(path: any): any;
AbortRequest: any;
abort(): void;
visitor: any;
acquireContext(path: any): any;
releaseContext(context: any): void;
reportChanged(): void;
wasChangeReported(): any;
}
export interface PathVisitorStatics {
fromMethodsObject(methods?: any): Visitor;
visit<M = {}>(node: ASTNode, methods?: import("../gen/visitor").Visitor<M>): any;
}
export interface PathVisitorConstructor extends PathVisitorStatics {
new (): PathVisitor;
}
export interface Visitor extends PathVisitor {
}
export interface VisitorConstructor extends PathVisitorStatics {
new (): Visitor;
}
export interface VisitorMethods {
[visitorMethod: string]: (path: NodePath) => any;
}
export interface SharedContextMethods {
currentPath: any;
needToCallTraverse: boolean;
Context: any;
visitor: any;
reset(path: any, ...args: any[]): any;
invokeVisitorMethod(methodName: string): any;
traverse(path: any, newVisitor?: VisitorMethods): any;
visit(path: any, newVisitor?: VisitorMethods): any;
reportChanged(): void;
abort(): void;
}
export interface Context extends Omit<PathVisitor, "visit" | "reset">, SharedContextMethods {
}
export default function pathVisitorPlugin(fork: Fork): PathVisitorConstructor;