import * as t from "@babel/types"; export import Node = t.Node; export import RemovePropertiesOptions = t.RemovePropertiesOptions; declare const traverse: { (parent: Node, opts: TraverseOptions, scope: Scope | undefined, state: S, parentPath?: NodePath): void; (parent: Node, opts?: TraverseOptions, scope?: Scope, state?: any, parentPath?: NodePath): void; visitors: typeof visitors; verify: typeof visitors.verify; explode: typeof visitors.explode; cheap: (node: Node, enter: (node: Node) => void) => void; node: ( node: Node, opts: TraverseOptions, scope?: Scope, state?: any, path?: NodePath, skipKeys?: Record, ) => void; clearNode: (node: Node, opts?: RemovePropertiesOptions) => void; removeProperties: (tree: Node, opts?: RemovePropertiesOptions) => Node; hasType: (tree: Node, type: Node["type"], denylistTypes?: string[]) => boolean; cache: typeof cache; }; export namespace visitors { /** * `explode()` will take a `Visitor` object with all of the various shorthands * that we support, and validates & normalizes it into a common format, ready * to be used in traversal. * * The various shorthands are: * - `Identifier() { ... }` -> `Identifier: { enter() { ... } }` * - `"Identifier|NumericLiteral": { ... }` -> `Identifier: { ... }, NumericLiteral: { ... }` * - Aliases in `@babel/types`: e.g. `Property: { ... }` -> `ObjectProperty: { ... }, ClassProperty: { ... }` * * Other normalizations are: * - Visitors of virtual types are wrapped, so that they are only visited when their dynamic check passes * - `enter` and `exit` functions are wrapped in arrays, to ease merging of visitors */ function explode( visitor: Visitor, ): { [Type in Exclude["type"]]?: VisitNodeObject>; }; function verify(visitor: Visitor): void; function merge(visitors: Array>): Visitor; function merge( visitors: Visitor[], states?: any[], wrapper?: ( stateKey: any, visitorKey: keyof Visitor, func: VisitNodeFunction, ) => VisitNodeFunction | null, ): Visitor; } export namespace cache { let path: WeakMap>; let scope: WeakMap; function clear(): void; function clearPath(): void; function clearScope(): void; } export default traverse; export type TraverseOptions = { scope?: Scope; noScope?: boolean; denylist?: NodeType[]; /** @deprecated will be removed in Babel 8 */ blacklist?: NodeType[]; shouldSkip?: (node: NodePath) => boolean; } & Visitor; export class Scope { /** * This searches the current "scope" and collects all references/bindings * within. */ constructor(path: NodePath, parentScope?: Scope); uid: number; path: NodePath; block: Node; labels: Map>; parentBlock: Node; parent: Scope; hub: HubInterface; bindings: { [name: string]: Binding }; references: { [name: string]: true }; globals: { [name: string]: t.Identifier | t.JSXIdentifier }; uids: { [name: string]: boolean }; data: Record; crawling: boolean; static globals: string[]; /** Variables available in current context. */ static contextVariables: string[]; /** Traverse node with current scope and path. */ traverse(node: Node | Node[], opts: TraverseOptions, state: S): void; traverse(node: Node | Node[], opts?: TraverseOptions, state?: any): void; /** Generate a unique identifier and add it to the current scope. */ generateDeclaredUidIdentifier(name?: string): t.Identifier; /** Generate a unique identifier. */ generateUidIdentifier(name?: string): t.Identifier; /** Generate a unique `_id1` binding. */ generateUid(name?: string): string; /** Generate a unique identifier based on a node. */ generateUidIdentifierBasedOnNode(parent: Node, defaultName?: string): t.Identifier; /** * Determine whether evaluating the specific input `node` is a consequenceless reference. ie. * evaluating it wont result in potentially arbitrary code from being ran. The following are * whitelisted and determined not to cause side effects: * * - `this` expressions * - `super` expressions * - Bound identifiers */ isStatic(node: Node): boolean; /** Possibly generate a memoised identifier if it is not static and has consequences. */ maybeGenerateMemoised(node: Node, dontPush?: boolean): t.Identifier; checkBlockScopedCollisions(local: Binding, kind: BindingKind, name: string, id: object): void; rename(oldName: string, newName?: string, block?: Node): void; dump(): void; toArray( node: t.Node, i?: number | boolean, arrayLikeIsIterable?: boolean, ): t.ArrayExpression | t.CallExpression | t.Identifier; hasLabel(name: string): boolean; getLabel(name: string): NodePath | undefined; registerLabel(path: NodePath): void; registerDeclaration(path: NodePath): void; buildUndefinedNode(): t.UnaryExpression; registerConstantViolation(path: NodePath): void; registerBinding(kind: BindingKind, path: NodePath, bindingPath?: NodePath): void; addGlobal(node: t.Identifier | t.JSXIdentifier): void; hasUid(name: string): boolean; hasGlobal(name: string): boolean; hasReference(name: string): boolean; isPure(node: Node, constantsOnly?: boolean): boolean; /** * Set some arbitrary data on the current scope. */ setData(key: string, val: any): any; /** * Recursively walk up scope tree looking for the data `key`. */ getData(key: string): any; /** * Recursively walk up scope tree looking for the data `key` and if it exists, * remove it. */ removeData(key: string): void; crawl(): void; push(opts: { id: t.LVal; init?: t.Expression; unique?: boolean; _blockHoist?: number | undefined; kind?: "var" | "let" | "const"; }): void; /** Walk up to the top of the scope tree and get the `Program`. */ getProgramParent(): Scope; /** Walk up the scope tree until we hit either a Function or return null. */ getFunctionParent(): Scope | null; /** * Walk up the scope tree until we hit either a BlockStatement/Loop/Program/Function/Switch or reach the * very top and hit Program. */ getBlockParent(): Scope; /** * Walk up from a pattern scope (function param initializer) until we hit a non-pattern scope, * then returns its block parent * @returns An ancestry scope whose path is a block parent */ getPatternParent(): Scope; /** Walks the scope tree and gathers **all** bindings. */ getAllBindings(): Record; /** Walks the scope tree and gathers all declarations of `kind`. */ getAllBindingsOfKind(...kinds: string[]): Record; bindingIdentifierEquals(name: string, node: Node): boolean; getBinding(name: string): Binding | undefined; getOwnBinding(name: string): Binding | undefined; getBindingIdentifier(name: string): t.Identifier; getOwnBindingIdentifier(name: string): t.Identifier; hasOwnBinding(name: string): boolean; hasBinding( name: string, optsOrNoGlobals?: | boolean | { noGlobals?: boolean; noUids?: boolean; }, ): boolean; parentHasBinding( name: string, opts?: { noGlobals?: boolean; noUids?: boolean; }, ): boolean; /** Move a binding of `name` to another `scope`. */ moveBindingTo(name: string, scope: Scope): void; removeOwnBinding(name: string): void; removeBinding(name: string): void; } export type BindingKind = "var" | "let" | "const" | "module" | "hoisted" | "param" | "local" | "unknown"; /** * This class is responsible for a binding inside of a scope. * * It tracks the following: * * * Node path. * * Amount of times referenced by other nodes. * * Paths to nodes that reassign or modify this binding. * * The kind of binding. (Is it a parameter, declaration etc) */ export class Binding { constructor(opts: { identifier: t.Identifier; scope: Scope; path: NodePath; kind: BindingKind }); identifier: t.Identifier; scope: Scope; path: NodePath; kind: BindingKind; referenced: boolean; references: number; referencePaths: NodePath[]; constant: boolean; constantViolations: NodePath[]; hasDeoptedValue: boolean; hasValue: boolean; value: any; deopValue(): void; setValue(value: any): void; clearValue(): void; /** Register a constant violation with the provided `path`. */ reassign(path: NodePath): void; /** Increment the amount of references to this binding. */ reference(path: NodePath): void; /** Decrement the amount of references to this binding. */ dereference(): void; } export type Visitor = & VisitNodeObject & { [N in Node as N["type"]]?: VisitNode; } & { [K in keyof t.Aliases]?: VisitNode; } & { [K in keyof VirtualTypeAliases]?: VisitNode; } & { // Babel supports `NodeTypesWithoutComment | NodeTypesWithoutComment | ... ` but it is // too complex for TS. So we type it as a general visitor only if the key contains `|` // this is good enough for non-visitor traverse options e.g. `noScope` [k: `${string}|${string}`]: VisitNode; }; export type VisitNode = VisitNodeFunction | VisitNodeObject; export type VisitNodeFunction = (this: S, path: NodePath

, state: S) => void; type NodeType = Node["type"] | keyof t.Aliases; export interface VisitNodeObject { enter?: VisitNodeFunction; exit?: VisitNodeFunction; } export type NodeKeyOfArrays = { [P in keyof T]-?: T[P] extends Array ? P : never; }[keyof T]; export type NodeKeyOfNodes = { [P in keyof T]-?: T[P] extends Node | null | undefined ? P : never; }[keyof T]; export type NodePaths = T extends readonly Node[] ? { -readonly [K in keyof T]: NodePath> } : T extends Node ? [NodePath] : never; type NodeListType = N[K] extends Array ? (P extends Node ? P : never) : never; type NodesInsertionParam = T | readonly T[] | [T, ...T[]]; export class NodePath { constructor(hub: HubInterface, parent: Node); parent: Node; hub: Hub; data: Record; context: TraversalContext; scope: Scope; contexts: TraversalContext[]; state: any; opts: any; // exploded TraverseOptions skipKeys: Record | null; parentPath: T extends t.Program ? null : NodePath; container: Node | Node[] | null; listKey: string | null; key: string | number | null; node: T; type: T extends Node ? T["type"] : T extends null | undefined ? undefined : Node["type"] | undefined; shouldSkip: boolean; shouldStop: boolean; removed: boolean; inList: boolean; parentKey: string; typeAnnotation: object; static get(opts: { hub?: HubInterface; parentPath: NodePath | null; parent: Node; container: C; key: K; }): NodePath; static get>(opts: { hub?: HubInterface; parentPath: NodePath | null; parent: Node; container: C; listKey: L; key: number; }): C[L] extends Array ? NodePath : never; getScope(scope: Scope): Scope; setData(key: string | symbol, val: any): any; getData(key: string | symbol, def?: any): any; hasNode(): this is NodePath>; buildCodeFrameError(msg: string, Error?: ErrorConstructor): Error; traverse(visitor: TraverseOptions, state: T): void; traverse(visitor: TraverseOptions): void; set(key: string, node: any): void; getPathLocation(): string; // Example: https://github.com/babel/babel/blob/63204ae51e020d84a5b246312f5eeb4d981ab952/packages/babel-traverse/src/path/modification.js#L83 debug(buildMessage: () => string): void; // #region ------------------------- ancestry ------------------------- /** * Starting at the parent path of the current `NodePath` and going up the * tree, return the first `NodePath` that causes the provided `callback` * to return a truthy value, or `null` if the `callback` never returns a * truthy value. */ findParent(callback: (path: NodePath) => boolean): NodePath | null; /** * Starting at current `NodePath` and going up the tree, return the first * `NodePath` that causes the provided `callback` to return a truthy value, * or `null` if the `callback` never returns a truthy value. */ find(callback: (path: NodePath) => boolean): NodePath | null; /** Get the parent function of the current path. */ getFunctionParent(): NodePath | null; /** Walk up the tree until we hit a parent node path in a list. */ getStatementParent(): NodePath | null; /** * Get the deepest common ancestor and then from it, get the earliest relationship path * to that ancestor. * * Earliest is defined as being "before" all the other nodes in terms of list container * position and visiting key. */ getEarliestCommonAncestorFrom(paths: NodePath[]): NodePath; /** Get the earliest path in the tree where the provided `paths` intersect. */ getDeepestCommonAncestorFrom( paths: NodePath[], filter?: (deepest: Node, i: number, ancestries: NodePath[][]) => NodePath, ): NodePath; /** * Build an array of node paths containing the entire ancestry of the current node path. * * NOTE: The current node path is included in this. */ getAncestry(): [this, ...NodePath[]]; /** * A helper to find if `this` path is an ancestor of `maybeDescendant` */ isAncestor(maybeDescendant: NodePath): boolean; /** * A helper to find if `this` path is a descendant of `maybeAncestor` */ isDescendant(maybeAncestor: NodePath): boolean; inType(...candidateTypes: string[]): boolean; // #endregion // #region ------------------------- inference ------------------------- /** Infer the type of the current `NodePath`. */ getTypeAnnotation(): t.FlowType | t.TSType; isBaseType(baseName: string, soft?: boolean): boolean; couldBeBaseType(name: string): boolean; baseTypeStrictlyMatches(rightArg: NodePath): boolean; isGenericType(genericName: string): boolean; // #endregion // #region ------------------------- replacement ------------------------- /** * Replace a node with an array of multiple. This method performs the following steps: * * - Inherit the comments of first provided node with that of the current node. * - Insert the provided nodes after the current node. * - Remove the current node. */ replaceWithMultiple(nodes: Nodes): NodePaths; /** * Parse a string as an expression and replace the current node with the result. * * NOTE: This is typically not a good idea to use. Building source strings when * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's * easier to use, your transforms will be extremely brittle. */ replaceWithSourceString(replacement: string): [NodePath]; /** Replace the current node with another. */ replaceWith(replacementPath: R | NodePath): [NodePath]; replaceWith(replacementPath: R): [R]; /** * This method takes an array of statements nodes and then explodes it * into expressions. This method retains completion records which is * extremely important to retain original semantics. */ replaceExpressionWithStatements(nodes: t.Statement[]): NodePaths; replaceInline(nodes: Nodes): NodePaths; // #endregion // #region ------------------------- evaluation ------------------------- /** * Walk the input `node` and statically evaluate if it's truthy. * * Returning `true` when we're sure that the expression will evaluate to a * truthy value, `false` if we're sure that it will evaluate to a falsy * value and `undefined` if we aren't sure. Because of this please do not * rely on coercion when using this method and check with === if it's false. */ evaluateTruthy(): boolean | undefined; /** * Walk the input `node` and statically evaluate it. * * Returns an object in the form `{ confident, value, deopt }`. `confident` * indicates whether or not we had to drop out of evaluating the expression * because of hitting an unknown node that we couldn't confidently find the * value of, in which case `deopt` is the path of said node. * * Example: * * t.evaluate(parse("5 + 5")) // { confident: true, value: 10 } * t.evaluate(parse("!true")) // { confident: true, value: false } * t.evaluate(parse("foo + foo")) // { confident: false, value: undefined, deopt: NodePath } */ evaluate(): { confident: boolean; value: any; deopt?: NodePath; }; // #endregion // #region ------------------------- introspection ------------------------- /** * Match the current node if it matches the provided `pattern`. * * For example, given the match `React.createClass` it would match the * parsed nodes of `React.createClass` and `React["createClass"]`. */ matchesPattern(pattern: string, allowPartial?: boolean): boolean; /** * Check whether we have the input `key`. If the `key` references an array then we check * if the array has any items, otherwise we just check if it's falsy. */ has(key: string): boolean; // has(key: keyof T): boolean; isStatic(): boolean; /** Alias of `has`. */ is(key: string): boolean; // is(key: keyof T): boolean; /** Opposite of `has`. */ isnt(key: string): boolean; // isnt(key: keyof T): boolean; /** Check whether the path node `key` strict equals `value`. */ equals(key: string, value: any): boolean; // equals(key: keyof T, value: any): boolean; /** * Check the type against our stored internal type of the node. This is handy when a node has * been removed yet we still internally know the type and need it to calculate node replacement. */ isNodeType(type: string): boolean; /** * This checks whether or not we're in one of the following positions: * * for (KEY in right); * for (KEY;;); * * This is because these spots allow VariableDeclarations AND normal expressions so we need * to tell the path replacement that it's ok to replace this with an expression. */ canHaveVariableDeclarationOrExpression(): boolean; /** * This checks whether we are swapping an arrow function's body between an * expression and a block statement (or vice versa). * * This is because arrow functions may implicitly return an expression, which * is the same as containing a block statement. */ canSwapBetweenExpressionAndStatement(replacement: Node): boolean; /** Check whether the current path references a completion record */ isCompletionRecord(allowInsideFunction?: boolean): boolean; /** * Check whether or not the current `key` allows either a single statement or block statement * so we can explode it if necessary. */ isStatementOrBlock(): boolean; /** Check if the currently assigned path references the `importName` of `moduleSource`. */ referencesImport(moduleSource: string, importName: string): boolean; /** Get the source code associated with this node. */ getSource(): string; /** Check if the current path will maybe execute before another path */ willIMaybeExecuteBefore(target: NodePath): boolean; resolve(dangerous?: boolean, resolved?: NodePath[]): NodePath; isConstantExpression(): boolean; isInStrictMode(): boolean; // #endregion // #region ------------------------- context ------------------------- call(key: string): boolean; isDenylisted(): boolean; /** @deprecated will be removed in Babel 8 */ isBlacklisted(): boolean; visit(): boolean; skip(): void; skipKey(key: string): void; stop(): void; setScope(): void; setContext(context?: TraversalContext): this; /** * Here we resync the node paths `key` and `container`. If they've changed according * to what we have stored internally then we attempt to resync by crawling and looking * for the new values. */ resync(): void; popContext(): void; pushContext(context: TraversalContext): void; requeue(pathToQueue?: NodePath): void; // #endregion // #region ------------------------- removal ------------------------- remove(): void; // #endregion // #region ------------------------- conversion ------------------------- toComputedKey(): t.PrivateName | t.Expression; /** @deprecated Use `arrowFunctionToExpression` */ arrowFunctionToShadowed(): void; /** * Given an arbitrary function, process its content as if it were an arrow function, moving references * to "this", "arguments", "super", and such into the function's parent scope. This method is useful if * you have wrapped some set of items in an IIFE or other function, but want "this", "arguments", and super" * to continue behaving as expected. */ unwrapFunctionEnvironment(): void; /** * Convert a given arrow function into a normal ES5 function expression. */ arrowFunctionToExpression({ allowInsertArrow, allowInsertArrowWithRest, /** @deprecated Use `noNewArrows` instead */ specCompliant, noNewArrows, }?: { allowInsertArrow?: boolean; allowInsertArrowWithRest?: boolean; specCompliant?: boolean; noNewArrows?: boolean; }): NodePath | t.CallExpression>; ensureBlock( this: NodePath, ): asserts this is NodePath< T & { body: t.BlockStatement; } >; // #endregion // #region ------------------------- modification ------------------------- /** Insert the provided nodes before the current one. */ insertBefore>(nodes: Nodes): NodePaths; /** * Insert the provided nodes after the current one. When inserting nodes after an * expression, ensure that the completion record is correct by pushing the current node. */ insertAfter>(nodes: Nodes): NodePaths; /** Update all sibling node paths after `fromIndex` by `incrementBy`. */ updateSiblingKeys(fromIndex: number, incrementBy: number): void; /** * Insert child nodes at the start of the current node. * @param listKey - The key at which the child nodes are stored (usually body). * @param nodes - the nodes to insert. */ unshiftContainer< T extends Node, K extends NodeKeyOfArrays, Nodes extends NodesInsertionParam>, >(this: NodePath, listKey: K, nodes: Nodes): NodePaths; /** * Insert child nodes at the end of the current node. * @param listKey - The key at which the child nodes are stored (usually body). * @param nodes - the nodes to insert. */ pushContainer, Nodes extends NodesInsertionParam>>( this: NodePath, listKey: K, nodes: Nodes, ): NodePaths; /** Hoist the current node to the highest scope possible and return a UID referencing it. */ hoist(scope: Scope): void; // #endregion // #region ------------------------- family ------------------------- getOpposite(): NodePath | null; getCompletionRecords(): NodePath[]; getSibling(key: string | number): NodePath; getPrevSibling(): NodePath; getNextSibling(): NodePath; getAllPrevSiblings(): NodePath[]; getAllNextSiblings(): NodePath[]; get(key: K, context?: boolean | TraversalContext): NodePathResult; get(key: string, context?: boolean | TraversalContext): NodePath | NodePath[]; getBindingIdentifiers(duplicates: true): Record; getBindingIdentifiers(duplicates?: false): Record; getBindingIdentifiers(duplicates?: boolean): Record; getOuterBindingIdentifiers(duplicates: true): Record; getOuterBindingIdentifiers(duplicates?: false): Record; getOuterBindingIdentifiers(duplicates?: boolean): Record; getBindingIdentifierPaths(duplicates: true, outerOnly?: boolean): Record>>; getBindingIdentifierPaths(duplicates?: false, outerOnly?: boolean): Record>; getBindingIdentifierPaths( duplicates?: boolean, outerOnly?: boolean, ): Record | Array>>; getOuterBindingIdentifierPaths(duplicates: true): Record>>; getOuterBindingIdentifierPaths(duplicates?: false): Record>; getOuterBindingIdentifierPaths( duplicates?: boolean, outerOnly?: boolean, ): Record | Array>>; // #endregion // #region ------------------------- comments ------------------------- /** Share comments amongst siblings. */ shareCommentsWithSiblings(): void; addComment(type: t.CommentTypeShorthand, content: string, line?: boolean): void; /** Give node `comments` of the specified `type`. */ addComments(type: t.CommentTypeShorthand, comments: t.Comment[]): void; // #endregion // #region ------------------------- isXXX ------------------------- isAccessor(opts?: object): this is NodePath; isAnyTypeAnnotation(opts?: object): this is NodePath; isArgumentPlaceholder(opts?: object): this is NodePath; isArrayExpression(opts?: object): this is NodePath; isArrayPattern(opts?: object): this is NodePath; isArrayTypeAnnotation(opts?: object): this is NodePath; isArrowFunctionExpression(opts?: object): this is NodePath; isAssignmentExpression(opts?: object): this is NodePath; isAssignmentPattern(opts?: object): this is NodePath; isAwaitExpression(opts?: object): this is NodePath; isBigIntLiteral(opts?: object): this is NodePath; isBinary(opts?: object): this is NodePath; isBinaryExpression(opts?: object): this is NodePath; isBindExpression(opts?: object): this is NodePath; isBlock(opts?: object): this is NodePath; isBlockParent(opts?: object): this is NodePath; isBlockStatement(opts?: object): this is NodePath; isBooleanLiteral(opts?: object): this is NodePath; isBooleanLiteralTypeAnnotation(opts?: object): this is NodePath; isBooleanTypeAnnotation(opts?: object): this is NodePath; isBreakStatement(opts?: object): this is NodePath; isCallExpression(opts?: object): this is NodePath; isCatchClause(opts?: object): this is NodePath; isClass(opts?: object): this is NodePath; isClassAccessorProperty(opts?: object): this is NodePath; isClassBody(opts?: object): this is NodePath; isClassDeclaration(opts?: object): this is NodePath; isClassExpression(opts?: object): this is NodePath; isClassImplements(opts?: object): this is NodePath; isClassMethod(opts?: object): this is NodePath; isClassPrivateMethod(opts?: object): this is NodePath; isClassPrivateProperty(opts?: object): this is NodePath; isClassProperty(opts?: object): this is NodePath; isCompletionStatement(opts?: object): this is NodePath; isConditional(opts?: object): this is NodePath; isConditionalExpression(opts?: object): this is NodePath; isContinueStatement(opts?: object): this is NodePath; isDebuggerStatement(opts?: object): this is NodePath; isDecimalLiteral(opts?: object): this is NodePath; isDeclaration(opts?: object): this is NodePath; isDeclareClass(opts?: object): this is NodePath; isDeclareExportAllDeclaration(opts?: object): this is NodePath; isDeclareExportDeclaration(opts?: object): this is NodePath; isDeclareFunction(opts?: object): this is NodePath; isDeclareInterface(opts?: object): this is NodePath; isDeclareModule(opts?: object): this is NodePath; isDeclareModuleExports(opts?: object): this is NodePath; isDeclareOpaqueType(opts?: object): this is NodePath; isDeclareTypeAlias(opts?: object): this is NodePath; isDeclareVariable(opts?: object): this is NodePath; isDeclaredPredicate(opts?: object): this is NodePath; isDecorator(opts?: object): this is NodePath; isDirective(opts?: object): this is NodePath; isDirectiveLiteral(opts?: object): this is NodePath; isDoExpression(opts?: object): this is NodePath; isDoWhileStatement(opts?: object): this is NodePath; isEmptyStatement(opts?: object): this is NodePath; isEmptyTypeAnnotation(opts?: object): this is NodePath; isEnumBody(opts?: object): this is NodePath; isEnumBooleanBody(opts?: object): this is NodePath; isEnumBooleanMember(opts?: object): this is NodePath; isEnumDeclaration(opts?: object): this is NodePath; isEnumDefaultedMember(opts?: object): this is NodePath; isEnumMember(opts?: object): this is NodePath; isEnumNumberBody(opts?: object): this is NodePath; isEnumNumberMember(opts?: object): this is NodePath; isEnumStringBody(opts?: object): this is NodePath; isEnumStringMember(opts?: object): this is NodePath; isEnumSymbolBody(opts?: object): this is NodePath; isExistsTypeAnnotation(opts?: object): this is NodePath; isExportAllDeclaration(opts?: object): this is NodePath; isExportDeclaration(opts?: object): this is NodePath; isExportDefaultDeclaration(opts?: object): this is NodePath; isExportDefaultSpecifier(opts?: object): this is NodePath; isExportNamedDeclaration(opts?: object): this is NodePath; isExportNamespaceSpecifier(opts?: object): this is NodePath; isExportSpecifier(opts?: object): this is NodePath; isExpression(opts?: object): this is NodePath; isExpressionStatement(opts?: object): this is NodePath; isExpressionWrapper(opts?: object): this is NodePath; isFile(opts?: object): this is NodePath; isFlow(opts?: object): this is NodePath; isFlowBaseAnnotation(opts?: object): this is NodePath; isFlowDeclaration(opts?: object): this is NodePath; isFlowPredicate(opts?: object): this is NodePath; isFlowType(opts?: object): this is NodePath; isFor(opts?: object): this is NodePath; isForInStatement(opts?: object): this is NodePath; isForOfStatement(opts?: object): this is NodePath; isForStatement(opts?: object): this is NodePath; isForXStatement(opts?: object): this is NodePath; isFunction(opts?: object): this is NodePath; isFunctionDeclaration(opts?: object): this is NodePath; isFunctionExpression(opts?: object): this is NodePath; isFunctionParent(opts?: object): this is NodePath; isFunctionTypeAnnotation(opts?: object): this is NodePath; isFunctionTypeParam(opts?: object): this is NodePath; isGenericTypeAnnotation(opts?: object): this is NodePath; isIdentifier(opts?: object): this is NodePath; isIfStatement(opts?: object): this is NodePath; isImmutable(opts?: object): this is NodePath; isImport(opts?: object): this is NodePath; isImportAttribute(opts?: object): this is NodePath; isImportDeclaration(opts?: object): this is NodePath; isImportDefaultSpecifier(opts?: object): this is NodePath; isImportNamespaceSpecifier(opts?: object): this is NodePath; isImportSpecifier(opts?: object): this is NodePath; isIndexedAccessType(opts?: object): this is NodePath; isInferredPredicate(opts?: object): this is NodePath; isInterfaceDeclaration(opts?: object): this is NodePath; isInterfaceExtends(opts?: object): this is NodePath; isInterfaceTypeAnnotation(opts?: object): this is NodePath; isInterpreterDirective(opts?: object): this is NodePath; isIntersectionTypeAnnotation(opts?: object): this is NodePath; isJSX(opts?: object): this is NodePath; isJSXAttribute(opts?: object): this is NodePath; isJSXClosingElement(opts?: object): this is NodePath; isJSXClosingFragment(opts?: object): this is NodePath; isJSXElement(opts?: object): this is NodePath; isJSXEmptyExpression(opts?: object): this is NodePath; isJSXExpressionContainer(opts?: object): this is NodePath; isJSXFragment(opts?: object): this is NodePath; isJSXIdentifier(opts?: object): this is NodePath; isJSXMemberExpression(opts?: object): this is NodePath; isJSXNamespacedName(opts?: object): this is NodePath; isJSXOpeningElement(opts?: object): this is NodePath; isJSXOpeningFragment(opts?: object): this is NodePath; isJSXSpreadAttribute(opts?: object): this is NodePath; isJSXSpreadChild(opts?: object): this is NodePath; isJSXText(opts?: object): this is NodePath; isLVal(opts?: object): this is NodePath; isLabeledStatement(opts?: object): this is NodePath; isLiteral(opts?: object): this is NodePath; isLogicalExpression(opts?: object): this is NodePath; isLoop(opts?: object): this is NodePath; isMemberExpression(opts?: object): this is NodePath; isMetaProperty(opts?: object): this is NodePath; isMethod(opts?: object): this is NodePath; isMiscellaneous(opts?: object): this is NodePath; isMixedTypeAnnotation(opts?: object): this is NodePath; isModuleDeclaration(opts?: object): this is NodePath; isModuleExpression(opts?: object): this is NodePath; isModuleSpecifier(opts?: object): this is NodePath; isNewExpression(opts?: object): this is NodePath; isNoop(opts?: object): this is NodePath; isNullLiteral(opts?: object): this is NodePath; isNullLiteralTypeAnnotation(opts?: object): this is NodePath; isNullableTypeAnnotation(opts?: object): this is NodePath; /** @deprecated Use `isNumericLiteral` */ isNumberLiteral(opts?: object): this is NodePath; isNumberLiteralTypeAnnotation(opts?: object): this is NodePath; isNumberTypeAnnotation(opts?: object): this is NodePath; isNumericLiteral(opts?: object): this is NodePath; isObjectExpression(opts?: object): this is NodePath; isObjectMember(opts?: object): this is NodePath; isObjectMethod(opts?: object): this is NodePath; isObjectPattern(opts?: object): this is NodePath; isObjectProperty(opts?: object): this is NodePath; isObjectTypeAnnotation(opts?: object): this is NodePath; isObjectTypeCallProperty(opts?: object): this is NodePath; isObjectTypeIndexer(opts?: object): this is NodePath; isObjectTypeInternalSlot(opts?: object): this is NodePath; isObjectTypeProperty(opts?: object): this is NodePath; isObjectTypeSpreadProperty(opts?: object): this is NodePath; isOpaqueType(opts?: object): this is NodePath; isOptionalCallExpression(opts?: object): this is NodePath; isOptionalIndexedAccessType(opts?: object): this is NodePath; isOptionalMemberExpression(opts?: object): this is NodePath; isParenthesizedExpression(opts?: object): this is NodePath; isPattern(opts?: object): this is NodePath; isPatternLike(opts?: object): this is NodePath; isPipelineBareFunction(opts?: object): this is NodePath; isPipelinePrimaryTopicReference(opts?: object): this is NodePath; isPipelineTopicExpression(opts?: object): this is NodePath; isPlaceholder(opts?: object): this is NodePath; isPrivate(opts?: object): this is NodePath; isPrivateName(opts?: object): this is NodePath; isProgram(opts?: object): this is NodePath; isProperty(opts?: object): this is NodePath; isPureish(opts?: object): this is NodePath; isQualifiedTypeIdentifier(opts?: object): this is NodePath; isRecordExpression(opts?: object): this is NodePath; isRegExpLiteral(opts?: object): this is NodePath; /** @deprecated Use `isRegExpLiteral` */ isRegexLiteral(opts?: object): this is NodePath; isRestElement(opts?: object): this is NodePath; /** @deprecated Use `isRestElement` */ isRestProperty(opts?: object): this is NodePath; isReturnStatement(opts?: object): this is NodePath; isScopable(opts?: object): this is NodePath; isSequenceExpression(opts?: object): this is NodePath; isSpreadElement(opts?: object): this is NodePath; /** @deprecated Use `isSpreadElement` */ isSpreadProperty(opts?: object): this is NodePath; isStandardized(opts?: object): this is NodePath; isStatement(opts?: object): this is NodePath; isStaticBlock(opts?: object): this is NodePath; isStringLiteral(opts?: object): this is NodePath; isStringLiteralTypeAnnotation(opts?: object): this is NodePath; isStringTypeAnnotation(opts?: object): this is NodePath; isSuper(opts?: object): this is NodePath; isSwitchCase(opts?: object): this is NodePath; isSwitchStatement(opts?: object): this is NodePath; isSymbolTypeAnnotation(opts?: object): this is NodePath; isTSAnyKeyword(opts?: object): this is NodePath; isTSArrayType(opts?: object): this is NodePath; isTSAsExpression(opts?: object): this is NodePath; isTSBaseType(opts?: object): this is NodePath; isTSBigIntKeyword(opts?: object): this is NodePath; isTSBooleanKeyword(opts?: object): this is NodePath; isTSCallSignatureDeclaration(opts?: object): this is NodePath; isTSConditionalType(opts?: object): this is NodePath; isTSConstructSignatureDeclaration(opts?: object): this is NodePath; isTSConstructorType(opts?: object): this is NodePath; isTSDeclareFunction(opts?: object): this is NodePath; isTSDeclareMethod(opts?: object): this is NodePath; isTSEntityName(opts?: object): this is NodePath; isTSEnumDeclaration(opts?: object): this is NodePath; isTSEnumMember(opts?: object): this is NodePath; isTSExportAssignment(opts?: object): this is NodePath; isTSExpressionWithTypeArguments(opts?: object): this is NodePath; isTSExternalModuleReference(opts?: object): this is NodePath; isTSFunctionType(opts?: object): this is NodePath; isTSImportEqualsDeclaration(opts?: object): this is NodePath; isTSImportType(opts?: object): this is NodePath; isTSIndexSignature(opts?: object): this is NodePath; isTSIndexedAccessType(opts?: object): this is NodePath; isTSInferType(opts?: object): this is NodePath; isTSInstantiationExpression(opts?: object): this is NodePath; isTSInterfaceBody(opts?: object): this is NodePath; isTSInterfaceDeclaration(opts?: object): this is NodePath; isTSIntersectionType(opts?: object): this is NodePath; isTSIntrinsicKeyword(opts?: object): this is NodePath; isTSLiteralType(opts?: object): this is NodePath; isTSMappedType(opts?: object): this is NodePath; isTSMethodSignature(opts?: object): this is NodePath; isTSModuleBlock(opts?: object): this is NodePath; isTSModuleDeclaration(opts?: object): this is NodePath; isTSNamedTupleMember(opts?: object): this is NodePath; isTSNamespaceExportDeclaration(opts?: object): this is NodePath; isTSNeverKeyword(opts?: object): this is NodePath; isTSNonNullExpression(opts?: object): this is NodePath; isTSNullKeyword(opts?: object): this is NodePath; isTSNumberKeyword(opts?: object): this is NodePath; isTSObjectKeyword(opts?: object): this is NodePath; isTSOptionalType(opts?: object): this is NodePath; isTSParameterProperty(opts?: object): this is NodePath; isTSParenthesizedType(opts?: object): this is NodePath; isTSPropertySignature(opts?: object): this is NodePath; isTSQualifiedName(opts?: object): this is NodePath; isTSRestType(opts?: object): this is NodePath; isTSSatisfiesExpression(opts?: object): this is NodePath; isTSStringKeyword(opts?: object): this is NodePath; isTSSymbolKeyword(opts?: object): this is NodePath; isTSThisType(opts?: object): this is NodePath; isTSTupleType(opts?: object): this is NodePath; isTSType(opts?: object): this is NodePath; isTSTypeAliasDeclaration(opts?: object): this is NodePath; isTSTypeAnnotation(opts?: object): this is NodePath; isTSTypeAssertion(opts?: object): this is NodePath; isTSTypeElement(opts?: object): this is NodePath; isTSTypeLiteral(opts?: object): this is NodePath; isTSTypeOperator(opts?: object): this is NodePath; isTSTypeParameter(opts?: object): this is NodePath; isTSTypeParameterDeclaration(opts?: object): this is NodePath; isTSTypeParameterInstantiation(opts?: object): this is NodePath; isTSTypePredicate(opts?: object): this is NodePath; isTSTypeQuery(opts?: object): this is NodePath; isTSTypeReference(opts?: object): this is NodePath; isTSUndefinedKeyword(opts?: object): this is NodePath; isTSUnionType(opts?: object): this is NodePath; isTSUnknownKeyword(opts?: object): this is NodePath; isTSVoidKeyword(opts?: object): this is NodePath; isTaggedTemplateExpression(opts?: object): this is NodePath; isTemplateElement(opts?: object): this is NodePath; isTemplateLiteral(opts?: object): this is NodePath; isTerminatorless(opts?: object): this is NodePath; isThisExpression(opts?: object): this is NodePath; isThisTypeAnnotation(opts?: object): this is NodePath; isThrowStatement(opts?: object): this is NodePath; isTopicReference(opts?: object): this is NodePath; isTryStatement(opts?: object): this is NodePath; isTupleExpression(opts?: object): this is NodePath; isTupleTypeAnnotation(opts?: object): this is NodePath; isTypeAlias(opts?: object): this is NodePath; isTypeAnnotation(opts?: object): this is NodePath; isTypeCastExpression(opts?: object): this is NodePath; isTypeParameter(opts?: object): this is NodePath; isTypeParameterDeclaration(opts?: object): this is NodePath; isTypeParameterInstantiation(opts?: object): this is NodePath; isTypeScript(opts?: object): this is NodePath; isTypeofTypeAnnotation(opts?: object): this is NodePath; isUnaryExpression(opts?: object): this is NodePath; isUnaryLike(opts?: object): this is NodePath; isUnionTypeAnnotation(opts?: object): this is NodePath; isUpdateExpression(opts?: object): this is NodePath; isUserWhitespacable(opts?: object): this is NodePath; isV8IntrinsicIdentifier(opts?: object): this is NodePath; isVariableDeclaration(opts?: object): this is NodePath; isVariableDeclarator(opts?: object): this is NodePath; isVariance(opts?: object): this is NodePath; isVoidTypeAnnotation(opts?: object): this is NodePath; isWhile(opts?: object): this is NodePath; isWhileStatement(opts?: object): this is NodePath; isWithStatement(opts?: object): this is NodePath; isYieldExpression(opts?: object): this is NodePath; isBindingIdentifier(opts?: object): this is NodePath; isBlockScoped(opts?: object): this is NodePath; /** @deprecated */ isExistentialTypeParam(opts?: object): this is NodePath; isForAwaitStatement(opts?: object): this is NodePath; isGenerated(opts?: object): boolean; /** @deprecated */ isNumericLiteralTypeAnnotation(opts?: object): void; isPure(opts?: object): boolean; isReferenced(opts?: object): boolean; isReferencedIdentifier(opts?: object): this is NodePath; isReferencedMemberExpression(opts?: object): this is NodePath; isScope(opts?: object): this is NodePath; isUser(opts?: object): boolean; isVar(opts?: object): this is NodePath; // #endregion // #region ------------------------- assertXXX ------------------------- assertAccessor(opts?: object): asserts this is NodePath; assertAnyTypeAnnotation(opts?: object): asserts this is NodePath; assertArgumentPlaceholder(opts?: object): asserts this is NodePath; assertArrayExpression(opts?: object): asserts this is NodePath; assertArrayPattern(opts?: object): asserts this is NodePath; assertArrayTypeAnnotation(opts?: object): asserts this is NodePath; assertArrowFunctionExpression(opts?: object): asserts this is NodePath; assertAssignmentExpression(opts?: object): asserts this is NodePath; assertAssignmentPattern(opts?: object): asserts this is NodePath; assertAwaitExpression(opts?: object): asserts this is NodePath; assertBigIntLiteral(opts?: object): asserts this is NodePath; assertBinary(opts?: object): asserts this is NodePath; assertBinaryExpression(opts?: object): asserts this is NodePath; assertBindExpression(opts?: object): asserts this is NodePath; assertBlock(opts?: object): asserts this is NodePath; assertBlockParent(opts?: object): asserts this is NodePath; assertBlockStatement(opts?: object): asserts this is NodePath; assertBooleanLiteral(opts?: object): asserts this is NodePath; assertBooleanLiteralTypeAnnotation(opts?: object): asserts this is NodePath; assertBooleanTypeAnnotation(opts?: object): asserts this is NodePath; assertBreakStatement(opts?: object): asserts this is NodePath; assertCallExpression(opts?: object): asserts this is NodePath; assertCatchClause(opts?: object): asserts this is NodePath; assertClass(opts?: object): asserts this is NodePath; assertClassAccessorProperty(opts?: object): asserts this is NodePath; assertClassBody(opts?: object): asserts this is NodePath; assertClassDeclaration(opts?: object): asserts this is NodePath; assertClassExpression(opts?: object): asserts this is NodePath; assertClassImplements(opts?: object): asserts this is NodePath; assertClassMethod(opts?: object): asserts this is NodePath; assertClassPrivateMethod(opts?: object): asserts this is NodePath; assertClassPrivateProperty(opts?: object): asserts this is NodePath; assertClassProperty(opts?: object): asserts this is NodePath; assertCompletionStatement(opts?: object): asserts this is NodePath; assertConditional(opts?: object): asserts this is NodePath; assertConditionalExpression(opts?: object): asserts this is NodePath; assertContinueStatement(opts?: object): asserts this is NodePath; assertDebuggerStatement(opts?: object): asserts this is NodePath; assertDecimalLiteral(opts?: object): asserts this is NodePath; assertDeclaration(opts?: object): asserts this is NodePath; assertDeclareClass(opts?: object): asserts this is NodePath; assertDeclareExportAllDeclaration(opts?: object): asserts this is NodePath; assertDeclareExportDeclaration(opts?: object): asserts this is NodePath; assertDeclareFunction(opts?: object): asserts this is NodePath; assertDeclareInterface(opts?: object): asserts this is NodePath; assertDeclareModule(opts?: object): asserts this is NodePath; assertDeclareModuleExports(opts?: object): asserts this is NodePath; assertDeclareOpaqueType(opts?: object): asserts this is NodePath; assertDeclareTypeAlias(opts?: object): asserts this is NodePath; assertDeclareVariable(opts?: object): asserts this is NodePath; assertDeclaredPredicate(opts?: object): asserts this is NodePath; assertDecorator(opts?: object): asserts this is NodePath; assertDirective(opts?: object): asserts this is NodePath; assertDirectiveLiteral(opts?: object): asserts this is NodePath; assertDoExpression(opts?: object): asserts this is NodePath; assertDoWhileStatement(opts?: object): asserts this is NodePath; assertEmptyStatement(opts?: object): asserts this is NodePath; assertEmptyTypeAnnotation(opts?: object): asserts this is NodePath; assertEnumBody(opts?: object): asserts this is NodePath; assertEnumBooleanBody(opts?: object): asserts this is NodePath; assertEnumBooleanMember(opts?: object): asserts this is NodePath; assertEnumDeclaration(opts?: object): asserts this is NodePath; assertEnumDefaultedMember(opts?: object): asserts this is NodePath; assertEnumMember(opts?: object): asserts this is NodePath; assertEnumNumberBody(opts?: object): asserts this is NodePath; assertEnumNumberMember(opts?: object): asserts this is NodePath; assertEnumStringBody(opts?: object): asserts this is NodePath; assertEnumStringMember(opts?: object): asserts this is NodePath; assertEnumSymbolBody(opts?: object): asserts this is NodePath; assertExistsTypeAnnotation(opts?: object): asserts this is NodePath; assertExportAllDeclaration(opts?: object): asserts this is NodePath; assertExportDeclaration(opts?: object): asserts this is NodePath; assertExportDefaultDeclaration(opts?: object): asserts this is NodePath; assertExportDefaultSpecifier(opts?: object): asserts this is NodePath; assertExportNamedDeclaration(opts?: object): asserts this is NodePath; assertExportNamespaceSpecifier(opts?: object): asserts this is NodePath; assertExportSpecifier(opts?: object): asserts this is NodePath; assertExpression(opts?: object): asserts this is NodePath; assertExpressionStatement(opts?: object): asserts this is NodePath; assertExpressionWrapper(opts?: object): asserts this is NodePath; assertFile(opts?: object): asserts this is NodePath; assertFlow(opts?: object): asserts this is NodePath; assertFlowBaseAnnotation(opts?: object): asserts this is NodePath; assertFlowDeclaration(opts?: object): asserts this is NodePath; assertFlowPredicate(opts?: object): asserts this is NodePath; assertFlowType(opts?: object): asserts this is NodePath; assertFor(opts?: object): asserts this is NodePath; assertForInStatement(opts?: object): asserts this is NodePath; assertForOfStatement(opts?: object): asserts this is NodePath; assertForStatement(opts?: object): asserts this is NodePath; assertForXStatement(opts?: object): asserts this is NodePath; assertFunction(opts?: object): asserts this is NodePath; assertFunctionDeclaration(opts?: object): asserts this is NodePath; assertFunctionExpression(opts?: object): asserts this is NodePath; assertFunctionParent(opts?: object): asserts this is NodePath; assertFunctionTypeAnnotation(opts?: object): asserts this is NodePath; assertFunctionTypeParam(opts?: object): asserts this is NodePath; assertGenericTypeAnnotation(opts?: object): asserts this is NodePath; assertIdentifier(opts?: object): asserts this is NodePath; assertIfStatement(opts?: object): asserts this is NodePath; assertImmutable(opts?: object): asserts this is NodePath; assertImport(opts?: object): asserts this is NodePath; assertImportAttribute(opts?: object): asserts this is NodePath; assertImportDeclaration(opts?: object): asserts this is NodePath; assertImportDefaultSpecifier(opts?: object): asserts this is NodePath; assertImportNamespaceSpecifier(opts?: object): asserts this is NodePath; assertImportSpecifier(opts?: object): asserts this is NodePath; assertIndexedAccessType(opts?: object): asserts this is NodePath; assertInferredPredicate(opts?: object): asserts this is NodePath; assertInterfaceDeclaration(opts?: object): asserts this is NodePath; assertInterfaceExtends(opts?: object): asserts this is NodePath; assertInterfaceTypeAnnotation(opts?: object): asserts this is NodePath; assertInterpreterDirective(opts?: object): asserts this is NodePath; assertIntersectionTypeAnnotation(opts?: object): asserts this is NodePath; assertJSX(opts?: object): asserts this is NodePath; assertJSXAttribute(opts?: object): asserts this is NodePath; assertJSXClosingElement(opts?: object): asserts this is NodePath; assertJSXClosingFragment(opts?: object): asserts this is NodePath; assertJSXElement(opts?: object): asserts this is NodePath; assertJSXEmptyExpression(opts?: object): asserts this is NodePath; assertJSXExpressionContainer(opts?: object): asserts this is NodePath; assertJSXFragment(opts?: object): asserts this is NodePath; assertJSXIdentifier(opts?: object): asserts this is NodePath; assertJSXMemberExpression(opts?: object): asserts this is NodePath; assertJSXNamespacedName(opts?: object): asserts this is NodePath; assertJSXOpeningElement(opts?: object): asserts this is NodePath; assertJSXOpeningFragment(opts?: object): asserts this is NodePath; assertJSXSpreadAttribute(opts?: object): asserts this is NodePath; assertJSXSpreadChild(opts?: object): asserts this is NodePath; assertJSXText(opts?: object): asserts this is NodePath; assertLVal(opts?: object): asserts this is NodePath; assertLabeledStatement(opts?: object): asserts this is NodePath; assertLiteral(opts?: object): asserts this is NodePath; assertLogicalExpression(opts?: object): asserts this is NodePath; assertLoop(opts?: object): asserts this is NodePath; assertMemberExpression(opts?: object): asserts this is NodePath; assertMetaProperty(opts?: object): asserts this is NodePath; assertMethod(opts?: object): asserts this is NodePath; assertMiscellaneous(opts?: object): asserts this is NodePath; assertMixedTypeAnnotation(opts?: object): asserts this is NodePath; assertModuleDeclaration(opts?: object): asserts this is NodePath; assertModuleExpression(opts?: object): asserts this is NodePath; assertModuleSpecifier(opts?: object): asserts this is NodePath; assertNewExpression(opts?: object): asserts this is NodePath; assertNoop(opts?: object): asserts this is NodePath; assertNullLiteral(opts?: object): asserts this is NodePath; assertNullLiteralTypeAnnotation(opts?: object): asserts this is NodePath; assertNullableTypeAnnotation(opts?: object): asserts this is NodePath; /** @deprecated Use `assertNumericLiteral` */ assertNumberLiteral(opts?: object): asserts this is NodePath; assertNumberLiteralTypeAnnotation(opts?: object): asserts this is NodePath; assertNumberTypeAnnotation(opts?: object): asserts this is NodePath; assertNumericLiteral(opts?: object): asserts this is NodePath; assertObjectExpression(opts?: object): asserts this is NodePath; assertObjectMember(opts?: object): asserts this is NodePath; assertObjectMethod(opts?: object): asserts this is NodePath; assertObjectPattern(opts?: object): asserts this is NodePath; assertObjectProperty(opts?: object): asserts this is NodePath; assertObjectTypeAnnotation(opts?: object): asserts this is NodePath; assertObjectTypeCallProperty(opts?: object): asserts this is NodePath; assertObjectTypeIndexer(opts?: object): asserts this is NodePath; assertObjectTypeInternalSlot(opts?: object): asserts this is NodePath; assertObjectTypeProperty(opts?: object): asserts this is NodePath; assertObjectTypeSpreadProperty(opts?: object): asserts this is NodePath; assertOpaqueType(opts?: object): asserts this is NodePath; assertOptionalCallExpression(opts?: object): asserts this is NodePath; assertOptionalIndexedAccessType(opts?: object): asserts this is NodePath; assertOptionalMemberExpression(opts?: object): asserts this is NodePath; assertParenthesizedExpression(opts?: object): asserts this is NodePath; assertPattern(opts?: object): asserts this is NodePath; assertPatternLike(opts?: object): asserts this is NodePath; assertPipelineBareFunction(opts?: object): asserts this is NodePath; assertPipelinePrimaryTopicReference(opts?: object): asserts this is NodePath; assertPipelineTopicExpression(opts?: object): asserts this is NodePath; assertPlaceholder(opts?: object): asserts this is NodePath; assertPrivate(opts?: object): asserts this is NodePath; assertPrivateName(opts?: object): asserts this is NodePath; assertProgram(opts?: object): asserts this is NodePath; assertProperty(opts?: object): asserts this is NodePath; assertPureish(opts?: object): asserts this is NodePath; assertQualifiedTypeIdentifier(opts?: object): asserts this is NodePath; assertRecordExpression(opts?: object): asserts this is NodePath; assertRegExpLiteral(opts?: object): asserts this is NodePath; /** @deprecated Use `assertRegExpLiteral` */ assertRegexLiteral(opts?: object): asserts this is NodePath; assertRestElement(opts?: object): asserts this is NodePath; /** @deprecated Use `assertRestElement` */ assertRestProperty(opts?: object): asserts this is NodePath; assertReturnStatement(opts?: object): asserts this is NodePath; assertScopable(opts?: object): asserts this is NodePath; assertSequenceExpression(opts?: object): asserts this is NodePath; assertSpreadElement(opts?: object): asserts this is NodePath; /** @deprecated Use `assertSpreadElement` */ assertSpreadProperty(opts?: object): asserts this is NodePath; assertStandardized(opts?: object): asserts this is NodePath; assertStatement(opts?: object): asserts this is NodePath; assertStaticBlock(opts?: object): asserts this is NodePath; assertStringLiteral(opts?: object): asserts this is NodePath; assertStringLiteralTypeAnnotation(opts?: object): asserts this is NodePath; assertStringTypeAnnotation(opts?: object): asserts this is NodePath; assertSuper(opts?: object): asserts this is NodePath; assertSwitchCase(opts?: object): asserts this is NodePath; assertSwitchStatement(opts?: object): asserts this is NodePath; assertSymbolTypeAnnotation(opts?: object): asserts this is NodePath; assertTSAnyKeyword(opts?: object): asserts this is NodePath; assertTSArrayType(opts?: object): asserts this is NodePath; assertTSAsExpression(opts?: object): asserts this is NodePath; assertTSBaseType(opts?: object): asserts this is NodePath; assertTSBigIntKeyword(opts?: object): asserts this is NodePath; assertTSBooleanKeyword(opts?: object): asserts this is NodePath; assertTSCallSignatureDeclaration(opts?: object): asserts this is NodePath; assertTSConditionalType(opts?: object): asserts this is NodePath; assertTSConstructSignatureDeclaration(opts?: object): asserts this is NodePath; assertTSConstructorType(opts?: object): asserts this is NodePath; assertTSDeclareFunction(opts?: object): asserts this is NodePath; assertTSDeclareMethod(opts?: object): asserts this is NodePath; assertTSEntityName(opts?: object): asserts this is NodePath; assertTSEnumDeclaration(opts?: object): asserts this is NodePath; assertTSEnumMember(opts?: object): asserts this is NodePath; assertTSExportAssignment(opts?: object): asserts this is NodePath; assertTSExpressionWithTypeArguments(opts?: object): asserts this is NodePath; assertTSExternalModuleReference(opts?: object): asserts this is NodePath; assertTSFunctionType(opts?: object): asserts this is NodePath; assertTSImportEqualsDeclaration(opts?: object): asserts this is NodePath; assertTSImportType(opts?: object): asserts this is NodePath; assertTSIndexSignature(opts?: object): asserts this is NodePath; assertTSIndexedAccessType(opts?: object): asserts this is NodePath; assertTSInferType(opts?: object): asserts this is NodePath; assertTSInstantiationExpression(opts?: object): asserts this is NodePath; assertTSInterfaceBody(opts?: object): asserts this is NodePath; assertTSInterfaceDeclaration(opts?: object): asserts this is NodePath; assertTSIntersectionType(opts?: object): asserts this is NodePath; assertTSIntrinsicKeyword(opts?: object): asserts this is NodePath; assertTSLiteralType(opts?: object): asserts this is NodePath; assertTSMappedType(opts?: object): asserts this is NodePath; assertTSMethodSignature(opts?: object): asserts this is NodePath; assertTSModuleBlock(opts?: object): asserts this is NodePath; assertTSModuleDeclaration(opts?: object): asserts this is NodePath; assertTSNamedTupleMember(opts?: object): asserts this is NodePath; assertTSNamespaceExportDeclaration(opts?: object): asserts this is NodePath; assertTSNeverKeyword(opts?: object): asserts this is NodePath; assertTSNonNullExpression(opts?: object): asserts this is NodePath; assertTSNullKeyword(opts?: object): asserts this is NodePath; assertTSNumberKeyword(opts?: object): asserts this is NodePath; assertTSObjectKeyword(opts?: object): asserts this is NodePath; assertTSOptionalType(opts?: object): asserts this is NodePath; assertTSParameterProperty(opts?: object): asserts this is NodePath; assertTSParenthesizedType(opts?: object): asserts this is NodePath; assertTSPropertySignature(opts?: object): asserts this is NodePath; assertTSQualifiedName(opts?: object): asserts this is NodePath; assertTSRestType(opts?: object): asserts this is NodePath; assertTSSatisfiesExpression(opts?: object): asserts this is NodePath; assertTSStringKeyword(opts?: object): asserts this is NodePath; assertTSSymbolKeyword(opts?: object): asserts this is NodePath; assertTSThisType(opts?: object): asserts this is NodePath; assertTSTupleType(opts?: object): asserts this is NodePath; assertTSType(opts?: object): asserts this is NodePath; assertTSTypeAliasDeclaration(opts?: object): asserts this is NodePath; assertTSTypeAnnotation(opts?: object): asserts this is NodePath; assertTSTypeAssertion(opts?: object): asserts this is NodePath; assertTSTypeElement(opts?: object): asserts this is NodePath; assertTSTypeLiteral(opts?: object): asserts this is NodePath; assertTSTypeOperator(opts?: object): asserts this is NodePath; assertTSTypeParameter(opts?: object): asserts this is NodePath; assertTSTypeParameterDeclaration(opts?: object): asserts this is NodePath; assertTSTypeParameterInstantiation(opts?: object): asserts this is NodePath; assertTSTypePredicate(opts?: object): asserts this is NodePath; assertTSTypeQuery(opts?: object): asserts this is NodePath; assertTSTypeReference(opts?: object): asserts this is NodePath; assertTSUndefinedKeyword(opts?: object): asserts this is NodePath; assertTSUnionType(opts?: object): asserts this is NodePath; assertTSUnknownKeyword(opts?: object): asserts this is NodePath; assertTSVoidKeyword(opts?: object): asserts this is NodePath; assertTaggedTemplateExpression(opts?: object): asserts this is NodePath; assertTemplateElement(opts?: object): asserts this is NodePath; assertTemplateLiteral(opts?: object): asserts this is NodePath; assertTerminatorless(opts?: object): asserts this is NodePath; assertThisExpression(opts?: object): asserts this is NodePath; assertThisTypeAnnotation(opts?: object): asserts this is NodePath; assertThrowStatement(opts?: object): asserts this is NodePath; assertTopicReference(opts?: object): asserts this is NodePath; assertTryStatement(opts?: object): asserts this is NodePath; assertTupleExpression(opts?: object): asserts this is NodePath; assertTupleTypeAnnotation(opts?: object): asserts this is NodePath; assertTypeAlias(opts?: object): asserts this is NodePath; assertTypeAnnotation(opts?: object): asserts this is NodePath; assertTypeCastExpression(opts?: object): asserts this is NodePath; assertTypeParameter(opts?: object): asserts this is NodePath; assertTypeParameterDeclaration(opts?: object): asserts this is NodePath; assertTypeParameterInstantiation(opts?: object): asserts this is NodePath; assertTypeScript(opts?: object): asserts this is NodePath; assertTypeofTypeAnnotation(opts?: object): asserts this is NodePath; assertUnaryExpression(opts?: object): asserts this is NodePath; assertUnaryLike(opts?: object): asserts this is NodePath; assertUnionTypeAnnotation(opts?: object): asserts this is NodePath; assertUpdateExpression(opts?: object): asserts this is NodePath; assertUserWhitespacable(opts?: object): asserts this is NodePath; assertV8IntrinsicIdentifier(opts?: object): asserts this is NodePath; assertVariableDeclaration(opts?: object): asserts this is NodePath; assertVariableDeclarator(opts?: object): asserts this is NodePath; assertVariance(opts?: object): asserts this is NodePath; assertVoidTypeAnnotation(opts?: object): asserts this is NodePath; assertWhile(opts?: object): asserts this is NodePath; assertWhileStatement(opts?: object): asserts this is NodePath; assertWithStatement(opts?: object): asserts this is NodePath; assertYieldExpression(opts?: object): asserts this is NodePath; // #endregion } export interface HubInterface { getCode(): string | undefined; getScope(): Scope | undefined; addHelper(name: string): any; buildError(node: Node, msg: string, Error: ErrorConstructor): Error; } export class Hub implements HubInterface { constructor(); getCode(): string | undefined; getScope(): Scope | undefined; addHelper(name: string): any; buildError(node: Node, msg: string, Error?: ErrorConstructor): Error; } export interface TraversalContext { parentPath: NodePath; scope: Scope; state: S; opts: TraverseOptions; } export type NodePathResult = | (Extract extends never ? never : NodePath>) | (T extends Array ? Array> : never); export interface VirtualTypeAliases { BindingIdentifier: t.Identifier; BlockScoped: Node; ExistentialTypeParam: t.ExistsTypeAnnotation; Flow: t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier; ForAwaitStatement: t.ForOfStatement; Generated: Node; NumericLiteralTypeAnnotation: t.NumberLiteralTypeAnnotation; Pure: Node; Referenced: Node; ReferencedIdentifier: t.Identifier | t.JSXIdentifier; ReferencedMemberExpression: t.MemberExpression; RestProperty: t.RestElement; Scope: t.Scopable | t.Pattern; SpreadProperty: t.RestElement; User: Node; Var: t.VariableDeclaration; }