Skip to main content

AST Specification

The following auto-generated documentation describes the Abstract Syntax Tree (AST) generated by @typescript-eslint/typescript-estree for parsers such as @typescript-eslint/parser.

Enumerations

AST_NODE_TYPES

Enumeration Members

Enumeration MemberValue
AccessorProperty"AccessorProperty"
ArrayExpression"ArrayExpression"
ArrayPattern"ArrayPattern"
ArrowFunctionExpression"ArrowFunctionExpression"
AssignmentExpression"AssignmentExpression"
AssignmentPattern"AssignmentPattern"
AwaitExpression"AwaitExpression"
BinaryExpression"BinaryExpression"
BlockStatement"BlockStatement"
BreakStatement"BreakStatement"
CallExpression"CallExpression"
CatchClause"CatchClause"
ChainExpression"ChainExpression"
ClassBody"ClassBody"
ClassDeclaration"ClassDeclaration"
ClassExpression"ClassExpression"
ConditionalExpression"ConditionalExpression"
ContinueStatement"ContinueStatement"
DebuggerStatement"DebuggerStatement"
Decorator"Decorator"
DoWhileStatement"DoWhileStatement"
EmptyStatement"EmptyStatement"
ExportAllDeclaration"ExportAllDeclaration"
ExportDefaultDeclaration"ExportDefaultDeclaration"
ExportNamedDeclaration"ExportNamedDeclaration"
ExportSpecifier"ExportSpecifier"
ExpressionStatement"ExpressionStatement"
ForInStatement"ForInStatement"
ForOfStatement"ForOfStatement"
ForStatement"ForStatement"
FunctionDeclaration"FunctionDeclaration"
FunctionExpression"FunctionExpression"
Identifier"Identifier"
IfStatement"IfStatement"
ImportAttribute"ImportAttribute"
ImportDeclaration"ImportDeclaration"
ImportDefaultSpecifier"ImportDefaultSpecifier"
ImportExpression"ImportExpression"
ImportNamespaceSpecifier"ImportNamespaceSpecifier"
ImportSpecifier"ImportSpecifier"
JSXAttribute"JSXAttribute"
JSXClosingElement"JSXClosingElement"
JSXClosingFragment"JSXClosingFragment"
JSXElement"JSXElement"
JSXEmptyExpression"JSXEmptyExpression"
JSXExpressionContainer"JSXExpressionContainer"
JSXFragment"JSXFragment"
JSXIdentifier"JSXIdentifier"
JSXMemberExpression"JSXMemberExpression"
JSXNamespacedName"JSXNamespacedName"
JSXOpeningElement"JSXOpeningElement"
JSXOpeningFragment"JSXOpeningFragment"
JSXSpreadAttribute"JSXSpreadAttribute"
JSXSpreadChild"JSXSpreadChild"
JSXText"JSXText"
LabeledStatement"LabeledStatement"
Literal"Literal"
LogicalExpression"LogicalExpression"
MemberExpression"MemberExpression"
MetaProperty"MetaProperty"
MethodDefinition"MethodDefinition"
NewExpression"NewExpression"
ObjectExpression"ObjectExpression"
ObjectPattern"ObjectPattern"
PrivateIdentifier"PrivateIdentifier"
Program"Program"
Property"Property"
PropertyDefinition"PropertyDefinition"
RestElement"RestElement"
ReturnStatement"ReturnStatement"
SequenceExpression"SequenceExpression"
SpreadElement"SpreadElement"
StaticBlock"StaticBlock"
Super"Super"
SwitchCase"SwitchCase"
SwitchStatement"SwitchStatement"
TSAbstractAccessorProperty"TSAbstractAccessorProperty"
TSAbstractKeyword"TSAbstractKeyword"
TSAbstractMethodDefinition"TSAbstractMethodDefinition"
TSAbstractPropertyDefinition"TSAbstractPropertyDefinition"
TSAnyKeyword"TSAnyKeyword"
TSArrayType"TSArrayType"
TSAsExpression"TSAsExpression"
TSAsyncKeyword"TSAsyncKeyword"
TSBigIntKeyword"TSBigIntKeyword"
TSBooleanKeyword"TSBooleanKeyword"
TSCallSignatureDeclaration"TSCallSignatureDeclaration"
TSClassImplements"TSClassImplements"
TSConditionalType"TSConditionalType"
TSConstructSignatureDeclaration"TSConstructSignatureDeclaration"
TSConstructorType"TSConstructorType"
TSDeclareFunction"TSDeclareFunction"
TSDeclareKeyword"TSDeclareKeyword"
TSEmptyBodyFunctionExpression"TSEmptyBodyFunctionExpression"
TSEnumBody"TSEnumBody"
TSEnumDeclaration"TSEnumDeclaration"
TSEnumMember"TSEnumMember"
TSExportAssignment"TSExportAssignment"
TSExportKeyword"TSExportKeyword"
TSExternalModuleReference"TSExternalModuleReference"
TSFunctionType"TSFunctionType"
TSImportEqualsDeclaration"TSImportEqualsDeclaration"
TSImportType"TSImportType"
TSIndexSignature"TSIndexSignature"
TSIndexedAccessType"TSIndexedAccessType"
TSInferType"TSInferType"
TSInstantiationExpression"TSInstantiationExpression"
TSInterfaceBody"TSInterfaceBody"
TSInterfaceDeclaration"TSInterfaceDeclaration"
TSInterfaceHeritage"TSInterfaceHeritage"
TSIntersectionType"TSIntersectionType"
TSIntrinsicKeyword"TSIntrinsicKeyword"
TSLiteralType"TSLiteralType"
TSMappedType"TSMappedType"
TSMethodSignature"TSMethodSignature"
TSModuleBlock"TSModuleBlock"
TSModuleDeclaration"TSModuleDeclaration"
TSNamedTupleMember"TSNamedTupleMember"
TSNamespaceExportDeclaration"TSNamespaceExportDeclaration"
TSNeverKeyword"TSNeverKeyword"
TSNonNullExpression"TSNonNullExpression"
TSNullKeyword"TSNullKeyword"
TSNumberKeyword"TSNumberKeyword"
TSObjectKeyword"TSObjectKeyword"
TSOptionalType"TSOptionalType"
TSParameterProperty"TSParameterProperty"
TSPrivateKeyword"TSPrivateKeyword"
TSPropertySignature"TSPropertySignature"
TSProtectedKeyword"TSProtectedKeyword"
TSPublicKeyword"TSPublicKeyword"
TSQualifiedName"TSQualifiedName"
TSReadonlyKeyword"TSReadonlyKeyword"
TSRestType"TSRestType"
TSSatisfiesExpression"TSSatisfiesExpression"
TSStaticKeyword"TSStaticKeyword"
TSStringKeyword"TSStringKeyword"
TSSymbolKeyword"TSSymbolKeyword"
TSTemplateLiteralType"TSTemplateLiteralType"
TSThisType"TSThisType"
TSTupleType"TSTupleType"
TSTypeAliasDeclaration"TSTypeAliasDeclaration"
TSTypeAnnotation"TSTypeAnnotation"
TSTypeAssertion"TSTypeAssertion"
TSTypeLiteral"TSTypeLiteral"
TSTypeOperator"TSTypeOperator"
TSTypeParameter"TSTypeParameter"
TSTypeParameterDeclaration"TSTypeParameterDeclaration"
TSTypeParameterInstantiation"TSTypeParameterInstantiation"
TSTypePredicate"TSTypePredicate"
TSTypeQuery"TSTypeQuery"
TSTypeReference"TSTypeReference"
TSUndefinedKeyword"TSUndefinedKeyword"
TSUnionType"TSUnionType"
TSUnknownKeyword"TSUnknownKeyword"
TSVoidKeyword"TSVoidKeyword"
TaggedTemplateExpression"TaggedTemplateExpression"
TemplateElement"TemplateElement"
TemplateLiteral"TemplateLiteral"
ThisExpression"ThisExpression"
ThrowStatement"ThrowStatement"
TryStatement"TryStatement"
UnaryExpression"UnaryExpression"
UpdateExpression"UpdateExpression"
VariableDeclaration"VariableDeclaration"
VariableDeclarator"VariableDeclarator"
WhileStatement"WhileStatement"
WithStatement"WithStatement"
YieldExpression"YieldExpression"

AST_TOKEN_TYPES

Enumeration Members

Enumeration MemberValue
Block"Block"
Boolean"Boolean"
Identifier"Identifier"
JSXIdentifier"JSXIdentifier"
JSXText"JSXText"
Keyword"Keyword"
Line"Line"
Null"Null"
Numeric"Numeric"
Punctuator"Punctuator"
RegularExpression"RegularExpression"
String"String"
Template"Template"

Interfaces

AccessorPropertyComputedName

Extends

  • PropertyDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typeAccessorPropertyPropertyDefinitionComputedNameBase.type

AccessorPropertyNonComputedName

Extends

  • PropertyDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typeAccessorPropertyPropertyDefinitionNonComputedNameBase.type

ArrayExpression

Extends

Properties

PropertyTypeDescriptionOverrides
elements(null | Expression | SpreadElement)[]an element will be null in the case of a sparse array: [1, ,3]-
typeArrayExpression-BaseNode.type

ArrayPattern

Extends

Properties

PropertyTypeOverrides
decoratorsDecorator[]-
elements(null | DestructuringPattern)[]-
optionalboolean-
typeArrayPatternBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-

ArrowFunctionExpression

Extends

Properties

PropertyTypeOverrides
asyncboolean-
bodyExpression | BlockStatement-
expressionboolean-
generatorboolean-
idnull-
paramsParameter[]-
returnTypeundefined | TSTypeAnnotation-
typeArrowFunctionExpressionBaseNode.type
typeParametersundefined | TSTypeParameterDeclaration-

AssignmentExpression

Extends

Properties

PropertyTypeOverrides
leftExpression-
operatorValueOf <AssignmentOperatorToText>-
rightExpression-
typeAssignmentExpressionBaseNode.type

AssignmentOperatorToText

Extended by

Properties

PropertyType
64"="
65"+="
66"-="
67"*="
68"**="
69"/="
70"%="
71"<<="
72">>="
73">>>="
74"&="
75"|="
76"||="
77"&&="
78"??="
79"^="

AssignmentPattern

Extends

Properties

PropertyTypeOverrides
decoratorsDecorator[]-
leftBindingName-
optionalboolean-
rightExpression-
typeAssignmentPatternBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-

AwaitExpression

Extends

Properties

PropertyTypeOverrides
argumentExpression-
typeAwaitExpressionBaseNode.type

BaseNode

Extends

Extended by

Properties

PropertyTypeOverrides
typeAST_NODE_TYPESNodeOrTokenData.type

BigIntLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
bigintstring-
valuenull | bigintLiteralBase.value

BinaryExpression

Extends

Properties

PropertyTypeOverrides
leftPrivateIdentifier | Expression-
operatorValueOf <BinaryOperatorToText>-
rightExpression-
typeBinaryExpressionBaseNode.type

BinaryOperatorToText

Properties

PropertyType
103"in"
104"instanceof"
30"<"
32">"
33"<="
34">="
35"=="
36"!="
37"==="
38"!=="
40"+"
41"-"
42"*"
43"**"
44"/"
45"%"
48"<<"
49">>"
50">>>"
51"&"
52"|"
53"^"
56"&&"
57"||"

BlockComment

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeBlockBaseToken.type

BlockStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement[]-
typeBlockStatementBaseNode.type

BooleanLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
raw"false" | "true"LiteralBase.raw
valuebooleanLiteralBase.value

BooleanToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeBooleanBaseToken.type

BreakStatement

Extends

Properties

PropertyTypeOverrides
labelnull | Identifier-
typeBreakStatementBaseNode.type

CallExpression

Extends

Properties

PropertyTypeOverrides
argumentsCallExpressionArgument[]-
calleeExpression-
optionalboolean-
typeCallExpressionBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-

CatchClause

Extends

Properties

PropertyTypeOverrides
bodyBlockStatement-
paramnull | BindingName-
typeCatchClauseBaseNode.type

ChainExpression

Extends

Properties

PropertyTypeOverrides
expressionChainElement-
typeChainExpressionBaseNode.type

ClassBody

Extends

Properties

PropertyTypeOverrides
bodyClassElement[]-
typeClassBodyBaseNode.type

ClassDeclarationWithName

A normal class declaration:

class A {}

Extends

  • ClassDeclarationBase

Properties

PropertyTypeOverrides
idIdentifierClassDeclarationBase.id

ClassDeclarationWithOptionalName

Default-exported class declarations have optional names:

export default class {}

Extends

  • ClassDeclarationBase

Properties

PropertyTypeOverrides
idnull | IdentifierClassDeclarationBase.id

ClassExpression

Extends

  • ClassBase

Properties

PropertyTypeOverrides
abstractfalseClassBase.abstract
declarefalseClassBase.declare
typeClassExpressionClassBase.type

ConditionalExpression

Extends

Properties

PropertyTypeOverrides
alternateExpression-
consequentExpression-
testExpression-
typeConditionalExpressionBaseNode.type

ContinueStatement

Extends

Properties

PropertyTypeOverrides
labelnull | Identifier-
typeContinueStatementBaseNode.type

DebuggerStatement

Extends

Properties

PropertyTypeOverrides
typeDebuggerStatementBaseNode.type

Decorator

Extends

Properties

PropertyTypeOverrides
expressionLeftHandSideExpression-
typeDecoratorBaseNode.type

DoWhileStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
testExpression-
typeDoWhileStatementBaseNode.type

EmptyStatement

Extends

Properties

PropertyTypeOverrides
typeEmptyStatementBaseNode.type

ExportAllDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
assertionsImportAttribute[]

The assertions declared for the export.

Example

export * from 'mod' assert { type: 'json' };

Deprecated

Replaced with attributes.

-
attributesImportAttribute[]

The attributes declared for the export.

Example

export * from 'mod' with { type: 'json' };
-
exportKindExportAndImportKindThe kind of the export.-
exportednull | IdentifierThe name for the exported items (as X). null if no name is assigned.-
sourceStringLiteralThe source module being exported from.-
typeExportAllDeclaration-BaseNode.type

ExportDefaultDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
declarationDefaultExportDeclarationsThe declaration being exported.-
exportKind"value"The kind of the export. Always value for default exports.-
typeExportDefaultDeclaration-BaseNode.type

ExportNamedDeclarationWithSource

Export names from another module.

export { a, b } from 'mod';

Extends

  • ExportNamedDeclarationBase

Properties

PropertyTypeOverrides
declarationnullExportNamedDeclarationBase.declaration
sourceStringLiteralExportNamedDeclarationBase.source

ExportNamedDeclarationWithoutSourceWithMultiple

Exporting names from the current module.

export {};
export { a, b };

Extends

  • ExportNamedDeclarationBase

Properties

PropertyTypeDescriptionOverrides
assertionsImportAttribute[]

This will always be an empty array.

Deprecated

Replaced with attributes.

ExportNamedDeclarationBase.assertions
attributesImportAttribute[]This will always be an empty array.ExportNamedDeclarationBase.attributes
declarationnull-ExportNamedDeclarationBase.declaration
sourcenull-ExportNamedDeclarationBase.source

ExportNamedDeclarationWithoutSourceWithSingle

Exporting a single named declaration.

export const x = 1;

Extends

  • ExportNamedDeclarationBase

Properties

PropertyTypeDescriptionOverrides
assertionsImportAttribute[]

This will always be an empty array.

Deprecated

Replaced with attributes.

ExportNamedDeclarationBase.assertions
attributesImportAttribute[]This will always be an empty array.ExportNamedDeclarationBase.attributes
declarationNamedExportDeclarations-ExportNamedDeclarationBase.declaration
sourcenull-ExportNamedDeclarationBase.source
specifiersExportSpecifier[]This will always be an empty array.ExportNamedDeclarationBase.specifiers

ExportSpecifier

Extends

Properties

PropertyTypeOverrides
exportKindExportAndImportKind-
exportedIdentifier-
localIdentifier-
typeExportSpecifierBaseNode.type

ExpressionStatement

Extends

Properties

PropertyTypeOverrides
directiveundefined | string-
expressionExpression-
typeExpressionStatementBaseNode.type

ForInStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
leftForInitialiser-
rightExpression-
typeForInStatementBaseNode.type

ForOfStatement

Extends

Properties

PropertyTypeOverrides
awaitboolean-
bodyStatement-
leftForOfInitialiser-
rightExpression-
typeForOfStatementBaseNode.type

ForStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
init| null | Identifier | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | ImportExpression | JSXElement | JSXFragment | BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | LogicalExpression | MemberExpressionComputedName | MemberExpressionNonComputedName | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression | LetOrConstOrVarDeclaration-
testnull | Expression-
typeForStatementBaseNode.type
updatenull | Expression-

FunctionDeclarationWithName

A normal function declaration:

function f() {}

Extends

  • FunctionDeclarationBase

Properties

PropertyTypeOverrides
idIdentifierFunctionDeclarationBase.id

FunctionDeclarationWithOptionalName

Default-exported function declarations have optional names:

export default function () {}

Extends

  • FunctionDeclarationBase

Properties

PropertyTypeOverrides
idnull | IdentifierFunctionDeclarationBase.id

FunctionExpression

Extends

  • FunctionBase

Properties

PropertyTypeOverrides
bodyBlockStatementFunctionBase.body
expressionfalseFunctionBase.expression
typeFunctionExpressionFunctionBase.type

Identifier

Extends

Properties

PropertyTypeOverrides
decoratorsDecorator[]-
namestring-
optionalboolean-
typeIdentifierBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-

IdentifierToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeIdentifierBaseToken.type

IfStatement

Extends

Properties

PropertyTypeOverrides
alternatenull | Statement-
consequentStatement-
testExpression-
typeIfStatementBaseNode.type

ImportAttribute

Extends

Properties

PropertyTypeOverrides
keyIdentifier | Literal-
typeImportAttributeBaseNode.type
valueLiteral-

ImportDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
assertionsImportAttribute[]

The assertions declared for the export.

Example

import * from 'mod' assert { type: 'json' };

Deprecated

Replaced with attributes.

-
attributesImportAttribute[]

The attributes declared for the export.

Example

import * from 'mod' with { type: 'json' };
-
importKindExportAndImportKindThe kind of the import.-
sourceStringLiteralThe source module being imported from.-
specifiersImportClause[]

The specifiers being imported. If this is an empty array then either there are no specifiers:

import from 'mod';

Or it is a side-effect import:

import 'mod';
-
typeImportDeclaration-BaseNode.type

ImportDefaultSpecifier

Extends

Properties

PropertyTypeOverrides
localIdentifier-
typeImportDefaultSpecifierBaseNode.type

ImportExpression

Extends

Properties

PropertyTypeOverrides
attributesnull | Expression-
sourceExpression-
typeImportExpressionBaseNode.type

ImportNamespaceSpecifier

Extends

Properties

PropertyTypeOverrides
localIdentifier-
typeImportNamespaceSpecifierBaseNode.type

ImportSpecifier

Extends

Properties

PropertyTypeOverrides
importKindExportAndImportKind-
importedIdentifier-
localIdentifier-
typeImportSpecifierBaseNode.type

JSXAttribute

Extends

Properties

PropertyTypeOverrides
nameJSXIdentifier | JSXNamespacedName-
typeJSXAttributeBaseNode.type
valuenull | JSXElement | Literal | JSXExpression-

JSXClosingElement

Extends

Properties

PropertyTypeOverrides
nameJSXTagNameExpression-
typeJSXClosingElementBaseNode.type

JSXClosingFragment

Extends

Properties

PropertyTypeOverrides
typeJSXClosingFragmentBaseNode.type

JSXElement

Extends

Properties

PropertyTypeOverrides
childrenJSXChild[]-
closingElementnull | JSXClosingElement-
openingElementJSXOpeningElement-
typeJSXElementBaseNode.type

JSXEmptyExpression

Extends

Properties

PropertyTypeOverrides
typeJSXEmptyExpressionBaseNode.type

JSXExpressionContainer

Extends

Properties

PropertyTypeOverrides
expressionExpression | JSXEmptyExpression-
typeJSXExpressionContainerBaseNode.type

JSXFragment

Extends

Properties

PropertyTypeOverrides
childrenJSXChild[]-
closingFragmentJSXClosingFragment-
openingFragmentJSXOpeningFragment-
typeJSXFragmentBaseNode.type

JSXIdentifier

Extends

Properties

PropertyTypeOverrides
namestring-
typeJSXIdentifierBaseNode.type

JSXIdentifierToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeJSXIdentifierBaseToken.type

JSXMemberExpression

Extends

Properties

PropertyTypeOverrides
objectJSXTagNameExpression-
propertyJSXIdentifier-
typeJSXMemberExpressionBaseNode.type

JSXNamespacedName

Extends

Properties

PropertyTypeOverrides
nameJSXIdentifier-
namespaceJSXIdentifier-
typeJSXNamespacedNameBaseNode.type

JSXOpeningElement

Extends

Properties

PropertyTypeOverrides
attributes(JSXAttribute | JSXSpreadAttribute)[]-
nameJSXTagNameExpression-
selfClosingboolean-
typeJSXOpeningElementBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-

JSXOpeningFragment

Extends

Properties

PropertyTypeOverrides
typeJSXOpeningFragmentBaseNode.type

JSXSpreadAttribute

Extends

Properties

PropertyTypeOverrides
argumentExpression-
typeJSXSpreadAttributeBaseNode.type

JSXSpreadChild

Extends

Properties

PropertyTypeOverrides
expressionExpression | JSXEmptyExpression-
typeJSXSpreadChildBaseNode.type

JSXText

Extends

Properties

PropertyTypeOverrides
rawstring-
typeJSXTextBaseNode.type
valuestring-

JSXTextToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeJSXTextBaseToken.type

KeywordToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeKeywordBaseToken.type

LabeledStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
labelIdentifier-
typeLabeledStatementBaseNode.type

LetOrConstOrVarDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
declarationsLetOrConstOrVarDeclarator[]

The variables declared by this declaration. Note that there may be 0 declarations (i.e. const;).

Example

let x;

let y, z;

-
declareboolean

Whether the declaration is declared

Example

declare const x = 1;
-
kind"const" | "let" | "var"

The keyword used to declare the variable(s)

Example

const x = 1;

let y = 2;

var z = 3;

-
typeVariableDeclaration-BaseNode.type

LetOrConstOrVarDeclarator

Extends

Properties

PropertyTypeOverrides
definiteboolean-
idBindingName-
initnull | Expression-
typeVariableDeclaratorBaseNode.type

LineComment

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeLineBaseToken.type

LogicalExpression

Extends

Properties

PropertyTypeOverrides
leftExpression-
operator"&&" | "||" | "??"-
rightExpression-
typeLogicalExpressionBaseNode.type

MemberExpressionComputedName

Extends

  • MemberExpressionBase

Properties

PropertyTypeOverrides
computedtrueMemberExpressionBase.computed
propertyExpressionMemberExpressionBase.property
typeMemberExpressionMemberExpressionBase.type

MemberExpressionNonComputedName

Extends

  • MemberExpressionBase

Properties

PropertyTypeOverrides
computedfalseMemberExpressionBase.computed
propertyIdentifier | PrivateIdentifierMemberExpressionBase.property
typeMemberExpressionMemberExpressionBase.type

MetaProperty

Extends

Properties

PropertyTypeOverrides
metaIdentifier-
propertyIdentifier-
typeMetaPropertyBaseNode.type

MethodDefinitionComputedName

Extends

  • MethodDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typeMethodDefinitionMethodDefinitionComputedNameBase.type

MethodDefinitionNonComputedName

Extends

  • ClassMethodDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typeMethodDefinitionClassMethodDefinitionNonComputedNameBase.type

NewExpression

Extends

Properties

PropertyTypeOverrides
argumentsCallExpressionArgument[]-
calleeExpression-
typeNewExpressionBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-

NodeOrTokenData

Extended by

Properties

PropertyTypeDescription
locSourceLocation

The source location information of the node.

The loc property is defined as nullable by ESTree, but ESLint requires this property.

rangeRange-
typestring-

NullLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
raw"null"LiteralBase.raw
valuenullLiteralBase.value

NullToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeNullBaseToken.type

NumberLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
valuenumberLiteralBase.value

NumericToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeNumericBaseToken.type

ObjectExpression

Extends

Properties

PropertyTypeOverrides
propertiesObjectLiteralElement[]-
typeObjectExpressionBaseNode.type

ObjectPattern

Extends

Properties

PropertyTypeOverrides
decoratorsDecorator[]-
optionalboolean-
properties(RestElement | Property)[]-
typeObjectPatternBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-

Position

Properties

PropertyTypeDescription
columnnumberColumn number on the line (0-indexed)
linenumberLine number (1-indexed)

PrivateIdentifier

Extends

Properties

PropertyTypeOverrides
namestring-
typePrivateIdentifierBaseNode.type

Program

Extends

Properties

PropertyTypeOverrides
bodyProgramStatement[]-
commentsundefined | Comment[]-
sourceType"module" | "script"-
tokensundefined | Token[]-
typeProgramNodeOrTokenData.type

PropertyComputedName

Extends

  • PropertyBase

Properties

PropertyTypeOverrides
computedtruePropertyBase.computed
keyExpressionPropertyBase.key

PropertyDefinitionComputedName

Extends

  • PropertyDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typePropertyDefinitionPropertyDefinitionComputedNameBase.type

PropertyDefinitionNonComputedName

Extends

  • ClassPropertyDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typePropertyDefinitionClassPropertyDefinitionNonComputedNameBase.type

PropertyNonComputedName

Extends

  • PropertyBase

Properties

PropertyTypeOverrides
computedfalsePropertyBase.computed
keyPropertyNameNonComputedPropertyBase.key

PunctuatorToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typePunctuatorBaseToken.type
valueValueOf <PunctuatorTokenToText>BaseToken.value

PunctuatorTokenToText

Extends

Properties

PropertyType
19"{"
20"}"
21"("
22")"
23"["
24"]"
25"."
26"..."
27";"
28","
29"?."
30"<"
31"</"
32">"
33"<="
34">="
35"=="
36"!="
37"==="
38"!=="
39"=>"
40"+"
41"-"
42"*"
43"**"
44"/"
45"%"
46"++"
47"--"
48"<<"
49">>"
50">>>"
51"&"
52"|"
53"^"
54"!"
55"~"
56"&&"
57"||"
58"?"
59":"
60"@"
61"??"
62"`"
63"#"

RegExpLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
regexobject-
regex.flagsstring-
regex.patternstring-
valuenull | RegExpLiteralBase.value

RegularExpressionToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
regexobject-
regex.flagsstring-
regex.patternstring-
typeRegularExpressionBaseToken.type

RestElement

Extends

Properties

PropertyTypeOverrides
argumentDestructuringPattern-
decoratorsDecorator[]-
optionalboolean-
typeRestElementBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-
valueundefined | AssignmentPattern-

ReturnStatement

Extends

Properties

PropertyTypeOverrides
argumentnull | Expression-
typeReturnStatementBaseNode.type

SequenceExpression

Extends

Properties

PropertyTypeOverrides
expressionsExpression[]-
typeSequenceExpressionBaseNode.type

SourceLocation

Properties

PropertyTypeDescription
endPositionThe position of the first character after the parsed source region
startPositionThe position of the first character of the parsed source region

SpreadElement

Extends

Properties

PropertyTypeOverrides
argumentExpression-
typeSpreadElementBaseNode.type

StaticBlock

Extends

Properties

PropertyTypeOverrides
bodyStatement[]-
typeStaticBlockBaseNode.type

StringLiteral

Extends

  • LiteralBase

Properties

PropertyTypeOverrides
valuestringLiteralBase.value

StringToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeStringBaseToken.type

Super

Extends

Properties

PropertyTypeOverrides
typeSuperBaseNode.type

SwitchCase

Extends

Properties

PropertyTypeOverrides
consequentStatement[]-
testnull | Expression-
typeSwitchCaseBaseNode.type

SwitchStatement

Extends

Properties

PropertyTypeOverrides
casesSwitchCase[]-
discriminantExpression-
typeSwitchStatementBaseNode.type

TSAbstractAccessorPropertyComputedName

Extends

  • PropertyDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractAccessorPropertyPropertyDefinitionComputedNameBase.type
valuenullPropertyDefinitionComputedNameBase.value

TSAbstractAccessorPropertyNonComputedName

Extends

  • PropertyDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractAccessorPropertyPropertyDefinitionNonComputedNameBase.type
valuenullPropertyDefinitionNonComputedNameBase.value

TSAbstractKeyword

Extends

Properties

PropertyTypeOverrides
typeTSAbstractKeywordBaseNode.type

TSAbstractMethodDefinitionComputedName

Extends

  • MethodDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractMethodDefinitionMethodDefinitionComputedNameBase.type

TSAbstractMethodDefinitionNonComputedName

Extends

  • MethodDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractMethodDefinitionMethodDefinitionNonComputedNameBase.type

TSAbstractPropertyDefinitionComputedName

Extends

  • PropertyDefinitionComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractPropertyDefinitionPropertyDefinitionComputedNameBase.type
valuenullPropertyDefinitionComputedNameBase.value

TSAbstractPropertyDefinitionNonComputedName

Extends

  • PropertyDefinitionNonComputedNameBase

Properties

PropertyTypeOverrides
typeTSAbstractPropertyDefinitionPropertyDefinitionNonComputedNameBase.type
valuenullPropertyDefinitionNonComputedNameBase.value

TSAnyKeyword

Extends

Properties

PropertyTypeOverrides
typeTSAnyKeywordBaseNode.type

TSArrayType

Extends

Properties

PropertyTypeOverrides
elementTypeTypeNode-
typeTSArrayTypeBaseNode.type

TSAsExpression

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSAsExpressionBaseNode.type
typeAnnotationTypeNode-

TSAsyncKeyword

Extends

Properties

PropertyTypeOverrides
typeTSAsyncKeywordBaseNode.type

TSBigIntKeyword

Extends

Properties

PropertyTypeOverrides
typeTSBigIntKeywordBaseNode.type

TSBooleanKeyword

Extends

Properties

PropertyTypeOverrides
typeTSBooleanKeywordBaseNode.type

TSCallSignatureDeclaration

Extends

  • TSFunctionSignatureBase

Properties

PropertyTypeOverrides
typeTSCallSignatureDeclarationTSFunctionSignatureBase.type

TSClassImplements

Extends

  • TSHeritageBase

Properties

PropertyTypeOverrides
typeTSClassImplementsTSHeritageBase.type

TSConditionalType

Extends

Properties

PropertyTypeOverrides
checkTypeTypeNode-
extendsTypeTypeNode-
falseTypeTypeNode-
trueTypeTypeNode-
typeTSConditionalTypeBaseNode.type

TSConstructSignatureDeclaration

Extends

  • TSFunctionSignatureBase

Properties

PropertyTypeOverrides
typeTSConstructSignatureDeclarationTSFunctionSignatureBase.type

TSConstructorType

Extends

  • TSFunctionSignatureBase

Properties

PropertyTypeOverrides
abstractboolean-
typeTSConstructorTypeTSFunctionSignatureBase.type

TSDeclareFunctionNoDeclare

Function declaration without the declare keyword:

function foo(): void;

This can either be an overload signature or a declaration in an ambient context (e.g. declare module)

Extends

  • TSDeclareFunctionBase

Properties

PropertyTypeDescriptionOverrides
declarefalse-TSDeclareFunctionBase.declare
generatorfalse
  • TS1221: Generators are not allowed in an ambient context.
  • TS1222: An overload signature cannot be declared as a generator.
TSDeclareFunctionBase.generator

TSDeclareFunctionWithDeclare

Function declaration with the declare keyword:

declare function foo(): void;

Extends

  • TSDeclareFunctionBase

Properties

PropertyTypeDescriptionOverrides
asyncfalseTS1040: 'async' modifier cannot be used in an ambient context.TSDeclareFunctionBase.async
declaretrue-TSDeclareFunctionBase.declare
generatorfalseTS1221: Generators are not allowed in an ambient context.TSDeclareFunctionBase.generator

TSDeclareKeyword

Extends

Properties

PropertyTypeOverrides
typeTSDeclareKeywordBaseNode.type

TSEmptyBodyFunctionExpression

Extends

  • FunctionBase

Properties

PropertyTypeOverrides
bodynullFunctionBase.body
idnullFunctionBase.id
typeTSEmptyBodyFunctionExpressionFunctionBase.type

TSEnumBody

Extends

Properties

PropertyTypeOverrides
membersTSEnumMember[]-
typeTSEnumBodyBaseNode.type

TSEnumDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
bodyTSEnumBodyThe body of the enum.-
constboolean

Whether this is a const enum.

Example

const enum Foo
-
declareboolean

Whether this is a declared enum.

Example

declare enum Foo
-
idIdentifierThe enum name.-
membersTSEnumMember[]

The enum members.

Deprecated

Use body instead.

-
typeTSEnumDeclaration-BaseNode.type

TSEnumMemberComputedName

this should only really happen in semantically invalid code (errors 1164 and 2452)

Example

// VALID:
enum Foo { ['a'] }

// INVALID:
const x = 'a';
enum Foo { [x] }
enum Bar { ['a' + 'b'] }

Extends

  • TSEnumMemberBase

Properties

PropertyTypeOverrides
computedtrueTSEnumMemberBase.computed
idExpressionTSEnumMemberBase.id

TSEnumMemberNonComputedName

Extends

  • TSEnumMemberBase

Properties

PropertyTypeOverrides
computedfalseTSEnumMemberBase.computed
idPropertyNameNonComputedTSEnumMemberBase.id

TSExportAssignment

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSExportAssignmentBaseNode.type

TSExportKeyword

Extends

Properties

PropertyTypeOverrides
typeTSExportKeywordBaseNode.type

TSExternalModuleReference

Extends

Properties

PropertyTypeOverrides
expressionStringLiteral-
typeTSExternalModuleReferenceBaseNode.type

TSFunctionType

Extends

  • TSFunctionSignatureBase

Properties

PropertyTypeOverrides
typeTSFunctionTypeTSFunctionSignatureBase.type

TSImportEqualsNamespaceDeclaration

Extends

  • TSImportEqualsDeclarationBase

Properties

PropertyTypeDescriptionOverrides
importKind"value"The kind of the import.TSImportEqualsDeclarationBase.importKind
moduleReferenceTSQualifiedName | Identifier

The value being aliased.

import F1 = A;

import F2 = A.B.C;

TSImportEqualsDeclarationBase.moduleReference

TSImportEqualsRequireDeclaration

Extends

  • TSImportEqualsDeclarationBase

Properties

PropertyTypeDescriptionOverrides
importKindExportAndImportKindThe kind of the import.TSImportEqualsDeclarationBase.importKind
moduleReferenceTSExternalModuleReference

The value being aliased.

import F3 = require('mod');
TSImportEqualsDeclarationBase.moduleReference

TSImportType

Extends

Properties

PropertyTypeOverrides
argumentTypeNode-
qualifiernull | EntityName-
typeTSImportTypeBaseNode.type
typeArgumentsnull | TSTypeParameterInstantiation-

TSIndexSignature

Extends

Properties

PropertyTypeOverrides
accessibilityundefined | Accessibility-
parametersParameter[]-
readonlyboolean-
staticboolean-
typeTSIndexSignatureBaseNode.type
typeAnnotationundefined | TSTypeAnnotation-

TSIndexedAccessType

Extends

Properties

PropertyTypeOverrides
indexTypeTypeNode-
objectTypeTypeNode-
typeTSIndexedAccessTypeBaseNode.type

TSInferType

Extends

Properties

PropertyTypeOverrides
typeTSInferTypeBaseNode.type
typeParameterTSTypeParameter-

TSInstantiationExpression

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSInstantiationExpressionBaseNode.type
typeArgumentsTSTypeParameterInstantiation-

TSInterfaceBody

Extends

Properties

PropertyTypeOverrides
bodyTypeElement[]-
typeTSInterfaceBodyBaseNode.type

TSInterfaceDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
bodyTSInterfaceBodyThe body of the interface-
declarebooleanWhether the interface was declared-
extendsTSInterfaceHeritage[]The types this interface extends-
idIdentifierThe name of this interface-
typeTSInterfaceDeclaration-BaseNode.type
typeParametersundefined | TSTypeParameterDeclaration

The generic type parameters declared for the interface. Empty declaration

(<>) is different from no declaration.

-

TSInterfaceHeritage

Extends

  • TSHeritageBase

Properties

PropertyTypeOverrides
typeTSInterfaceHeritageTSHeritageBase.type

TSIntersectionType

Extends

Properties

PropertyTypeOverrides
typeTSIntersectionTypeBaseNode.type
typesTypeNode[]-

TSIntrinsicKeyword

Extends

Properties

PropertyTypeOverrides
typeTSIntrinsicKeywordBaseNode.type

TSLiteralType

Extends

Properties

PropertyTypeOverrides
literalLiteralExpression | UnaryExpression | UpdateExpression-
typeTSLiteralTypeBaseNode.type

TSMappedType

Extends

Properties

PropertyTypeDescriptionOverrides
constraintTypeNode--
keyIdentifier--
nameTypenull | TypeNode--
optionalundefined | boolean | "-" | "+"--
readonlyundefined | boolean | "-" | "+"--
typeTSMappedType-BaseNode.type
typeAnnotationundefined | TypeNode--
typeParameterTSTypeParameter

Deprecated

Use constraint and key instead.

-

TSMethodSignatureComputedName

Extends

  • TSMethodSignatureBase

Properties

PropertyTypeOverrides
computedtrueTSMethodSignatureBase.computed
keyExpressionTSMethodSignatureBase.key

TSMethodSignatureNonComputedName

Extends

  • TSMethodSignatureBase

Properties

PropertyTypeOverrides
computedfalseTSMethodSignatureBase.computed
keyPropertyNameNonComputedTSMethodSignatureBase.key

TSModuleBlock

Extends

Properties

PropertyTypeOverrides
bodyProgramStatement[]-
typeTSModuleBlockBaseNode.type

TSModuleDeclarationGlobal

Extends

  • TSModuleDeclarationBase

Properties

PropertyTypeDescriptionOverrides
bodyTSModuleBlock-TSModuleDeclarationBase.body
idIdentifierThis will always be an Identifier with name globalTSModuleDeclarationBase.id
kind"global"-TSModuleDeclarationBase.kind

TSModuleDeclarationModuleWithIdentifierId

The legacy module declaration, replaced with namespace declarations.

module A {}

Extends

  • TSModuleDeclarationModuleBase

Properties

PropertyTypeOverrides
bodyTSModuleBlockTSModuleDeclarationModuleBase.body
idIdentifierTSModuleDeclarationModuleBase.id
kind"module"TSModuleDeclarationModuleBase.kind

TSModuleDeclarationModuleWithStringIdDeclared

A string module declaration that is declared:

declare module 'foo' {}
declare module 'foo';

Extends

  • TSModuleDeclarationModuleBase

Properties

PropertyTypeOverrides
body?TSModuleBlockTSModuleDeclarationModuleBase.body
declaretrueTSModuleDeclarationModuleBase.declare
idStringLiteralTSModuleDeclarationModuleBase.id
kind"module"TSModuleDeclarationModuleBase.kind

TSModuleDeclarationModuleWithStringIdNotDeclared

A string module declaration that is not declared:

module 'foo' {}

Extends

  • TSModuleDeclarationModuleBase

Properties

PropertyTypeOverrides
bodyTSModuleBlockTSModuleDeclarationModuleBase.body
declarefalseTSModuleDeclarationModuleBase.declare
idStringLiteralTSModuleDeclarationModuleBase.id
kind"module"TSModuleDeclarationModuleBase.kind

TSModuleDeclarationNamespace

Extends

  • TSModuleDeclarationBase

Properties

PropertyTypeOverrides
bodyTSModuleBlockTSModuleDeclarationBase.body
idTSQualifiedName | IdentifierTSModuleDeclarationBase.id
kind"namespace"TSModuleDeclarationBase.kind

TSNamedTupleMember

Extends

Properties

PropertyTypeOverrides
elementTypeTypeNode-
labelIdentifier-
optionalboolean-
typeTSNamedTupleMemberBaseNode.type

TSNamespaceExportDeclaration

For the following declaration:

export as namespace X;

Extends

Properties

PropertyTypeDescriptionOverrides
idIdentifierThe name of the global variable that's exported as namespace-
typeTSNamespaceExportDeclaration-BaseNode.type

TSNeverKeyword

Extends

Properties

PropertyTypeOverrides
typeTSNeverKeywordBaseNode.type

TSNonNullExpression

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSNonNullExpressionBaseNode.type

TSNullKeyword

Extends

Properties

PropertyTypeOverrides
typeTSNullKeywordBaseNode.type

TSNumberKeyword

Extends

Properties

PropertyTypeOverrides
typeTSNumberKeywordBaseNode.type

TSObjectKeyword

Extends

Properties

PropertyTypeOverrides
typeTSObjectKeywordBaseNode.type

TSOptionalType

Extends

Properties

PropertyTypeOverrides
typeTSOptionalTypeBaseNode.type
typeAnnotationTypeNode-

TSParameterProperty

Extends

Properties

PropertyTypeOverrides
accessibilityundefined | Accessibility-
decoratorsDecorator[]-
overrideboolean-
parameterAssignmentPattern | BindingName | RestElement-
readonlyboolean-
staticboolean-
typeTSParameterPropertyBaseNode.type

TSPrivateKeyword

Extends

Properties

PropertyTypeOverrides
typeTSPrivateKeywordBaseNode.type

TSPropertySignatureComputedName

Extends

  • TSPropertySignatureBase

Properties

PropertyTypeOverrides
computedtrueTSPropertySignatureBase.computed
keyExpressionTSPropertySignatureBase.key

TSPropertySignatureNonComputedName

Extends

  • TSPropertySignatureBase

Properties

PropertyTypeOverrides
computedfalseTSPropertySignatureBase.computed
keyPropertyNameNonComputedTSPropertySignatureBase.key

TSProtectedKeyword

Extends

Properties

PropertyTypeOverrides
typeTSProtectedKeywordBaseNode.type

TSPublicKeyword

Extends

Properties

PropertyTypeOverrides
typeTSPublicKeywordBaseNode.type

TSQualifiedName

Extends

Properties

PropertyTypeOverrides
leftEntityName-
rightIdentifier-
typeTSQualifiedNameBaseNode.type

TSReadonlyKeyword

Extends

Properties

PropertyTypeOverrides
typeTSReadonlyKeywordBaseNode.type

TSRestType

Extends

Properties

PropertyTypeOverrides
typeTSRestTypeBaseNode.type
typeAnnotationTypeNode-

TSSatisfiesExpression

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSSatisfiesExpressionBaseNode.type
typeAnnotationTypeNode-

TSStaticKeyword

Extends

Properties

PropertyTypeOverrides
typeTSStaticKeywordBaseNode.type

TSStringKeyword

Extends

Properties

PropertyTypeOverrides
typeTSStringKeywordBaseNode.type

TSSymbolKeyword

Extends

Properties

PropertyTypeOverrides
typeTSSymbolKeywordBaseNode.type

TSTemplateLiteralType

Extends

Properties

PropertyTypeOverrides
quasisTemplateElement[]-
typeTSTemplateLiteralTypeBaseNode.type
typesTypeNode[]-

TSThisType

Extends

Properties

PropertyTypeOverrides
typeTSThisTypeBaseNode.type

TSTupleType

Extends

Properties

PropertyTypeOverrides
elementTypesTypeNode[]-
typeTSTupleTypeBaseNode.type

TSTypeAliasDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
declareboolean

Whether the type was declared.

Example

declare type T = 1;
-
idIdentifierThe name of the type.-
typeTSTypeAliasDeclaration-BaseNode.type
typeAnnotationTypeNodeThe "value" (type) of the declaration-
typeParametersundefined | TSTypeParameterDeclaration

The generic type parameters declared for the type. Empty declaration

(<>) is different from no declaration.

-

TSTypeAnnotation

Extends

Properties

PropertyTypeOverrides
typeTSTypeAnnotationBaseNode.type
typeAnnotationTypeNode-

TSTypeAssertion

Extends

Properties

PropertyTypeOverrides
expressionExpression-
typeTSTypeAssertionBaseNode.type
typeAnnotationTypeNode-

TSTypeLiteral

Extends

Properties

PropertyTypeOverrides
membersTypeElement[]-
typeTSTypeLiteralBaseNode.type

TSTypeOperator

Extends

Properties

PropertyTypeOverrides
operator"keyof" | "readonly" | "unique"-
typeTSTypeOperatorBaseNode.type
typeAnnotationundefined | TypeNode-

TSTypeParameter

Extends

Properties

PropertyTypeOverrides
constboolean-
constraintundefined | TypeNode-
defaultundefined | TypeNode-
inboolean-
nameIdentifier-
outboolean-
typeTSTypeParameterBaseNode.type

TSTypeParameterDeclaration

Extends

Properties

PropertyTypeOverrides
paramsTSTypeParameter[]-
typeTSTypeParameterDeclarationBaseNode.type

TSTypeParameterInstantiation

Extends

Properties

PropertyTypeOverrides
paramsTypeNode[]-
typeTSTypeParameterInstantiationBaseNode.type

TSTypePredicate

Extends

Properties

PropertyTypeOverrides
assertsboolean-
parameterNameTSThisType | Identifier-
typeTSTypePredicateBaseNode.type
typeAnnotationnull | TSTypeAnnotation-

TSTypeQuery

Extends

Properties

PropertyTypeOverrides
exprNameTSImportType | EntityName-
typeTSTypeQueryBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-

TSTypeReference

Extends

Properties

PropertyTypeOverrides
typeTSTypeReferenceBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-
typeNameEntityName-

TSUndefinedKeyword

Extends

Properties

PropertyTypeOverrides
typeTSUndefinedKeywordBaseNode.type

TSUnionType

Extends

Properties

PropertyTypeOverrides
typeTSUnionTypeBaseNode.type
typesTypeNode[]-

TSUnknownKeyword

Extends

Properties

PropertyTypeOverrides
typeTSUnknownKeywordBaseNode.type

TSVoidKeyword

Extends

Properties

PropertyTypeOverrides
typeTSVoidKeywordBaseNode.type

TaggedTemplateExpression

Extends

Properties

PropertyTypeOverrides
quasiTemplateLiteral-
tagExpression-
typeTaggedTemplateExpressionBaseNode.type
typeArgumentsundefined | TSTypeParameterInstantiation-

TemplateElement

Extends

Properties

PropertyTypeOverrides
tailboolean-
typeTemplateElementBaseNode.type
valueobject-
value.cookedstring-
value.rawstring-

TemplateLiteral

Extends

Properties

PropertyTypeOverrides
expressionsExpression[]-
quasisTemplateElement[]-
typeTemplateLiteralBaseNode.type

TemplateToken

Extends

  • BaseToken

Properties

PropertyTypeOverrides
typeTemplateBaseToken.type

ThisExpression

Extends

Properties

PropertyTypeOverrides
typeThisExpressionBaseNode.type

ThrowStatement

Extends

Properties

PropertyTypeOverrides
argumentnull | TSAsExpression | Statement-
typeThrowStatementBaseNode.type

TryStatement

Extends

Properties

PropertyTypeOverrides
blockBlockStatement-
finalizernull | BlockStatement-
handlernull | CatchClause-
typeTryStatementBaseNode.type

UnaryExpression

Extends

  • UnaryExpressionBase

Properties

PropertyTypeOverrides
operator| "-" | "!" | "+" | "~" | "delete" | "typeof" | "void"UnaryExpressionBase.operator
typeUnaryExpressionUnaryExpressionBase.type

UpdateExpression

Extends

  • UnaryExpressionBase

Properties

PropertyTypeOverrides
operator"--" | "++"UnaryExpressionBase.operator
typeUpdateExpressionUnaryExpressionBase.type

UsingInForOfDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
declarationsUsingInForOfDeclarator[]

The variables declared by this declaration. Note that there may be 0 declarations (i.e. const;).

Example

for(using x of y)
-
declarefalseThis value will always be false because 'declare' modifier cannot appear on a 'using' declaration.-
kind"await using" | "using"

The keyword used to declare the variable(s)

Example

for(using x of y)

for(await using x of y)

-
typeVariableDeclaration-BaseNode.type

UsingInForOfDeclarator

Extends

Properties

PropertyTypeOverrides
definiteboolean-
idIdentifier-
initnull-
typeVariableDeclaratorBaseNode.type

UsingInNomalConextDeclarator

Extends

Properties

PropertyTypeOverrides
definiteboolean-
idIdentifier-
initExpression-
typeVariableDeclaratorBaseNode.type

UsingInNormalContextDeclaration

Extends

Properties

PropertyTypeDescriptionOverrides
declarationsUsingInNomalConextDeclarator[]

The variables declared by this declaration. Note that there may be 0 declarations (i.e. const;).

Example

using x = 1;

using y =1, z = 2;

-
declarefalseThis value will always be false because 'declare' modifier cannot appear on a 'using' declaration.-
kind"await using" | "using"

The keyword used to declare the variable(s)

Example

using x = 1;

await using y = 2;

-
typeVariableDeclaration-BaseNode.type

WhileStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
testExpression-
typeWhileStatementBaseNode.type

WithStatement

Extends

Properties

PropertyTypeOverrides
bodyStatement-
objectExpression-
typeWithStatementBaseNode.type

YieldExpression

Extends

Properties

PropertyTypeOverrides
argumentundefined | Expression-
delegateboolean-
typeYieldExpressionBaseNode.type

Type Aliases

Accessibility

type Accessibility: "private" | "protected" | "public";

Source

base/Accessibility.ts:1


AccessorProperty

type AccessorProperty: AccessorPropertyComputedName | AccessorPropertyNonComputedName;

Source

element/AccessorProperty/spec.ts:17


BindingName

type BindingName: BindingPattern | Identifier;

Source

unions/BindingName.ts:4


BindingPattern

type BindingPattern: ArrayPattern | ObjectPattern;

Source

unions/BindingPattern.ts:4


CallExpressionArgument

type CallExpressionArgument: Expression | SpreadElement;

Source

unions/CallExpressionArgument.ts:4


ChainElement

type ChainElement: CallExpression | MemberExpression | TSNonNullExpression;

Source

unions/ChainElement.ts:5


ClassDeclaration

type ClassDeclaration: ClassDeclarationWithName | ClassDeclarationWithOptionalName;

Source

declaration/ClassDeclaration/spec.ts:29


ClassElement

type ClassElement: 
| AccessorProperty
| MethodDefinition
| PropertyDefinition
| StaticBlock
| TSAbstractAccessorProperty
| TSAbstractMethodDefinition
| TSAbstractPropertyDefinition
| TSIndexSignature;

Source

unions/ClassElement.ts:10


ClassPropertyNameNonComputed

type ClassPropertyNameNonComputed: PrivateIdentifier | PropertyNameNonComputed;

Source

unions/PropertyName.ts:16


Comment

type Comment: BlockComment | LineComment;

Source

unions/Comment.ts:4


DeclarationStatement

type DeclarationStatement: 
| ClassDeclaration
| ClassExpression
| ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| FunctionDeclaration
| TSDeclareFunction
| TSEnumDeclaration
| TSImportEqualsDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSNamespaceExportDeclaration
| TSTypeAliasDeclaration;

Deprecated

Note that this is neither up to date nor fully correct.

Source

unions/DeclarationStatement.ts:20


DefaultExportDeclarations

type DefaultExportDeclarations: 
| ClassDeclarationWithOptionalName
| Expression
| FunctionDeclarationWithName
| FunctionDeclarationWithOptionalName
| TSDeclareFunction
| TSEnumDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration;

Source

unions/ExportDeclaration.ts:20


DestructuringPattern

type DestructuringPattern: 
| ArrayPattern
| AssignmentPattern
| Identifier
| MemberExpression
| ObjectPattern
| RestElement;

Source

unions/DestructuringPattern.ts:8


EntityName

type EntityName: Identifier | ThisExpression | TSQualifiedName;

Source

unions/EntityName.ts:5


ExportDeclaration

type ExportDeclaration: DefaultExportDeclarations | NamedExportDeclarations;

Source

unions/ExportDeclaration.ts:48


ExportNamedDeclaration

type ExportNamedDeclaration: ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource;

Source

declaration/ExportNamedDeclaration/spec.ts:117


Expression

type Expression: 
| ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| AssignmentExpression
| AwaitExpression
| BinaryExpression
| CallExpression
| ChainExpression
| ClassExpression
| ConditionalExpression
| FunctionExpression
| Identifier
| ImportExpression
| JSXElement
| JSXFragment
| LiteralExpression
| LogicalExpression
| MemberExpression
| MetaProperty
| NewExpression
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| TemplateLiteral
| ThisExpression
| TSAsExpression
| TSInstantiationExpression
| TSNonNullExpression
| TSSatisfiesExpression
| TSTypeAssertion
| UnaryExpression
| UpdateExpression
| YieldExpression;

Source

unions/Expression.ts:45


ForInitialiser

type ForInitialiser: Expression | LetOrConstOrVarDeclaration;

Source

unions/ForInitialiser.ts:4


FunctionDeclaration

type FunctionDeclaration: FunctionDeclarationWithName | FunctionDeclarationWithOptionalName;

Source

declaration/FunctionDeclaration/spec.ts:34


FunctionLike

type FunctionLike: 
| ArrowFunctionExpression
| FunctionDeclaration
| FunctionExpression
| TSDeclareFunction
| TSEmptyBodyFunctionExpression;

Source

unions/FunctionLike.ts:7


ImportClause

type ImportClause: ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier;

Source

unions/ImportClause.ts:5


IterationStatement

type IterationStatement: 
| DoWhileStatement
| ForInStatement
| ForOfStatement
| ForStatement
| WhileStatement;

Source

unions/IterationStatement.ts:7


JSXChild

type JSXChild: JSXElement | JSXExpression | JSXFragment | JSXText;

Source

unions/JSXChild.ts:6


JSXExpression

type JSXExpression: JSXExpressionContainer | JSXSpreadChild;

Source

unions/JSXExpression.ts:4


JSXTagNameExpression

type JSXTagNameExpression: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;

Source

unions/JSXTagNameExpression.ts:5


LeftHandSideExpression

type LeftHandSideExpression: 
| ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| CallExpression
| ClassExpression
| FunctionExpression
| Identifier
| JSXElement
| JSXFragment
| LiteralExpression
| MemberExpression
| MetaProperty
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| ThisExpression
| TSAsExpression
| TSNonNullExpression
| TSTypeAssertion;

Source

unions/LeftHandSideExpression.ts:23


Literal

type Literal: 
| BigIntLiteral
| BooleanLiteral
| NullLiteral
| NumberLiteral
| RegExpLiteral
| StringLiteral;

Source

unions/Literal.ts:8


LiteralExpression

type LiteralExpression: Literal | TemplateLiteral;

Source

unions/LiteralExpression.ts:4


MemberExpression

type MemberExpression: MemberExpressionComputedName | MemberExpressionNonComputedName;

Source

expression/MemberExpression/spec.ts:26


MethodDefinition

type MethodDefinition: MethodDefinitionComputedName | MethodDefinitionNonComputedName;

Source

element/MethodDefinition/spec.ts:17


NamedExportDeclarations

type NamedExportDeclarations: 
| ClassDeclarationWithName
| ClassDeclarationWithOptionalName
| FunctionDeclarationWithName
| FunctionDeclarationWithOptionalName
| TSDeclareFunction
| TSEnumDeclaration
| TSImportEqualsDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration;

Source

unions/ExportDeclaration.ts:34


Node

type Node: 
| AccessorProperty
| ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| AssignmentExpression
| AssignmentPattern
| AwaitExpression
| BinaryExpression
| BlockStatement
| BreakStatement
| CallExpression
| CatchClause
| ChainExpression
| ClassBody
| ClassDeclaration
| ClassExpression
| ConditionalExpression
| ContinueStatement
| DebuggerStatement
| Decorator
| DoWhileStatement
| EmptyStatement
| ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| ExportSpecifier
| ExpressionStatement
| ForInStatement
| ForOfStatement
| ForStatement
| FunctionDeclaration
| FunctionExpression
| Identifier
| IfStatement
| ImportAttribute
| ImportDeclaration
| ImportDefaultSpecifier
| ImportExpression
| ImportNamespaceSpecifier
| ImportSpecifier
| JSXAttribute
| JSXClosingElement
| JSXClosingFragment
| JSXElement
| JSXEmptyExpression
| JSXExpressionContainer
| JSXFragment
| JSXIdentifier
| JSXMemberExpression
| JSXNamespacedName
| JSXOpeningElement
| JSXOpeningFragment
| JSXSpreadAttribute
| JSXSpreadChild
| JSXText
| LabeledStatement
| Literal
| LogicalExpression
| MemberExpression
| MetaProperty
| MethodDefinition
| NewExpression
| ObjectExpression
| ObjectPattern
| PrivateIdentifier
| Program
| Property
| PropertyDefinition
| RestElement
| ReturnStatement
| SequenceExpression
| SpreadElement
| StaticBlock
| Super
| SwitchCase
| SwitchStatement
| TaggedTemplateExpression
| TemplateElement
| TemplateLiteral
| ThisExpression
| ThrowStatement
| TryStatement
| TSAbstractAccessorProperty
| TSAbstractKeyword
| TSAbstractMethodDefinition
| TSAbstractPropertyDefinition
| TSAnyKeyword
| TSArrayType
| TSAsExpression
| TSAsyncKeyword
| TSBigIntKeyword
| TSBooleanKeyword
| TSCallSignatureDeclaration
| TSClassImplements
| TSConditionalType
| TSConstructorType
| TSConstructSignatureDeclaration
| TSDeclareFunction
| TSDeclareKeyword
| TSEmptyBodyFunctionExpression
| TSEnumBody
| TSEnumDeclaration
| TSEnumMember
| TSExportAssignment
| TSExportKeyword
| TSExternalModuleReference
| TSFunctionType
| TSImportEqualsDeclaration
| TSImportType
| TSIndexedAccessType
| TSIndexSignature
| TSInferType
| TSInstantiationExpression
| TSInterfaceBody
| TSInterfaceDeclaration
| TSInterfaceHeritage
| TSIntersectionType
| TSIntrinsicKeyword
| TSLiteralType
| TSMappedType
| TSMethodSignature
| TSModuleBlock
| TSModuleDeclaration
| TSNamedTupleMember
| TSNamespaceExportDeclaration
| TSNeverKeyword
| TSNonNullExpression
| TSNullKeyword
| TSNumberKeyword
| TSObjectKeyword
| TSOptionalType
| TSParameterProperty
| TSPrivateKeyword
| TSPropertySignature
| TSProtectedKeyword
| TSPublicKeyword
| TSQualifiedName
| TSReadonlyKeyword
| TSRestType
| TSSatisfiesExpression
| TSStaticKeyword
| TSStringKeyword
| TSSymbolKeyword
| TSTemplateLiteralType
| TSThisType
| TSTupleType
| TSTypeAliasDeclaration
| TSTypeAnnotation
| TSTypeAssertion
| TSTypeLiteral
| TSTypeOperator
| TSTypeParameter
| TSTypeParameterDeclaration
| TSTypeParameterInstantiation
| TSTypePredicate
| TSTypeQuery
| TSTypeReference
| TSUndefinedKeyword
| TSUnionType
| TSUnknownKeyword
| TSVoidKeyword
| UnaryExpression
| UpdateExpression
| VariableDeclaration
| VariableDeclarator
| WhileStatement
| WithStatement
| YieldExpression;

Source

unions/Node.ts:175


ObjectLiteralElement

type ObjectLiteralElement: Property | SpreadElement;

Source

unions/ObjectLiteralElement.ts:4


ObjectLiteralElementLike

type ObjectLiteralElementLike: ObjectLiteralElement;

Source

unions/ObjectLiteralElement.ts:7


OptionalRangeAndLoc<T>

type OptionalRangeAndLoc<T>: Pick<T, Exclude<keyof T, "loc" | "range">> & object;

Type declaration

MemberType
locSourceLocation
rangeRange

Type parameters

Type parameter
T

Source

base/OptionalRangeAndLoc.ts:5


Parameter

type Parameter: 
| ArrayPattern
| AssignmentPattern
| Identifier
| ObjectPattern
| RestElement
| TSParameterProperty;

Source

unions/Parameter.ts:8


PrimaryExpression

type PrimaryExpression: 
| ArrayExpression
| ArrayPattern
| ClassExpression
| FunctionExpression
| Identifier
| JSXElement
| JSXFragment
| JSXOpeningElement
| LiteralExpression
| MetaProperty
| ObjectExpression
| ObjectPattern
| Super
| TemplateLiteral
| ThisExpression
| TSNullKeyword;

Source

unions/PrimaryExpression.ts:19


ProgramStatement

type ProgramStatement: 
| ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| ImportDeclaration
| Statement
| TSImportEqualsDeclaration
| TSNamespaceExportDeclaration;

Source

unions/Statement.ts:71


Property

type Property: PropertyComputedName | PropertyNonComputedName;

Source

element/Property/spec.ts:37


PropertyDefinition

type PropertyDefinition: PropertyDefinitionComputedName | PropertyDefinitionNonComputedName;

Source

element/PropertyDefinition/spec.ts:17


PropertyName

type PropertyName: ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed;

Source

unions/PropertyName.ts:7


PropertyNameComputed

type PropertyNameComputed: Expression;

Source

unions/PropertyName.ts:11


PropertyNameNonComputed

type PropertyNameNonComputed: Identifier | NumberLiteral | StringLiteral;

Source

unions/PropertyName.ts:12


Range

type Range: [number, number];

An array of two numbers. Both numbers are a 0-based index which is the position in the array of source code characters. The first is the start position of the node, the second is the end position of the node.

Source

base/Range.ts:6


Statement

type Statement: 
| BlockStatement
| BreakStatement
| ClassDeclarationWithName
| ContinueStatement
| DebuggerStatement
| DoWhileStatement
| EmptyStatement
| ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| ExpressionStatement
| ForInStatement
| ForOfStatement
| ForStatement
| FunctionDeclarationWithName
| IfStatement
| ImportDeclaration
| LabeledStatement
| ReturnStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| TSDeclareFunction
| TSEnumDeclaration
| TSExportAssignment
| TSImportEqualsDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSNamespaceExportDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration
| WhileStatement
| WithStatement;

Source

unions/Statement.ts:35


TSAbstractAccessorProperty

type TSAbstractAccessorProperty: TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName;

Source

element/TSAbstractAccessorProperty/spec.ts:20


TSAbstractMethodDefinition

type TSAbstractMethodDefinition: TSAbstractMethodDefinitionComputedName | TSAbstractMethodDefinitionNonComputedName;

Source

element/TSAbstractMethodDefinition/spec.ts:18


TSAbstractPropertyDefinition

type TSAbstractPropertyDefinition: TSAbstractPropertyDefinitionComputedName | TSAbstractPropertyDefinitionNonComputedName;

Source

element/TSAbstractPropertyDefinition/spec.ts:20


TSDeclareFunction

type TSDeclareFunction: TSDeclareFunctionNoDeclare | TSDeclareFunctionWithDeclare;

Source

declaration/TSDeclareFunction/spec.ts:53


TSEnumMember

type TSEnumMember: TSEnumMemberComputedName | TSEnumMemberNonComputedName;

Source

element/TSEnumMember/spec.ts:42


TSImportEqualsDeclaration

type TSImportEqualsDeclaration: TSImportEqualsNamespaceDeclaration | TSImportEqualsRequireDeclaration;

Source

declaration/TSImportEqualsDeclaration/spec.ts:62


TSMethodSignature

type TSMethodSignature: TSMethodSignatureComputedName | TSMethodSignatureNonComputedName;

Source

element/TSMethodSignature/spec.ts:37


TSModuleDeclaration

type TSModuleDeclaration: TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace;

Source

declaration/TSModuleDeclaration/spec.ts:132


TSModuleDeclarationKind

type TSModuleDeclarationKind: "global" | "module" | "namespace";

Source

declaration/TSModuleDeclaration/spec.ts:9


TSModuleDeclarationModule

type TSModuleDeclarationModule: TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId;

Source

declaration/TSModuleDeclaration/spec.ts:129


TSModuleDeclarationModuleWithStringId

type TSModuleDeclarationModuleWithStringId: TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared;

Source

declaration/TSModuleDeclaration/spec.ts:126


TSPropertySignature

type TSPropertySignature: TSPropertySignatureComputedName | TSPropertySignatureNonComputedName;

Source

element/TSPropertySignature/spec.ts:34


TSUnaryExpression

type TSUnaryExpression: AwaitExpression | LeftHandSideExpression | UnaryExpression | UpdateExpression;

Source

unions/TSUnaryExpression.ts:7


Token

type Token: 
| BooleanToken
| Comment
| IdentifierToken
| JSXIdentifierToken
| JSXTextToken
| KeywordToken
| NullToken
| NumericToken
| PunctuatorToken
| RegularExpressionToken
| StringToken
| TemplateToken;

Source

unions/Token.ts:14


TypeElement

type TypeElement: 
| TSCallSignatureDeclaration
| TSConstructSignatureDeclaration
| TSIndexSignature
| TSMethodSignature
| TSPropertySignature;

Source

unions/TypeElement.ts:7


TypeNode

type TypeNode: 
| TSAbstractKeyword
| TSAnyKeyword
| TSArrayType
| TSAsyncKeyword
| TSBigIntKeyword
| TSBooleanKeyword
| TSConditionalType
| TSConstructorType
| TSDeclareKeyword
| TSExportKeyword
| TSFunctionType
| TSImportType
| TSIndexedAccessType
| TSInferType
| TSIntersectionType
| TSIntrinsicKeyword
| TSLiteralType
| TSMappedType
| TSNamedTupleMember
| TSNeverKeyword
| TSNullKeyword
| TSNumberKeyword
| TSObjectKeyword
| TSOptionalType
| TSPrivateKeyword
| TSProtectedKeyword
| TSPublicKeyword
| TSQualifiedName
| TSReadonlyKeyword
| TSRestType
| TSStaticKeyword
| TSStringKeyword
| TSSymbolKeyword
| TSTemplateLiteralType
| TSThisType
| TSTupleType
| TSTypeLiteral
| TSTypeOperator
| TSTypePredicate
| TSTypeQuery
| TSTypeReference
| TSUndefinedKeyword
| TSUnionType
| TSUnknownKeyword
| TSVoidKeyword;

Source

unions/TypeNode.ts:47


UsingDeclaration

type UsingDeclaration: UsingInForOfDeclaration | UsingInNormalContextDeclaration;

Source

declaration/VariableDeclaration/spec.ts:99


UsingDeclarator

type UsingDeclarator: UsingInForOfDeclarator | UsingInNomalConextDeclarator;

Source

special/VariableDeclarator/spec.ts:28


VariableDeclaration

type VariableDeclaration: LetOrConstOrVarDeclaration | UsingDeclaration;

Source

declaration/VariableDeclaration/spec.ts:103


VariableDeclarator

type VariableDeclarator: LetOrConstOrVarDeclarator | UsingDeclarator;

Source

special/VariableDeclarator/spec.ts:32