jscodeshift provides 278 node types which are mapped to their corresponding node type in ast-types. This is a comprehensive list of each node type used in jscodeshift.
For an easier approach to identifying the AST node type in a piece of code, please refer to AST Explorer.
AnyTypeAnnotation
A type annotation representing any type.
ArrayExpression
Represents an array literal.
ArrayPattern
A pattern that matches an array from a destructuring assignment.
ArrayTypeAnnotation
A type annotation for arrays.
ArrowFunctionExpression
An arrow function expression.
AssignmentExpression
Represents an assignment expression.
AssignmentPattern
A pattern that matches an assignment from a destructuring assignment.
AwaitExpression
Represents an await expression.
BigIntLiteral
A literal representing a big integer.
BigIntLiteralTypeAnnotation
A type annotation for big integer literals.
BigIntTypeAnnotation
A type annotation for big integers.
BinaryExpression
Represents a binary expression.
BindExpression
Represents a bind expression.
Block
A comment block.
BlockStatement
Represents a block statement.
BooleanLiteral
A literal representing a boolean value.
BooleanLiteralTypeAnnotation
A type annotation for boolean literals.
BooleanTypeAnnotation
A type annotation for boolean values.
BreakStatement
Represents a break statement.
CallExpression
Represents a call expression.
CatchClause
Represents a catch clause in a try statement.
ChainElement
An element of a chain expression.
ChainExpression
Represents a chain expression.
ClassBody
Represents the body of a class, which contains method definitions.
ClassDeclaration
Represents a class declaration.
ClassExpression
Represents a class expression.
ClassImplements
Represents an implementation of a class.
ClassMethod
Represents a method of a class.
ClassPrivateMethod
Represents a
private method of a class.
ClassPrivateProperty
Represents a private property of a class.
ClassProperty
Represents a property of a class.
ClassPropertyDefinition
Represents a property definition in a class.
Comment
Represents a comment in the code.
CommentBlock
Represents a block comment.
CommentLine
Represents a line comment.
ComprehensionBlock
Represents a comprehension block.
ComprehensionExpression
Represents a comprehension expression.
ConditionalExpression
Represents a conditional expression (ternary).
ContinueStatement
Represents a continue statement.
DebuggerStatement
Represents a debugger statement.
Declaration
Represents a declaration in the code.
DeclareClass
Represents a Flow type declaration for a class.
DeclaredPredicate
Represents a declared predicate in Flow.
DeclareExportAllDeclaration
Represents a Flow type declaration for exporting everything.
DeclareExportDeclaration
Represents a Flow type declaration for exporting.
DeclareFunction
Represents a Flow type declaration for a function.
DeclareInterface
Represents a Flow type declaration for an interface.
DeclareModule
Represents a Flow type declaration for a module.
DeclareModuleExports
Represents a Flow type declaration for module exports.
DeclareOpaqueType
Represents a Flow type declaration for an opaque type.
DeclareTypeAlias
Represents a Flow type declaration for a type alias.
DeclareVariable
Represents a Flow type declaration for a variable.
Decorator
Represents a decorator.
Directive
Represents a directive in a function or a script.
DirectiveLiteral
Represents the value of a directive.
DoExpression
Represents a do expression.
DoWhileStatement
Represents a do…while statement.
EmptyStatement
Represents an empty statement.
EmptyTypeAnnotation
A type annotation for an empty type.
EnumBooleanBody
Represents the body of a boolean enum.
EnumBooleanMember
Represents a member of a boolean enum.
EnumDeclaration
Represents an enum declaration.
EnumDefaultedMember
Represents a defaulted member of an enum.
EnumNumberBody
Represents the body of a number enum.
EnumNumberMember
Represents a member of a number enum.
EnumStringBody
Represents the body of a string enum.
EnumStringMember
Represents a member of a string enum.
EnumSymbolBody
Represents the body of a symbol enum.
ExistentialTypeParam
Represents an existential type parameter in Flow.
ExistsTypeAnnotation
A type annotation for an existential type.
ExportAllDeclaration
Represents an export all declaration.
ExportBatchSpecifier
Represents a batch export specifier.
ExportDeclaration
Represents an export declaration.
ExportDefaultDeclaration
Represents an export default declaration.
ExportDefaultSpecifier
Represents an export default specifier.
ExportNamedDeclaration
Represents a named export declaration.
ExportNamespaceSpecifier
Represents an export namespace specifier.
ExportSpecifier
Represents an export specifier.
Expression
Represents an expression in the code.
ExpressionStatement
Represents an expression statement.
File
Represents a file in the AST.
Flow
Represents a Flow type.
FlowPredicate
Represents a Flow predicate.
FlowType
Represents a Flow type.
ForAwaitStatement
Represents a for-await statement.
ForInStatement
Represents a for-in statement.
ForOfStatement
Represents a for-of statement.
ForStatement
Represents a for statement.
Function
Represents a function in the code.
FunctionDeclaration
Represents a function declaration.
FunctionExpression
Represents a function expression.
FunctionTypeAnnotation
A type annotation for a function.
FunctionTypeParam
Represents a parameter in a function type annotation.
GeneratorExpression
Represents a generator expression.
GenericTypeAnnotation
A type annotation for a generic type.
Identifier
Represents an identifier.
IfStatement
Represents an if statement.
Import
Represents an import expression.
ImportDeclaration
Represents an import declaration.
ImportDefaultSpecifier
Represents a default import specifier.
ImportExpression
Represents an import expression.
ImportNamespaceSpecifier
Represents a namespace import specifier.
ImportSpecifier
Represents an import specifier.
InferredPredicate
Represents an inferred predicate in Flow.
InterfaceDeclaration
Represents an interface declaration.
InterfaceExtends
Represents an extension of an interface.
InterfaceTypeAnnotation
A type annotation for an interface.
InterpreterDirective
Represents an interpreter directive at the top of a script.
IntersectionTypeAnnotation
A type annotation for an intersection type.
JSXAttribute
Represents an attribute in a JSX element.
JSXClosingElement
Represents a closing element in JSX.
JSXClosingFragment
Represents a closing fragment in JSX.
JSXElement
Represents a JSX element.
JSXEmptyExpression
Represents an empty expression in JSX.
JSXExpressionContainer
Represents an expression container in JSX.
JSXFragment
Represents a JSX fragment.
JSXIdentifier
Represents an identifier in JSX.
JSXMemberExpression
Represents a member expression in JSX.
JSXNamespacedName
Represents a namespaced name in JSX.
JSXOpeningElement
Represents an opening element in JSX.
JSXOpeningFragment
Represents an opening fragment in JSX.
JSXSpreadAttribute
Represents a spread attribute in JSX.
JSXSpreadChild
Represents a spread child in JSX.
JSXText
Represents text in JSX.
LabeledStatement
Represents a labeled statement.
Line
Represents a line comment.
Literal
Represents a literal value.
LogicalExpression
Represents a logical expression.
MemberExpression
Represents a member expression.
MemberTypeAnnotation
A type annotation for a member type.
MetaProperty
Represents a meta property.
MethodDefinition
Represents a method definition.
MixedTypeAnnotation
A type annotation for a mixed type.
ModuleSpecifier
Represents a module specifier.
NewExpression
Represents a new expression.
Node
Represents a generic AST node.
Noop
Represents a no-op (no operation) statement.
NullableTypeAnnotation
A type annotation for a nullable type.
NullLiteral
Represents a null literal.
NullLiteralTypeAnnotation
A type annotation for null literals.
NullTypeAnnotation
A type annotation for null types.
NumberLiteralTypeAnnotation
A type annotation for number literals.
NumberTypeAnnotation
A type annotation for number types.
NumericLiteral
Represents a numeric literal.
NumericLiteralTypeAnnotation
A type annotation for numeric literals.
ObjectExpression
Represents an object expression.
ObjectMethod
Represents a method in an object.
ObjectPattern
Represents an object pattern for destructuring.
ObjectProperty
Represents a property in an object.
ObjectTypeAnnotation
A type annotation for object types.
ObjectTypeCallProperty
Represents a call property in an object type annotation.
ObjectTypeIndexer
Represents an indexer in an object type annotation.
ObjectTypeInternalSlot
Represents an internal slot in an object type annotation.
ObjectTypeProperty
Represents a property in an object type annotation.
ObjectTypeSpreadProperty
Represents a spread property in an object type annotation.
OpaqueType
Represents an opaque type.
OptionalCallExpression
Represents an optional call expression.
OptionalMemberExpression
Represents an optional member expression.
ParenthesizedExpression
Represents a parenthesized expression.
Pattern
Represents a pattern in the code.
Position
Represents a position in the source code.
Printable
Represents a printable node.
PrivateName
Represents a private name.
Program
Represents the entire program.
Property
Represents a property in an object.
PropertyPattern
Represents a pattern property in an object.
QualifiedTypeIdentifier
Represents a qualified type identifier in Flow.
RegExpLiteral
Represents a regular expression literal.
RestElement
Represents a rest element in a destructuring assignment.
RestProperty
Represents a rest property in an object pattern.
ReturnStatement
Represents a return statement.
SequenceExpression
Represents a sequence expression.
SourceLocation
Represents the source location of a node.
Specifier
Represents a specifier in an import or export declaration.
SpreadElement
Represents a spread element in an array or function call.
SpreadElementPattern
Represents a spread element pattern in an array.
SpreadProperty
Represents a spread property in an object.
SpreadPropertyPattern
Represents a spread property pattern in an object.
Statement
Represents a statement in the code.
StringLiteral
Represents a string literal.
StringLiteralTypeAnnotation
A type annotation for string literals.
StringTypeAnnotation
A type annotation for string types.
Super
Represents the super keyword.
SwitchCase
Represents a case in a switch statement.
SwitchStatement
Represents a switch statement.
SymbolTypeAnnotation
A type annotation for symbol types.
TaggedTemplateExpression
Represents a tagged template expression.
TemplateElement
Represents an element in a template literal.
TemplateLiteral
Represents a template literal.
ThisExpression
Represents the this expression.
ThisTypeAnnotation
A type annotation for the this type.
ThrowStatement
Represents a throw statement.
TryStatement
Represents a try statement.
TSAnyKeyword
Represents the TypeScript any keyword.
TSArrayType
Represents a TypeScript array type.
TSAsExpression
Represents a TypeScript as-expression.
TSBigIntKeyword
Represents the TypeScript bigint keyword.
TSBooleanKeyword
Represents the TypeScript boolean keyword.
TSCallSignatureDeclaration
Represents a TypeScript call signature declaration.
TSConditionalType
Represents a TypeScript conditional type.
TSConstructorType
Represents a TypeScript constructor type.
TSConstructSignatureDeclaration
Represents a TypeScript construct signature declaration.
TSDeclareFunction
Represents a TypeScript function declaration.
TSDeclareMethod
Represents a TypeScript method declaration.
TSEnumDeclaration
Represents a TypeScript enum declaration.
TSEnumMember
Represents a member of a TypeScript enum.
TSExportAssignment
Represents a TypeScript export assignment.
TSExpressionWithTypeArguments
Represents a TypeScript expression with type arguments.
TSExternalModuleReference
Represents a TypeScript external module reference.
TSFunctionType
Represents a TypeScript function type.
TSHasOptionalTypeAnnotation
Represents an optional type annotation in TypeScript.
TSHasOptionalTypeParameterInstantiation
Represents an optional type parameter instantiation in TypeScript.
TSHasOptionalTypeParameters
Represents optional type parameters in TypeScript.
TSImportEqualsDeclaration
Represents a TypeScript import equals declaration.
TSImportType
Represents a TypeScript import type.
TSIndexedAccessType
Represents a TypeScript indexed access type.
TSIndexSignature
Represents a TypeScript index signature.
TSInferType
Represents a TypeScript infer type.
TSInterfaceBody
Represents the body of a TypeScript interface.
TSInterfaceDeclaration
Represents a TypeScript interface declaration.
TSIntersectionType
Represents a TypeScript intersection type.
TSLiteralType
Represents a TypeScript literal type.
TSMappedType
Represents a TypeScript mapped type.
TSMethodSignature
Represents a TypeScript method signature.
TSModuleBlock
Represents a TypeScript module block.
TSModuleDeclaration
Represents a TypeScript module declaration.
TSNamedTupleMember
Represents a named tuple member in TypeScript.
TSNamespaceExportDeclaration
Represents a TypeScript namespace export declaration.
TSNeverKeyword
Represents the TypeScript never keyword.
TSNonNullExpression
Represents a non-null assertion in TypeScript.
TSNullKeyword
Represents the TypeScript null keyword.
TSNumberKeyword
Represents the TypeScript number keyword.
TSObjectKeyword
Represents the TypeScript object keyword.
TSOptionalType
Represents an optional type in TypeScript.
TSParameterProperty
Represents a parameter property in TypeScript.
TSParenthesizedType
Represents a parenthesized type in TypeScript.
TSPropertySignature
Represents a property signature in TypeScript.
TSQualifiedName
Represents a qualified name in TypeScript.
TSRestType
Represents a rest type in TypeScript.
TSStringKeyword
Represents the TypeScript string keyword.
TSSymbolKeyword
Represents the TypeScript symbol keyword.
TSThisType
Represents the TypeScript this type.
TSTupleType
Represents a tuple type in TypeScript.
TSType
Represents a TypeScript type.
TSTypeAliasDeclaration
Represents a TypeScript type alias declaration.
TSTypeAnnotation
Represents a TypeScript type annotation.
TSTypeAssertion
Represents a TypeScript type assertion.
TSTypeLiteral
Represents a TypeScript type literal.
TSTypeOperator
Represents a TypeScript type operator.
TSTypeParameter
Represents a type parameter in TypeScript.
TSTypeParameterDeclaration
Represents a type parameter declaration in TypeScript.
TSTypeParameterInstantiation
Represents a type parameter instantiation in TypeScript.