cache cache : typeof cache
Defined in node_modules/@types/babel__traverse/index.d.ts:26 cheap cheap : ( ( node : Node , enter : ( ( node : Node ) => void ) ) => void )
Defined in node_modules/@types/babel__traverse/index.d.ts:13 clear Node clear Node : ( ( node : Node , opts ?: Options ) => void )
Defined in node_modules/@types/babel__traverse/index.d.ts:22 explode explode : ( < S > ( visitor : Visitor < S > ) => { [ Type in Exclude < Node , t.DeprecatedAliases > [ "type" ] ] ?: VisitNodeObject < S , Extract < Node , { type : Type ; } > > } ) Type declaration < S > ( visitor ) : { [ Type in Exclude < Node , t.DeprecatedAliases > [ "type" ] ] ?: VisitNodeObject < S , Extract < Node , { type : Type ; } > > } Returns { [ Type in Exclude < Node , t.DeprecatedAliases > [ "type" ] ] ?: VisitNodeObject < S , Extract < Node , { type : Type ; } > > } Defined in node_modules/@types/babel__traverse/index.d.ts:11 has Type has Type : ( ( tree : Node , type : | "ImportDefaultSpecifier" | "ImportSpecifier" | "ImportNamespaceSpecifier" | "JSXElement" | "ArrayExpression" | "ArrowFunctionExpression" | "AssignmentExpression" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "BindExpression" | "BooleanLiteral" | "CallExpression" | "ClassExpression" | "ConditionalExpression" | "DecimalLiteral" | "DoExpression" | "FunctionExpression" | "Identifier" | "Import" | "ImportExpression" | "JSXFragment" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "ModuleExpression" | "NewExpression" | "NullLiteral" | "NumericLiteral" | "ObjectExpression" | "OptionalCallExpression" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "RecordExpression" | "RegExpLiteral" | "SequenceExpression" | "StringLiteral" | "Super" | "TSAsExpression" | "TSInstantiationExpression" | "TSNonNullExpression" | "TSSatisfiesExpression" | "TSTypeAssertion" | "TaggedTemplateExpression" | "TemplateLiteral" | "ThisExpression" | "TopicReference" | "TupleExpression" | "TypeCastExpression" | "UnaryExpression" | "UpdateExpression" | "YieldExpression" | "JSXIdentifier" | "JSXMemberExpression" | "PrivateName" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayPattern" | "ArrayTypeAnnotation" | "AssignmentPattern" | "BlockStatement" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CatchClause" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ContinueStatement" | "DebuggerStatement" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "IfStatement" | "ImportAttribute" | "ImportDeclaration" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "MixedTypeAnnotation" | "Noop" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalIndexedAccessType" | "Placeholder" | "Program" | "QualifiedTypeIdentifier" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SpreadElement" | "SpreadProperty" | "StaticBlock" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSStringKeyword" | "TSSymbolKeyword" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TemplateElement" | "ThisTypeAnnotation" | "ThrowStatement" | "TryStatement" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnionTypeAnnotation" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement" , denylistTypes ?: string [] ) => boolean )
Defined in node_modules/@types/babel__traverse/index.d.ts:24 node node : ( ( node : Node , opts : TraverseOptions < Node > , scope ?: Scope , state ?: any , path ?: NodePath < Node > , skipKeys ?: Record < string , boolean > ) => void )
Defined in node_modules/@types/babel__traverse/index.d.ts:14 remove Properties remove Properties : ( ( tree : Node , opts ?: Options ) => Node )
Defined in node_modules/@types/babel__traverse/index.d.ts:23 verify verify : ( ( visitor : Visitor < unknown > ) => void )
Defined in node_modules/@types/babel__traverse/index.d.ts:10 visitors visitors : typeof visitors
Defined in node_modules/@types/babel__traverse/index.d.ts:9
explode()
will take aVisitor
object with all of the various shorthands that we support, and validates & normalizes it into a common format, ready to be used in traversal.The various shorthands are:
Identifier() { ... }
->Identifier: { enter() { ... } }
"Identifier|NumericLiteral": { ... }
->Identifier: { ... }, NumericLiteral: { ... }
@babel/types
: e.g.Property: { ... }
->ObjectProperty: { ... }, ClassProperty: { ... }
Other normalizations are:
enter
andexit
functions are wrapped in arrays, to ease merging of visitors