syntaxWalker.d.ts 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /**
  2. * @license
  3. * Copyright 2013 Palantir Technologies, Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import * as ts from "typescript";
  18. export declare class SyntaxWalker {
  19. walk(node: ts.Node): void;
  20. protected visitAnyKeyword(node: ts.Node): void;
  21. protected visitArrayLiteralExpression(node: ts.ArrayLiteralExpression): void;
  22. protected visitArrayType(node: ts.ArrayTypeNode): void;
  23. protected visitArrowFunction(node: ts.ArrowFunction): void;
  24. protected visitBinaryExpression(node: ts.BinaryExpression): void;
  25. protected visitBindingElement(node: ts.BindingElement): void;
  26. protected visitBindingPattern(node: ts.BindingPattern): void;
  27. protected visitBlock(node: ts.Block): void;
  28. protected visitBreakStatement(node: ts.BreakOrContinueStatement): void;
  29. protected visitCallExpression(node: ts.CallExpression): void;
  30. protected visitCallSignature(node: ts.SignatureDeclaration): void;
  31. protected visitCaseClause(node: ts.CaseClause): void;
  32. protected visitClassDeclaration(node: ts.ClassDeclaration): void;
  33. protected visitClassExpression(node: ts.ClassExpression): void;
  34. protected visitCatchClause(node: ts.CatchClause): void;
  35. protected visitConditionalExpression(node: ts.ConditionalExpression): void;
  36. protected visitConstructSignature(node: ts.ConstructSignatureDeclaration): void;
  37. protected visitConstructorDeclaration(node: ts.ConstructorDeclaration): void;
  38. protected visitConstructorType(node: ts.FunctionOrConstructorTypeNode): void;
  39. protected visitContinueStatement(node: ts.BreakOrContinueStatement): void;
  40. protected visitDebuggerStatement(node: ts.Statement): void;
  41. protected visitDefaultClause(node: ts.DefaultClause): void;
  42. protected visitDoStatement(node: ts.DoStatement): void;
  43. protected visitElementAccessExpression(node: ts.ElementAccessExpression): void;
  44. protected visitEndOfFileToken(node: ts.Node): void;
  45. protected visitEnumDeclaration(node: ts.EnumDeclaration): void;
  46. protected visitEnumMember(node: ts.EnumMember): void;
  47. protected visitExportAssignment(node: ts.ExportAssignment): void;
  48. protected visitExpressionStatement(node: ts.ExpressionStatement): void;
  49. protected visitForStatement(node: ts.ForStatement): void;
  50. protected visitForInStatement(node: ts.ForInStatement): void;
  51. protected visitForOfStatement(node: ts.ForOfStatement): void;
  52. protected visitFunctionDeclaration(node: ts.FunctionDeclaration): void;
  53. protected visitFunctionExpression(node: ts.FunctionExpression): void;
  54. protected visitFunctionType(node: ts.FunctionOrConstructorTypeNode): void;
  55. protected visitGetAccessor(node: ts.AccessorDeclaration): void;
  56. protected visitIdentifier(node: ts.Identifier): void;
  57. protected visitIfStatement(node: ts.IfStatement): void;
  58. protected visitImportDeclaration(node: ts.ImportDeclaration): void;
  59. protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void;
  60. protected visitIndexSignatureDeclaration(node: ts.IndexSignatureDeclaration): void;
  61. protected visitInterfaceDeclaration(node: ts.InterfaceDeclaration): void;
  62. protected visitJsxAttribute(node: ts.JsxAttribute): void;
  63. protected visitJsxElement(node: ts.JsxElement): void;
  64. protected visitJsxExpression(node: ts.JsxExpression): void;
  65. protected visitJsxSelfClosingElement(node: ts.JsxSelfClosingElement): void;
  66. protected visitJsxSpreadAttribute(node: ts.JsxSpreadAttribute): void;
  67. protected visitLabeledStatement(node: ts.LabeledStatement): void;
  68. protected visitMethodDeclaration(node: ts.MethodDeclaration): void;
  69. protected visitMethodSignature(node: ts.SignatureDeclaration): void;
  70. protected visitModuleDeclaration(node: ts.ModuleDeclaration): void;
  71. protected visitNamedImports(node: ts.NamedImports): void;
  72. protected visitNamespaceImport(node: ts.NamespaceImport): void;
  73. protected visitNewExpression(node: ts.NewExpression): void;
  74. protected visitNonNullExpression(node: ts.NonNullExpression): void;
  75. protected visitNumericLiteral(node: ts.NumericLiteral): void;
  76. protected visitObjectLiteralExpression(node: ts.ObjectLiteralExpression): void;
  77. protected visitParameterDeclaration(node: ts.ParameterDeclaration): void;
  78. protected visitPostfixUnaryExpression(node: ts.PostfixUnaryExpression): void;
  79. protected visitPrefixUnaryExpression(node: ts.PrefixUnaryExpression): void;
  80. protected visitPropertyAccessExpression(node: ts.PropertyAccessExpression): void;
  81. protected visitPropertyAssignment(node: ts.PropertyAssignment): void;
  82. protected visitPropertyDeclaration(node: ts.PropertyDeclaration): void;
  83. protected visitPropertySignature(node: ts.Node): void;
  84. protected visitRegularExpressionLiteral(node: ts.Node): void;
  85. protected visitReturnStatement(node: ts.ReturnStatement): void;
  86. protected visitSetAccessor(node: ts.AccessorDeclaration): void;
  87. protected visitSourceFile(node: ts.SourceFile): void;
  88. protected visitStringLiteral(node: ts.StringLiteral): void;
  89. protected visitSwitchStatement(node: ts.SwitchStatement): void;
  90. protected visitTemplateExpression(node: ts.TemplateExpression): void;
  91. protected visitThrowStatement(node: ts.ThrowStatement): void;
  92. protected visitTryStatement(node: ts.TryStatement): void;
  93. protected visitTupleType(node: ts.TupleTypeNode): void;
  94. protected visitTypeAliasDeclaration(node: ts.TypeAliasDeclaration): void;
  95. protected visitTypeAssertionExpression(node: ts.TypeAssertion): void;
  96. protected visitTypeLiteral(node: ts.TypeLiteralNode): void;
  97. protected visitTypeReference(node: ts.TypeReferenceNode): void;
  98. protected visitVariableDeclaration(node: ts.VariableDeclaration): void;
  99. protected visitVariableDeclarationList(node: ts.VariableDeclarationList): void;
  100. protected visitVariableStatement(node: ts.VariableStatement): void;
  101. protected visitWhileStatement(node: ts.WhileStatement): void;
  102. protected visitWithStatement(node: ts.WithStatement): void;
  103. protected visitNode(node: ts.Node): void;
  104. protected walkChildren(node: ts.Node): void;
  105. }