;
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