mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add a jump-table for visitEachChild (#50266)
* Add a jump-table for visitEachChild * Name each visitor function for better stack traces * Fix node tests and some minor cleanup
This commit is contained in:
parent
7bafbeae90
commit
1592210673
@ -885,6 +885,144 @@ namespace ts {
|
||||
/* @internal */ jsDocCache?: readonly JSDocTag[]; // Cache for getJSDocTags
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export type HasChildren =
|
||||
| Identifier
|
||||
| QualifiedName
|
||||
| ComputedPropertyName
|
||||
| TypeParameterDeclaration
|
||||
| ParameterDeclaration
|
||||
| Decorator
|
||||
| PropertySignature
|
||||
| PropertyDeclaration
|
||||
| MethodSignature
|
||||
| MethodDeclaration
|
||||
| ConstructorDeclaration
|
||||
| GetAccessorDeclaration
|
||||
| SetAccessorDeclaration
|
||||
| ClassStaticBlockDeclaration
|
||||
| CallSignatureDeclaration
|
||||
| ConstructSignatureDeclaration
|
||||
| IndexSignatureDeclaration
|
||||
| TypePredicateNode
|
||||
| TypeReferenceNode
|
||||
| FunctionTypeNode
|
||||
| ConstructorTypeNode
|
||||
| TypeQueryNode
|
||||
| TypeLiteralNode
|
||||
| ArrayTypeNode
|
||||
| TupleTypeNode
|
||||
| OptionalTypeNode
|
||||
| RestTypeNode
|
||||
| UnionTypeNode
|
||||
| IntersectionTypeNode
|
||||
| ConditionalTypeNode
|
||||
| InferTypeNode
|
||||
| ImportTypeNode
|
||||
| ImportTypeAssertionContainer
|
||||
| NamedTupleMember
|
||||
| ParenthesizedTypeNode
|
||||
| TypeOperatorNode
|
||||
| IndexedAccessTypeNode
|
||||
| MappedTypeNode
|
||||
| LiteralTypeNode
|
||||
| TemplateLiteralTypeNode
|
||||
| TemplateLiteralTypeSpan
|
||||
| ObjectBindingPattern
|
||||
| ArrayBindingPattern
|
||||
| BindingElement
|
||||
| ArrayLiteralExpression
|
||||
| ObjectLiteralExpression
|
||||
| PropertyAccessExpression
|
||||
| ElementAccessExpression
|
||||
| CallExpression
|
||||
| NewExpression
|
||||
| TaggedTemplateExpression
|
||||
| TypeAssertion
|
||||
| ParenthesizedExpression
|
||||
| FunctionExpression
|
||||
| ArrowFunction
|
||||
| DeleteExpression
|
||||
| TypeOfExpression
|
||||
| VoidExpression
|
||||
| AwaitExpression
|
||||
| PrefixUnaryExpression
|
||||
| PostfixUnaryExpression
|
||||
| BinaryExpression
|
||||
| ConditionalExpression
|
||||
| TemplateExpression
|
||||
| YieldExpression
|
||||
| SpreadElement
|
||||
| ClassExpression
|
||||
| ExpressionWithTypeArguments
|
||||
| AsExpression
|
||||
| NonNullExpression
|
||||
| MetaProperty
|
||||
| TemplateSpan
|
||||
| Block
|
||||
| VariableStatement
|
||||
| ExpressionStatement
|
||||
| IfStatement
|
||||
| DoStatement
|
||||
| WhileStatement
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| ContinueStatement
|
||||
| BreakStatement
|
||||
| ReturnStatement
|
||||
| WithStatement
|
||||
| SwitchStatement
|
||||
| LabeledStatement
|
||||
| ThrowStatement
|
||||
| TryStatement
|
||||
| VariableDeclaration
|
||||
| VariableDeclarationList
|
||||
| FunctionDeclaration
|
||||
| ClassDeclaration
|
||||
| InterfaceDeclaration
|
||||
| TypeAliasDeclaration
|
||||
| EnumDeclaration
|
||||
| ModuleDeclaration
|
||||
| ModuleBlock
|
||||
| CaseBlock
|
||||
| NamespaceExportDeclaration
|
||||
| ImportEqualsDeclaration
|
||||
| ImportDeclaration
|
||||
| AssertClause
|
||||
| AssertEntry
|
||||
| ImportClause
|
||||
| NamespaceImport
|
||||
| NamespaceExport
|
||||
| NamedImports
|
||||
| ImportSpecifier
|
||||
| ExportAssignment
|
||||
| ExportDeclaration
|
||||
| NamedExports
|
||||
| ExportSpecifier
|
||||
| ExternalModuleReference
|
||||
| JsxElement
|
||||
| JsxSelfClosingElement
|
||||
| JsxOpeningElement
|
||||
| JsxClosingElement
|
||||
| JsxFragment
|
||||
| JsxAttribute
|
||||
| JsxAttributes
|
||||
| JsxSpreadAttribute
|
||||
| JsxExpression
|
||||
| CaseClause
|
||||
| DefaultClause
|
||||
| HeritageClause
|
||||
| CatchClause
|
||||
| PropertyAssignment
|
||||
| ShorthandPropertyAssignment
|
||||
| SpreadAssignment
|
||||
| EnumMember
|
||||
| SourceFile
|
||||
| PartiallyEmittedExpression
|
||||
| CommaListExpression
|
||||
;
|
||||
|
||||
export type HasJSDoc =
|
||||
| ParameterDeclaration
|
||||
| CallSignatureDeclaration
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user