@types/babel__traverse
- Version 7.20.6
- Published
- 84.1 kB
- 1 dependency
- MIT license
Install
npm i @types/babel__traverse
yarn add @types/babel__traverse
pnpm add @types/babel__traverse
Overview
TypeScript definitions for @babel/traverse
Index
Variables
Classes
NodePath
- addComment()
- addComments()
- arrowFunctionToExpression()
- arrowFunctionToShadowed()
- assertAccessor()
- assertAnyTypeAnnotation()
- assertArgumentPlaceholder()
- assertArrayExpression()
- assertArrayPattern()
- assertArrayTypeAnnotation()
- assertArrowFunctionExpression()
- assertAssignmentExpression()
- assertAssignmentPattern()
- assertAwaitExpression()
- assertBigIntLiteral()
- assertBinary()
- assertBinaryExpression()
- assertBindExpression()
- assertBlock()
- assertBlockParent()
- assertBlockStatement()
- assertBooleanLiteral()
- assertBooleanLiteralTypeAnnotation()
- assertBooleanTypeAnnotation()
- assertBreakStatement()
- assertCallExpression()
- assertCatchClause()
- assertClass()
- assertClassAccessorProperty()
- assertClassBody()
- assertClassDeclaration()
- assertClassExpression()
- assertClassImplements()
- assertClassMethod()
- assertClassPrivateMethod()
- assertClassPrivateProperty()
- assertClassProperty()
- assertCompletionStatement()
- assertConditional()
- assertConditionalExpression()
- assertContinueStatement()
- assertDebuggerStatement()
- assertDecimalLiteral()
- assertDeclaration()
- assertDeclareClass()
- assertDeclaredPredicate()
- assertDeclareExportAllDeclaration()
- assertDeclareExportDeclaration()
- assertDeclareFunction()
- assertDeclareInterface()
- assertDeclareModule()
- assertDeclareModuleExports()
- assertDeclareOpaqueType()
- assertDeclareTypeAlias()
- assertDeclareVariable()
- assertDecorator()
- assertDirective()
- assertDirectiveLiteral()
- assertDoExpression()
- assertDoWhileStatement()
- assertEmptyStatement()
- assertEmptyTypeAnnotation()
- assertEnumBody()
- assertEnumBooleanBody()
- assertEnumBooleanMember()
- assertEnumDeclaration()
- assertEnumDefaultedMember()
- assertEnumMember()
- assertEnumNumberBody()
- assertEnumNumberMember()
- assertEnumStringBody()
- assertEnumStringMember()
- assertEnumSymbolBody()
- assertExistsTypeAnnotation()
- assertExportAllDeclaration()
- assertExportDeclaration()
- assertExportDefaultDeclaration()
- assertExportDefaultSpecifier()
- assertExportNamedDeclaration()
- assertExportNamespaceSpecifier()
- assertExportSpecifier()
- assertExpression()
- assertExpressionStatement()
- assertExpressionWrapper()
- assertFile()
- assertFlow()
- assertFlowBaseAnnotation()
- assertFlowDeclaration()
- assertFlowPredicate()
- assertFlowType()
- assertFor()
- assertForInStatement()
- assertForOfStatement()
- assertForStatement()
- assertForXStatement()
- assertFunction()
- assertFunctionDeclaration()
- assertFunctionExpression()
- assertFunctionParent()
- assertFunctionTypeAnnotation()
- assertFunctionTypeParam()
- assertGenericTypeAnnotation()
- assertIdentifier()
- assertIfStatement()
- assertImmutable()
- assertImport()
- assertImportAttribute()
- assertImportDeclaration()
- assertImportDefaultSpecifier()
- assertImportNamespaceSpecifier()
- assertImportSpecifier()
- assertIndexedAccessType()
- assertInferredPredicate()
- assertInterfaceDeclaration()
- assertInterfaceExtends()
- assertInterfaceTypeAnnotation()
- assertInterpreterDirective()
- assertIntersectionTypeAnnotation()
- assertJSX()
- assertJSXAttribute()
- assertJSXClosingElement()
- assertJSXClosingFragment()
- assertJSXElement()
- assertJSXEmptyExpression()
- assertJSXExpressionContainer()
- assertJSXFragment()
- assertJSXIdentifier()
- assertJSXMemberExpression()
- assertJSXNamespacedName()
- assertJSXOpeningElement()
- assertJSXOpeningFragment()
- assertJSXSpreadAttribute()
- assertJSXSpreadChild()
- assertJSXText()
- assertLabeledStatement()
- assertLiteral()
- assertLogicalExpression()
- assertLoop()
- assertLVal()
- assertMemberExpression()
- assertMetaProperty()
- assertMethod()
- assertMiscellaneous()
- assertMixedTypeAnnotation()
- assertModuleDeclaration()
- assertModuleExpression()
- assertModuleSpecifier()
- assertNewExpression()
- assertNoop()
- assertNullableTypeAnnotation()
- assertNullLiteral()
- assertNullLiteralTypeAnnotation()
- assertNumberLiteral()
- assertNumberLiteralTypeAnnotation()
- assertNumberTypeAnnotation()
- assertNumericLiteral()
- assertObjectExpression()
- assertObjectMember()
- assertObjectMethod()
- assertObjectPattern()
- assertObjectProperty()
- assertObjectTypeAnnotation()
- assertObjectTypeCallProperty()
- assertObjectTypeIndexer()
- assertObjectTypeInternalSlot()
- assertObjectTypeProperty()
- assertObjectTypeSpreadProperty()
- assertOpaqueType()
- assertOptionalCallExpression()
- assertOptionalIndexedAccessType()
- assertOptionalMemberExpression()
- assertParenthesizedExpression()
- assertPattern()
- assertPatternLike()
- assertPipelineBareFunction()
- assertPipelinePrimaryTopicReference()
- assertPipelineTopicExpression()
- assertPlaceholder()
- assertPrivate()
- assertPrivateName()
- assertProgram()
- assertProperty()
- assertPureish()
- assertQualifiedTypeIdentifier()
- assertRecordExpression()
- assertRegexLiteral()
- assertRegExpLiteral()
- assertRestElement()
- assertRestProperty()
- assertReturnStatement()
- assertScopable()
- assertSequenceExpression()
- assertSpreadElement()
- assertSpreadProperty()
- assertStandardized()
- assertStatement()
- assertStaticBlock()
- assertStringLiteral()
- assertStringLiteralTypeAnnotation()
- assertStringTypeAnnotation()
- assertSuper()
- assertSwitchCase()
- assertSwitchStatement()
- assertSymbolTypeAnnotation()
- assertTaggedTemplateExpression()
- assertTemplateElement()
- assertTemplateLiteral()
- assertTerminatorless()
- assertThisExpression()
- assertThisTypeAnnotation()
- assertThrowStatement()
- assertTopicReference()
- assertTryStatement()
- assertTSAnyKeyword()
- assertTSArrayType()
- assertTSAsExpression()
- assertTSBaseType()
- assertTSBigIntKeyword()
- assertTSBooleanKeyword()
- assertTSCallSignatureDeclaration()
- assertTSConditionalType()
- assertTSConstructorType()
- assertTSConstructSignatureDeclaration()
- assertTSDeclareFunction()
- assertTSDeclareMethod()
- assertTSEntityName()
- assertTSEnumDeclaration()
- assertTSEnumMember()
- assertTSExportAssignment()
- assertTSExpressionWithTypeArguments()
- assertTSExternalModuleReference()
- assertTSFunctionType()
- assertTSImportEqualsDeclaration()
- assertTSImportType()
- assertTSIndexedAccessType()
- assertTSIndexSignature()
- assertTSInferType()
- assertTSInstantiationExpression()
- assertTSInterfaceBody()
- assertTSInterfaceDeclaration()
- assertTSIntersectionType()
- assertTSIntrinsicKeyword()
- assertTSLiteralType()
- assertTSMappedType()
- assertTSMethodSignature()
- assertTSModuleBlock()
- assertTSModuleDeclaration()
- assertTSNamedTupleMember()
- assertTSNamespaceExportDeclaration()
- assertTSNeverKeyword()
- assertTSNonNullExpression()
- assertTSNullKeyword()
- assertTSNumberKeyword()
- assertTSObjectKeyword()
- assertTSOptionalType()
- assertTSParameterProperty()
- assertTSParenthesizedType()
- assertTSPropertySignature()
- assertTSQualifiedName()
- assertTSRestType()
- assertTSSatisfiesExpression()
- assertTSStringKeyword()
- assertTSSymbolKeyword()
- assertTSThisType()
- assertTSTupleType()
- assertTSType()
- assertTSTypeAliasDeclaration()
- assertTSTypeAnnotation()
- assertTSTypeAssertion()
- assertTSTypeElement()
- assertTSTypeLiteral()
- assertTSTypeOperator()
- assertTSTypeParameter()
- assertTSTypeParameterDeclaration()
- assertTSTypeParameterInstantiation()
- assertTSTypePredicate()
- assertTSTypeQuery()
- assertTSTypeReference()
- assertTSUndefinedKeyword()
- assertTSUnionType()
- assertTSUnknownKeyword()
- assertTSVoidKeyword()
- assertTupleExpression()
- assertTupleTypeAnnotation()
- assertTypeAlias()
- assertTypeAnnotation()
- assertTypeCastExpression()
- assertTypeofTypeAnnotation()
- assertTypeParameter()
- assertTypeParameterDeclaration()
- assertTypeParameterInstantiation()
- assertTypeScript()
- assertUnaryExpression()
- assertUnaryLike()
- assertUnionTypeAnnotation()
- assertUpdateExpression()
- assertUserWhitespacable()
- assertV8IntrinsicIdentifier()
- assertVariableDeclaration()
- assertVariableDeclarator()
- assertVariance()
- assertVoidTypeAnnotation()
- assertWhile()
- assertWhileStatement()
- assertWithStatement()
- assertYieldExpression()
- baseTypeStrictlyMatches()
- buildCodeFrameError()
- call()
- canHaveVariableDeclarationOrExpression()
- canSwapBetweenExpressionAndStatement()
- container
- context
- contexts
- couldBeBaseType()
- data
- debug()
- ensureBlock()
- equals()
- evaluate()
- evaluateTruthy()
- find()
- findParent()
- get()
- getAllNextSiblings()
- getAllPrevSiblings()
- getAncestry()
- getBindingIdentifierPaths()
- getBindingIdentifiers()
- getCompletionRecords()
- getData()
- getDeepestCommonAncestorFrom()
- getEarliestCommonAncestorFrom()
- getFunctionParent()
- getNextSibling()
- getOpposite()
- getOuterBindingIdentifierPaths()
- getOuterBindingIdentifiers()
- getPathLocation()
- getPrevSibling()
- getScope()
- getSibling()
- getSource()
- getStatementParent()
- getTypeAnnotation()
- has()
- hasNode()
- hoist()
- hub
- inList
- insertAfter()
- insertBefore()
- inType()
- is()
- isAccessor()
- isAncestor()
- isAnyTypeAnnotation()
- isArgumentPlaceholder()
- isArrayExpression()
- isArrayPattern()
- isArrayTypeAnnotation()
- isArrowFunctionExpression()
- isAssignmentExpression()
- isAssignmentPattern()
- isAwaitExpression()
- isBaseType()
- isBigIntLiteral()
- isBinary()
- isBinaryExpression()
- isBindExpression()
- isBindingIdentifier()
- isBlacklisted()
- isBlock()
- isBlockParent()
- isBlockScoped()
- isBlockStatement()
- isBooleanLiteral()
- isBooleanLiteralTypeAnnotation()
- isBooleanTypeAnnotation()
- isBreakStatement()
- isCallExpression()
- isCatchClause()
- isClass()
- isClassAccessorProperty()
- isClassBody()
- isClassDeclaration()
- isClassExpression()
- isClassImplements()
- isClassMethod()
- isClassPrivateMethod()
- isClassPrivateProperty()
- isClassProperty()
- isCompletionRecord()
- isCompletionStatement()
- isConditional()
- isConditionalExpression()
- isConstantExpression()
- isContinueStatement()
- isDebuggerStatement()
- isDecimalLiteral()
- isDeclaration()
- isDeclareClass()
- isDeclaredPredicate()
- isDeclareExportAllDeclaration()
- isDeclareExportDeclaration()
- isDeclareFunction()
- isDeclareInterface()
- isDeclareModule()
- isDeclareModuleExports()
- isDeclareOpaqueType()
- isDeclareTypeAlias()
- isDeclareVariable()
- isDecorator()
- isDenylisted()
- isDescendant()
- isDirective()
- isDirectiveLiteral()
- isDoExpression()
- isDoWhileStatement()
- isEmptyStatement()
- isEmptyTypeAnnotation()
- isEnumBody()
- isEnumBooleanBody()
- isEnumBooleanMember()
- isEnumDeclaration()
- isEnumDefaultedMember()
- isEnumMember()
- isEnumNumberBody()
- isEnumNumberMember()
- isEnumStringBody()
- isEnumStringMember()
- isEnumSymbolBody()
- isExistentialTypeParam()
- isExistsTypeAnnotation()
- isExportAllDeclaration()
- isExportDeclaration()
- isExportDefaultDeclaration()
- isExportDefaultSpecifier()
- isExportNamedDeclaration()
- isExportNamespaceSpecifier()
- isExportSpecifier()
- isExpression()
- isExpressionStatement()
- isExpressionWrapper()
- isFile()
- isFlow()
- isFlowBaseAnnotation()
- isFlowDeclaration()
- isFlowPredicate()
- isFlowType()
- isFor()
- isForAwaitStatement()
- isForInStatement()
- isForOfStatement()
- isForStatement()
- isForXStatement()
- isFunction()
- isFunctionDeclaration()
- isFunctionExpression()
- isFunctionParent()
- isFunctionTypeAnnotation()
- isFunctionTypeParam()
- isGenerated()
- isGenericType()
- isGenericTypeAnnotation()
- isIdentifier()
- isIfStatement()
- isImmutable()
- isImport()
- isImportAttribute()
- isImportDeclaration()
- isImportDefaultSpecifier()
- isImportNamespaceSpecifier()
- isImportSpecifier()
- isIndexedAccessType()
- isInferredPredicate()
- isInStrictMode()
- isInterfaceDeclaration()
- isInterfaceExtends()
- isInterfaceTypeAnnotation()
- isInterpreterDirective()
- isIntersectionTypeAnnotation()
- isJSX()
- isJSXAttribute()
- isJSXClosingElement()
- isJSXClosingFragment()
- isJSXElement()
- isJSXEmptyExpression()
- isJSXExpressionContainer()
- isJSXFragment()
- isJSXIdentifier()
- isJSXMemberExpression()
- isJSXNamespacedName()
- isJSXOpeningElement()
- isJSXOpeningFragment()
- isJSXSpreadAttribute()
- isJSXSpreadChild()
- isJSXText()
- isLabeledStatement()
- isLiteral()
- isLogicalExpression()
- isLoop()
- isLVal()
- isMemberExpression()
- isMetaProperty()
- isMethod()
- isMiscellaneous()
- isMixedTypeAnnotation()
- isModuleDeclaration()
- isModuleExpression()
- isModuleSpecifier()
- isNewExpression()
- isNodeType()
- isNoop()
- isnt()
- isNullableTypeAnnotation()
- isNullLiteral()
- isNullLiteralTypeAnnotation()
- isNumberLiteral()
- isNumberLiteralTypeAnnotation()
- isNumberTypeAnnotation()
- isNumericLiteral()
- isNumericLiteralTypeAnnotation()
- isObjectExpression()
- isObjectMember()
- isObjectMethod()
- isObjectPattern()
- isObjectProperty()
- isObjectTypeAnnotation()
- isObjectTypeCallProperty()
- isObjectTypeIndexer()
- isObjectTypeInternalSlot()
- isObjectTypeProperty()
- isObjectTypeSpreadProperty()
- isOpaqueType()
- isOptionalCallExpression()
- isOptionalIndexedAccessType()
- isOptionalMemberExpression()
- isParenthesizedExpression()
- isPattern()
- isPatternLike()
- isPipelineBareFunction()
- isPipelinePrimaryTopicReference()
- isPipelineTopicExpression()
- isPlaceholder()
- isPrivate()
- isPrivateName()
- isProgram()
- isProperty()
- isPure()
- isPureish()
- isQualifiedTypeIdentifier()
- isRecordExpression()
- isReferenced()
- isReferencedIdentifier()
- isReferencedMemberExpression()
- isRegexLiteral()
- isRegExpLiteral()
- isRestElement()
- isRestProperty()
- isReturnStatement()
- isScopable()
- isScope()
- isSequenceExpression()
- isSpreadElement()
- isSpreadProperty()
- isStandardized()
- isStatement()
- isStatementOrBlock()
- isStatic()
- isStaticBlock()
- isStringLiteral()
- isStringLiteralTypeAnnotation()
- isStringTypeAnnotation()
- isSuper()
- isSwitchCase()
- isSwitchStatement()
- isSymbolTypeAnnotation()
- isTaggedTemplateExpression()
- isTemplateElement()
- isTemplateLiteral()
- isTerminatorless()
- isThisExpression()
- isThisTypeAnnotation()
- isThrowStatement()
- isTopicReference()
- isTryStatement()
- isTSAnyKeyword()
- isTSArrayType()
- isTSAsExpression()
- isTSBaseType()
- isTSBigIntKeyword()
- isTSBooleanKeyword()
- isTSCallSignatureDeclaration()
- isTSConditionalType()
- isTSConstructorType()
- isTSConstructSignatureDeclaration()
- isTSDeclareFunction()
- isTSDeclareMethod()
- isTSEntityName()
- isTSEnumDeclaration()
- isTSEnumMember()
- isTSExportAssignment()
- isTSExpressionWithTypeArguments()
- isTSExternalModuleReference()
- isTSFunctionType()
- isTSImportEqualsDeclaration()
- isTSImportType()
- isTSIndexedAccessType()
- isTSIndexSignature()
- isTSInferType()
- isTSInstantiationExpression()
- isTSInterfaceBody()
- isTSInterfaceDeclaration()
- isTSIntersectionType()
- isTSIntrinsicKeyword()
- isTSLiteralType()
- isTSMappedType()
- isTSMethodSignature()
- isTSModuleBlock()
- isTSModuleDeclaration()
- isTSNamedTupleMember()
- isTSNamespaceExportDeclaration()
- isTSNeverKeyword()
- isTSNonNullExpression()
- isTSNullKeyword()
- isTSNumberKeyword()
- isTSObjectKeyword()
- isTSOptionalType()
- isTSParameterProperty()
- isTSParenthesizedType()
- isTSPropertySignature()
- isTSQualifiedName()
- isTSRestType()
- isTSSatisfiesExpression()
- isTSStringKeyword()
- isTSSymbolKeyword()
- isTSThisType()
- isTSTupleType()
- isTSType()
- isTSTypeAliasDeclaration()
- isTSTypeAnnotation()
- isTSTypeAssertion()
- isTSTypeElement()
- isTSTypeLiteral()
- isTSTypeOperator()
- isTSTypeParameter()
- isTSTypeParameterDeclaration()
- isTSTypeParameterInstantiation()
- isTSTypePredicate()
- isTSTypeQuery()
- isTSTypeReference()
- isTSUndefinedKeyword()
- isTSUnionType()
- isTSUnknownKeyword()
- isTSVoidKeyword()
- isTupleExpression()
- isTupleTypeAnnotation()
- isTypeAlias()
- isTypeAnnotation()
- isTypeCastExpression()
- isTypeofTypeAnnotation()
- isTypeParameter()
- isTypeParameterDeclaration()
- isTypeParameterInstantiation()
- isTypeScript()
- isUnaryExpression()
- isUnaryLike()
- isUnionTypeAnnotation()
- isUpdateExpression()
- isUser()
- isUserWhitespacable()
- isV8IntrinsicIdentifier()
- isVar()
- isVariableDeclaration()
- isVariableDeclarator()
- isVariance()
- isVoidTypeAnnotation()
- isWhile()
- isWhileStatement()
- isWithStatement()
- isYieldExpression()
- key
- listKey
- matchesPattern()
- node
- opts
- parent
- parentKey
- parentPath
- popContext()
- pushContainer()
- pushContext()
- referencesImport()
- remove()
- removed
- replaceExpressionWithStatements()
- replaceInline()
- replaceWith()
- replaceWithMultiple()
- replaceWithSourceString()
- requeue()
- resolve()
- resync()
- scope
- set()
- setContext()
- setData()
- setScope()
- shareCommentsWithSiblings()
- shouldSkip
- shouldStop
- skip()
- skipKey()
- skipKeys
- state
- stop()
- toComputedKey()
- traverse()
- type
- typeAnnotation
- unshiftContainer()
- unwrapFunctionEnvironment()
- updateSiblingKeys()
- visit()
- willIMaybeExecuteBefore()
Scope
- addGlobal()
- bindingIdentifierEquals()
- bindings
- block
- buildUndefinedNode()
- checkBlockScopedCollisions()
- contextVariables
- crawl()
- crawling
- data
- dump()
- generateDeclaredUidIdentifier()
- generateUid()
- generateUidIdentifier()
- generateUidIdentifierBasedOnNode()
- getAllBindings()
- getAllBindingsOfKind()
- getBinding()
- getBindingIdentifier()
- getBlockParent()
- getData()
- getFunctionParent()
- getLabel()
- getOwnBinding()
- getOwnBindingIdentifier()
- getPatternParent()
- getProgramParent()
- globals
- globals
- hasBinding()
- hasGlobal()
- hasLabel()
- hasOwnBinding()
- hasReference()
- hasUid()
- hub
- isPure()
- isStatic()
- labels
- maybeGenerateMemoised()
- moveBindingTo()
- parent
- parentBlock
- parentHasBinding()
- path
- push()
- references
- registerBinding()
- registerConstantViolation()
- registerDeclaration()
- registerLabel()
- removeBinding()
- removeData()
- removeOwnBinding()
- rename()
- setData()
- toArray()
- traverse()
- uid
- uids
Interfaces
Type Aliases
Namespaces
Variables
variable traverse
const traverse: { <S>( parent: Node, opts: TraverseOptions<S>, 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<string, boolean> ) => void; clearNode: (node: Node, opts?: RemovePropertiesOptions) => void; removeProperties: (tree: Node, opts?: RemovePropertiesOptions) => Node; hasType: (tree: Node, type: Node, denylistTypes?: string[]) => boolean; cache: typeof cache;};
Classes
class Binding
class Binding {}
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)
constructor
constructor(opts: { identifier: t.Identifier; scope: Scope; path: NodePath; kind: BindingKind;});
property constant
constant: boolean;
property constantViolations
constantViolations: NodePath<Node>[];
property hasDeoptedValue
hasDeoptedValue: boolean;
property hasValue
hasValue: boolean;
property identifier
identifier: t.Identifier;
property kind
kind: BindingKind;
property path
path: NodePath<Node>;
property referenced
referenced: boolean;
property referencePaths
referencePaths: NodePath<Node>[];
property references
references: number;
property scope
scope: Scope;
property value
value: any;
method clearValue
clearValue: () => void;
method deopValue
deopValue: () => void;
method dereference
dereference: () => void;
Decrement the amount of references to this binding.
method reassign
reassign: (path: NodePath) => void;
Register a constant violation with the provided
path
.
method reference
reference: (path: NodePath) => void;
Increment the amount of references to this binding.
method setValue
setValue: (value: any) => void;
class Hub
class Hub implements HubInterface {}
constructor
constructor();
method addHelper
addHelper: (name: string) => any;
method buildError
buildError: (node: Node, msg: string, Error?: ErrorConstructor) => Error;
method getCode
getCode: () => string | undefined;
method getScope
getScope: () => Scope | undefined;
class NodePath
class NodePath<T = Node> {}
constructor
constructor(hub: HubInterface, parent: Node);
property container
container: any;
property context
context: TraversalContext<unknown>;
property contexts
contexts: TraversalContext<unknown>[];
property data
data: Record<string | symbol, unknown>;
property hub
hub: Hub;
property inList
inList: boolean;
property key
key: string | number;
property listKey
listKey: string;
property node
node: {};
property opts
opts: any;
property parent
parent: Node;
property parentKey
parentKey: string;
property parentPath
parentPath: NodePath<Node>;
property removed
removed: boolean;
property scope
scope: Scope;
property shouldSkip
shouldSkip: boolean;
property shouldStop
shouldStop: boolean;
property skipKeys
skipKeys: Record<string, boolean>;
property state
state: any;
property type
type: {};
property typeAnnotation
typeAnnotation: {};
method addComment
addComment: ( type: t.CommentTypeShorthand, content: string, line?: boolean) => void;
method addComments
addComments: (type: t.CommentTypeShorthand, comments: t.Comment[]) => void;
Give node
comments
of the specifiedtype
.
method arrowFunctionToExpression
arrowFunctionToExpression: ({ allowInsertArrow, allowInsertArrowWithRest, specCompliant, noNewArrows,}?: { allowInsertArrow?: boolean; allowInsertArrowWithRest?: boolean; specCompliant?: boolean; noNewArrows?: boolean;}) => NodePath< Exclude<t.Function, t.Method | t.ArrowFunctionExpression> | t.CallExpression>;
Convert a given arrow function into a normal ES5 function expression.
method arrowFunctionToShadowed
arrowFunctionToShadowed: () => void;
Deprecated
Use
arrowFunctionToExpression
method assertAccessor
assertAccessor: (opts?: object) => asserts this is NodePath<t.Accessor>;
method assertAnyTypeAnnotation
assertAnyTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.AnyTypeAnnotation>;
method assertArgumentPlaceholder
assertArgumentPlaceholder: ( opts?: object) => asserts this is NodePath<t.ArgumentPlaceholder>;
method assertArrayExpression
assertArrayExpression: ( opts?: object) => asserts this is NodePath<t.ArrayExpression>;
method assertArrayPattern
assertArrayPattern: (opts?: object) => asserts this is NodePath<t.ArrayPattern>;
method assertArrayTypeAnnotation
assertArrayTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.ArrayTypeAnnotation>;
method assertArrowFunctionExpression
assertArrowFunctionExpression: ( opts?: object) => asserts this is NodePath<t.ArrowFunctionExpression>;
method assertAssignmentExpression
assertAssignmentExpression: ( opts?: object) => asserts this is NodePath<t.AssignmentExpression>;
method assertAssignmentPattern
assertAssignmentPattern: ( opts?: object) => asserts this is NodePath<t.AssignmentPattern>;
method assertAwaitExpression
assertAwaitExpression: ( opts?: object) => asserts this is NodePath<t.AwaitExpression>;
method assertBigIntLiteral
assertBigIntLiteral: ( opts?: object) => asserts this is NodePath<t.BigIntLiteral>;
method assertBinary
assertBinary: (opts?: object) => asserts this is NodePath<t.Binary>;
method assertBinaryExpression
assertBinaryExpression: ( opts?: object) => asserts this is NodePath<t.BinaryExpression>;
method assertBindExpression
assertBindExpression: ( opts?: object) => asserts this is NodePath<t.BindExpression>;
method assertBlock
assertBlock: (opts?: object) => asserts this is NodePath<t.Block>;
method assertBlockParent
assertBlockParent: (opts?: object) => asserts this is NodePath<t.BlockParent>;
method assertBlockStatement
assertBlockStatement: ( opts?: object) => asserts this is NodePath<t.BlockStatement>;
method assertBooleanLiteral
assertBooleanLiteral: ( opts?: object) => asserts this is NodePath<t.BooleanLiteral>;
method assertBooleanLiteralTypeAnnotation
assertBooleanLiteralTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.BooleanLiteralTypeAnnotation>;
method assertBooleanTypeAnnotation
assertBooleanTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.BooleanTypeAnnotation>;
method assertBreakStatement
assertBreakStatement: ( opts?: object) => asserts this is NodePath<t.BreakStatement>;
method assertCallExpression
assertCallExpression: ( opts?: object) => asserts this is NodePath<t.CallExpression>;
method assertCatchClause
assertCatchClause: (opts?: object) => asserts this is NodePath<t.CatchClause>;
method assertClass
assertClass: (opts?: object) => asserts this is NodePath<t.Class>;
method assertClassAccessorProperty
assertClassAccessorProperty: ( opts?: object) => asserts this is NodePath<t.ClassAccessorProperty>;
method assertClassBody
assertClassBody: (opts?: object) => asserts this is NodePath<t.ClassBody>;
method assertClassDeclaration
assertClassDeclaration: ( opts?: object) => asserts this is NodePath<t.ClassDeclaration>;
method assertClassExpression
assertClassExpression: ( opts?: object) => asserts this is NodePath<t.ClassExpression>;
method assertClassImplements
assertClassImplements: ( opts?: object) => asserts this is NodePath<t.ClassImplements>;
method assertClassMethod
assertClassMethod: (opts?: object) => asserts this is NodePath<t.ClassMethod>;
method assertClassPrivateMethod
assertClassPrivateMethod: ( opts?: object) => asserts this is NodePath<t.ClassPrivateMethod>;
method assertClassPrivateProperty
assertClassPrivateProperty: ( opts?: object) => asserts this is NodePath<t.ClassPrivateProperty>;
method assertClassProperty
assertClassProperty: ( opts?: object) => asserts this is NodePath<t.ClassProperty>;
method assertCompletionStatement
assertCompletionStatement: ( opts?: object) => asserts this is NodePath<t.CompletionStatement>;
method assertConditional
assertConditional: (opts?: object) => asserts this is NodePath<t.Conditional>;
method assertConditionalExpression
assertConditionalExpression: ( opts?: object) => asserts this is NodePath<t.ConditionalExpression>;
method assertContinueStatement
assertContinueStatement: ( opts?: object) => asserts this is NodePath<t.ContinueStatement>;
method assertDebuggerStatement
assertDebuggerStatement: ( opts?: object) => asserts this is NodePath<t.DebuggerStatement>;
method assertDecimalLiteral
assertDecimalLiteral: ( opts?: object) => asserts this is NodePath<t.DecimalLiteral>;
method assertDeclaration
assertDeclaration: (opts?: object) => asserts this is NodePath<t.Declaration>;
method assertDeclareClass
assertDeclareClass: (opts?: object) => asserts this is NodePath<t.DeclareClass>;
method assertDeclaredPredicate
assertDeclaredPredicate: ( opts?: object) => asserts this is NodePath<t.DeclaredPredicate>;
method assertDeclareExportAllDeclaration
assertDeclareExportAllDeclaration: ( opts?: object) => asserts this is NodePath<t.DeclareExportAllDeclaration>;
method assertDeclareExportDeclaration
assertDeclareExportDeclaration: ( opts?: object) => asserts this is NodePath<t.DeclareExportDeclaration>;
method assertDeclareFunction
assertDeclareFunction: ( opts?: object) => asserts this is NodePath<t.DeclareFunction>;
method assertDeclareInterface
assertDeclareInterface: ( opts?: object) => asserts this is NodePath<t.DeclareInterface>;
method assertDeclareModule
assertDeclareModule: ( opts?: object) => asserts this is NodePath<t.DeclareModule>;
method assertDeclareModuleExports
assertDeclareModuleExports: ( opts?: object) => asserts this is NodePath<t.DeclareModuleExports>;
method assertDeclareOpaqueType
assertDeclareOpaqueType: ( opts?: object) => asserts this is NodePath<t.DeclareOpaqueType>;
method assertDeclareTypeAlias
assertDeclareTypeAlias: ( opts?: object) => asserts this is NodePath<t.DeclareTypeAlias>;
method assertDeclareVariable
assertDeclareVariable: ( opts?: object) => asserts this is NodePath<t.DeclareVariable>;
method assertDecorator
assertDecorator: (opts?: object) => asserts this is NodePath<t.Decorator>;
method assertDirective
assertDirective: (opts?: object) => asserts this is NodePath<t.Directive>;
method assertDirectiveLiteral
assertDirectiveLiteral: ( opts?: object) => asserts this is NodePath<t.DirectiveLiteral>;
method assertDoExpression
assertDoExpression: (opts?: object) => asserts this is NodePath<t.DoExpression>;
method assertDoWhileStatement
assertDoWhileStatement: ( opts?: object) => asserts this is NodePath<t.DoWhileStatement>;
method assertEmptyStatement
assertEmptyStatement: ( opts?: object) => asserts this is NodePath<t.EmptyStatement>;
method assertEmptyTypeAnnotation
assertEmptyTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.EmptyTypeAnnotation>;
method assertEnumBody
assertEnumBody: (opts?: object) => asserts this is NodePath<t.EnumBody>;
method assertEnumBooleanBody
assertEnumBooleanBody: ( opts?: object) => asserts this is NodePath<t.EnumBooleanBody>;
method assertEnumBooleanMember
assertEnumBooleanMember: ( opts?: object) => asserts this is NodePath<t.EnumBooleanMember>;
method assertEnumDeclaration
assertEnumDeclaration: ( opts?: object) => asserts this is NodePath<t.EnumDeclaration>;
method assertEnumDefaultedMember
assertEnumDefaultedMember: ( opts?: object) => asserts this is NodePath<t.EnumDefaultedMember>;
method assertEnumMember
assertEnumMember: (opts?: object) => asserts this is NodePath<t.EnumMember>;
method assertEnumNumberBody
assertEnumNumberBody: ( opts?: object) => asserts this is NodePath<t.EnumNumberBody>;
method assertEnumNumberMember
assertEnumNumberMember: ( opts?: object) => asserts this is NodePath<t.EnumNumberMember>;
method assertEnumStringBody
assertEnumStringBody: ( opts?: object) => asserts this is NodePath<t.EnumStringBody>;
method assertEnumStringMember
assertEnumStringMember: ( opts?: object) => asserts this is NodePath<t.EnumStringMember>;
method assertEnumSymbolBody
assertEnumSymbolBody: ( opts?: object) => asserts this is NodePath<t.EnumSymbolBody>;
method assertExistsTypeAnnotation
assertExistsTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.ExistsTypeAnnotation>;
method assertExportAllDeclaration
assertExportAllDeclaration: ( opts?: object) => asserts this is NodePath<t.ExportAllDeclaration>;
method assertExportDeclaration
assertExportDeclaration: ( opts?: object) => asserts this is NodePath<t.ExportDeclaration>;
method assertExportDefaultDeclaration
assertExportDefaultDeclaration: ( opts?: object) => asserts this is NodePath<t.ExportDefaultDeclaration>;
method assertExportDefaultSpecifier
assertExportDefaultSpecifier: ( opts?: object) => asserts this is NodePath<t.ExportDefaultSpecifier>;
method assertExportNamedDeclaration
assertExportNamedDeclaration: ( opts?: object) => asserts this is NodePath<t.ExportNamedDeclaration>;
method assertExportNamespaceSpecifier
assertExportNamespaceSpecifier: ( opts?: object) => asserts this is NodePath<t.ExportNamespaceSpecifier>;
method assertExportSpecifier
assertExportSpecifier: ( opts?: object) => asserts this is NodePath<t.ExportSpecifier>;
method assertExpression
assertExpression: (opts?: object) => asserts this is NodePath<t.Expression>;
method assertExpressionStatement
assertExpressionStatement: ( opts?: object) => asserts this is NodePath<t.ExpressionStatement>;
method assertExpressionWrapper
assertExpressionWrapper: ( opts?: object) => asserts this is NodePath<t.ExpressionWrapper>;
method assertFile
assertFile: (opts?: object) => asserts this is NodePath<t.File>;
method assertFlow
assertFlow: (opts?: object) => asserts this is NodePath<t.Flow>;
method assertFlowBaseAnnotation
assertFlowBaseAnnotation: ( opts?: object) => asserts this is NodePath<t.FlowBaseAnnotation>;
method assertFlowDeclaration
assertFlowDeclaration: ( opts?: object) => asserts this is NodePath<t.FlowDeclaration>;
method assertFlowPredicate
assertFlowPredicate: ( opts?: object) => asserts this is NodePath<t.FlowPredicate>;
method assertFlowType
assertFlowType: (opts?: object) => asserts this is NodePath<t.FlowType>;
method assertFor
assertFor: (opts?: object) => asserts this is NodePath<t.For>;
method assertForInStatement
assertForInStatement: ( opts?: object) => asserts this is NodePath<t.ForInStatement>;
method assertForOfStatement
assertForOfStatement: ( opts?: object) => asserts this is NodePath<t.ForOfStatement>;
method assertForStatement
assertForStatement: (opts?: object) => asserts this is NodePath<t.ForStatement>;
method assertForXStatement
assertForXStatement: ( opts?: object) => asserts this is NodePath<t.ForXStatement>;
method assertFunction
assertFunction: (opts?: object) => asserts this is NodePath<t.Function>;
method assertFunctionDeclaration
assertFunctionDeclaration: ( opts?: object) => asserts this is NodePath<t.FunctionDeclaration>;
method assertFunctionExpression
assertFunctionExpression: ( opts?: object) => asserts this is NodePath<t.FunctionExpression>;
method assertFunctionParent
assertFunctionParent: ( opts?: object) => asserts this is NodePath<t.FunctionParent>;
method assertFunctionTypeAnnotation
assertFunctionTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.FunctionTypeAnnotation>;
method assertFunctionTypeParam
assertFunctionTypeParam: ( opts?: object) => asserts this is NodePath<t.FunctionTypeParam>;
method assertGenericTypeAnnotation
assertGenericTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.GenericTypeAnnotation>;
method assertIdentifier
assertIdentifier: (opts?: object) => asserts this is NodePath<t.Identifier>;
method assertIfStatement
assertIfStatement: (opts?: object) => asserts this is NodePath<t.IfStatement>;
method assertImmutable
assertImmutable: (opts?: object) => asserts this is NodePath<t.Immutable>;
method assertImport
assertImport: (opts?: object) => asserts this is NodePath<t.Import>;
method assertImportAttribute
assertImportAttribute: ( opts?: object) => asserts this is NodePath<t.ImportAttribute>;
method assertImportDeclaration
assertImportDeclaration: ( opts?: object) => asserts this is NodePath<t.ImportDeclaration>;
method assertImportDefaultSpecifier
assertImportDefaultSpecifier: ( opts?: object) => asserts this is NodePath<t.ImportDefaultSpecifier>;
method assertImportNamespaceSpecifier
assertImportNamespaceSpecifier: ( opts?: object) => asserts this is NodePath<t.ImportNamespaceSpecifier>;
method assertImportSpecifier
assertImportSpecifier: ( opts?: object) => asserts this is NodePath<t.ImportSpecifier>;
method assertIndexedAccessType
assertIndexedAccessType: ( opts?: object) => asserts this is NodePath<t.IndexedAccessType>;
method assertInferredPredicate
assertInferredPredicate: ( opts?: object) => asserts this is NodePath<t.InferredPredicate>;
method assertInterfaceDeclaration
assertInterfaceDeclaration: ( opts?: object) => asserts this is NodePath<t.InterfaceDeclaration>;
method assertInterfaceExtends
assertInterfaceExtends: ( opts?: object) => asserts this is NodePath<t.InterfaceExtends>;
method assertInterfaceTypeAnnotation
assertInterfaceTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.InterfaceTypeAnnotation>;
method assertInterpreterDirective
assertInterpreterDirective: ( opts?: object) => asserts this is NodePath<t.InterpreterDirective>;
method assertIntersectionTypeAnnotation
assertIntersectionTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.IntersectionTypeAnnotation>;
method assertJSX
assertJSX: (opts?: object) => asserts this is NodePath<t.JSX>;
method assertJSXAttribute
assertJSXAttribute: (opts?: object) => asserts this is NodePath<t.JSXAttribute>;
method assertJSXClosingElement
assertJSXClosingElement: ( opts?: object) => asserts this is NodePath<t.JSXClosingElement>;
method assertJSXClosingFragment
assertJSXClosingFragment: ( opts?: object) => asserts this is NodePath<t.JSXClosingFragment>;
method assertJSXElement
assertJSXElement: (opts?: object) => asserts this is NodePath<t.JSXElement>;
method assertJSXEmptyExpression
assertJSXEmptyExpression: ( opts?: object) => asserts this is NodePath<t.JSXEmptyExpression>;
method assertJSXExpressionContainer
assertJSXExpressionContainer: ( opts?: object) => asserts this is NodePath<t.JSXExpressionContainer>;
method assertJSXFragment
assertJSXFragment: (opts?: object) => asserts this is NodePath<t.JSXFragment>;
method assertJSXIdentifier
assertJSXIdentifier: ( opts?: object) => asserts this is NodePath<t.JSXIdentifier>;
method assertJSXMemberExpression
assertJSXMemberExpression: ( opts?: object) => asserts this is NodePath<t.JSXMemberExpression>;
method assertJSXNamespacedName
assertJSXNamespacedName: ( opts?: object) => asserts this is NodePath<t.JSXNamespacedName>;
method assertJSXOpeningElement
assertJSXOpeningElement: ( opts?: object) => asserts this is NodePath<t.JSXOpeningElement>;
method assertJSXOpeningFragment
assertJSXOpeningFragment: ( opts?: object) => asserts this is NodePath<t.JSXOpeningFragment>;
method assertJSXSpreadAttribute
assertJSXSpreadAttribute: ( opts?: object) => asserts this is NodePath<t.JSXSpreadAttribute>;
method assertJSXSpreadChild
assertJSXSpreadChild: ( opts?: object) => asserts this is NodePath<t.JSXSpreadChild>;
method assertJSXText
assertJSXText: (opts?: object) => asserts this is NodePath<t.JSXText>;
method assertLabeledStatement
assertLabeledStatement: ( opts?: object) => asserts this is NodePath<t.LabeledStatement>;
method assertLiteral
assertLiteral: (opts?: object) => asserts this is NodePath<t.Literal>;
method assertLogicalExpression
assertLogicalExpression: ( opts?: object) => asserts this is NodePath<t.LogicalExpression>;
method assertLoop
assertLoop: (opts?: object) => asserts this is NodePath<t.Loop>;
method assertLVal
assertLVal: (opts?: object) => asserts this is NodePath<t.LVal>;
method assertMemberExpression
assertMemberExpression: ( opts?: object) => asserts this is NodePath<t.MemberExpression>;
method assertMetaProperty
assertMetaProperty: (opts?: object) => asserts this is NodePath<t.MetaProperty>;
method assertMethod
assertMethod: (opts?: object) => asserts this is NodePath<t.Method>;
method assertMiscellaneous
assertMiscellaneous: ( opts?: object) => asserts this is NodePath<t.Miscellaneous>;
method assertMixedTypeAnnotation
assertMixedTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.MixedTypeAnnotation>;
method assertModuleDeclaration
assertModuleDeclaration: ( opts?: object) => asserts this is NodePath<t.ModuleDeclaration>;
method assertModuleExpression
assertModuleExpression: ( opts?: object) => asserts this is NodePath<t.ModuleExpression>;
method assertModuleSpecifier
assertModuleSpecifier: ( opts?: object) => asserts this is NodePath<t.ModuleSpecifier>;
method assertNewExpression
assertNewExpression: ( opts?: object) => asserts this is NodePath<t.NewExpression>;
method assertNoop
assertNoop: (opts?: object) => asserts this is NodePath<t.Noop>;
method assertNullableTypeAnnotation
assertNullableTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.NullableTypeAnnotation>;
method assertNullLiteral
assertNullLiteral: (opts?: object) => asserts this is NodePath<t.NullLiteral>;
method assertNullLiteralTypeAnnotation
assertNullLiteralTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.NullLiteralTypeAnnotation>;
method assertNumberLiteral
assertNumberLiteral: ( opts?: object) => asserts this is NodePath<t.NumberLiteral>;
Deprecated
Use
assertNumericLiteral
method assertNumberLiteralTypeAnnotation
assertNumberLiteralTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.NumberLiteralTypeAnnotation>;
method assertNumberTypeAnnotation
assertNumberTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.NumberTypeAnnotation>;
method assertNumericLiteral
assertNumericLiteral: ( opts?: object) => asserts this is NodePath<t.NumericLiteral>;
method assertObjectExpression
assertObjectExpression: ( opts?: object) => asserts this is NodePath<t.ObjectExpression>;
method assertObjectMember
assertObjectMember: (opts?: object) => asserts this is NodePath<t.ObjectMember>;
method assertObjectMethod
assertObjectMethod: (opts?: object) => asserts this is NodePath<t.ObjectMethod>;
method assertObjectPattern
assertObjectPattern: ( opts?: object) => asserts this is NodePath<t.ObjectPattern>;
method assertObjectProperty
assertObjectProperty: ( opts?: object) => asserts this is NodePath<t.ObjectProperty>;
method assertObjectTypeAnnotation
assertObjectTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.ObjectTypeAnnotation>;
method assertObjectTypeCallProperty
assertObjectTypeCallProperty: ( opts?: object) => asserts this is NodePath<t.ObjectTypeCallProperty>;
method assertObjectTypeIndexer
assertObjectTypeIndexer: ( opts?: object) => asserts this is NodePath<t.ObjectTypeIndexer>;
method assertObjectTypeInternalSlot
assertObjectTypeInternalSlot: ( opts?: object) => asserts this is NodePath<t.ObjectTypeInternalSlot>;
method assertObjectTypeProperty
assertObjectTypeProperty: ( opts?: object) => asserts this is NodePath<t.ObjectTypeProperty>;
method assertObjectTypeSpreadProperty
assertObjectTypeSpreadProperty: ( opts?: object) => asserts this is NodePath<t.ObjectTypeSpreadProperty>;
method assertOpaqueType
assertOpaqueType: (opts?: object) => asserts this is NodePath<t.OpaqueType>;
method assertOptionalCallExpression
assertOptionalCallExpression: ( opts?: object) => asserts this is NodePath<t.OptionalCallExpression>;
method assertOptionalIndexedAccessType
assertOptionalIndexedAccessType: ( opts?: object) => asserts this is NodePath<t.OptionalIndexedAccessType>;
method assertOptionalMemberExpression
assertOptionalMemberExpression: ( opts?: object) => asserts this is NodePath<t.OptionalMemberExpression>;
method assertParenthesizedExpression
assertParenthesizedExpression: ( opts?: object) => asserts this is NodePath<t.ParenthesizedExpression>;
method assertPattern
assertPattern: (opts?: object) => asserts this is NodePath<t.Pattern>;
method assertPatternLike
assertPatternLike: (opts?: object) => asserts this is NodePath<t.PatternLike>;
method assertPipelineBareFunction
assertPipelineBareFunction: ( opts?: object) => asserts this is NodePath<t.PipelineBareFunction>;
method assertPipelinePrimaryTopicReference
assertPipelinePrimaryTopicReference: ( opts?: object) => asserts this is NodePath<t.PipelinePrimaryTopicReference>;
method assertPipelineTopicExpression
assertPipelineTopicExpression: ( opts?: object) => asserts this is NodePath<t.PipelineTopicExpression>;
method assertPlaceholder
assertPlaceholder: (opts?: object) => asserts this is NodePath<t.Placeholder>;
method assertPrivate
assertPrivate: (opts?: object) => asserts this is NodePath<t.Private>;
method assertPrivateName
assertPrivateName: (opts?: object) => asserts this is NodePath<t.PrivateName>;
method assertProgram
assertProgram: (opts?: object) => asserts this is NodePath<t.Program>;
method assertProperty
assertProperty: (opts?: object) => asserts this is NodePath<t.Property>;
method assertPureish
assertPureish: (opts?: object) => asserts this is NodePath<t.Pureish>;
method assertQualifiedTypeIdentifier
assertQualifiedTypeIdentifier: ( opts?: object) => asserts this is NodePath<t.QualifiedTypeIdentifier>;
method assertRecordExpression
assertRecordExpression: ( opts?: object) => asserts this is NodePath<t.RecordExpression>;
method assertRegexLiteral
assertRegexLiteral: (opts?: object) => asserts this is NodePath<t.RegexLiteral>;
Deprecated
Use
assertRegExpLiteral
method assertRegExpLiteral
assertRegExpLiteral: ( opts?: object) => asserts this is NodePath<t.RegExpLiteral>;
method assertRestElement
assertRestElement: (opts?: object) => asserts this is NodePath<t.RestElement>;
method assertRestProperty
assertRestProperty: (opts?: object) => asserts this is NodePath<t.RestProperty>;
Deprecated
Use
assertRestElement
method assertReturnStatement
assertReturnStatement: ( opts?: object) => asserts this is NodePath<t.ReturnStatement>;
method assertScopable
assertScopable: (opts?: object) => asserts this is NodePath<t.Scopable>;
method assertSequenceExpression
assertSequenceExpression: ( opts?: object) => asserts this is NodePath<t.SequenceExpression>;
method assertSpreadElement
assertSpreadElement: ( opts?: object) => asserts this is NodePath<t.SpreadElement>;
method assertSpreadProperty
assertSpreadProperty: ( opts?: object) => asserts this is NodePath<t.SpreadProperty>;
Deprecated
Use
assertSpreadElement
method assertStandardized
assertStandardized: (opts?: object) => asserts this is NodePath<t.Standardized>;
method assertStatement
assertStatement: (opts?: object) => asserts this is NodePath<t.Statement>;
method assertStaticBlock
assertStaticBlock: (opts?: object) => asserts this is NodePath<t.StaticBlock>;
method assertStringLiteral
assertStringLiteral: ( opts?: object) => asserts this is NodePath<t.StringLiteral>;
method assertStringLiteralTypeAnnotation
assertStringLiteralTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.StringLiteralTypeAnnotation>;
method assertStringTypeAnnotation
assertStringTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.StringTypeAnnotation>;
method assertSuper
assertSuper: (opts?: object) => asserts this is NodePath<t.Super>;
method assertSwitchCase
assertSwitchCase: (opts?: object) => asserts this is NodePath<t.SwitchCase>;
method assertSwitchStatement
assertSwitchStatement: ( opts?: object) => asserts this is NodePath<t.SwitchStatement>;
method assertSymbolTypeAnnotation
assertSymbolTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.SymbolTypeAnnotation>;
method assertTaggedTemplateExpression
assertTaggedTemplateExpression: ( opts?: object) => asserts this is NodePath<t.TaggedTemplateExpression>;
method assertTemplateElement
assertTemplateElement: ( opts?: object) => asserts this is NodePath<t.TemplateElement>;
method assertTemplateLiteral
assertTemplateLiteral: ( opts?: object) => asserts this is NodePath<t.TemplateLiteral>;
method assertTerminatorless
assertTerminatorless: ( opts?: object) => asserts this is NodePath<t.Terminatorless>;
method assertThisExpression
assertThisExpression: ( opts?: object) => asserts this is NodePath<t.ThisExpression>;
method assertThisTypeAnnotation
assertThisTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.ThisTypeAnnotation>;
method assertThrowStatement
assertThrowStatement: ( opts?: object) => asserts this is NodePath<t.ThrowStatement>;
method assertTopicReference
assertTopicReference: ( opts?: object) => asserts this is NodePath<t.TopicReference>;
method assertTryStatement
assertTryStatement: (opts?: object) => asserts this is NodePath<t.TryStatement>;
method assertTSAnyKeyword
assertTSAnyKeyword: (opts?: object) => asserts this is NodePath<t.TSAnyKeyword>;
method assertTSArrayType
assertTSArrayType: (opts?: object) => asserts this is NodePath<t.TSArrayType>;
method assertTSAsExpression
assertTSAsExpression: ( opts?: object) => asserts this is NodePath<t.TSAsExpression>;
method assertTSBaseType
assertTSBaseType: (opts?: object) => asserts this is NodePath<t.TSBaseType>;
method assertTSBigIntKeyword
assertTSBigIntKeyword: ( opts?: object) => asserts this is NodePath<t.TSBigIntKeyword>;
method assertTSBooleanKeyword
assertTSBooleanKeyword: ( opts?: object) => asserts this is NodePath<t.TSBooleanKeyword>;
method assertTSCallSignatureDeclaration
assertTSCallSignatureDeclaration: ( opts?: object) => asserts this is NodePath<t.TSCallSignatureDeclaration>;
method assertTSConditionalType
assertTSConditionalType: ( opts?: object) => asserts this is NodePath<t.TSConditionalType>;
method assertTSConstructorType
assertTSConstructorType: ( opts?: object) => asserts this is NodePath<t.TSConstructorType>;
method assertTSConstructSignatureDeclaration
assertTSConstructSignatureDeclaration: ( opts?: object) => asserts this is NodePath<t.TSConstructSignatureDeclaration>;
method assertTSDeclareFunction
assertTSDeclareFunction: ( opts?: object) => asserts this is NodePath<t.TSDeclareFunction>;
method assertTSDeclareMethod
assertTSDeclareMethod: ( opts?: object) => asserts this is NodePath<t.TSDeclareMethod>;
method assertTSEntityName
assertTSEntityName: (opts?: object) => asserts this is NodePath<t.TSEntityName>;
method assertTSEnumDeclaration
assertTSEnumDeclaration: ( opts?: object) => asserts this is NodePath<t.TSEnumDeclaration>;
method assertTSEnumMember
assertTSEnumMember: (opts?: object) => asserts this is NodePath<t.TSEnumMember>;
method assertTSExportAssignment
assertTSExportAssignment: ( opts?: object) => asserts this is NodePath<t.TSExportAssignment>;
method assertTSExpressionWithTypeArguments
assertTSExpressionWithTypeArguments: ( opts?: object) => asserts this is NodePath<t.TSExpressionWithTypeArguments>;
method assertTSExternalModuleReference
assertTSExternalModuleReference: ( opts?: object) => asserts this is NodePath<t.TSExternalModuleReference>;
method assertTSFunctionType
assertTSFunctionType: ( opts?: object) => asserts this is NodePath<t.TSFunctionType>;
method assertTSImportEqualsDeclaration
assertTSImportEqualsDeclaration: ( opts?: object) => asserts this is NodePath<t.TSImportEqualsDeclaration>;
method assertTSImportType
assertTSImportType: (opts?: object) => asserts this is NodePath<t.TSImportType>;
method assertTSIndexedAccessType
assertTSIndexedAccessType: ( opts?: object) => asserts this is NodePath<t.TSIndexedAccessType>;
method assertTSIndexSignature
assertTSIndexSignature: ( opts?: object) => asserts this is NodePath<t.TSIndexSignature>;
method assertTSInferType
assertTSInferType: (opts?: object) => asserts this is NodePath<t.TSInferType>;
method assertTSInstantiationExpression
assertTSInstantiationExpression: ( opts?: object) => asserts this is NodePath<t.TSInstantiationExpression>;
method assertTSInterfaceBody
assertTSInterfaceBody: ( opts?: object) => asserts this is NodePath<t.TSInterfaceBody>;
method assertTSInterfaceDeclaration
assertTSInterfaceDeclaration: ( opts?: object) => asserts this is NodePath<t.TSInterfaceDeclaration>;
method assertTSIntersectionType
assertTSIntersectionType: ( opts?: object) => asserts this is NodePath<t.TSIntersectionType>;
method assertTSIntrinsicKeyword
assertTSIntrinsicKeyword: ( opts?: object) => asserts this is NodePath<t.TSIntrinsicKeyword>;
method assertTSLiteralType
assertTSLiteralType: ( opts?: object) => asserts this is NodePath<t.TSLiteralType>;
method assertTSMappedType
assertTSMappedType: (opts?: object) => asserts this is NodePath<t.TSMappedType>;
method assertTSMethodSignature
assertTSMethodSignature: ( opts?: object) => asserts this is NodePath<t.TSMethodSignature>;
method assertTSModuleBlock
assertTSModuleBlock: ( opts?: object) => asserts this is NodePath<t.TSModuleBlock>;
method assertTSModuleDeclaration
assertTSModuleDeclaration: ( opts?: object) => asserts this is NodePath<t.TSModuleDeclaration>;
method assertTSNamedTupleMember
assertTSNamedTupleMember: ( opts?: object) => asserts this is NodePath<t.TSNamedTupleMember>;
method assertTSNamespaceExportDeclaration
assertTSNamespaceExportDeclaration: ( opts?: object) => asserts this is NodePath<t.TSNamespaceExportDeclaration>;
method assertTSNeverKeyword
assertTSNeverKeyword: ( opts?: object) => asserts this is NodePath<t.TSNeverKeyword>;
method assertTSNonNullExpression
assertTSNonNullExpression: ( opts?: object) => asserts this is NodePath<t.TSNonNullExpression>;
method assertTSNullKeyword
assertTSNullKeyword: ( opts?: object) => asserts this is NodePath<t.TSNullKeyword>;
method assertTSNumberKeyword
assertTSNumberKeyword: ( opts?: object) => asserts this is NodePath<t.TSNumberKeyword>;
method assertTSObjectKeyword
assertTSObjectKeyword: ( opts?: object) => asserts this is NodePath<t.TSObjectKeyword>;
method assertTSOptionalType
assertTSOptionalType: ( opts?: object) => asserts this is NodePath<t.TSOptionalType>;
method assertTSParameterProperty
assertTSParameterProperty: ( opts?: object) => asserts this is NodePath<t.TSParameterProperty>;
method assertTSParenthesizedType
assertTSParenthesizedType: ( opts?: object) => asserts this is NodePath<t.TSParenthesizedType>;
method assertTSPropertySignature
assertTSPropertySignature: ( opts?: object) => asserts this is NodePath<t.TSPropertySignature>;
method assertTSQualifiedName
assertTSQualifiedName: ( opts?: object) => asserts this is NodePath<t.TSQualifiedName>;
method assertTSRestType
assertTSRestType: (opts?: object) => asserts this is NodePath<t.TSRestType>;
method assertTSSatisfiesExpression
assertTSSatisfiesExpression: ( opts?: object) => asserts this is NodePath<t.TSSatisfiesExpression>;
method assertTSStringKeyword
assertTSStringKeyword: ( opts?: object) => asserts this is NodePath<t.TSStringKeyword>;
method assertTSSymbolKeyword
assertTSSymbolKeyword: ( opts?: object) => asserts this is NodePath<t.TSSymbolKeyword>;
method assertTSThisType
assertTSThisType: (opts?: object) => asserts this is NodePath<t.TSThisType>;
method assertTSTupleType
assertTSTupleType: (opts?: object) => asserts this is NodePath<t.TSTupleType>;
method assertTSType
assertTSType: (opts?: object) => asserts this is NodePath<t.TSType>;
method assertTSTypeAliasDeclaration
assertTSTypeAliasDeclaration: ( opts?: object) => asserts this is NodePath<t.TSTypeAliasDeclaration>;
method assertTSTypeAnnotation
assertTSTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.TSTypeAnnotation>;
method assertTSTypeAssertion
assertTSTypeAssertion: ( opts?: object) => asserts this is NodePath<t.TSTypeAssertion>;
method assertTSTypeElement
assertTSTypeElement: ( opts?: object) => asserts this is NodePath<t.TSTypeElement>;
method assertTSTypeLiteral
assertTSTypeLiteral: ( opts?: object) => asserts this is NodePath<t.TSTypeLiteral>;
method assertTSTypeOperator
assertTSTypeOperator: ( opts?: object) => asserts this is NodePath<t.TSTypeOperator>;
method assertTSTypeParameter
assertTSTypeParameter: ( opts?: object) => asserts this is NodePath<t.TSTypeParameter>;
method assertTSTypeParameterDeclaration
assertTSTypeParameterDeclaration: ( opts?: object) => asserts this is NodePath<t.TSTypeParameterDeclaration>;
method assertTSTypeParameterInstantiation
assertTSTypeParameterInstantiation: ( opts?: object) => asserts this is NodePath<t.TSTypeParameterInstantiation>;
method assertTSTypePredicate
assertTSTypePredicate: ( opts?: object) => asserts this is NodePath<t.TSTypePredicate>;
method assertTSTypeQuery
assertTSTypeQuery: (opts?: object) => asserts this is NodePath<t.TSTypeQuery>;
method assertTSTypeReference
assertTSTypeReference: ( opts?: object) => asserts this is NodePath<t.TSTypeReference>;
method assertTSUndefinedKeyword
assertTSUndefinedKeyword: ( opts?: object) => asserts this is NodePath<t.TSUndefinedKeyword>;
method assertTSUnionType
assertTSUnionType: (opts?: object) => asserts this is NodePath<t.TSUnionType>;
method assertTSUnknownKeyword
assertTSUnknownKeyword: ( opts?: object) => asserts this is NodePath<t.TSUnknownKeyword>;
method assertTSVoidKeyword
assertTSVoidKeyword: ( opts?: object) => asserts this is NodePath<t.TSVoidKeyword>;
method assertTupleExpression
assertTupleExpression: ( opts?: object) => asserts this is NodePath<t.TupleExpression>;
method assertTupleTypeAnnotation
assertTupleTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.TupleTypeAnnotation>;
method assertTypeAlias
assertTypeAlias: (opts?: object) => asserts this is NodePath<t.TypeAlias>;
method assertTypeAnnotation
assertTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.TypeAnnotation>;
method assertTypeCastExpression
assertTypeCastExpression: ( opts?: object) => asserts this is NodePath<t.TypeCastExpression>;
method assertTypeofTypeAnnotation
assertTypeofTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.TypeofTypeAnnotation>;
method assertTypeParameter
assertTypeParameter: ( opts?: object) => asserts this is NodePath<t.TypeParameter>;
method assertTypeParameterDeclaration
assertTypeParameterDeclaration: ( opts?: object) => asserts this is NodePath<t.TypeParameterDeclaration>;
method assertTypeParameterInstantiation
assertTypeParameterInstantiation: ( opts?: object) => asserts this is NodePath<t.TypeParameterInstantiation>;
method assertTypeScript
assertTypeScript: (opts?: object) => asserts this is NodePath<t.TypeScript>;
method assertUnaryExpression
assertUnaryExpression: ( opts?: object) => asserts this is NodePath<t.UnaryExpression>;
method assertUnaryLike
assertUnaryLike: (opts?: object) => asserts this is NodePath<t.UnaryLike>;
method assertUnionTypeAnnotation
assertUnionTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.UnionTypeAnnotation>;
method assertUpdateExpression
assertUpdateExpression: ( opts?: object) => asserts this is NodePath<t.UpdateExpression>;
method assertUserWhitespacable
assertUserWhitespacable: ( opts?: object) => asserts this is NodePath<t.UserWhitespacable>;
method assertV8IntrinsicIdentifier
assertV8IntrinsicIdentifier: ( opts?: object) => asserts this is NodePath<t.V8IntrinsicIdentifier>;
method assertVariableDeclaration
assertVariableDeclaration: ( opts?: object) => asserts this is NodePath<t.VariableDeclaration>;
method assertVariableDeclarator
assertVariableDeclarator: ( opts?: object) => asserts this is NodePath<t.VariableDeclarator>;
method assertVariance
assertVariance: (opts?: object) => asserts this is NodePath<t.Variance>;
method assertVoidTypeAnnotation
assertVoidTypeAnnotation: ( opts?: object) => asserts this is NodePath<t.VoidTypeAnnotation>;
method assertWhile
assertWhile: (opts?: object) => asserts this is NodePath<t.While>;
method assertWhileStatement
assertWhileStatement: ( opts?: object) => asserts this is NodePath<t.WhileStatement>;
method assertWithStatement
assertWithStatement: ( opts?: object) => asserts this is NodePath<t.WithStatement>;
method assertYieldExpression
assertYieldExpression: ( opts?: object) => asserts this is NodePath<t.YieldExpression>;
method baseTypeStrictlyMatches
baseTypeStrictlyMatches: (rightArg: NodePath) => boolean;
method buildCodeFrameError
buildCodeFrameError: (msg: string, Error?: ErrorConstructor) => Error;
method call
call: (key: string) => boolean;
method canHaveVariableDeclarationOrExpression
canHaveVariableDeclarationOrExpression: () => 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.
method canSwapBetweenExpressionAndStatement
canSwapBetweenExpressionAndStatement: (replacement: Node) => 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.
method couldBeBaseType
couldBeBaseType: (name: string) => boolean;
method debug
debug: (buildMessage: () => string) => void;
method ensureBlock
ensureBlock: ( this: NodePath< | t.Loop | t.WithStatement | t.Function | t.LabeledStatement | t.CatchClause >) => asserts this is NodePath<T & { body: t.BlockStatement }>;
method equals
equals: (key: string, value: any) => boolean;
Check whether the path node
key
strict equalsvalue
.
method evaluate
evaluate: () => { confident: boolean; value: any; deopt?: NodePath };
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 casedeopt
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 }
method evaluateTruthy
evaluateTruthy: () => boolean | undefined;
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 andundefined
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.
method find
find: (callback: (path: NodePath) => boolean) => NodePath | null;
Starting at current
NodePath
and going up the tree, return the firstNodePath
that causes the providedcallback
to return a truthy value, ornull
if thecallback
never returns a truthy value.
method findParent
findParent: (callback: (path: NodePath) => boolean) => NodePath | null;
Starting at the parent path of the current
NodePath
and going up the tree, return the firstNodePath
that causes the providedcallback
to return a truthy value, ornull
if thecallback
never returns a truthy value.
method get
static get: { <C extends Node, K extends keyof C>(opts: { hub?: HubInterface; parentPath: NodePath | null; parent: Node; container: C; key: K; }): NodePath<C[K]>; <C extends Node, L extends NodeKeyOfArrays<C>>(opts: { hub?: HubInterface; parentPath: NodePath<Node>; parent: Node; container: C; listKey: L; key: number; }): C[L] extends any[] ? NodePath<C[L][number]> : never;};
method getAllNextSiblings
getAllNextSiblings: () => NodePath[];
method getAllPrevSiblings
getAllPrevSiblings: () => NodePath[];
method getAncestry
getAncestry: () => [this, ...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.
method getBindingIdentifierPaths
getBindingIdentifierPaths: { (duplicates: true, outerOnly?: boolean): Record< string, Array<NodePath<t.Identifier>> >; (duplicates?: false, outerOnly?: boolean): Record< string, NodePath<t.Identifier> >; (duplicates?: boolean, outerOnly?: boolean): Record< string, NodePath<t.Identifier> | NodePath<t.Identifier>[] >;};
method getBindingIdentifiers
getBindingIdentifiers: { (duplicates: true): Record<string, t.Identifier[]>; (duplicates?: false): Record<string, t.Identifier>; (duplicates?: boolean): Record<string, any>;};
method getCompletionRecords
getCompletionRecords: () => NodePath[];
method getData
getData: (key: string | symbol, def?: any) => any;
method getDeepestCommonAncestorFrom
getDeepestCommonAncestorFrom: ( paths: NodePath[], filter?: (deepest: Node, i: number, ancestries: NodePath[][]) => NodePath) => NodePath;
Get the earliest path in the tree where the provided
paths
intersect.
method getEarliestCommonAncestorFrom
getEarliestCommonAncestorFrom: (paths: NodePath[]) => NodePath;
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.
method getFunctionParent
getFunctionParent: () => NodePath<t.Function> | null;
Get the parent function of the current path.
method getNextSibling
getNextSibling: () => NodePath;
method getOpposite
getOpposite: () => NodePath | null;
method getOuterBindingIdentifierPaths
getOuterBindingIdentifierPaths: { (duplicates: true): Record<string, Array<NodePath<t.Identifier>>>; (duplicates?: false): Record<string, NodePath<t.Identifier>>; (duplicates?: boolean, outerOnly?: boolean): Record< string, NodePath<t.Identifier> | NodePath<t.Identifier>[] >;};
method getOuterBindingIdentifiers
getOuterBindingIdentifiers: { (duplicates: true): Record<string, t.Identifier[]>; (duplicates?: false): Record<string, t.Identifier>; (duplicates?: boolean): Record<string, any>;};
method getPathLocation
getPathLocation: () => string;
method getPrevSibling
getPrevSibling: () => NodePath;
method getScope
getScope: (scope: Scope) => Scope;
method getSibling
getSibling: (key: string | number) => NodePath;
method getSource
getSource: () => string;
Get the source code associated with this node.
method getStatementParent
getStatementParent: () => NodePath<t.Statement> | null;
Walk up the tree until we hit a parent node path in a list.
method getTypeAnnotation
getTypeAnnotation: () => t.FlowType | t.TSType;
Infer the type of the current
NodePath
.
method has
has: (key: string) => boolean;
Check whether we have the input
key
. If thekey
references an array then we check if the array has any items, otherwise we just check if it's falsy.
method hasNode
hasNode: () => this is NodePath<Exclude<T, null>>;
method hoist
hoist: (scope: Scope) => void;
Hoist the current node to the highest scope possible and return a UID referencing it.
method insertAfter
insertAfter: <Nodes extends unknown>(nodes: Nodes) => NodePaths<Nodes>;
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.
method insertBefore
insertBefore: <Nodes extends unknown>(nodes: Nodes) => NodePaths<Nodes>;
Insert the provided nodes before the current one.
method inType
inType: (...candidateTypes: string[]) => boolean;
method is
is: (key: string) => boolean;
Alias of
has
.
method isAccessor
isAccessor: (opts?: object) => this is NodePath<t.Accessor>;
method isAncestor
isAncestor: (maybeDescendant: NodePath) => boolean;
A helper to find if
this
path is an ancestor ofmaybeDescendant
method isAnyTypeAnnotation
isAnyTypeAnnotation: (opts?: object) => this is NodePath<t.AnyTypeAnnotation>;
method isArgumentPlaceholder
isArgumentPlaceholder: ( opts?: object) => this is NodePath<t.ArgumentPlaceholder>;
method isArrayExpression
isArrayExpression: (opts?: object) => this is NodePath<t.ArrayExpression>;
method isArrayPattern
isArrayPattern: (opts?: object) => this is NodePath<t.ArrayPattern>;
method isArrayTypeAnnotation
isArrayTypeAnnotation: ( opts?: object) => this is NodePath<t.ArrayTypeAnnotation>;
method isArrowFunctionExpression
isArrowFunctionExpression: ( opts?: object) => this is NodePath<t.ArrowFunctionExpression>;
method isAssignmentExpression
isAssignmentExpression: ( opts?: object) => this is NodePath<t.AssignmentExpression>;
method isAssignmentPattern
isAssignmentPattern: (opts?: object) => this is NodePath<t.AssignmentPattern>;
method isAwaitExpression
isAwaitExpression: (opts?: object) => this is NodePath<t.AwaitExpression>;
method isBaseType
isBaseType: (baseName: string, soft?: boolean) => boolean;
method isBigIntLiteral
isBigIntLiteral: (opts?: object) => this is NodePath<t.BigIntLiteral>;
method isBinary
isBinary: (opts?: object) => this is NodePath<t.Binary>;
method isBinaryExpression
isBinaryExpression: (opts?: object) => this is NodePath<t.BinaryExpression>;
method isBindExpression
isBindExpression: (opts?: object) => this is NodePath<t.BindExpression>;
method isBindingIdentifier
isBindingIdentifier: (opts?: object) => this is NodePath<t.Identifier>;
method isBlacklisted
isBlacklisted: () => boolean;
Deprecated
will be removed in Babel 8
method isBlock
isBlock: (opts?: object) => this is NodePath<t.Block>;
method isBlockParent
isBlockParent: (opts?: object) => this is NodePath<t.BlockParent>;
method isBlockScoped
isBlockScoped: (opts?: object) => this is NodePath<any>;
method isBlockStatement
isBlockStatement: (opts?: object) => this is NodePath<t.BlockStatement>;
method isBooleanLiteral
isBooleanLiteral: (opts?: object) => this is NodePath<t.BooleanLiteral>;
method isBooleanLiteralTypeAnnotation
isBooleanLiteralTypeAnnotation: ( opts?: object) => this is NodePath<t.BooleanLiteralTypeAnnotation>;
method isBooleanTypeAnnotation
isBooleanTypeAnnotation: ( opts?: object) => this is NodePath<t.BooleanTypeAnnotation>;
method isBreakStatement
isBreakStatement: (opts?: object) => this is NodePath<t.BreakStatement>;
method isCallExpression
isCallExpression: (opts?: object) => this is NodePath<t.CallExpression>;
method isCatchClause
isCatchClause: (opts?: object) => this is NodePath<t.CatchClause>;
method isClass
isClass: (opts?: object) => this is NodePath<t.Class>;
method isClassAccessorProperty
isClassAccessorProperty: ( opts?: object) => this is NodePath<t.ClassAccessorProperty>;
method isClassBody
isClassBody: (opts?: object) => this is NodePath<t.ClassBody>;
method isClassDeclaration
isClassDeclaration: (opts?: object) => this is NodePath<t.ClassDeclaration>;
method isClassExpression
isClassExpression: (opts?: object) => this is NodePath<t.ClassExpression>;
method isClassImplements
isClassImplements: (opts?: object) =>