SyntaxKind enum identifies the type of each node in the TypeScript Abstract Syntax Tree (AST). Every node has a kind property that determines its type and structure.
Trivia and Tokens
Trivia (Comments and Whitespace)
Literals
Primary Literals
Template Literals
Punctuation
Braces and Brackets
Operators
Other Punctuation
Assignment Operators
Keywords
Reserved Words
Strict Mode Reserved Words
Contextual Keywords
Parse Tree Nodes
Names
QualifiedName-A.B.CComputedPropertyName-[expr]
Type Members
PropertySignaturePropertyDeclarationMethodSignatureMethodDeclarationConstructorGetAccessorSetAccessorCallSignatureConstructSignatureIndexSignature
Types
TypePredicateTypeReferenceFunctionTypeConstructorTypeTypeQueryTypeLiteralArrayTypeTupleTypeUnionTypeIntersectionTypeConditionalTypeInferTypeMappedTypeTemplateLiteralTypeImportType
Expressions
ArrayLiteralExpressionObjectLiteralExpressionPropertyAccessExpressionElementAccessExpressionCallExpressionNewExpressionTaggedTemplateExpressionTypeAssertionExpressionParenthesizedExpressionFunctionExpressionArrowFunctionDeleteExpressionTypeOfExpressionVoidExpressionAwaitExpressionPrefixUnaryExpressionPostfixUnaryExpressionBinaryExpressionConditionalExpressionYieldExpressionSpreadElementClassExpressionAsExpressionNonNullExpressionSatisfiesExpression
Statements
BlockVariableStatementExpressionStatementIfStatementDoStatementWhileStatementForStatementForInStatementForOfStatementContinueStatementBreakStatementReturnStatementWithStatementSwitchStatementLabeledStatementThrowStatementTryStatementDebuggerStatement
Declarations
VariableDeclarationFunctionDeclarationClassDeclarationInterfaceDeclarationTypeAliasDeclarationEnumDeclarationModuleDeclarationImportDeclarationExportDeclarationImportEqualsDeclarationExportAssignment
JSX
JsxElementJsxSelfClosingElementJsxOpeningElementJsxClosingElementJsxFragmentJsxAttributeJsxSpreadAttributeJsxExpression
Other
SourceFile- Root nodeBundle- Multiple source filesSyntaxList- List of nodes
Helper Markers
The enum includes helper values for ranges:Usage
Checking Node Kind
Getting Kind Name
See Also
- Node Types - Node type hierarchy
- TypeFlags - Type system flags
- Compiler Overview - TypeScript compiler architecture