@idlizer/arktscgen 2.1.10-arktscgen-3a → 2.1.10-arktscgen-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/build/libarkts-copy/native/meson.build +1 -1
  2. package/build/libarkts-copy/native/src/bridges.cc +72 -115
  3. package/build/libarkts-copy/native/src/common.cc +225 -84
  4. package/build/libarkts-copy/native/src/common.h +22 -22
  5. package/build/libarkts-copy/native/src/memoryTracker.cc +30 -37
  6. package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
  7. package/build/libarkts-copy/package.json +23 -19
  8. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +176 -100
  9. package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
  10. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +17 -18
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +31 -30
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +20 -17
  13. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +12 -12
  14. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +44 -29
  15. package/build/libarkts-copy/src/arkts-api/index.ts +24 -24
  16. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -12
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +47 -13
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +80 -35
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
  42. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
  43. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -49
  44. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +17 -24
  45. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +29 -37
  46. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +5 -6
  47. package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
  48. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
  49. package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
  50. package/build/libarkts-copy/src/arkts-api/plugins.ts +98 -30
  51. package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
  52. package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
  53. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
  54. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
  55. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
  56. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +39 -23
  57. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +73 -61
  58. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +220 -173
  59. package/build/libarkts-copy/src/arkts-api/visitor.ts +606 -742
  60. package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
  61. package/build/libarkts-copy/src/checkSdk.ts +15 -18
  62. package/build/libarkts-copy/src/index.ts +29 -29
  63. package/build/libarkts-copy/src/plugin-utils.ts +52 -40
  64. package/build/libarkts-copy/src/reexport-for-generated.ts +11 -10
  65. package/build/libarkts-copy/src/tracer.ts +75 -69
  66. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
  67. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
  68. package/build/libarkts-copy/src/ts-api/index.ts +27 -35
  69. package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
  70. package/build/libarkts-copy/src/ts-api/types.ts +535 -395
  71. package/build/libarkts-copy/src/ts-api/utilities/private.ts +115 -112
  72. package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
  73. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
  74. package/build/libarkts-copy/src/utils.ts +97 -70
  75. package/build/libarkts-copy/tsconfig.json +3 -2
  76. package/lib/index.js +428 -159
  77. package/package.json +51 -53
  78. package/templates/Es2pandaNativeModule.ts +1 -0
  79. package/templates/factory.ts +1 -1
  80. package/templates/peer.ts +2 -1
  81. package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16382
  82. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1350
  83. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5195
  84. package/build/libarkts-copy/src/generated/factory.ts +0 -1286
  85. package/build/libarkts-copy/src/generated/index.ts +0 -222
  86. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
  87. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
  88. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
  89. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
  90. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
  91. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
  92. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
  93. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
  94. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
  95. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
  96. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
  97. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
  98. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
  99. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
  100. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
  101. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
  102. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
  103. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
  104. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
  105. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
  106. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
  107. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
  108. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
  109. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
  110. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
  111. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
  112. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
  113. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
  114. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
  115. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
  116. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
  117. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
  118. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
  119. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
  120. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
  121. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
  122. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
  123. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
  124. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
  125. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
  126. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
  127. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
  128. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
  129. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
  130. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -75
  131. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
  132. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
  133. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
  134. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
  135. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
  136. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
  137. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
  138. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
  139. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
  140. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
  141. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
  142. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
  143. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
  144. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
  145. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
  146. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
  147. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
  148. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
  149. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
  150. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
  151. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
  152. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
  153. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
  154. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
  155. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
  156. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
  157. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
  158. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
  159. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
  160. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
  161. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
  162. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
  163. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
  164. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
  165. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
  166. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
  167. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
  168. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
  169. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
  170. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
  171. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
  172. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
  173. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
  174. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
  175. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
  176. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
  177. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
  178. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
  179. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
  180. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
  181. package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
  182. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
  183. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
  184. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
  185. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
  186. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
  187. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
  188. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
  189. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
  190. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
  191. package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
  192. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
  193. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
  194. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
  195. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
  196. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
  197. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
  198. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
  199. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
  200. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
  201. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
  202. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
  203. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
  204. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
  205. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
  206. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
  207. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
  208. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
  209. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
  210. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
  211. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
  212. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
  213. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
  214. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
  215. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
  216. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
  217. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
  218. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
  219. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
  220. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
  221. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
  222. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
  223. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
  224. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
  225. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
  226. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
  227. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
  228. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
  229. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
  230. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
  231. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
  232. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
  233. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
  234. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
  235. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
  236. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
  237. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
  238. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
  239. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
  240. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
  241. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
  242. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
  243. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
  244. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
  245. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
  246. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
  247. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
  248. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
  249. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
  250. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
  251. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
  252. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
  253. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
  254. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
  255. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
  256. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
  257. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
  258. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
  259. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
  260. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
  261. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
  262. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
  263. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
  264. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
  265. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
  266. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
  267. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
  268. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
  269. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
  270. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
  271. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
  272. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
  273. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
  274. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
  275. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
  276. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
  277. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
  278. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
  279. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
  280. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
  281. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
  282. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
  283. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
  284. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
@@ -1,1286 +0,0 @@
1
- /*
2
- * Copyright (c) 2024 Huawei Device Co., Ltd.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- /*
17
- * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY!
18
- */
19
-
20
- import {
21
- global,
22
- passNode,
23
- passNodeArray,
24
- unpackNonNullableNode,
25
- unpackNode,
26
- unpackNodeArray,
27
- AstNode,
28
- KNativePointer,
29
- nodeByType,
30
- ArktsObject,
31
- isSameNativeObject,
32
- unpackString,
33
- updateNodeByNode
34
- } from "../reexport-for-generated"
35
-
36
- import { AnnotationDeclaration } from "./peers/AnnotationDeclaration"
37
- import { AnnotationUsage } from "./peers/AnnotationUsage"
38
- import { ArrowFunctionExpression } from "./peers/ArrowFunctionExpression"
39
- import { AssertStatement } from "./peers/AssertStatement"
40
- import { AwaitExpression } from "./peers/AwaitExpression"
41
- import { BigIntLiteral } from "./peers/BigIntLiteral"
42
- import { BinaryExpression } from "./peers/BinaryExpression"
43
- import { BlockExpression } from "./peers/BlockExpression"
44
- import { BlockStatement } from "./peers/BlockStatement"
45
- import { BooleanLiteral } from "./peers/BooleanLiteral"
46
- import { BreakStatement } from "./peers/BreakStatement"
47
- import { CatchClause } from "./peers/CatchClause"
48
- import { ChainExpression } from "./peers/ChainExpression"
49
- import { CharLiteral } from "./peers/CharLiteral"
50
- import { ClassDeclaration } from "./peers/ClassDeclaration"
51
- import { ClassDefinition } from "./peers/ClassDefinition"
52
- import { ClassExpression } from "./peers/ClassExpression"
53
- import { ConditionalExpression } from "./peers/ConditionalExpression"
54
- import { ContinueStatement } from "./peers/ContinueStatement"
55
- import { DebuggerStatement } from "./peers/DebuggerStatement"
56
- import { Decorator } from "./peers/Decorator"
57
- import { DoWhileStatement } from "./peers/DoWhileStatement"
58
- import { ETSClassLiteral } from "./peers/ETSClassLiteral"
59
- import { ETSIntrinsicNode } from "./peers/ETSIntrinsicNode"
60
- import { ETSKeyofType } from "./peers/ETSKeyofType"
61
- import { ETSNewArrayInstanceExpression } from "./peers/ETSNewArrayInstanceExpression"
62
- import { ETSNewClassInstanceExpression } from "./peers/ETSNewClassInstanceExpression"
63
- import { ETSNewMultiDimArrayInstanceExpression } from "./peers/ETSNewMultiDimArrayInstanceExpression"
64
- import { ETSNullType } from "./peers/ETSNullType"
65
- import { ETSPrimitiveType } from "./peers/ETSPrimitiveType"
66
- import { ETSTypeReference } from "./peers/ETSTypeReference"
67
- import { ETSTypeReferencePart } from "./peers/ETSTypeReferencePart"
68
- import { ETSUndefinedType } from "./peers/ETSUndefinedType"
69
- import { ETSUnionType } from "./peers/ETSUnionType"
70
- import { EmptyStatement } from "./peers/EmptyStatement"
71
- import { Es2pandaIntrinsicNodeType } from "./Es2pandaEnums"
72
- import { Es2pandaMetaPropertyKind } from "./Es2pandaEnums"
73
- import { Es2pandaModifierFlags } from "./Es2pandaEnums"
74
- import { Es2pandaPrimitiveType } from "./Es2pandaEnums"
75
- import { Es2pandaPropertyKind } from "./Es2pandaEnums"
76
- import { Es2pandaTokenType } from "./Es2pandaEnums"
77
- import { Es2pandaVariableDeclarationKind } from "./Es2pandaEnums"
78
- import { ExportAllDeclaration } from "./peers/ExportAllDeclaration"
79
- import { ExportDefaultDeclaration } from "./peers/ExportDefaultDeclaration"
80
- import { ExportSpecifier } from "./peers/ExportSpecifier"
81
- import { Expression } from "./peers/Expression"
82
- import { ExpressionStatement } from "./peers/ExpressionStatement"
83
- import { ForInStatement } from "./peers/ForInStatement"
84
- import { ForOfStatement } from "./peers/ForOfStatement"
85
- import { ForUpdateStatement } from "./peers/ForUpdateStatement"
86
- import { FunctionDeclaration } from "./peers/FunctionDeclaration"
87
- import { FunctionExpression } from "./peers/FunctionExpression"
88
- import { FunctionSignature } from "./peers/FunctionSignature"
89
- import { Identifier } from "./peers/Identifier"
90
- import { IfStatement } from "./peers/IfStatement"
91
- import { ImportDefaultSpecifier } from "./peers/ImportDefaultSpecifier"
92
- import { ImportExpression } from "./peers/ImportExpression"
93
- import { ImportNamespaceSpecifier } from "./peers/ImportNamespaceSpecifier"
94
- import { ImportSpecifier } from "./peers/ImportSpecifier"
95
- import { LabelledStatement } from "./peers/LabelledStatement"
96
- import { MetaProperty } from "./peers/MetaProperty"
97
- import { NamedType } from "./peers/NamedType"
98
- import { NewExpression } from "./peers/NewExpression"
99
- import { NullLiteral } from "./peers/NullLiteral"
100
- import { OmittedExpression } from "./peers/OmittedExpression"
101
- import { OpaqueTypeNode } from "./peers/OpaqueTypeNode"
102
- import { PrefixAssertionExpression } from "./peers/PrefixAssertionExpression"
103
- import { Property } from "./peers/Property"
104
- import { ReturnStatement } from "./peers/ReturnStatement"
105
- import { ScriptFunction } from "./peers/ScriptFunction"
106
- import { SequenceExpression } from "./peers/SequenceExpression"
107
- import { Statement } from "./peers/Statement"
108
- import { StringLiteral } from "./peers/StringLiteral"
109
- import { SuperExpression } from "./peers/SuperExpression"
110
- import { SwitchCaseStatement } from "./peers/SwitchCaseStatement"
111
- import { SwitchStatement } from "./peers/SwitchStatement"
112
- import { TSAnyKeyword } from "./peers/TSAnyKeyword"
113
- import { TSArrayType } from "./peers/TSArrayType"
114
- import { TSAsExpression } from "./peers/TSAsExpression"
115
- import { TSBigintKeyword } from "./peers/TSBigintKeyword"
116
- import { TSBooleanKeyword } from "./peers/TSBooleanKeyword"
117
- import { TSClassImplements } from "./peers/TSClassImplements"
118
- import { TSConditionalType } from "./peers/TSConditionalType"
119
- import { TSEnumMember } from "./peers/TSEnumMember"
120
- import { TSExternalModuleReference } from "./peers/TSExternalModuleReference"
121
- import { TSImportEqualsDeclaration } from "./peers/TSImportEqualsDeclaration"
122
- import { TSImportType } from "./peers/TSImportType"
123
- import { TSIndexSignature } from "./peers/TSIndexSignature"
124
- import { TSIndexedAccessType } from "./peers/TSIndexedAccessType"
125
- import { TSInferType } from "./peers/TSInferType"
126
- import { TSInterfaceBody } from "./peers/TSInterfaceBody"
127
- import { TSInterfaceHeritage } from "./peers/TSInterfaceHeritage"
128
- import { TSIntersectionType } from "./peers/TSIntersectionType"
129
- import { TSLiteralType } from "./peers/TSLiteralType"
130
- import { TSModuleBlock } from "./peers/TSModuleBlock"
131
- import { TSNamedTupleMember } from "./peers/TSNamedTupleMember"
132
- import { TSNeverKeyword } from "./peers/TSNeverKeyword"
133
- import { TSNonNullExpression } from "./peers/TSNonNullExpression"
134
- import { TSNullKeyword } from "./peers/TSNullKeyword"
135
- import { TSNumberKeyword } from "./peers/TSNumberKeyword"
136
- import { TSObjectKeyword } from "./peers/TSObjectKeyword"
137
- import { TSQualifiedName } from "./peers/TSQualifiedName"
138
- import { TSStringKeyword } from "./peers/TSStringKeyword"
139
- import { TSThisType } from "./peers/TSThisType"
140
- import { TSTupleType } from "./peers/TSTupleType"
141
- import { TSTypeAliasDeclaration } from "./peers/TSTypeAliasDeclaration"
142
- import { TSTypeAssertion } from "./peers/TSTypeAssertion"
143
- import { TSTypeLiteral } from "./peers/TSTypeLiteral"
144
- import { TSTypeParameter } from "./peers/TSTypeParameter"
145
- import { TSTypeParameterDeclaration } from "./peers/TSTypeParameterDeclaration"
146
- import { TSTypeParameterInstantiation } from "./peers/TSTypeParameterInstantiation"
147
- import { TSTypePredicate } from "./peers/TSTypePredicate"
148
- import { TSTypeQuery } from "./peers/TSTypeQuery"
149
- import { TSTypeReference } from "./peers/TSTypeReference"
150
- import { TSUndefinedKeyword } from "./peers/TSUndefinedKeyword"
151
- import { TSUnionType } from "./peers/TSUnionType"
152
- import { TSUnknownKeyword } from "./peers/TSUnknownKeyword"
153
- import { TSVoidKeyword } from "./peers/TSVoidKeyword"
154
- import { TaggedTemplateExpression } from "./peers/TaggedTemplateExpression"
155
- import { TemplateElement } from "./peers/TemplateElement"
156
- import { TemplateLiteral } from "./peers/TemplateLiteral"
157
- import { ThisExpression } from "./peers/ThisExpression"
158
- import { ThrowStatement } from "./peers/ThrowStatement"
159
- import { TypeNode } from "./peers/TypeNode"
160
- import { TypeofExpression } from "./peers/TypeofExpression"
161
- import { UnaryExpression } from "./peers/UnaryExpression"
162
- import { UndefinedLiteral } from "./peers/UndefinedLiteral"
163
- import { UpdateExpression } from "./peers/UpdateExpression"
164
- import { VariableDeclaration } from "./peers/VariableDeclaration"
165
- import { VariableDeclarator } from "./peers/VariableDeclarator"
166
- import { WhileStatement } from "./peers/WhileStatement"
167
- import { YieldExpression } from "./peers/YieldExpression"
168
-
169
- export const factory = {
170
- createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement {
171
- return LabelledStatement.createLabelledStatement(ident, body)
172
- }
173
- ,
174
- updateLabelledStatement(original: LabelledStatement, ident?: Identifier, body?: Statement): LabelledStatement {
175
- if (isSameNativeObject(ident, original.ident) && isSameNativeObject(body, original.body))
176
- return original
177
- return updateNodeByNode(LabelledStatement.createLabelledStatement(ident, body), original)
178
- }
179
- ,
180
- createThrowStatement(argument?: Expression): ThrowStatement {
181
- return ThrowStatement.createThrowStatement(argument)
182
- }
183
- ,
184
- updateThrowStatement(original: ThrowStatement, argument?: Expression): ThrowStatement {
185
- if (isSameNativeObject(argument, original.argument))
186
- return original
187
- return updateNodeByNode(ThrowStatement.createThrowStatement(argument), original)
188
- }
189
- ,
190
- createTSVoidKeyword(): TSVoidKeyword {
191
- return TSVoidKeyword.createTSVoidKeyword()
192
- }
193
- ,
194
- updateTSVoidKeyword(original: TSVoidKeyword): TSVoidKeyword {
195
- return updateNodeByNode(TSVoidKeyword.createTSVoidKeyword(), original)
196
- }
197
- ,
198
- createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement {
199
- return IfStatement.createIfStatement(test, consequent, alternate)
200
- }
201
- ,
202
- updateIfStatement(original: IfStatement, test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement {
203
- if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate))
204
- return original
205
- return updateNodeByNode(IfStatement.createIfStatement(test, consequent, alternate), original)
206
- }
207
- ,
208
- createDecorator(expr?: Expression): Decorator {
209
- return Decorator.createDecorator(expr)
210
- }
211
- ,
212
- updateDecorator(original: Decorator, expr?: Expression): Decorator {
213
- if (isSameNativeObject(expr, original.expr))
214
- return original
215
- return updateNodeByNode(Decorator.createDecorator(expr), original)
216
- }
217
- ,
218
- createTSNeverKeyword(): TSNeverKeyword {
219
- return TSNeverKeyword.createTSNeverKeyword()
220
- }
221
- ,
222
- updateTSNeverKeyword(original: TSNeverKeyword): TSNeverKeyword {
223
- return updateNodeByNode(TSNeverKeyword.createTSNeverKeyword(), original)
224
- }
225
- ,
226
- createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier {
227
- return ImportDefaultSpecifier.createImportDefaultSpecifier(local)
228
- }
229
- ,
230
- updateImportDefaultSpecifier(original: ImportDefaultSpecifier, local?: Identifier): ImportDefaultSpecifier {
231
- if (isSameNativeObject(local, original.local))
232
- return original
233
- return updateNodeByNode(ImportDefaultSpecifier.createImportDefaultSpecifier(local), original)
234
- }
235
- ,
236
- createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier {
237
- return ImportSpecifier.createImportSpecifier(imported, local)
238
- }
239
- ,
240
- updateImportSpecifier(original: ImportSpecifier, imported?: Identifier, local?: Identifier): ImportSpecifier {
241
- if (isSameNativeObject(imported, original.imported) && isSameNativeObject(local, original.local))
242
- return original
243
- return updateNodeByNode(ImportSpecifier.createImportSpecifier(imported, local), original)
244
- }
245
- ,
246
- createConditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression {
247
- return ConditionalExpression.createConditionalExpression(test, consequent, alternate)
248
- }
249
- ,
250
- updateConditionalExpression(original: ConditionalExpression, test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression {
251
- if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate))
252
- return original
253
- return updateNodeByNode(ConditionalExpression.createConditionalExpression(test, consequent, alternate), original)
254
- }
255
- ,
256
- createBigIntLiteral(str: string): BigIntLiteral {
257
- return BigIntLiteral.createBigIntLiteral(str)
258
- }
259
- ,
260
- updateBigIntLiteral(original: BigIntLiteral, str: string): BigIntLiteral {
261
- if (isSameNativeObject(str, original.str))
262
- return original
263
- return updateNodeByNode(BigIntLiteral.createBigIntLiteral(str), original)
264
- }
265
- ,
266
- createTSImportType(param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType {
267
- return TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof)
268
- }
269
- ,
270
- updateTSImportType(original: TSImportType, param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType {
271
- if (isSameNativeObject(param, original.param) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(qualifier, original.qualifier) && isSameNativeObject(isTypeof, original.isTypeof))
272
- return original
273
- return updateNodeByNode(TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof), original)
274
- }
275
- ,
276
- createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression {
277
- return TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams)
278
- }
279
- ,
280
- updateTaggedTemplateExpression(original: TaggedTemplateExpression, tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression {
281
- if (isSameNativeObject(tag, original.tag) && isSameNativeObject(quasi, original.quasi) && isSameNativeObject(typeParams, original.typeParams))
282
- return original
283
- return updateNodeByNode(TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams), original)
284
- }
285
- ,
286
- createFunctionDeclaration(_function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
287
- return FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous)
288
- }
289
- ,
290
- updateFunctionDeclaration(original: FunctionDeclaration, _function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
291
- if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(isAnonymous, original.isAnonymous))
292
- return original
293
- return updateNodeByNode(FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous), original)
294
- }
295
- ,
296
- createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference {
297
- return ETSTypeReference.createETSTypeReference(part)
298
- }
299
- ,
300
- updateETSTypeReference(original: ETSTypeReference, part?: ETSTypeReferencePart): ETSTypeReference {
301
- if (isSameNativeObject(part, original.part))
302
- return original
303
- return updateNodeByNode(ETSTypeReference.createETSTypeReference(part), original)
304
- }
305
- ,
306
- createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference {
307
- return TSTypeReference.createTSTypeReference(typeName, typeParams)
308
- }
309
- ,
310
- updateTSTypeReference(original: TSTypeReference, typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference {
311
- if (isSameNativeObject(typeName, original.typeName) && isSameNativeObject(typeParams, original.typeParams))
312
- return original
313
- return updateNodeByNode(TSTypeReference.createTSTypeReference(typeName, typeParams), original)
314
- }
315
- ,
316
- createNamedType(name?: Identifier): NamedType {
317
- return NamedType.createNamedType(name)
318
- }
319
- ,
320
- updateNamedType(original: NamedType, name?: Identifier): NamedType {
321
- if (isSameNativeObject(name, original.name))
322
- return original
323
- return updateNodeByNode(NamedType.createNamedType(name), original)
324
- }
325
- ,
326
- createTemplateElement(raw: string, cooked: string): TemplateElement {
327
- return TemplateElement.create1TemplateElement(raw, cooked)
328
- }
329
- ,
330
- updateTemplateElement(original: TemplateElement, raw: string, cooked: string): TemplateElement {
331
- if (isSameNativeObject(raw, original.raw) && isSameNativeObject(cooked, original.cooked))
332
- return original
333
- return updateNodeByNode(TemplateElement.create1TemplateElement(raw, cooked), original)
334
- }
335
- ,
336
- createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration {
337
- return VariableDeclaration.createVariableDeclaration(kind, declarators, annotations)
338
- }
339
- ,
340
- updateVariableDeclaration(original: VariableDeclaration, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration {
341
- if (isSameNativeObject(kind, original.kind) && isSameNativeObject(declarators, original.declarators) && isSameNativeObject(annotations, original.annotations))
342
- return original
343
- return updateNodeByNode(VariableDeclaration.createVariableDeclaration(kind, declarators, annotations), original)
344
- }
345
- ,
346
- createUndefinedLiteral(): UndefinedLiteral {
347
- return UndefinedLiteral.createUndefinedLiteral()
348
- }
349
- ,
350
- updateUndefinedLiteral(original: UndefinedLiteral): UndefinedLiteral {
351
- return updateNodeByNode(UndefinedLiteral.createUndefinedLiteral(), original)
352
- }
353
- ,
354
- createTSClassImplements(expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements {
355
- return TSClassImplements.createTSClassImplements(expr, typeParameters)
356
- }
357
- ,
358
- updateTSClassImplements(original: TSClassImplements, expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements {
359
- if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeParameters, original.typeParameters))
360
- return original
361
- return updateNodeByNode(TSClassImplements.createTSClassImplements(expr, typeParameters), original)
362
- }
363
- ,
364
- createTSObjectKeyword(): TSObjectKeyword {
365
- return TSObjectKeyword.createTSObjectKeyword()
366
- }
367
- ,
368
- updateTSObjectKeyword(original: TSObjectKeyword): TSObjectKeyword {
369
- return updateNodeByNode(TSObjectKeyword.createTSObjectKeyword(), original)
370
- }
371
- ,
372
- createETSUnionType(types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType {
373
- return ETSUnionType.createETSUnionType(types, annotations)
374
- }
375
- ,
376
- updateETSUnionType(original: ETSUnionType, types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType {
377
- if (isSameNativeObject(types, original.types) && isSameNativeObject(annotations, original.annotations))
378
- return original
379
- return updateNodeByNode(ETSUnionType.createETSUnionType(types, annotations), original)
380
- }
381
- ,
382
- createETSKeyofType(typeRef?: TypeNode): ETSKeyofType {
383
- return ETSKeyofType.createETSKeyofType(typeRef)
384
- }
385
- ,
386
- updateETSKeyofType(original: ETSKeyofType, typeRef?: TypeNode): ETSKeyofType {
387
- if (isSameNativeObject(typeRef, original.typeRef))
388
- return original
389
- return updateNodeByNode(ETSKeyofType.createETSKeyofType(typeRef), original)
390
- }
391
- ,
392
- createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType {
393
- return TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType)
394
- }
395
- ,
396
- updateTSConditionalType(original: TSConditionalType, checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType {
397
- if (isSameNativeObject(checkType, original.checkType) && isSameNativeObject(extendsType, original.extendsType) && isSameNativeObject(trueType, original.trueType) && isSameNativeObject(falseType, original.falseType))
398
- return original
399
- return updateNodeByNode(TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType), original)
400
- }
401
- ,
402
- createTSLiteralType(literal?: Expression): TSLiteralType {
403
- return TSLiteralType.createTSLiteralType(literal)
404
- }
405
- ,
406
- updateTSLiteralType(original: TSLiteralType, literal?: Expression): TSLiteralType {
407
- if (isSameNativeObject(literal, original.literal))
408
- return original
409
- return updateNodeByNode(TSLiteralType.createTSLiteralType(literal), original)
410
- }
411
- ,
412
- createTSTypeAliasDeclaration(id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration {
413
- return TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation, annotations, modifierFlags)
414
- }
415
- ,
416
- updateTSTypeAliasDeclaration(original: TSTypeAliasDeclaration, id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration {
417
- if (isSameNativeObject(id, original.id) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(modifierFlags, original.modifierFlags))
418
- return original
419
- return updateNodeByNode(TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation, annotations, modifierFlags), original)
420
- }
421
- ,
422
- createDebuggerStatement(): DebuggerStatement {
423
- return DebuggerStatement.createDebuggerStatement()
424
- }
425
- ,
426
- updateDebuggerStatement(original: DebuggerStatement): DebuggerStatement {
427
- return updateNodeByNode(DebuggerStatement.createDebuggerStatement(), original)
428
- }
429
- ,
430
- createReturnStatement(argument?: Expression): ReturnStatement {
431
- return ReturnStatement.create1ReturnStatement(argument)
432
- }
433
- ,
434
- updateReturnStatement(original: ReturnStatement, argument?: Expression): ReturnStatement {
435
- if (isSameNativeObject(argument, original.argument))
436
- return original
437
- return updateNodeByNode(ReturnStatement.create1ReturnStatement(argument), original)
438
- }
439
- ,
440
- createExportDefaultDeclaration(decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration {
441
- return ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals)
442
- }
443
- ,
444
- updateExportDefaultDeclaration(original: ExportDefaultDeclaration, decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration {
445
- if (isSameNativeObject(decl, original.decl) && isSameNativeObject(isExportEquals, original.isExportEquals))
446
- return original
447
- return updateNodeByNode(ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals), original)
448
- }
449
- ,
450
- createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody {
451
- return TSInterfaceBody.createTSInterfaceBody(body)
452
- }
453
- ,
454
- updateTSInterfaceBody(original: TSInterfaceBody, body: readonly AstNode[]): TSInterfaceBody {
455
- if (isSameNativeObject(body, original.body))
456
- return original
457
- return updateNodeByNode(TSInterfaceBody.createTSInterfaceBody(body), original)
458
- }
459
- ,
460
- createTSTypeQuery(exprName?: Expression): TSTypeQuery {
461
- return TSTypeQuery.createTSTypeQuery(exprName)
462
- }
463
- ,
464
- updateTSTypeQuery(original: TSTypeQuery, exprName?: Expression): TSTypeQuery {
465
- if (isSameNativeObject(exprName, original.exprName))
466
- return original
467
- return updateNodeByNode(TSTypeQuery.createTSTypeQuery(exprName), original)
468
- }
469
- ,
470
- createTSBigintKeyword(): TSBigintKeyword {
471
- return TSBigintKeyword.createTSBigintKeyword()
472
- }
473
- ,
474
- updateTSBigintKeyword(original: TSBigintKeyword): TSBigintKeyword {
475
- return updateNodeByNode(TSBigintKeyword.createTSBigintKeyword(), original)
476
- }
477
- ,
478
- createProperty(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property {
479
- return Property.create1Property(kind, key, value, isMethod, isComputed)
480
- }
481
- ,
482
- updateProperty(original: Property, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property {
483
- if (isSameNativeObject(kind, original.kind) && isSameNativeObject(key, original.key) && isSameNativeObject(value, original.value) && isSameNativeObject(isMethod, original.isMethod) && isSameNativeObject(isComputed, original.isComputed))
484
- return original
485
- return updateNodeByNode(Property.create1Property(kind, key, value, isMethod, isComputed), original)
486
- }
487
- ,
488
- createStringLiteral(str: string): StringLiteral {
489
- return StringLiteral.create1StringLiteral(str)
490
- }
491
- ,
492
- updateStringLiteral(original: StringLiteral, str: string): StringLiteral {
493
- if (isSameNativeObject(str, original.str))
494
- return original
495
- return updateNodeByNode(StringLiteral.create1StringLiteral(str), original)
496
- }
497
- ,
498
- createTSTypeAssertion(typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion {
499
- return TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression)
500
- }
501
- ,
502
- updateTSTypeAssertion(original: TSTypeAssertion, typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion {
503
- if (isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(expression, original.expression))
504
- return original
505
- return updateNodeByNode(TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression), original)
506
- }
507
- ,
508
- createTSExternalModuleReference(expr?: Expression): TSExternalModuleReference {
509
- return TSExternalModuleReference.createTSExternalModuleReference(expr)
510
- }
511
- ,
512
- updateTSExternalModuleReference(original: TSExternalModuleReference, expr?: Expression): TSExternalModuleReference {
513
- if (isSameNativeObject(expr, original.expr))
514
- return original
515
- return updateNodeByNode(TSExternalModuleReference.createTSExternalModuleReference(expr), original)
516
- }
517
- ,
518
- createTSUndefinedKeyword(): TSUndefinedKeyword {
519
- return TSUndefinedKeyword.createTSUndefinedKeyword()
520
- }
521
- ,
522
- updateTSUndefinedKeyword(original: TSUndefinedKeyword): TSUndefinedKeyword {
523
- return updateNodeByNode(TSUndefinedKeyword.createTSUndefinedKeyword(), original)
524
- }
525
- ,
526
- createUnaryExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression {
527
- return UnaryExpression.createUnaryExpression(argument, operatorType)
528
- }
529
- ,
530
- updateUnaryExpression(original: UnaryExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression {
531
- if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType))
532
- return original
533
- return updateNodeByNode(UnaryExpression.createUnaryExpression(argument, operatorType), original)
534
- }
535
- ,
536
- createForInStatement(left?: AstNode, right?: Expression, body?: Statement): ForInStatement {
537
- return ForInStatement.createForInStatement(left, right, body)
538
- }
539
- ,
540
- updateForInStatement(original: ForInStatement, left?: AstNode, right?: Expression, body?: Statement): ForInStatement {
541
- if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body))
542
- return original
543
- return updateNodeByNode(ForInStatement.createForInStatement(left, right, body), original)
544
- }
545
- ,
546
- createThisExpression(): ThisExpression {
547
- return ThisExpression.createThisExpression()
548
- }
549
- ,
550
- updateThisExpression(original: ThisExpression): ThisExpression {
551
- return updateNodeByNode(ThisExpression.createThisExpression(), original)
552
- }
553
- ,
554
- createBinaryExpression(left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression {
555
- return BinaryExpression.createBinaryExpression(left, right, operatorType)
556
- }
557
- ,
558
- updateBinaryExpression(original: BinaryExpression, left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression {
559
- if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(operatorType, original.operatorType))
560
- return original
561
- return updateNodeByNode(BinaryExpression.createBinaryExpression(left, right, operatorType), original)
562
- }
563
- ,
564
- createSuperExpression(): SuperExpression {
565
- return SuperExpression.createSuperExpression()
566
- }
567
- ,
568
- updateSuperExpression(original: SuperExpression): SuperExpression {
569
- return updateNodeByNode(SuperExpression.createSuperExpression(), original)
570
- }
571
- ,
572
- createAssertStatement(test?: Expression, second?: Expression): AssertStatement {
573
- return AssertStatement.createAssertStatement(test, second)
574
- }
575
- ,
576
- updateAssertStatement(original: AssertStatement, test?: Expression, second?: Expression): AssertStatement {
577
- if (isSameNativeObject(test, original.test) && isSameNativeObject(second, original.second))
578
- return original
579
- return updateNodeByNode(AssertStatement.createAssertStatement(test, second), original)
580
- }
581
- ,
582
- createTSStringKeyword(): TSStringKeyword {
583
- return TSStringKeyword.createTSStringKeyword()
584
- }
585
- ,
586
- updateTSStringKeyword(original: TSStringKeyword): TSStringKeyword {
587
- return updateNodeByNode(TSStringKeyword.createTSStringKeyword(), original)
588
- }
589
- ,
590
- createExpressionStatement(expression?: Expression): ExpressionStatement {
591
- return ExpressionStatement.createExpressionStatement(expression)
592
- }
593
- ,
594
- updateExpressionStatement(original: ExpressionStatement, expression?: Expression): ExpressionStatement {
595
- if (isSameNativeObject(expression, original.expression))
596
- return original
597
- return updateNodeByNode(ExpressionStatement.createExpressionStatement(expression), original)
598
- }
599
- ,
600
- createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty {
601
- return MetaProperty.createMetaProperty(kind)
602
- }
603
- ,
604
- updateMetaProperty(original: MetaProperty, kind: Es2pandaMetaPropertyKind): MetaProperty {
605
- if (isSameNativeObject(kind, original.kind))
606
- return original
607
- return updateNodeByNode(MetaProperty.createMetaProperty(kind), original)
608
- }
609
- ,
610
- createTSArrayType(elementType?: TypeNode): TSArrayType {
611
- return TSArrayType.createTSArrayType(elementType)
612
- }
613
- ,
614
- updateTSArrayType(original: TSArrayType, elementType?: TypeNode): TSArrayType {
615
- if (isSameNativeObject(elementType, original.elementType))
616
- return original
617
- return updateNodeByNode(TSArrayType.createTSArrayType(elementType), original)
618
- }
619
- ,
620
- createExportAllDeclaration(source?: StringLiteral, exported?: Identifier): ExportAllDeclaration {
621
- return ExportAllDeclaration.createExportAllDeclaration(source, exported)
622
- }
623
- ,
624
- updateExportAllDeclaration(original: ExportAllDeclaration, source?: StringLiteral, exported?: Identifier): ExportAllDeclaration {
625
- if (isSameNativeObject(source, original.source) && isSameNativeObject(exported, original.exported))
626
- return original
627
- return updateNodeByNode(ExportAllDeclaration.createExportAllDeclaration(source, exported), original)
628
- }
629
- ,
630
- createExportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier {
631
- return ExportSpecifier.createExportSpecifier(local, exported)
632
- }
633
- ,
634
- updateExportSpecifier(original: ExportSpecifier, local?: Identifier, exported?: Identifier): ExportSpecifier {
635
- if (isSameNativeObject(local, original.local) && isSameNativeObject(exported, original.exported))
636
- return original
637
- return updateNodeByNode(ExportSpecifier.createExportSpecifier(local, exported), original)
638
- }
639
- ,
640
- createTSTupleType(elementType: readonly TypeNode[]): TSTupleType {
641
- return TSTupleType.createTSTupleType(elementType)
642
- }
643
- ,
644
- updateTSTupleType(original: TSTupleType, elementType: readonly TypeNode[]): TSTupleType {
645
- if (isSameNativeObject(elementType, original.elementType))
646
- return original
647
- return updateNodeByNode(TSTupleType.createTSTupleType(elementType), original)
648
- }
649
- ,
650
- createFunctionExpression(id?: Identifier, _function?: ScriptFunction): FunctionExpression {
651
- return FunctionExpression.create1FunctionExpression(id, _function)
652
- }
653
- ,
654
- updateFunctionExpression(original: FunctionExpression, id?: Identifier, _function?: ScriptFunction): FunctionExpression {
655
- if (isSameNativeObject(id, original.id) && isSameNativeObject(_function, original.function))
656
- return original
657
- return updateNodeByNode(FunctionExpression.create1FunctionExpression(id, _function), original)
658
- }
659
- ,
660
- createTSIndexSignature(param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature {
661
- return TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly)
662
- }
663
- ,
664
- updateTSIndexSignature(original: TSIndexSignature, param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature {
665
- if (isSameNativeObject(param, original.param) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(readonly, original.readonly))
666
- return original
667
- return updateNodeByNode(TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly), original)
668
- }
669
- ,
670
- createCharLiteral(): CharLiteral {
671
- return CharLiteral.createCharLiteral()
672
- }
673
- ,
674
- updateCharLiteral(original: CharLiteral): CharLiteral {
675
- return updateNodeByNode(CharLiteral.createCharLiteral(), original)
676
- }
677
- ,
678
- createETSIntrinsicNode(type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode {
679
- return ETSIntrinsicNode.create2ETSIntrinsicNode(type, _arguments)
680
- }
681
- ,
682
- updateETSIntrinsicNode(original: ETSIntrinsicNode, type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode {
683
- if (isSameNativeObject(type, original.type) && isSameNativeObject(_arguments, original.arguments))
684
- return original
685
- return updateNodeByNode(ETSIntrinsicNode.create2ETSIntrinsicNode(type, _arguments), original)
686
- }
687
- ,
688
- createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock {
689
- return TSModuleBlock.createTSModuleBlock(statements)
690
- }
691
- ,
692
- updateTSModuleBlock(original: TSModuleBlock, statements: readonly Statement[]): TSModuleBlock {
693
- if (isSameNativeObject(statements, original.statements))
694
- return original
695
- return updateNodeByNode(TSModuleBlock.createTSModuleBlock(statements), original)
696
- }
697
- ,
698
- createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression {
699
- return ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension)
700
- }
701
- ,
702
- updateETSNewArrayInstanceExpression(original: ETSNewArrayInstanceExpression, typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression {
703
- if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimension, original.dimension))
704
- return original
705
- return updateNodeByNode(ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension), original)
706
- }
707
- ,
708
- createAnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration {
709
- return AnnotationDeclaration.create1AnnotationDeclaration(expr, properties)
710
- }
711
- ,
712
- updateAnnotationDeclaration(original: AnnotationDeclaration, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration {
713
- if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties))
714
- return original
715
- return updateNodeByNode(AnnotationDeclaration.create1AnnotationDeclaration(expr, properties), original)
716
- }
717
- ,
718
- createAnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage {
719
- return AnnotationUsage.create1AnnotationUsage(expr, properties)
720
- }
721
- ,
722
- updateAnnotationUsage(original: AnnotationUsage, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage {
723
- if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties))
724
- return original
725
- return updateNodeByNode(AnnotationUsage.create1AnnotationUsage(expr, properties), original)
726
- }
727
- ,
728
- createEmptyStatement(isBrokenStatement: boolean): EmptyStatement {
729
- return EmptyStatement.create1EmptyStatement(isBrokenStatement)
730
- }
731
- ,
732
- updateEmptyStatement(original: EmptyStatement, isBrokenStatement: boolean): EmptyStatement {
733
- if (isSameNativeObject(isBrokenStatement, original.isBrokenStatement))
734
- return original
735
- return updateNodeByNode(EmptyStatement.create1EmptyStatement(isBrokenStatement), original)
736
- }
737
- ,
738
- createWhileStatement(test?: Expression, body?: Statement): WhileStatement {
739
- return WhileStatement.createWhileStatement(test, body)
740
- }
741
- ,
742
- updateWhileStatement(original: WhileStatement, test?: Expression, body?: Statement): WhileStatement {
743
- if (isSameNativeObject(test, original.test) && isSameNativeObject(body, original.body))
744
- return original
745
- return updateNodeByNode(WhileStatement.createWhileStatement(test, body), original)
746
- }
747
- ,
748
- createFunctionSignature(typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature {
749
- return FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver)
750
- }
751
- ,
752
- updateFunctionSignature(original: FunctionSignature, typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature {
753
- if (isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(params, original.params) && isSameNativeObject(returnType, original.returnType) && isSameNativeObject(hasReceiver, original.hasReceiver))
754
- return original
755
- return updateNodeByNode(FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver), original)
756
- }
757
- ,
758
- createChainExpression(expression?: Expression): ChainExpression {
759
- return ChainExpression.createChainExpression(expression)
760
- }
761
- ,
762
- updateChainExpression(original: ChainExpression, expression?: Expression): ChainExpression {
763
- if (isSameNativeObject(expression, original.expression))
764
- return original
765
- return updateNodeByNode(ChainExpression.createChainExpression(expression), original)
766
- }
767
- ,
768
- createTSIntersectionType(types: readonly Expression[]): TSIntersectionType {
769
- return TSIntersectionType.createTSIntersectionType(types)
770
- }
771
- ,
772
- updateTSIntersectionType(original: TSIntersectionType, types: readonly Expression[]): TSIntersectionType {
773
- if (isSameNativeObject(types, original.types))
774
- return original
775
- return updateNodeByNode(TSIntersectionType.createTSIntersectionType(types), original)
776
- }
777
- ,
778
- createUpdateExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression {
779
- return UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix)
780
- }
781
- ,
782
- updateUpdateExpression(original: UpdateExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression {
783
- if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType) && isSameNativeObject(isPrefix, original.isPrefix))
784
- return original
785
- return updateNodeByNode(UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix), original)
786
- }
787
- ,
788
- createBlockExpression(statements: readonly Statement[]): BlockExpression {
789
- return BlockExpression.createBlockExpression(statements)
790
- }
791
- ,
792
- updateBlockExpression(original: BlockExpression, statements: readonly Statement[]): BlockExpression {
793
- if (isSameNativeObject(statements, original.statements))
794
- return original
795
- return updateNodeByNode(BlockExpression.createBlockExpression(statements), original)
796
- }
797
- ,
798
- createTSTypeLiteral(members: readonly AstNode[]): TSTypeLiteral {
799
- return TSTypeLiteral.createTSTypeLiteral(members)
800
- }
801
- ,
802
- updateTSTypeLiteral(original: TSTypeLiteral, members: readonly AstNode[]): TSTypeLiteral {
803
- if (isSameNativeObject(members, original.members))
804
- return original
805
- return updateNodeByNode(TSTypeLiteral.createTSTypeLiteral(members), original)
806
- }
807
- ,
808
- createTSBooleanKeyword(): TSBooleanKeyword {
809
- return TSBooleanKeyword.createTSBooleanKeyword()
810
- }
811
- ,
812
- updateTSBooleanKeyword(original: TSBooleanKeyword): TSBooleanKeyword {
813
- return updateNodeByNode(TSBooleanKeyword.createTSBooleanKeyword(), original)
814
- }
815
- ,
816
- createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate {
817
- return TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts)
818
- }
819
- ,
820
- updateTSTypePredicate(original: TSTypePredicate, parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate {
821
- if (isSameNativeObject(parameterName, original.parameterName) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(asserts, original.asserts))
822
- return original
823
- return updateNodeByNode(TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts), original)
824
- }
825
- ,
826
- createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier {
827
- return ImportNamespaceSpecifier.createImportNamespaceSpecifier(local)
828
- }
829
- ,
830
- updateImportNamespaceSpecifier(original: ImportNamespaceSpecifier, local?: Identifier): ImportNamespaceSpecifier {
831
- if (isSameNativeObject(local, original.local))
832
- return original
833
- return updateNodeByNode(ImportNamespaceSpecifier.createImportNamespaceSpecifier(local), original)
834
- }
835
- ,
836
- createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation {
837
- return TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params)
838
- }
839
- ,
840
- updateTSTypeParameterInstantiation(original: TSTypeParameterInstantiation, params: readonly TypeNode[]): TSTypeParameterInstantiation {
841
- if (isSameNativeObject(params, original.params))
842
- return original
843
- return updateNodeByNode(TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params), original)
844
- }
845
- ,
846
- createNullLiteral(): NullLiteral {
847
- return NullLiteral.createNullLiteral()
848
- }
849
- ,
850
- updateNullLiteral(original: NullLiteral): NullLiteral {
851
- return updateNodeByNode(NullLiteral.createNullLiteral(), original)
852
- }
853
- ,
854
- createTSInferType(typeParam?: TSTypeParameter): TSInferType {
855
- return TSInferType.createTSInferType(typeParam)
856
- }
857
- ,
858
- updateTSInferType(original: TSInferType, typeParam?: TSTypeParameter): TSInferType {
859
- if (isSameNativeObject(typeParam, original.typeParam))
860
- return original
861
- return updateNodeByNode(TSInferType.createTSInferType(typeParam), original)
862
- }
863
- ,
864
- createSwitchCaseStatement(test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement {
865
- return SwitchCaseStatement.createSwitchCaseStatement(test, consequent)
866
- }
867
- ,
868
- updateSwitchCaseStatement(original: SwitchCaseStatement, test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement {
869
- if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent))
870
- return original
871
- return updateNodeByNode(SwitchCaseStatement.createSwitchCaseStatement(test, consequent), original)
872
- }
873
- ,
874
- createYieldExpression(argument: Expression | undefined, hasDelegate: boolean): YieldExpression {
875
- return YieldExpression.createYieldExpression(argument, hasDelegate)
876
- }
877
- ,
878
- updateYieldExpression(original: YieldExpression, argument: Expression | undefined, hasDelegate: boolean): YieldExpression {
879
- if (isSameNativeObject(argument, original.argument) && isSameNativeObject(hasDelegate, original.hasDelegate))
880
- return original
881
- return updateNodeByNode(YieldExpression.createYieldExpression(argument, hasDelegate), original)
882
- }
883
- ,
884
- createTSImportEqualsDeclaration(id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration {
885
- return TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport)
886
- }
887
- ,
888
- updateTSImportEqualsDeclaration(original: TSImportEqualsDeclaration, id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration {
889
- if (isSameNativeObject(id, original.id) && isSameNativeObject(moduleReference, original.moduleReference) && isSameNativeObject(isExport, original.isExport))
890
- return original
891
- return updateNodeByNode(TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport), original)
892
- }
893
- ,
894
- createBooleanLiteral(value: boolean): BooleanLiteral {
895
- return BooleanLiteral.createBooleanLiteral(value)
896
- }
897
- ,
898
- updateBooleanLiteral(original: BooleanLiteral, value: boolean): BooleanLiteral {
899
- if (isSameNativeObject(value, original.value))
900
- return original
901
- return updateNodeByNode(BooleanLiteral.createBooleanLiteral(value), original)
902
- }
903
- ,
904
- createTSNumberKeyword(): TSNumberKeyword {
905
- return TSNumberKeyword.createTSNumberKeyword()
906
- }
907
- ,
908
- updateTSNumberKeyword(original: TSNumberKeyword): TSNumberKeyword {
909
- return updateNodeByNode(TSNumberKeyword.createTSNumberKeyword(), original)
910
- }
911
- ,
912
- createTSNonNullExpression(expr?: Expression): TSNonNullExpression {
913
- return TSNonNullExpression.createTSNonNullExpression(expr)
914
- }
915
- ,
916
- updateTSNonNullExpression(original: TSNonNullExpression, expr?: Expression): TSNonNullExpression {
917
- if (isSameNativeObject(expr, original.expr))
918
- return original
919
- return updateNodeByNode(TSNonNullExpression.createTSNonNullExpression(expr), original)
920
- }
921
- ,
922
- createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression {
923
- return PrefixAssertionExpression.createPrefixAssertionExpression(expr, type)
924
- }
925
- ,
926
- updatePrefixAssertionExpression(original: PrefixAssertionExpression, expr?: Expression, type?: TypeNode): PrefixAssertionExpression {
927
- if (isSameNativeObject(expr, original.expr) && isSameNativeObject(type, original.type))
928
- return original
929
- return updateNodeByNode(PrefixAssertionExpression.createPrefixAssertionExpression(expr, type), original)
930
- }
931
- ,
932
- createClassExpression(definition?: ClassDefinition): ClassExpression {
933
- return ClassExpression.createClassExpression(definition)
934
- }
935
- ,
936
- updateClassExpression(original: ClassExpression, definition?: ClassDefinition): ClassExpression {
937
- if (isSameNativeObject(definition, original.definition))
938
- return original
939
- return updateNodeByNode(ClassExpression.createClassExpression(definition), original)
940
- }
941
- ,
942
- createForOfStatement(left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement {
943
- return ForOfStatement.createForOfStatement(left, right, body, isAwait)
944
- }
945
- ,
946
- updateForOfStatement(original: ForOfStatement, left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement {
947
- if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body) && isSameNativeObject(isAwait, original.isAwait))
948
- return original
949
- return updateNodeByNode(ForOfStatement.createForOfStatement(left, right, body, isAwait), original)
950
- }
951
- ,
952
- createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral {
953
- return TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString)
954
- }
955
- ,
956
- updateTemplateLiteral(original: TemplateLiteral, quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral {
957
- if (isSameNativeObject(quasis, original.quasis) && isSameNativeObject(expressions, original.expressions) && isSameNativeObject(multilineString, original.multilineString))
958
- return original
959
- return updateNodeByNode(TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString), original)
960
- }
961
- ,
962
- createTSUnionType(types: readonly TypeNode[]): TSUnionType {
963
- return TSUnionType.createTSUnionType(types)
964
- }
965
- ,
966
- updateTSUnionType(original: TSUnionType, types: readonly TypeNode[]): TSUnionType {
967
- if (isSameNativeObject(types, original.types))
968
- return original
969
- return updateNodeByNode(TSUnionType.createTSUnionType(types), original)
970
- }
971
- ,
972
- createTSUnknownKeyword(): TSUnknownKeyword {
973
- return TSUnknownKeyword.createTSUnknownKeyword()
974
- }
975
- ,
976
- updateTSUnknownKeyword(original: TSUnknownKeyword): TSUnknownKeyword {
977
- return updateNodeByNode(TSUnknownKeyword.createTSUnknownKeyword(), original)
978
- }
979
- ,
980
- createIdentifier(name: string, typeAnnotation?: TypeNode): Identifier {
981
- return Identifier.create2Identifier(name, typeAnnotation)
982
- }
983
- ,
984
- updateIdentifier(original: Identifier, name: string, typeAnnotation?: TypeNode): Identifier {
985
- if (isSameNativeObject(name, original.name) && isSameNativeObject(typeAnnotation, original.typeAnnotation))
986
- return original
987
- return updateNodeByNode(Identifier.create2Identifier(name, typeAnnotation), original)
988
- }
989
- ,
990
- createOpaqueTypeNode(): OpaqueTypeNode {
991
- return OpaqueTypeNode.create1OpaqueTypeNode()
992
- }
993
- ,
994
- updateOpaqueTypeNode(original: OpaqueTypeNode): OpaqueTypeNode {
995
- return updateNodeByNode(OpaqueTypeNode.create1OpaqueTypeNode(), original)
996
- }
997
- ,
998
- createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration {
999
- return TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams)
1000
- }
1001
- ,
1002
- updateTSTypeParameterDeclaration(original: TSTypeParameterDeclaration, params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration {
1003
- if (isSameNativeObject(params, original.params) && isSameNativeObject(requiredParams, original.requiredParams))
1004
- return original
1005
- return updateNodeByNode(TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams), original)
1006
- }
1007
- ,
1008
- createTSNullKeyword(): TSNullKeyword {
1009
- return TSNullKeyword.createTSNullKeyword()
1010
- }
1011
- ,
1012
- updateTSNullKeyword(original: TSNullKeyword): TSNullKeyword {
1013
- return updateNodeByNode(TSNullKeyword.createTSNullKeyword(), original)
1014
- }
1015
- ,
1016
- createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage {
1017
- return TSInterfaceHeritage.createTSInterfaceHeritage(expr)
1018
- }
1019
- ,
1020
- updateTSInterfaceHeritage(original: TSInterfaceHeritage, expr?: TypeNode): TSInterfaceHeritage {
1021
- if (isSameNativeObject(expr, original.expr))
1022
- return original
1023
- return updateNodeByNode(TSInterfaceHeritage.createTSInterfaceHeritage(expr), original)
1024
- }
1025
- ,
1026
- createETSClassLiteral(expr?: TypeNode): ETSClassLiteral {
1027
- return ETSClassLiteral.createETSClassLiteral(expr)
1028
- }
1029
- ,
1030
- updateETSClassLiteral(original: ETSClassLiteral, expr?: TypeNode): ETSClassLiteral {
1031
- if (isSameNativeObject(expr, original.expr))
1032
- return original
1033
- return updateNodeByNode(ETSClassLiteral.createETSClassLiteral(expr), original)
1034
- }
1035
- ,
1036
- createBreakStatement(ident?: Identifier): BreakStatement {
1037
- return BreakStatement.create1BreakStatement(ident)
1038
- }
1039
- ,
1040
- updateBreakStatement(original: BreakStatement, ident?: Identifier): BreakStatement {
1041
- if (isSameNativeObject(ident, original.ident))
1042
- return original
1043
- return updateNodeByNode(BreakStatement.create1BreakStatement(ident), original)
1044
- }
1045
- ,
1046
- createTSAnyKeyword(): TSAnyKeyword {
1047
- return TSAnyKeyword.createTSAnyKeyword()
1048
- }
1049
- ,
1050
- updateTSAnyKeyword(original: TSAnyKeyword): TSAnyKeyword {
1051
- return updateNodeByNode(TSAnyKeyword.createTSAnyKeyword(), original)
1052
- }
1053
- ,
1054
- createClassDeclaration(definition: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration {
1055
- return ClassDeclaration.createClassDeclaration(definition, modifierFlags)
1056
- }
1057
- ,
1058
- updateClassDeclaration(original: ClassDeclaration, definition: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration {
1059
- if (isSameNativeObject(definition, original.definition) && isSameNativeObject(modifierFlags, original.modifierFlags))
1060
- return original
1061
- return updateNodeByNode(ClassDeclaration.createClassDeclaration(definition, modifierFlags), original)
1062
- }
1063
- ,
1064
- createTSIndexedAccessType(objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType {
1065
- return TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType)
1066
- }
1067
- ,
1068
- updateTSIndexedAccessType(original: TSIndexedAccessType, objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType {
1069
- if (isSameNativeObject(objectType, original.objectType) && isSameNativeObject(indexType, original.indexType))
1070
- return original
1071
- return updateNodeByNode(TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType), original)
1072
- }
1073
- ,
1074
- createTSQualifiedName(left?: Expression, right?: Identifier): TSQualifiedName {
1075
- return TSQualifiedName.createTSQualifiedName(left, right)
1076
- }
1077
- ,
1078
- updateTSQualifiedName(original: TSQualifiedName, left?: Expression, right?: Identifier): TSQualifiedName {
1079
- if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right))
1080
- return original
1081
- return updateNodeByNode(TSQualifiedName.createTSQualifiedName(left, right), original)
1082
- }
1083
- ,
1084
- createAwaitExpression(argument?: Expression): AwaitExpression {
1085
- return AwaitExpression.createAwaitExpression(argument)
1086
- }
1087
- ,
1088
- updateAwaitExpression(original: AwaitExpression, argument?: Expression): AwaitExpression {
1089
- if (isSameNativeObject(argument, original.argument))
1090
- return original
1091
- return updateNodeByNode(AwaitExpression.createAwaitExpression(argument), original)
1092
- }
1093
- ,
1094
- createContinueStatement(ident?: Identifier): ContinueStatement {
1095
- return ContinueStatement.create1ContinueStatement(ident)
1096
- }
1097
- ,
1098
- updateContinueStatement(original: ContinueStatement, ident?: Identifier): ContinueStatement {
1099
- if (isSameNativeObject(ident, original.ident))
1100
- return original
1101
- return updateNodeByNode(ContinueStatement.create1ContinueStatement(ident), original)
1102
- }
1103
- ,
1104
- createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression {
1105
- return ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions)
1106
- }
1107
- ,
1108
- updateETSNewMultiDimArrayInstanceExpression(original: ETSNewMultiDimArrayInstanceExpression, typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression {
1109
- if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimensions, original.dimensions))
1110
- return original
1111
- return updateNodeByNode(ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions), original)
1112
- }
1113
- ,
1114
- createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember {
1115
- return TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional)
1116
- }
1117
- ,
1118
- updateTSNamedTupleMember(original: TSNamedTupleMember, label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember {
1119
- if (isSameNativeObject(label, original.label) && isSameNativeObject(elementType, original.elementType) && isSameNativeObject(isOptional, original.isOptional))
1120
- return original
1121
- return updateNodeByNode(TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional), original)
1122
- }
1123
- ,
1124
- createImportExpression(source?: Expression): ImportExpression {
1125
- return ImportExpression.createImportExpression(source)
1126
- }
1127
- ,
1128
- updateImportExpression(original: ImportExpression, source?: Expression): ImportExpression {
1129
- if (isSameNativeObject(source, original.source))
1130
- return original
1131
- return updateNodeByNode(ImportExpression.createImportExpression(source), original)
1132
- }
1133
- ,
1134
- createETSNullType(): ETSNullType {
1135
- return ETSNullType.createETSNullType()
1136
- }
1137
- ,
1138
- updateETSNullType(original: ETSNullType): ETSNullType {
1139
- return updateNodeByNode(ETSNullType.createETSNullType(), original)
1140
- }
1141
- ,
1142
- createETSUndefinedType(): ETSUndefinedType {
1143
- return ETSUndefinedType.createETSUndefinedType()
1144
- }
1145
- ,
1146
- updateETSUndefinedType(original: ETSUndefinedType): ETSUndefinedType {
1147
- return updateNodeByNode(ETSUndefinedType.createETSUndefinedType(), original)
1148
- }
1149
- ,
1150
- createTypeofExpression(argument?: Expression): TypeofExpression {
1151
- return TypeofExpression.createTypeofExpression(argument)
1152
- }
1153
- ,
1154
- updateTypeofExpression(original: TypeofExpression, argument?: Expression): TypeofExpression {
1155
- if (isSameNativeObject(argument, original.argument))
1156
- return original
1157
- return updateNodeByNode(TypeofExpression.createTypeofExpression(argument), original)
1158
- }
1159
- ,
1160
- createTSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember {
1161
- return TSEnumMember.create1TSEnumMember(key, init, isGenerated)
1162
- }
1163
- ,
1164
- updateTSEnumMember(original: TSEnumMember, key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember {
1165
- if (isSameNativeObject(key, original.key) && isSameNativeObject(init, original.init) && isSameNativeObject(isGenerated, original.isGenerated))
1166
- return original
1167
- return updateNodeByNode(TSEnumMember.create1TSEnumMember(key, init, isGenerated), original)
1168
- }
1169
- ,
1170
- createSwitchStatement(discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement {
1171
- return SwitchStatement.createSwitchStatement(discriminant, cases)
1172
- }
1173
- ,
1174
- updateSwitchStatement(original: SwitchStatement, discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement {
1175
- if (isSameNativeObject(discriminant, original.discriminant) && isSameNativeObject(cases, original.cases))
1176
- return original
1177
- return updateNodeByNode(SwitchStatement.createSwitchStatement(discriminant, cases), original)
1178
- }
1179
- ,
1180
- createDoWhileStatement(body?: Statement, test?: Expression): DoWhileStatement {
1181
- return DoWhileStatement.createDoWhileStatement(body, test)
1182
- }
1183
- ,
1184
- updateDoWhileStatement(original: DoWhileStatement, body?: Statement, test?: Expression): DoWhileStatement {
1185
- if (isSameNativeObject(body, original.body) && isSameNativeObject(test, original.test))
1186
- return original
1187
- return updateNodeByNode(DoWhileStatement.createDoWhileStatement(body, test), original)
1188
- }
1189
- ,
1190
- createCatchClause(param?: Expression, body?: BlockStatement): CatchClause {
1191
- return CatchClause.createCatchClause(param, body)
1192
- }
1193
- ,
1194
- updateCatchClause(original: CatchClause, param?: Expression, body?: BlockStatement): CatchClause {
1195
- if (isSameNativeObject(param, original.param) && isSameNativeObject(body, original.body))
1196
- return original
1197
- return updateNodeByNode(CatchClause.createCatchClause(param, body), original)
1198
- }
1199
- ,
1200
- createSequenceExpression(sequence: readonly Expression[]): SequenceExpression {
1201
- return SequenceExpression.createSequenceExpression(sequence)
1202
- }
1203
- ,
1204
- updateSequenceExpression(original: SequenceExpression, sequence: readonly Expression[]): SequenceExpression {
1205
- if (isSameNativeObject(sequence, original.sequence))
1206
- return original
1207
- return updateNodeByNode(SequenceExpression.createSequenceExpression(sequence), original)
1208
- }
1209
- ,
1210
- createArrowFunctionExpression(_function: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression {
1211
- return ArrowFunctionExpression.createArrowFunctionExpression(_function, annotations)
1212
- }
1213
- ,
1214
- updateArrowFunctionExpression(original: ArrowFunctionExpression, _function: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression {
1215
- if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations))
1216
- return original
1217
- return updateNodeByNode(ArrowFunctionExpression.createArrowFunctionExpression(_function, annotations), original)
1218
- }
1219
- ,
1220
- createOmittedExpression(): OmittedExpression {
1221
- return OmittedExpression.createOmittedExpression()
1222
- }
1223
- ,
1224
- updateOmittedExpression(original: OmittedExpression): OmittedExpression {
1225
- return updateNodeByNode(OmittedExpression.createOmittedExpression(), original)
1226
- }
1227
- ,
1228
- createETSNewClassInstanceExpression(typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression {
1229
- return ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments)
1230
- }
1231
- ,
1232
- updateETSNewClassInstanceExpression(original: ETSNewClassInstanceExpression, typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression {
1233
- if (isSameNativeObject(typeRef, original.typeRef) && isSameNativeObject(_arguments, original.arguments))
1234
- return original
1235
- return updateNodeByNode(ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments), original)
1236
- }
1237
- ,
1238
- createTSAsExpression(expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression {
1239
- return TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst)
1240
- }
1241
- ,
1242
- updateTSAsExpression(original: TSAsExpression, expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression {
1243
- if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(isConst, original.isConst))
1244
- return original
1245
- return updateNodeByNode(TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst), original)
1246
- }
1247
- ,
1248
- createForUpdateStatement(init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement {
1249
- return ForUpdateStatement.createForUpdateStatement(init, test, update, body)
1250
- }
1251
- ,
1252
- updateForUpdateStatement(original: ForUpdateStatement, init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement {
1253
- if (isSameNativeObject(init, original.init) && isSameNativeObject(test, original.test) && isSameNativeObject(update, original.update) && isSameNativeObject(body, original.body))
1254
- return original
1255
- return updateNodeByNode(ForUpdateStatement.createForUpdateStatement(init, test, update, body), original)
1256
- }
1257
- ,
1258
- createETSPrimitiveType(primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType {
1259
- return ETSPrimitiveType.createETSPrimitiveType(primitiveType)
1260
- }
1261
- ,
1262
- updateETSPrimitiveType(original: ETSPrimitiveType, primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType {
1263
- if (isSameNativeObject(primitiveType, original.primitiveType))
1264
- return original
1265
- return updateNodeByNode(ETSPrimitiveType.createETSPrimitiveType(primitiveType), original)
1266
- }
1267
- ,
1268
- createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression {
1269
- return NewExpression.createNewExpression(callee, _arguments)
1270
- }
1271
- ,
1272
- updateNewExpression(original: NewExpression, callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression {
1273
- if (isSameNativeObject(callee, original.callee) && isSameNativeObject(_arguments, original.arguments))
1274
- return original
1275
- return updateNodeByNode(NewExpression.createNewExpression(callee, _arguments), original)
1276
- }
1277
- ,
1278
- createTSThisType(): TSThisType {
1279
- return TSThisType.createTSThisType()
1280
- }
1281
- ,
1282
- updateTSThisType(original: TSThisType): TSThisType {
1283
- return updateNodeByNode(TSThisType.createTSThisType(), original)
1284
- }
1285
- ,
1286
- }