@idlizer/arktscgen 2.1.9-arktscgen-5 → 2.1.9-arktscgen-8

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 (227) hide show
  1. package/build/libarkts-copy/generator/options.json5 +151 -0
  2. package/build/libarkts-copy/native/meson.build +11 -12
  3. package/build/libarkts-copy/native/meson_options.txt +1 -1
  4. package/build/libarkts-copy/native/mingw.cross +14 -0
  5. package/build/libarkts-copy/native/src/bridges.cc +77 -1
  6. package/build/libarkts-copy/native/src/common.cc +5 -5
  7. package/build/libarkts-copy/native/src/generated/bridges.cc +312 -33
  8. package/build/libarkts-copy/package.json +24 -20
  9. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +19 -1
  10. package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +2 -1
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +18 -12
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +1 -1
  13. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +15 -26
  14. package/build/libarkts-copy/src/arkts-api/index.ts +2 -4
  15. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +0 -4
  16. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +1 -22
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +7 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +1 -22
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +2 -5
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +1 -1
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +44 -0
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +1 -4
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +3 -7
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +1 -1
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +10 -0
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +11 -7
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +3 -6
  28. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +13 -12
  29. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +1 -1
  30. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -4
  31. package/build/libarkts-copy/src/arkts-api/plugins.ts +12 -3
  32. package/build/libarkts-copy/src/arkts-api/static/global.ts +2 -2
  33. package/build/libarkts-copy/src/{wrapper-compat/arkts-api → arkts-api}/static/globalUtils.ts +4 -4
  34. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +0 -8
  35. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +57 -0
  36. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +1 -1
  37. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +6 -8
  38. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +153 -29
  39. package/build/libarkts-copy/src/arkts-api/visitor.ts +16 -10
  40. package/build/libarkts-copy/src/checkSdk.ts +15 -0
  41. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +343 -321
  42. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +93 -12
  43. package/build/libarkts-copy/src/generated/factory.ts +38 -25
  44. package/build/libarkts-copy/src/generated/index.ts +2 -0
  45. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +1 -1
  46. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +15 -3
  47. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +1 -1
  48. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +1 -1
  49. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +10 -2
  50. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +11 -2
  51. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +20 -4
  52. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -2
  53. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +1 -1
  54. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +12 -9
  55. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +1 -1
  56. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +77 -0
  57. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +1 -1
  58. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +3 -1
  59. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +1 -1
  60. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +1 -1
  61. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +1 -1
  62. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +1 -1
  63. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +1 -1
  64. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +29 -5
  65. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +1 -1
  66. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -1
  67. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +1 -1
  68. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +1 -1
  69. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +1 -1
  70. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +1 -1
  71. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +1 -1
  72. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +1 -1
  73. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +12 -3
  74. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -1
  75. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +14 -2
  76. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +1 -1
  77. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +1 -1
  78. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +103 -0
  79. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +1 -1
  80. package/build/libarkts-copy/src/generated/peers/Program.ts +8 -0
  81. package/build/libarkts-copy/src/generated/peers/Property.ts +1 -1
  82. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +1 -1
  83. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +1 -1
  84. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +26 -9
  85. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +1 -1
  86. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +1 -1
  87. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +1 -1
  88. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +1 -1
  89. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +1 -1
  90. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -1
  91. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +1 -1
  92. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +1 -1
  93. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +1 -1
  94. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +1 -1
  95. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +1 -1
  96. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -1
  97. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +1 -1
  98. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -1
  99. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +12 -3
  100. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +1 -1
  101. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +1 -1
  102. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -1
  103. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -1
  104. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -1
  105. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +1 -1
  106. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +1 -1
  107. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -1
  108. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +1 -1
  109. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +12 -3
  110. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +1 -1
  111. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +1 -1
  112. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +1 -1
  113. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -1
  114. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -1
  115. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +1 -1
  116. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +1 -1
  117. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +1 -1
  118. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +1 -1
  119. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +1 -1
  120. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +1 -1
  121. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +1 -1
  122. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +1 -1
  123. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +1 -1
  124. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +1 -1
  125. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +1 -1
  126. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +1 -1
  127. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -1
  128. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +1 -1
  129. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +1 -1
  130. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +1 -1
  131. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +29 -4
  132. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +1 -1
  133. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +1 -1
  134. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +1 -1
  135. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +1 -1
  136. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -1
  137. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +1 -1
  138. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +1 -1
  139. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +1 -1
  140. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +1 -1
  141. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +1 -1
  142. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +1 -1
  143. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +1 -1
  144. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +1 -1
  145. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +1 -1
  146. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +1 -1
  147. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -1
  148. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +1 -1
  149. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +1 -1
  150. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -1
  151. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +1 -1
  152. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +1 -1
  153. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +1 -1
  154. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -3
  155. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +1 -1
  156. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +1 -1
  157. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +1 -1
  158. package/build/libarkts-copy/src/index.ts +1 -4
  159. package/build/libarkts-copy/src/plugin-utils.ts +37 -37
  160. package/build/libarkts-copy/src/reexport-for-generated.ts +7 -0
  161. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +14 -14
  162. package/build/libarkts-copy/src/ts-api/index.ts +1 -1
  163. package/build/libarkts-copy/src/ts-api/types.ts +56 -56
  164. package/build/libarkts-copy/src/ts-api/utilities/private.ts +6 -6
  165. package/build/libarkts-copy/src/ts-api/utilities/public.ts +3 -3
  166. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +4 -4
  167. package/build/libarkts-copy/src/utils.ts +13 -159
  168. package/build/libarkts-copy/src/wrapper-compat/README.md +4 -0
  169. package/build/libarkts-copy/src/wrapper-compat/arkts-api/index.ts +3 -4
  170. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrayExpression.ts +1 -1
  171. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrowFunctionExpression.ts +1 -1
  172. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/AssignmentExpression.ts +1 -1
  173. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/BlockStatement.ts +1 -1
  174. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/CallExpression.ts +1 -1
  175. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDeclaration.ts +1 -1
  176. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDefinition.ts +2 -2
  177. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassProperty.ts +1 -1
  178. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSFunctionType.ts +2 -2
  179. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSImportDeclaration.ts +2 -2
  180. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSParameterExpression.ts +2 -2
  181. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ExpressionStatement.ts +1 -1
  182. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionDeclaration.ts +1 -1
  183. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionExpression.ts +1 -1
  184. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/IfStatement.ts +1 -1
  185. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MemberExpression.ts +1 -1
  186. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MethodDefinition.ts +2 -2
  187. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/NumberLiteral.ts +2 -2
  188. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ObjectExpression.ts +3 -3
  189. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/Property.ts +1 -1
  190. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ScriptFunction.ts +1 -1
  191. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/StructDeclaration.ts +1 -1
  192. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSInterfaceDeclaration.ts +1 -1
  193. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +1 -1
  194. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeParameter.ts +1 -1
  195. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TryStatement.ts +3 -3
  196. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclaration.ts +1 -1
  197. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclarator.ts +2 -2
  198. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +2 -2
  199. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +1 -1
  200. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticKind.ts +1 -1
  201. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ImportPathManager.ts +2 -2
  202. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Program.ts +1 -1
  203. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourceRange.ts +2 -2
  204. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts +1 -1
  205. package/build/libarkts-copy/src/wrapper-compat/arkts-api/to-be-generated/MemberExpression.ts +1 -1
  206. package/build/libarkts-copy/src/wrapper-compat/arkts-api/types.ts +10 -11
  207. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/nativePtrDecoder.ts +1 -1
  208. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/private.ts +4 -4
  209. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/public.ts +6 -6
  210. package/build/libarkts-copy/src/wrapper-compat/arkts-api/visitor.ts +10 -10
  211. package/lib/index.js +7194 -7097
  212. package/package.json +2 -2
  213. package/templates/Es2pandaNativeModule.ts +1 -1
  214. package/templates/bridges.cc +5 -0
  215. package/build/libarkts-copy/src/arkts-api/CheckedBackFilter.ts +0 -131
  216. package/build/libarkts-copy/src/arkts-api/CompileWithCache.ts +0 -193
  217. package/build/libarkts-copy/src/arkts-api/InferVoidReturnType.ts +0 -89
  218. package/build/libarkts-copy/src/arkts-api/SetBaseOverloads.ts +0 -44
  219. package/build/libarkts-copy/src/arkts-api/node-utilities/AnnotationUsage.ts +0 -29
  220. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +0 -49
  221. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDeclaration.ts +0 -54
  222. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +0 -68
  223. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +0 -54
  224. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ArktsObject.ts +0 -45
  225. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Config.ts +0 -53
  226. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Context.ts +0 -60
  227. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourcePosition.ts +0 -38
@@ -0,0 +1,77 @@
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
+ assertValidPeer,
28
+ AstNode,
29
+ KNativePointer,
30
+ nodeByType,
31
+ ArktsObject,
32
+ unpackString
33
+ } from "../../reexport-for-generated"
34
+
35
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
36
+ import { Es2pandaIntrinsicNodeType } from "./../Es2pandaEnums"
37
+ import { Expression } from "./Expression"
38
+
39
+ export class ETSIntrinsicNode extends Expression {
40
+ constructor(pointer: KNativePointer) {
41
+ assertValidPeer(pointer, 68)
42
+ super(pointer)
43
+ }
44
+ static create2ETSIntrinsicNode(type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode {
45
+ const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._CreateETSIntrinsicNode2(global.context, type, passNodeArray(_arguments), _arguments.length))
46
+ result.setChildrenParentPtr()
47
+ return result
48
+ }
49
+ static updateETSIntrinsicNode(original?: ETSIntrinsicNode): ETSIntrinsicNode {
50
+ const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode(global.context, passNode(original)))
51
+ result.setChildrenParentPtr()
52
+ return result
53
+ }
54
+ static update1ETSIntrinsicNode(original?: ETSIntrinsicNode, other?: ETSIntrinsicNode): ETSIntrinsicNode {
55
+ const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode1(global.context, passNode(original), passNode(other)))
56
+ result.setChildrenParentPtr()
57
+ return result
58
+ }
59
+ static update2ETSIntrinsicNode(original: ETSIntrinsicNode | undefined, type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode {
60
+ const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode2(global.context, passNode(original), type, passNodeArray(_arguments), _arguments.length))
61
+ result.setChildrenParentPtr()
62
+ return result
63
+ }
64
+ get type(): Es2pandaIntrinsicNodeType {
65
+ return global.generatedEs2panda._ETSIntrinsicNodeTypeConst(global.context, this.peer)
66
+ }
67
+ get arguments(): readonly Expression[] {
68
+ return unpackNodeArray(global.generatedEs2panda._ETSIntrinsicNodeArgumentsConst(global.context, this.peer))
69
+ }
70
+ protected readonly brandETSIntrinsicNode: undefined
71
+ }
72
+ export function isETSIntrinsicNode(node: object | undefined): node is ETSIntrinsicNode {
73
+ return node instanceof ETSIntrinsicNode
74
+ }
75
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE)) {
76
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE, (peer: KNativePointer) => new ETSIntrinsicNode(peer))
77
+ }
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class ETSKeyofType extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 75)
40
+ assertValidPeer(pointer, 77)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSKeyofType(type?: TypeNode): ETSKeyofType {
@@ -40,10 +40,11 @@ import { Es2pandaModuleFlag } from "./../Es2pandaEnums"
40
40
  import { Identifier } from "./Identifier"
41
41
  import { Program } from "./Program"
42
42
  import { Statement } from "./Statement"
43
+ import { extension_ETSModuleGetNamespaceFlag } from "./../../reexport-for-generated"
43
44
 
44
45
  export class ETSModule extends BlockStatement {
45
46
  constructor(pointer: KNativePointer) {
46
- assertValidPeer(pointer, 82)
47
+ assertValidPeer(pointer, 84)
47
48
  super(pointer)
48
49
  }
49
50
  static createETSModule(statementList: readonly Statement[], ident: Identifier | undefined, flag: Es2pandaModuleFlag, program?: Program): ETSModule {
@@ -120,6 +121,7 @@ export class ETSModule extends BlockStatement {
120
121
  global.generatedEs2panda._ETSModuleAddAnnotations(global.context, this.peer, passNode(annotations))
121
122
  return this
122
123
  }
124
+ getNamespaceFlag = extension_ETSModuleGetNamespaceFlag
123
125
  protected readonly brandETSModule: undefined
124
126
  }
125
127
  export function isETSModule(node: object | undefined): node is ETSModule {
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
38
38
 
39
39
  export class ETSNewArrayInstanceExpression extends Expression {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 76)
41
+ assertValidPeer(pointer, 78)
42
42
  super(pointer)
43
43
  }
44
44
  static createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression {
@@ -37,7 +37,7 @@ import { Expression } from "./Expression"
37
37
 
38
38
  export class ETSNewClassInstanceExpression extends Expression {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 78)
40
+ assertValidPeer(pointer, 80)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSNewClassInstanceExpression(typeReference: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression {
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
38
38
 
39
39
  export class ETSNewMultiDimArrayInstanceExpression extends Expression {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 77)
41
+ assertValidPeer(pointer, 79)
42
42
  super(pointer)
43
43
  }
44
44
  static createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression {
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class ETSNullType extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 63)
40
+ assertValidPeer(pointer, 64)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSNullType(): ETSNullType {
@@ -38,7 +38,7 @@ import { Statement } from "./Statement"
38
38
 
39
39
  export class ETSPackageDeclaration extends Statement {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 70)
41
+ assertValidPeer(pointer, 72)
42
42
  super(pointer)
43
43
  }
44
44
  static createETSPackageDeclaration(name?: Expression): ETSPackageDeclaration {
@@ -42,26 +42,42 @@ import { TypeNode } from "./TypeNode"
42
42
 
43
43
  export class ETSParameterExpression extends Expression {
44
44
  constructor(pointer: KNativePointer) {
45
- assertValidPeer(pointer, 80)
45
+ assertValidPeer(pointer, 82)
46
46
  super(pointer)
47
47
  }
48
- static createETSParameterExpression(identOrSpread: AnnotatedExpression | undefined, isOptional: boolean): ETSParameterExpression {
48
+ static createETSParameterExpression(identOrSpread: AnnotatedExpression | undefined, isOptional: boolean, annotations?: readonly AnnotationUsage[]): ETSParameterExpression {
49
49
  const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression(global.context, passNode(identOrSpread), isOptional))
50
+ if (annotations)
51
+ {
52
+ result.setAnnotations(annotations)
53
+ }
50
54
  result.setChildrenParentPtr()
51
55
  return result
52
56
  }
53
- static updateETSParameterExpression(original: ETSParameterExpression | undefined, identOrSpread: AnnotatedExpression | undefined, isOptional: boolean): ETSParameterExpression {
57
+ static updateETSParameterExpression(original: ETSParameterExpression | undefined, identOrSpread: AnnotatedExpression | undefined, isOptional: boolean, annotations?: readonly AnnotationUsage[]): ETSParameterExpression {
54
58
  const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression(global.context, passNode(original), passNode(identOrSpread), isOptional))
59
+ if (annotations)
60
+ {
61
+ result.setAnnotations(annotations)
62
+ }
55
63
  result.setChildrenParentPtr()
56
64
  return result
57
65
  }
58
- static create1ETSParameterExpression(identOrSpread?: AnnotatedExpression, initializer?: Expression): ETSParameterExpression {
66
+ static create1ETSParameterExpression(identOrSpread?: AnnotatedExpression, initializer?: Expression, annotations?: readonly AnnotationUsage[]): ETSParameterExpression {
59
67
  const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression1(global.context, passNode(identOrSpread), passNode(initializer)))
68
+ if (annotations)
69
+ {
70
+ result.setAnnotations(annotations)
71
+ }
60
72
  result.setChildrenParentPtr()
61
73
  return result
62
74
  }
63
- static update1ETSParameterExpression(original?: ETSParameterExpression, identOrSpread?: AnnotatedExpression, initializer?: Expression): ETSParameterExpression {
75
+ static update1ETSParameterExpression(original?: ETSParameterExpression, identOrSpread?: AnnotatedExpression, initializer?: Expression, annotations?: readonly AnnotationUsage[]): ETSParameterExpression {
64
76
  const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression1(global.context, passNode(original), passNode(identOrSpread), passNode(initializer)))
77
+ if (annotations)
78
+ {
79
+ result.setAnnotations(annotations)
80
+ }
65
81
  result.setChildrenParentPtr()
66
82
  return result
67
83
  }
@@ -76,6 +92,14 @@ export class ETSParameterExpression extends Expression {
76
92
  global.generatedEs2panda._ETSParameterExpressionSetIdent(global.context, this.peer, passNode(ident))
77
93
  return this
78
94
  }
95
+ get spread(): SpreadElement | undefined {
96
+ return unpackNode(global.generatedEs2panda._ETSParameterExpressionSpread(global.context, this.peer))
97
+ }
98
+ /** @deprecated */
99
+ setSpread(spread?: SpreadElement): this {
100
+ global.generatedEs2panda._ETSParameterExpressionSetSpread(global.context, this.peer, passNode(spread))
101
+ return this
102
+ }
79
103
  get restParameter(): SpreadElement | undefined {
80
104
  return unpackNode(global.generatedEs2panda._ETSParameterExpressionRestParameter(global.context, this.peer))
81
105
  }
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
38
38
 
39
39
  export class ETSPrimitiveType extends TypeNode {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 69)
41
+ assertValidPeer(pointer, 71)
42
42
  super(pointer)
43
43
  }
44
44
  static createETSPrimitiveType(type: Es2pandaPrimitiveType): ETSPrimitiveType {
@@ -38,7 +38,7 @@ import { Statement } from "./Statement"
38
38
 
39
39
  export class ETSReExportDeclaration extends Statement {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 57)
41
+ assertValidPeer(pointer, 58)
42
42
  super(pointer)
43
43
  }
44
44
  get eTSImportDeclarations(): ETSImportDeclaration | undefined {
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class ETSStringLiteralType extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 66)
40
+ assertValidPeer(pointer, 67)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSStringLiteralType(value: string): ETSStringLiteralType {
@@ -38,7 +38,7 @@ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
38
38
 
39
39
  export class ETSStructDeclaration extends ClassDeclaration {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 84)
41
+ assertValidPeer(pointer, 86)
42
42
  super(pointer)
43
43
  }
44
44
  static createETSStructDeclaration(def?: ClassDefinition): ETSStructDeclaration {
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class ETSTuple extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 81)
40
+ assertValidPeer(pointer, 83)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSTuple(): ETSTuple {
@@ -39,7 +39,7 @@ import { TypeNode } from "./TypeNode"
39
39
 
40
40
  export class ETSTypeReference extends TypeNode {
41
41
  constructor(pointer: KNativePointer) {
42
- assertValidPeer(pointer, 72)
42
+ assertValidPeer(pointer, 74)
43
43
  super(pointer)
44
44
  }
45
45
  static createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference {
@@ -40,7 +40,7 @@ import { TypeNode } from "./TypeNode"
40
40
 
41
41
  export class ETSTypeReferencePart extends TypeNode {
42
42
  constructor(pointer: KNativePointer) {
43
- assertValidPeer(pointer, 73)
43
+ assertValidPeer(pointer, 75)
44
44
  super(pointer)
45
45
  }
46
46
  static createETSTypeReferencePart(name?: Expression, typeParams?: TSTypeParameterInstantiation, prev?: ETSTypeReferencePart): ETSTypeReferencePart {
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class ETSUndefinedType extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 64)
40
+ assertValidPeer(pointer, 65)
41
41
  super(pointer)
42
42
  }
43
43
  static createETSUndefinedType(): ETSUndefinedType {
@@ -32,21 +32,30 @@ import {
32
32
  unpackString
33
33
  } from "../../reexport-for-generated"
34
34
 
35
+ import { AnnotationUsage } from "./AnnotationUsage"
35
36
  import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
36
37
  import { TypeNode } from "./TypeNode"
37
38
 
38
39
  export class ETSUnionType extends TypeNode {
39
40
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 74)
41
+ assertValidPeer(pointer, 76)
41
42
  super(pointer)
42
43
  }
43
- static createETSUnionType(types: readonly TypeNode[]): ETSUnionType {
44
+ static createETSUnionType(types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType {
44
45
  const result: ETSUnionType = new ETSUnionType(global.generatedEs2panda._CreateETSUnionType(global.context, passNodeArray(types), types.length))
46
+ if (annotations)
47
+ {
48
+ result.setAnnotations(annotations)
49
+ }
45
50
  result.setChildrenParentPtr()
46
51
  return result
47
52
  }
48
- static updateETSUnionType(original: ETSUnionType | undefined, types: readonly TypeNode[]): ETSUnionType {
53
+ static updateETSUnionType(original: ETSUnionType | undefined, types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType {
49
54
  const result: ETSUnionType = new ETSUnionType(global.generatedEs2panda._UpdateETSUnionType(global.context, passNode(original), passNodeArray(types), types.length))
55
+ if (annotations)
56
+ {
57
+ result.setAnnotations(annotations)
58
+ }
50
59
  result.setChildrenParentPtr()
51
60
  return result
52
61
  }
@@ -39,7 +39,7 @@ import { TypeNode } from "./TypeNode"
39
39
 
40
40
  export class ETSWildcardType extends TypeNode {
41
41
  constructor(pointer: KNativePointer) {
42
- assertValidPeer(pointer, 68)
42
+ assertValidPeer(pointer, 70)
43
43
  super(pointer)
44
44
  }
45
45
  static createETSWildcardType(typeReference: ETSTypeReference | undefined, flags: Es2pandaModifierFlags): ETSWildcardType {
@@ -38,19 +38,29 @@ import { Es2pandaMethodDefinitionKind } from "./../Es2pandaEnums"
38
38
  import { Es2pandaModifierFlags } from "./../Es2pandaEnums"
39
39
  import { Expression } from "./Expression"
40
40
  import { ScriptFunction } from "./ScriptFunction"
41
+ import { extension_MethodDefinitionOnUpdate } from "./../../reexport-for-generated"
42
+ import { extension_MethodDefinitionSetChildrenParentPtr } from "./../../reexport-for-generated"
41
43
 
42
44
  export class MethodDefinition extends ClassElement {
43
45
  constructor(pointer: KNativePointer) {
44
46
  assertValidPeer(pointer, 47)
45
47
  super(pointer)
46
48
  }
47
- static createMethodDefinition(kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): MethodDefinition {
49
+ static createMethodDefinition(kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, overloads?: readonly MethodDefinition[]): MethodDefinition {
48
50
  const result: MethodDefinition = new MethodDefinition(global.generatedEs2panda._CreateMethodDefinition(global.context, kind, passNode(key), passNode(value), modifiers, isComputed))
51
+ if (overloads)
52
+ {
53
+ result.setOverloads(overloads)
54
+ }
49
55
  result.setChildrenParentPtr()
50
56
  return result
51
57
  }
52
- static updateMethodDefinition(original: MethodDefinition | undefined, kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): MethodDefinition {
58
+ static updateMethodDefinition(original: MethodDefinition | undefined, kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, overloads?: readonly MethodDefinition[]): MethodDefinition {
53
59
  const result: MethodDefinition = new MethodDefinition(global.generatedEs2panda._UpdateMethodDefinition(global.context, passNode(original), kind, passNode(key), passNode(value), modifiers, isComputed))
60
+ if (overloads)
61
+ {
62
+ result.setOverloads(overloads)
63
+ }
54
64
  result.setChildrenParentPtr()
55
65
  return result
56
66
  }
@@ -132,6 +142,8 @@ export class MethodDefinition extends ClassElement {
132
142
  global.generatedEs2panda._MethodDefinitionSetValueOverloads(global.context, this.peer, passNode(overloads), index)
133
143
  return this
134
144
  }
145
+ setChildrenParentPtr = extension_MethodDefinitionSetChildrenParentPtr
146
+ onUpdate = extension_MethodDefinitionOnUpdate
135
147
  protected readonly brandMethodDefinition: undefined
136
148
  }
137
149
  export function isMethodDefinition(node: object | undefined): node is MethodDefinition {
@@ -41,7 +41,7 @@ import { ValidationInfo } from "./ValidationInfo"
41
41
 
42
42
  export class ObjectExpression extends AnnotatedExpression {
43
43
  constructor(pointer: KNativePointer) {
44
- assertValidPeer(pointer, 161)
44
+ assertValidPeer(pointer, 163)
45
45
  super(pointer)
46
46
  }
47
47
  static createObjectExpression(nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression {
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
37
37
 
38
38
  export class OpaqueTypeNode extends TypeNode {
39
39
  constructor(pointer: KNativePointer) {
40
- assertValidPeer(pointer, 154)
40
+ assertValidPeer(pointer, 156)
41
41
  super(pointer)
42
42
  }
43
43
  static create1OpaqueTypeNode(): OpaqueTypeNode {
@@ -0,0 +1,103 @@
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
+ assertValidPeer,
28
+ AstNode,
29
+ KNativePointer,
30
+ nodeByType,
31
+ ArktsObject,
32
+ unpackString
33
+ } from "../../reexport-for-generated"
34
+
35
+ import { ClassElement } from "./ClassElement"
36
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
37
+ import { Es2pandaModifierFlags } from "./../Es2pandaEnums"
38
+ import { Es2pandaOverloadDeclFlags } from "./../Es2pandaEnums"
39
+ import { Expression } from "./Expression"
40
+ import { Identifier } from "./Identifier"
41
+ import { SrcDumper } from "./SrcDumper"
42
+
43
+ export class OverloadDeclaration extends ClassElement {
44
+ constructor(pointer: KNativePointer) {
45
+ assertValidPeer(pointer, 54)
46
+ super(pointer)
47
+ }
48
+ static createOverloadDeclaration(key: Expression | undefined, modifiers: Es2pandaModifierFlags): OverloadDeclaration {
49
+ const result: OverloadDeclaration = new OverloadDeclaration(global.generatedEs2panda._CreateOverloadDeclaration(global.context, passNode(key), modifiers))
50
+ result.setChildrenParentPtr()
51
+ return result
52
+ }
53
+ static updateOverloadDeclaration(original: OverloadDeclaration | undefined, key: Expression | undefined, modifiers: Es2pandaModifierFlags): OverloadDeclaration {
54
+ const result: OverloadDeclaration = new OverloadDeclaration(global.generatedEs2panda._UpdateOverloadDeclaration(global.context, passNode(original), passNode(key), modifiers))
55
+ result.setChildrenParentPtr()
56
+ return result
57
+ }
58
+ get flag(): Es2pandaOverloadDeclFlags {
59
+ return global.generatedEs2panda._OverloadDeclarationFlagConst(global.context, this.peer)
60
+ }
61
+ get overloadedList(): readonly Expression[] {
62
+ return unpackNodeArray(global.generatedEs2panda._OverloadDeclarationOverloadedList(global.context, this.peer))
63
+ }
64
+ /** @deprecated */
65
+ setOverloadedList(overloadedList: readonly Expression[]): this {
66
+ global.generatedEs2panda._OverloadDeclarationSetOverloadedList(global.context, this.peer, passNodeArray(overloadedList), overloadedList.length)
67
+ return this
68
+ }
69
+ /** @deprecated */
70
+ pushFront(overloadedExpression?: Identifier): this {
71
+ global.generatedEs2panda._OverloadDeclarationPushFront(global.context, this.peer, passNode(overloadedExpression))
72
+ return this
73
+ }
74
+ /** @deprecated */
75
+ addOverloadDeclFlag(overloadFlag: Es2pandaOverloadDeclFlags): this {
76
+ global.generatedEs2panda._OverloadDeclarationAddOverloadDeclFlag(global.context, this.peer, overloadFlag)
77
+ return this
78
+ }
79
+ get isConstructorOverloadDeclaration(): boolean {
80
+ return global.generatedEs2panda._OverloadDeclarationIsConstructorOverloadDeclaration(global.context, this.peer)
81
+ }
82
+ get isFunctionOverloadDeclaration(): boolean {
83
+ return global.generatedEs2panda._OverloadDeclarationIsFunctionOverloadDeclaration(global.context, this.peer)
84
+ }
85
+ get isClassMethodOverloadDeclaration(): boolean {
86
+ return global.generatedEs2panda._OverloadDeclarationIsClassMethodOverloadDeclaration(global.context, this.peer)
87
+ }
88
+ get isInterfaceMethodOverloadDeclaration(): boolean {
89
+ return global.generatedEs2panda._OverloadDeclarationIsInterfaceMethodOverloadDeclaration(global.context, this.peer)
90
+ }
91
+ /** @deprecated */
92
+ dumpModifier(dumper?: SrcDumper): this {
93
+ global.generatedEs2panda._OverloadDeclarationDumpModifierConst(global.context, this.peer, passNode(dumper))
94
+ return this
95
+ }
96
+ protected readonly brandOverloadDeclaration: undefined
97
+ }
98
+ export function isOverloadDeclaration(node: object | undefined): node is OverloadDeclaration {
99
+ return node instanceof OverloadDeclaration
100
+ }
101
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION)) {
102
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION, (peer: KNativePointer) => new OverloadDeclaration(peer))
103
+ }
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
38
38
 
39
39
  export class PrefixAssertionExpression extends Expression {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 54)
41
+ assertValidPeer(pointer, 55)
42
42
  super(pointer)
43
43
  }
44
44
  static createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression {
@@ -166,6 +166,14 @@ export class Program extends ArktsObject {
166
166
  get isStdLib(): boolean {
167
167
  return global.generatedEs2panda._ProgramIsStdLibConst(global.context, this.peer)
168
168
  }
169
+ get isGenAbcForExternal(): boolean {
170
+ return global.generatedEs2panda._ProgramIsGenAbcForExternalConst(global.context, this.peer)
171
+ }
172
+ /** @deprecated */
173
+ setGenAbcForExternalSources(genAbc: boolean): this {
174
+ global.generatedEs2panda._ProgramSetGenAbcForExternalSources(global.context, this.peer, genAbc)
175
+ return this
176
+ }
169
177
  get dump(): string {
170
178
  return unpackString(global.generatedEs2panda._ProgramDumpConst(global.context, this.peer))
171
179
  }
@@ -39,7 +39,7 @@ import { ValidationInfo } from "./ValidationInfo"
39
39
 
40
40
  export class Property extends Expression {
41
41
  constructor(pointer: KNativePointer) {
42
- assertValidPeer(pointer, 55)
42
+ assertValidPeer(pointer, 56)
43
43
  super(pointer)
44
44
  }
45
45
  static create1Property(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property {
@@ -38,7 +38,7 @@ import { Literal } from "./Literal"
38
38
 
39
39
  export class RegExpLiteral extends Literal {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 56)
41
+ assertValidPeer(pointer, 57)
42
42
  super(pointer)
43
43
  }
44
44
  static createRegExpLiteral(pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral {
@@ -38,7 +38,7 @@ import { Statement } from "./Statement"
38
38
 
39
39
  export class ReturnStatement extends Statement {
40
40
  constructor(pointer: KNativePointer) {
41
- assertValidPeer(pointer, 58)
41
+ assertValidPeer(pointer, 59)
42
42
  super(pointer)
43
43
  }
44
44
  static create1ReturnStatement(argument?: Expression): ReturnStatement {
@@ -41,19 +41,37 @@ import { Identifier } from "./Identifier"
41
41
  import { ReturnStatement } from "./ReturnStatement"
42
42
  import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
43
43
  import { TypeNode } from "./TypeNode"
44
+ import { extension_ScriptFunctionGetPreferredReturnTypePointer } from "./../../reexport-for-generated"
45
+ import { extension_ScriptFunctionSetPreferredReturnTypePointer } from "./../../reexport-for-generated"
44
46
 
45
47
  export class ScriptFunction extends AstNode {
46
48
  constructor(pointer: KNativePointer) {
47
- assertValidPeer(pointer, 59)
49
+ assertValidPeer(pointer, 60)
48
50
  super(pointer)
49
51
  }
50
- static createScriptFunction(databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number): ScriptFunction {
52
+ static createScriptFunction(databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number, ident?: Identifier, annotations?: readonly AnnotationUsage[]): ScriptFunction {
51
53
  const result: ScriptFunction = new ScriptFunction(global.generatedEs2panda._CreateScriptFunction(global.context, passNode(databody), passNode(datasignature), datafuncFlags, dataflags))
54
+ if (ident)
55
+ {
56
+ result.setIdent(ident)
57
+ }
58
+ if (annotations)
59
+ {
60
+ result.setAnnotations(annotations)
61
+ }
52
62
  result.setChildrenParentPtr()
53
63
  return result
54
64
  }
55
- static updateScriptFunction(original: ScriptFunction | undefined, databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number): ScriptFunction {
65
+ static updateScriptFunction(original: ScriptFunction | undefined, databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number, ident?: Identifier, annotations?: readonly AnnotationUsage[]): ScriptFunction {
56
66
  const result: ScriptFunction = new ScriptFunction(global.generatedEs2panda._UpdateScriptFunction(global.context, passNode(original), passNode(databody), passNode(datasignature), datafuncFlags, dataflags))
67
+ if (ident)
68
+ {
69
+ result.setIdent(ident)
70
+ }
71
+ if (annotations)
72
+ {
73
+ result.setAnnotations(annotations)
74
+ }
57
75
  result.setChildrenParentPtr()
58
76
  return result
59
77
  }
@@ -159,15 +177,12 @@ export class ScriptFunction extends AstNode {
159
177
  get hasThrowStatement(): boolean {
160
178
  return global.generatedEs2panda._ScriptFunctionHasThrowStatementConst(global.context, this.peer)
161
179
  }
162
- get isThrowing(): boolean {
163
- return global.generatedEs2panda._ScriptFunctionIsThrowingConst(global.context, this.peer)
164
- }
165
- get isRethrowing(): boolean {
166
- return global.generatedEs2panda._ScriptFunctionIsRethrowingConst(global.context, this.peer)
167
- }
168
180
  get isTrailingLambda(): boolean {
169
181
  return global.generatedEs2panda._ScriptFunctionIsTrailingLambdaConst(global.context, this.peer)
170
182
  }
183
+ get isSynthetic(): boolean {
184
+ return global.generatedEs2panda._ScriptFunctionIsSyntheticConst(global.context, this.peer)
185
+ }
171
186
  get isDynamic(): boolean {
172
187
  return global.generatedEs2panda._ScriptFunctionIsDynamicConst(global.context, this.peer)
173
188
  }
@@ -267,6 +282,8 @@ export class ScriptFunction extends AstNode {
267
282
  global.generatedEs2panda._ScriptFunctionAddAnnotations(global.context, this.peer, passNode(annotations))
268
283
  return this
269
284
  }
285
+ getPreferredReturnTypePointer = extension_ScriptFunctionGetPreferredReturnTypePointer
286
+ setPreferredReturnTypePointer = extension_ScriptFunctionSetPreferredReturnTypePointer
270
287
  protected readonly brandScriptFunction: undefined
271
288
  }
272
289
  export function isScriptFunction(node: object | undefined): node is ScriptFunction {