Skip to content

Commit

Permalink
Add a jump-table for visitEachChild
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Aug 11, 2022
1 parent 8a24fe7 commit b43e228
Show file tree
Hide file tree
Showing 2 changed files with 911 additions and 909 deletions.
138 changes: 138 additions & 0 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit b43e228

Please sign in to comment.