import { Visitor } from "./visitor"; import { AstNode, Identifier } from "./ast"; import { Scope } from "./scope"; import { ParserContext } from "./context"; export declare function getPath(node: N, parent: AstNode | undefined, ctx: ParserContext): NodePath; export declare class NodePath { node: T; parent: AstNode | undefined; private ctx; key: string | number; parentKey: string; inList: boolean; listKey: string; _scope: Scope | null; constructor(node: T, parent: AstNode | undefined, ctx: ParserContext); get scope(): Scope; get hub(): { file: { ast: { comments: import("./ast").AstComment[]; }; opts: { filename: string; }; }; }; get parentPath(): NodePath | undefined; get type(): "VariableDeclaration" | "VariableDeclarator" | "ExpressionStatement" | "Directive" | "DirectiveLiteral" | "BlockStatement" | "BreakStatement" | "ContinueStatement" | "DebuggerStatement" | "DoWhileStatement" | "EmptyStatement" | "ForInStatement" | "ForStatement" | "Identifier" | "IfStatement" | "LabeledStatement" | "ReturnStatement" | "SequenceExpression" | "SwitchCase" | "SwitchStatement" | "ThisExpression" | "ThrowStatement" | "TryStatement" | "CatchClause" | "UnaryExpression" | "WhileStatement" | "WithStatement" | "ClassDeclaration" | "ClassExpression" | "ClassBody" | "ClassMethod" | "ClassPrivateMethod" | "ClassProperty" | "ClassPrivateProperty" | "PrivateName" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportNamedDeclaration" | "ExportSpecifier" | "ForOfStatement" | "ImportDeclaration" | "ImportAttribute" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "MetaProperty" | "Super" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "YieldExpression" | "AwaitExpression" | "Import" | "BigIntLiteral" | "UpdateExpression" | "ArrowFunctionExpression" | "BinaryExpression" | "AssignmentExpression" | "MemberExpression" | "LogicalExpression" | "NewExpression" | "ObjectExpression" | "ObjectProperty" | "ObjectMethod" | "ArrayExpression" | "BindExpression" | "CallExpression" | "ConditionalExpression" | "FunctionDeclaration" | "FunctionExpression" | "SpreadElement" | "RestElement" | "StringLiteral" | "NumericLiteral" | "NullLiteral" | "BooleanLiteral" | "RegExpLiteral" | "ObjectPattern" | "AssignmentPattern" | "ArrayPattern" | "JSXAttribute" | "JSXClosingElement" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXSpreadChild" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXSpreadAttribute" | "JSXText" | "JSXFragment" | "JSXOpeningFragment" | "JSXClosingFragment" | "Program"; get(selector: string): NodePath | NodePath[]; getSource(): string; find(fn: (path: NodePath) => boolean): NodePath | null; forEach(fn: (path: NodePath) => void): void; /** * @param {string} source The module source * @param {string} [name] The imported name * @returns {boolean} */ referencesImport(source: string, name?: string): boolean; unshiftContainer(property: string, node: AstNode): void; pushContainer(property: string, node: AstNode): void; replaceWith(node: AstNode): void; traverse(visitor: Visitor, state: any): void; remove(): void; insertBefore(node: AstNode): void; insertAfter(node: AstNode): void; getOuterBindingIdentifierPaths(): Record> | null; isBlock(): boolean; isIdentifier(): this is NodePath; }