= keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
export class Scope {
constructor(path: NodePath, parentScope?: Scope);
path: NodePath;
block: Node;
parentBlock: Node;
parent: Scope;
hub: HubInterface;
bindings: { [name: string]: Binding };
/** 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: Node, i?: number): Node;
registerDeclaration(path: NodePath): void;
buildUndefinedNode(): Node;
registerConstantViolation(path: NodePath): void;
registerBinding(kind: string, path: NodePath, bindingPath?: NodePath): void;
addGlobal(node: Node): void;
hasUid(name: string): boolean;
hasGlobal(name: string): boolean;
hasReference(name: string): boolean;
isPure(node: Node, constantsOnly?: boolean): boolean;
setData(key: string, val: any): any;
getData(key: string): any;
removeData(key: string): void;
crawl(): void;
push(opts: {
id: t.LVal;
init?: t.Expression | undefined;
unique?: boolean | undefined;
kind?: 'var' | 'let' | 'const' | undefined;
}): void;
getProgramParent(): Scope;
getFunctionParent(): Scope | null;
getBlockParent(): Scope;
/** Walks the scope tree and gathers **all** bindings. */
getAllBindings(...kinds: string[]): object;
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, noGlobals?: boolean): boolean;
parentHasBinding(name: string, noGlobals?: 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';
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;
reassign(path: NodePath): void;
reference(path: NodePath): void;
dereference(): void;
}
export type Visitor = VisitNodeObject & {
[Type in Node['type']]?: VisitNode>;
} & {
[K in keyof t.Aliases]?: 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 | undefined;
exit?: VisitNodeFunction | undefined;
denylist?: NodeType[] | undefined;
/**
* @deprecated will be removed in Babel 8
*/
blacklist?: NodeType[] | undefined;
}
export type NodePaths = T extends readonly Node[]
? { -readonly [K in keyof T]: NodePath> }
: T extends Node
? [NodePath]
: never;
export class NodePath {
constructor(hub: Hub, parent: Node);
parent: Node;
hub: Hub;
contexts: TraversalContext[];
data: object;
shouldSkip: boolean;
shouldStop: boolean;
removed: boolean;
state: any;
opts: object;
skipKeys: object;
parentPath: T extends t.Program ? null : NodePath;
context: TraversalContext;
container: object | object[];
listKey: string;
inList: boolean;
parentKey: string;
key: string | number;
node: T;
scope: Scope;
type: T extends null | undefined ? undefined : T extends Node ? T['type'] : string | undefined;
typeAnnotation: object;
getScope(scope: Scope): Scope;
setData(key: string, val: any): any;
getData(key: string, def?: any): any;
hasNode(): this is NodePath>;
buildCodeFrameError(msg: string, Error?: new (msg: string) => TError): TError;
traverse(visitor: Visitor, state: T): void;
traverse(visitor: Visitor): void;
set(key: string, node: Node): void;
getPathLocation(): string;
// Example: https://github.com/babel/babel/blob/63204ae51e020d84a5b246312f5eeb4d981ab952/packages/babel-traverse/src/path/modification.js#L83
debug(buildMessage: () => string): void;
static get(opts: {
hub: HubInterface;
parentPath: NodePath | null;
parent: Node;
container: C;
listKey?: string | undefined;
key: K;
}): NodePath;
//#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;
isBaseType(baseName: string, soft?: boolean): boolean;
couldBeBaseType(name: string): boolean;
baseTypeStrictlyMatches(right: 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: any): [NodePath];
/** Replace the current node with another. */
replaceWith(replacement: T | NodePath): [NodePath];
/**
* 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: Nodes): 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;
/**
* Walk the input `node` and statically evaluate it.
*
* Returns an object in the form `{ confident, value }`. `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.
*
* 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 }
*/
evaluate(): { confident: boolean; value: any };
//#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;
isStatic(): boolean;
/** Alias of `has`. */
is(key: string): boolean;
/** Opposite of `has`. */
isnt(key: string): boolean;
/** Check whether the path node `key` strict equals `value`. */
equals(key: string, 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(path: NodePath): boolean;
//#endregion
//#region ------------------------- context -------------------------
call(key: string): boolean;
isBlacklisted(): boolean;
visit(): boolean;
skip(): void;
skipKey(key: string): void;
stop(): void;
setScope(): void;
setContext(context?: TraversalContext): this;
popContext(): void;
pushContext(context: TraversalContext): void;
//#endregion
//#region ------------------------- removal -------------------------
remove(): void;
//#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(listKey: ArrayKeys, 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(listKey: ArrayKeys, 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;
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: string, content: string, line?: boolean): void;
/** Give node `comments` of the specified `type`. */
addComments(type: string, comments: any[]): void;
//#endregion
//#region ------------------------- isXXX -------------------------
isAnyTypeAnnotation(props?: object | null): this is NodePath;
isArrayExpression(props?: object | null): this is NodePath;
isArrayPattern(props?: object | null): this is NodePath;
isArrayTypeAnnotation(props?: object | null): this is NodePath;
isArrowFunctionExpression(props?: object | null): this is NodePath;
isAssignmentExpression(props?: object | null): this is NodePath;
isAssignmentPattern(props?: object | null): this is NodePath;
isAwaitExpression(props?: object | null): this is NodePath;
isBigIntLiteral(props?: object | null): this is NodePath;
isBinary(props?: object | null): this is NodePath;
isBinaryExpression(props?: object | null): this is NodePath;
isBindExpression(props?: object | null): this is NodePath;
isBlock(props?: object | null): this is NodePath;
isBlockParent(props?: object | null): this is NodePath;
isBlockStatement(props?: object | null): this is NodePath;
isBooleanLiteral(props?: object | null): this is NodePath;
isBooleanLiteralTypeAnnotation(props?: object | null): this is NodePath;
isBooleanTypeAnnotation(props?: object | null): this is NodePath;
isBreakStatement(props?: object | null): this is NodePath;
isCallExpression(props?: object | null): this is NodePath;
isCatchClause(props?: object | null): this is NodePath;
isClass(props?: object | null): this is NodePath;
isClassBody(props?: object | null): this is NodePath;
isClassDeclaration(props?: object | null): this is NodePath;
isClassExpression(props?: object | null): this is NodePath;
isClassImplements(props?: object | null): this is NodePath;
isClassMethod(props?: object | null): this is NodePath;
isClassPrivateMethod(props?: object | null): this is NodePath;
isClassPrivateProperty(props?: object | null): this is NodePath;
isClassProperty(props?: object | null): this is NodePath;
isCompletionStatement(props?: object | null): this is NodePath;
isConditional(props?: object | null): this is NodePath;
isConditionalExpression(props?: object | null): this is NodePath;
isContinueStatement(props?: object | null): this is NodePath;
isDebuggerStatement(props?: object | null): this is NodePath;
isDeclaration(props?: object | null): this is NodePath;
isDeclareClass(props?: object | null): this is NodePath;
isDeclareExportAllDeclaration(props?: object | null): this is NodePath;
isDeclareExportDeclaration(props?: object | null): this is NodePath;
isDeclareFunction(props?: object | null): this is NodePath;
isDeclareInterface(props?: object | null): this is NodePath;
isDeclareModule(props?: object | null): this is NodePath;
isDeclareModuleExports(props?: object | null): this is NodePath;
isDeclareOpaqueType(props?: object | null): this is NodePath;
isDeclareTypeAlias(props?: object | null): this is NodePath;
isDeclareVariable(props?: object | null): this is NodePath;
isDeclaredPredicate(props?: object | null): this is NodePath;
isDecorator(props?: object | null): this is NodePath;
isDirective(props?: object | null): this is NodePath;
isDirectiveLiteral(props?: object | null): this is NodePath;
isDoExpression(props?: object | null): this is NodePath;
isDoWhileStatement(props?: object | null): this is NodePath;
isEmptyStatement(props?: object | null): this is NodePath;
isEmptyTypeAnnotation(props?: object | null): this is NodePath;
isExistsTypeAnnotation(props?: object | null): this is NodePath;
isExportAllDeclaration(props?: object | null): this is NodePath;
isExportDeclaration(props?: object | null): this is NodePath;
isExportDefaultDeclaration(props?: object | null): this is NodePath;
isExportDefaultSpecifier(props?: object | null): this is NodePath;
isExportNamedDeclaration(props?: object | null): this is NodePath;
isExportNamespaceSpecifier(props?: object | null): this is NodePath;
isExportSpecifier(props?: object | null): this is NodePath;
isExpression(props?: object | null): this is NodePath;
isExpressionStatement(props?: object | null): this is NodePath;
isExpressionWrapper(props?: object | null): this is NodePath;
isFile(props?: object | null): this is NodePath;
isFlow(props?: object | null): this is NodePath;
isFlowBaseAnnotation(props?: object | null): this is NodePath;
isFlowDeclaration(props?: object | null): this is NodePath;
isFlowPredicate(props?: object | null): this is NodePath;
isFlowType(props?: object | null): this is NodePath;
isFor(props?: object | null): this is NodePath;
isForInStatement(props?: object | null): this is NodePath;
isForOfStatement(props?: object | null): this is NodePath;
isForStatement(props?: object | null): this is NodePath;
isForXStatement(props?: object | null): this is NodePath;
isFunction(props?: object | null): this is NodePath;
isFunctionDeclaration(props?: object | null): this is NodePath;
isFunctionExpression(props?: object | null): this is NodePath;
isFunctionParent(props?: object | null): this is NodePath;
isFunctionTypeAnnotation(props?: object | null): this is NodePath;
isFunctionTypeParam(props?: object | null): this is NodePath;
isGenericTypeAnnotation(props?: object | null): this is NodePath;
isIdentifier(props?: object | null): this is NodePath;
isIfStatement(props?: object | null): this is NodePath;
isImmutable(props?: object | null): this is NodePath;
isImport(props?: object | null): this is NodePath;
isImportDeclaration(props?: object | null): this is NodePath;
isImportDefaultSpecifier(props?: object | null): this is NodePath;
isImportNamespaceSpecifier(props?: object | null): this is NodePath;
isImportSpecifier(props?: object | null): this is NodePath;
isInferredPredicate(props?: object | null): this is NodePath;
isInterfaceDeclaration(props?: object | null): this is NodePath;
isInterfaceExtends(props?: object | null): this is NodePath;
isInterfaceTypeAnnotation(props?: object | null): this is NodePath;
isInterpreterDirective(props?: object | null): this is NodePath;
isIntersectionTypeAnnotation(props?: object | null): this is NodePath;
isJSX(props?: object | null): this is NodePath;
isJSXAttribute(props?: object | null): this is NodePath;
isJSXClosingElement(props?: object | null): this is NodePath;
isJSXClosingFragment(props?: object | null): this is NodePath;
isJSXElement(props?: object | null): this is NodePath;
isJSXEmptyExpression(props?: object | null): this is NodePath;
isJSXExpressionContainer(props?: object | null): this is NodePath;
isJSXFragment(props?: object | null): this is NodePath;
isJSXIdentifier(props?: object | null): this is NodePath;
isJSXMemberExpression(props?: object | null): this is NodePath;
isJSXNamespacedName(props?: object | null): this is NodePath;
isJSXOpeningElement(props?: object | null): this is NodePath;
isJSXOpeningFragment(props?: object | null): this is NodePath;
isJSXSpreadAttribute(props?: object | null): this is NodePath;
isJSXSpreadChild(props?: object | null): this is NodePath;
isJSXText(props?: object | null): this is NodePath;
isLVal(props?: object | null): this is NodePath;
isLabeledStatement(props?: object | null): this is NodePath;
isLiteral(props?: object | null): this is NodePath;
isLogicalExpression(props?: object | null): this is NodePath;
isLoop(props?: object | null): this is NodePath;
isMemberExpression(props?: object | null): this is NodePath;
isMetaProperty(props?: object | null): this is NodePath;
isMethod(props?: object | null): this is NodePath;
isMixedTypeAnnotation(props?: object | null): this is NodePath;
isModuleDeclaration(props?: object | null): this is NodePath;
isModuleSpecifier(props?: object | null): this is NodePath;
isNewExpression(props?: object | null): this is NodePath;
isNoop(props?: object | null): this is NodePath;
isNullLiteral(props?: object | null): this is NodePath;
isNullLiteralTypeAnnotation(props?: object | null): this is NodePath;
isNullableTypeAnnotation(props?: object | null): this is NodePath;
/** @deprecated Use `isNumericLiteral` */
isNumberLiteral(props?: object | null): this is NodePath;
isNumberLiteralTypeAnnotation(props?: object | null): this is NodePath;
isNumberTypeAnnotation(props?: object | null): this is NodePath;
isNumericLiteral(props?: object | null): this is NodePath;
isObjectExpression(props?: object | null): this is NodePath;
isObjectMember(props?: object | null): this is NodePath;
isObjectMethod(props?: object | null): this is NodePath;
isObjectPattern(props?: object | null): this is NodePath;
isObjectProperty(props?: object | null): this is NodePath;
isObjectTypeAnnotation(props?: object | null): this is NodePath;
isObjectTypeCallProperty(props?: object | null): this is NodePath;
isObjectTypeIndexer(props?: object | null): this is NodePath;
isObjectTypeInternalSlot(props?: object | null): this is NodePath;
isObjectTypeProperty(props?: object | null): this is NodePath;
isObjectTypeSpreadProperty(props?: object | null): this is NodePath;
isOpaqueType(props?: object | null): this is NodePath;
isOptionalCallExpression(props?: object | null): this is NodePath;
isOptionalMemberExpression(props?: object | null): this is NodePath;
isParenthesizedExpression(props?: object | null): this is NodePath;
isPattern(props?: object | null): this is NodePath;
isPatternLike(props?: object | null): this is NodePath;
isPipelineBareFunction(props?: object | null): this is NodePath;
isPipelinePrimaryTopicReference(props?: object | null): this is NodePath;
isPipelineTopicExpression(props?: object | null): this is NodePath;
isPrivate(props?: object | null): this is NodePath;
isPrivateName(props?: object | null): this is NodePath;
isProgram(props?: object | null): this is NodePath;
isProperty(props?: object | null): this is NodePath;
isPureish(props?: object | null): this is NodePath;
isQualifiedTypeIdentifier(props?: object | null): this is NodePath;
isRegExpLiteral(props?: object | null): this is NodePath;
/** @deprecated Use `isRegExpLiteral` */
isRegexLiteral(props?: object | null): this is NodePath;
isRestElement(props?: object | null): this is NodePath;
/** @deprecated Use `isRestElement` */
isRestProperty(props?: object | null): this is NodePath;
isReturnStatement(props?: object | null): this is NodePath;
isScopable(props?: object | null): this is NodePath;
isSequenceExpression(props?: object | null): this is NodePath;
isSpreadElement(props?: object | null): this is NodePath;
/** @deprecated Use `isSpreadElement` */
isSpreadProperty(props?: object | null): this is NodePath;
isStatement(props?: object | null): this is NodePath;
isStringLiteral(props?: object | null): this is NodePath;
isStringLiteralTypeAnnotation(props?: object | null): this is NodePath;
isStringTypeAnnotation(props?: object | null): this is NodePath;
isSuper(props?: object | null): this is NodePath;
isSwitchCase(props?: object | null): this is NodePath;
isSwitchStatement(props?: object | null): this is NodePath;
isTSAnyKeyword(props?: object | null): this is NodePath;
isTSArrayType(props?: object | null): this is NodePath;
isTSAsExpression(props?: object | null): this is NodePath;
isTSBooleanKeyword(props?: object | null): this is NodePath;
isTSCallSignatureDeclaration(props?: object | null): this is NodePath;
isTSConditionalType(props?: object | null): this is NodePath;
isTSConstructSignatureDeclaration(props?: object | null): this is NodePath;
isTSConstructorType(props?: object | null): this is NodePath