@idlizer/arktscgen 2.1.2

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 (229) hide show
  1. package/build/libarkts-copy/generator/options.json5 +155 -0
  2. package/build/libarkts-copy/native/meson.build +62 -0
  3. package/build/libarkts-copy/native/meson_options.txt +24 -0
  4. package/build/libarkts-copy/native/src/bridges.cc +265 -0
  5. package/build/libarkts-copy/native/src/common.cc +231 -0
  6. package/build/libarkts-copy/native/src/common.h +39 -0
  7. package/build/libarkts-copy/native/src/generated/bridges.cc +11979 -0
  8. package/build/libarkts-copy/package.json +51 -0
  9. package/build/libarkts-copy/src/Es2pandaEnums.ts +183 -0
  10. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +123 -0
  11. package/build/libarkts-copy/src/InteropNativeModule.ts +50 -0
  12. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +31 -0
  13. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +147 -0
  14. package/build/libarkts-copy/src/arkts-api/index.ts +28 -0
  15. package/build/libarkts-copy/src/arkts-api/node-utilities/createCallExpression.ts +40 -0
  16. package/build/libarkts-copy/src/arkts-api/node-utilities/createNumberLiteral.ts +28 -0
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +55 -0
  18. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +45 -0
  19. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +121 -0
  20. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +52 -0
  21. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +46 -0
  22. package/build/libarkts-copy/src/arkts-api/peers/Program.ts +55 -0
  23. package/build/libarkts-copy/src/arkts-api/static/global.ts +67 -0
  24. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +69 -0
  25. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +156 -0
  26. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +135 -0
  27. package/build/libarkts-copy/src/arkts-api/visitor.ts +297 -0
  28. package/build/libarkts-copy/src/es2panda.ts +277 -0
  29. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1266 -0
  30. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +3745 -0
  31. package/build/libarkts-copy/src/generated/factory.ts +1299 -0
  32. package/build/libarkts-copy/src/generated/index.ts +191 -0
  33. package/build/libarkts-copy/src/generated/node-map.ts +182 -0
  34. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +39 -0
  35. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +49 -0
  36. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +40 -0
  37. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +110 -0
  38. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +74 -0
  39. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +98 -0
  40. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +70 -0
  41. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +57 -0
  42. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +95 -0
  43. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +42 -0
  44. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +53 -0
  45. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +53 -0
  46. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +95 -0
  47. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +64 -0
  48. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +63 -0
  49. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +53 -0
  50. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +65 -0
  51. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +97 -0
  52. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +64 -0
  53. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +53 -0
  54. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +50 -0
  55. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +58 -0
  56. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +233 -0
  57. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +80 -0
  58. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +54 -0
  59. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +70 -0
  60. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +58 -0
  61. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +74 -0
  62. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +65 -0
  63. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +50 -0
  64. package/build/libarkts-copy/src/generated/peers/Decorator.ts +54 -0
  65. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +52 -0
  66. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +58 -0
  67. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +54 -0
  68. package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +40 -0
  69. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +84 -0
  70. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +68 -0
  71. package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +57 -0
  72. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +71 -0
  73. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +62 -0
  74. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +69 -0
  75. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +60 -0
  76. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +50 -0
  77. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +51 -0
  78. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +126 -0
  79. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +54 -0
  80. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +51 -0
  81. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +51 -0
  82. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +73 -0
  83. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +58 -0
  84. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +68 -0
  85. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +50 -0
  86. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +53 -0
  87. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +55 -0
  88. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +50 -0
  89. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +58 -0
  90. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +56 -0
  91. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +73 -0
  92. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +57 -0
  93. package/build/libarkts-copy/src/generated/peers/Expression.ts +75 -0
  94. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +59 -0
  95. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +61 -0
  96. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +64 -0
  97. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +61 -0
  98. package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +40 -0
  99. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +69 -0
  100. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +64 -0
  101. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +62 -0
  102. package/build/libarkts-copy/src/generated/peers/Identifier.ts +154 -0
  103. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +65 -0
  104. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +61 -0
  105. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +54 -0
  106. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +53 -0
  107. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +54 -0
  108. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +49 -0
  109. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +57 -0
  110. package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +40 -0
  111. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +60 -0
  112. package/build/libarkts-copy/src/generated/peers/Literal.ts +40 -0
  113. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +40 -0
  114. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +48 -0
  115. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +95 -0
  116. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +54 -0
  117. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +105 -0
  118. package/build/libarkts-copy/src/generated/peers/NamedType.ts +76 -0
  119. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +56 -0
  120. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +50 -0
  121. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +47 -0
  122. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +90 -0
  123. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +50 -0
  124. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +50 -0
  125. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +57 -0
  126. package/build/libarkts-copy/src/generated/peers/Property.ts +82 -0
  127. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +57 -0
  128. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +62 -0
  129. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +201 -0
  130. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +53 -0
  131. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +79 -0
  132. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +82 -0
  133. package/build/libarkts-copy/src/generated/peers/Statement.ts +39 -0
  134. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +56 -0
  135. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +50 -0
  136. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +62 -0
  137. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +63 -0
  138. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +50 -0
  139. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +53 -0
  140. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +76 -0
  141. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +50 -0
  142. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +50 -0
  143. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +60 -0
  144. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +63 -0
  145. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +65 -0
  146. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +81 -0
  147. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +66 -0
  148. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +53 -0
  149. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +67 -0
  150. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +61 -0
  151. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +64 -0
  152. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +65 -0
  153. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +56 -0
  154. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +54 -0
  155. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +53 -0
  156. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +102 -0
  157. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +54 -0
  158. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +54 -0
  159. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +54 -0
  160. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +64 -0
  161. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +71 -0
  162. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +53 -0
  163. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +63 -0
  164. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +60 -0
  165. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +50 -0
  166. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +58 -0
  167. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +50 -0
  168. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +50 -0
  169. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +50 -0
  170. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +66 -0
  171. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +54 -0
  172. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +72 -0
  173. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +63 -0
  174. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +67 -0
  175. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +50 -0
  176. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +50 -0
  177. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +53 -0
  178. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +88 -0
  179. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +63 -0
  180. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +53 -0
  181. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +63 -0
  182. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +84 -0
  183. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +62 -0
  184. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +54 -0
  185. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +60 -0
  186. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +54 -0
  187. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +62 -0
  188. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +50 -0
  189. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +53 -0
  190. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +50 -0
  191. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +50 -0
  192. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +61 -0
  193. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +59 -0
  194. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +60 -0
  195. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +50 -0
  196. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +54 -0
  197. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +75 -0
  198. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +49 -0
  199. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +39 -0
  200. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +40 -0
  201. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +53 -0
  202. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +57 -0
  203. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +50 -0
  204. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +60 -0
  205. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +42 -0
  206. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +71 -0
  207. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +69 -0
  208. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +58 -0
  209. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +56 -0
  210. package/build/libarkts-copy/src/reexport-for-generated.ts +33 -0
  211. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +1375 -0
  212. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +110 -0
  213. package/build/libarkts-copy/src/ts-api/index.ts +35 -0
  214. package/build/libarkts-copy/src/ts-api/static/enums.ts +18 -0
  215. package/build/libarkts-copy/src/ts-api/types.ts +920 -0
  216. package/build/libarkts-copy/src/ts-api/utilities/private.ts +289 -0
  217. package/build/libarkts-copy/src/ts-api/utilities/public.ts +55 -0
  218. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +155 -0
  219. package/build/libarkts-copy/src/utils.ts +89 -0
  220. package/build/libarkts-copy/tsconfig.json +15 -0
  221. package/lib/index.js +11858 -0
  222. package/package.json +54 -0
  223. package/templates/Es2pandaEnums.ts +16 -0
  224. package/templates/Es2pandaNativeModule.ts +32 -0
  225. package/templates/bridges.cc +18 -0
  226. package/templates/factory.ts +34 -0
  227. package/templates/index.ts +16 -0
  228. package/templates/node-map.ts +31 -0
  229. package/templates/peer.ts +32 -0
@@ -0,0 +1,54 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Es2pandaMetaPropertyKind } from "./../Es2pandaEnums"
33
+ import { Expression } from "./Expression"
34
+ export class MetaProperty extends Expression {
35
+ constructor(pointer: KNativePointer) {
36
+ assertValidPeer(pointer, 46)
37
+ super(pointer)
38
+ }
39
+ static createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty {
40
+ return new MetaProperty(global.generatedEs2panda._CreateMetaProperty(global.context, kind))
41
+ }
42
+ static updateMetaProperty(original: MetaProperty | undefined, kind: Es2pandaMetaPropertyKind): MetaProperty {
43
+ return new MetaProperty(global.generatedEs2panda._UpdateMetaProperty(global.context, passNode(original), kind))
44
+ }
45
+ get kind(): Es2pandaMetaPropertyKind {
46
+ return global.generatedEs2panda._MetaPropertyKindConst(global.context, this.peer)
47
+ }
48
+ }
49
+ export function isMetaProperty(node: object | undefined): node is MetaProperty {
50
+ return node instanceof MetaProperty
51
+ }
52
+ if (!nodeByType.has(46)) {
53
+ nodeByType.set(46, MetaProperty)
54
+ }
@@ -0,0 +1,105 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { ClassElement } from "./ClassElement"
33
+ import { Es2pandaMethodDefinitionKind } from "./../Es2pandaEnums"
34
+ import { Es2pandaModifierFlags } from "./../Es2pandaEnums"
35
+ import { Expression } from "./Expression"
36
+ import { ScriptFunction } from "./ScriptFunction"
37
+ export class MethodDefinition extends ClassElement {
38
+ constructor(pointer: KNativePointer) {
39
+ assertValidPeer(pointer, 47)
40
+ super(pointer)
41
+ }
42
+ static createMethodDefinition(kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): MethodDefinition {
43
+ return new MethodDefinition(global.generatedEs2panda._CreateMethodDefinition(global.context, kind, passNode(key), passNode(value), modifiers, isComputed))
44
+ }
45
+ static updateMethodDefinition(original: MethodDefinition | undefined, kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): MethodDefinition {
46
+ return new MethodDefinition(global.generatedEs2panda._UpdateMethodDefinition(global.context, passNode(original), kind, passNode(key), passNode(value), modifiers, isComputed))
47
+ }
48
+ get kind(): Es2pandaMethodDefinitionKind {
49
+ return global.generatedEs2panda._MethodDefinitionKindConst(global.context, this.peer)
50
+ }
51
+ get isConstructor(): boolean {
52
+ return global.generatedEs2panda._MethodDefinitionIsConstructorConst(global.context, this.peer)
53
+ }
54
+ get isExtensionMethod(): boolean {
55
+ return global.generatedEs2panda._MethodDefinitionIsExtensionMethodConst(global.context, this.peer)
56
+ }
57
+ get overloads(): readonly MethodDefinition[] {
58
+ return unpackNodeArray(global.generatedEs2panda._MethodDefinitionOverloadsConst(global.context, this.peer))
59
+ }
60
+ get baseOverloadMethod(): MethodDefinition | undefined {
61
+ return unpackNode(global.generatedEs2panda._MethodDefinitionBaseOverloadMethodConst(global.context, this.peer))
62
+ }
63
+ get asyncPairMethod(): MethodDefinition | undefined {
64
+ return unpackNode(global.generatedEs2panda._MethodDefinitionAsyncPairMethodConst(global.context, this.peer))
65
+ }
66
+ /** @deprecated */
67
+ setOverloads(overloads: readonly MethodDefinition[]): this {
68
+ global.generatedEs2panda._MethodDefinitionSetOverloads(global.context, this.peer, passNodeArray(overloads), overloads.length)
69
+ return this
70
+ }
71
+ /** @deprecated */
72
+ clearOverloads(): this {
73
+ global.generatedEs2panda._MethodDefinitionClearOverloads(global.context, this.peer)
74
+ return this
75
+ }
76
+ /** @deprecated */
77
+ addOverload(overload?: MethodDefinition): this {
78
+ global.generatedEs2panda._MethodDefinitionAddOverload(global.context, this.peer, passNode(overload))
79
+ return this
80
+ }
81
+ /** @deprecated */
82
+ setBaseOverloadMethod(baseOverloadMethod?: MethodDefinition): this {
83
+ global.generatedEs2panda._MethodDefinitionSetBaseOverloadMethod(global.context, this.peer, passNode(baseOverloadMethod))
84
+ return this
85
+ }
86
+ /** @deprecated */
87
+ setAsyncPairMethod(method?: MethodDefinition): this {
88
+ global.generatedEs2panda._MethodDefinitionSetAsyncPairMethod(global.context, this.peer, passNode(method))
89
+ return this
90
+ }
91
+ get function(): ScriptFunction {
92
+ return unpackNonNullableNode(global.generatedEs2panda._MethodDefinitionFunctionConst(global.context, this.peer))
93
+ }
94
+ /** @deprecated */
95
+ initializeOverloadInfo(): this {
96
+ global.generatedEs2panda._MethodDefinitionInitializeOverloadInfo(global.context, this.peer)
97
+ return this
98
+ }
99
+ }
100
+ export function isMethodDefinition(node: object | undefined): node is MethodDefinition {
101
+ return node instanceof MethodDefinition
102
+ }
103
+ if (!nodeByType.has(47)) {
104
+ nodeByType.set(47, MethodDefinition)
105
+ }
@@ -0,0 +1,76 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Identifier } from "./Identifier"
33
+ import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation"
34
+ import { TypeNode } from "./TypeNode"
35
+ export class NamedType extends TypeNode {
36
+ constructor(pointer: KNativePointer) {
37
+ assertValidPeer(pointer, 48)
38
+ super(pointer)
39
+ }
40
+ static createNamedType(name?: Identifier): NamedType {
41
+ return new NamedType(global.generatedEs2panda._CreateNamedType(global.context, passNode(name)))
42
+ }
43
+ static updateNamedType(original?: NamedType, name?: Identifier): NamedType {
44
+ return new NamedType(global.generatedEs2panda._UpdateNamedType(global.context, passNode(original), passNode(name)))
45
+ }
46
+ get name(): Identifier | undefined {
47
+ return unpackNode(global.generatedEs2panda._NamedTypeNameConst(global.context, this.peer))
48
+ }
49
+ get typeParams(): TSTypeParameterInstantiation | undefined {
50
+ return unpackNode(global.generatedEs2panda._NamedTypeTypeParamsConst(global.context, this.peer))
51
+ }
52
+ get isNullable(): boolean {
53
+ return global.generatedEs2panda._NamedTypeIsNullableConst(global.context, this.peer)
54
+ }
55
+ /** @deprecated */
56
+ setNullable(nullable: boolean): this {
57
+ global.generatedEs2panda._NamedTypeSetNullable(global.context, this.peer, nullable)
58
+ return this
59
+ }
60
+ /** @deprecated */
61
+ setNext(next?: NamedType): this {
62
+ global.generatedEs2panda._NamedTypeSetNext(global.context, this.peer, passNode(next))
63
+ return this
64
+ }
65
+ /** @deprecated */
66
+ setTypeParams(typeParams?: TSTypeParameterInstantiation): this {
67
+ global.generatedEs2panda._NamedTypeSetTypeParams(global.context, this.peer, passNode(typeParams))
68
+ return this
69
+ }
70
+ }
71
+ export function isNamedType(node: object | undefined): node is NamedType {
72
+ return node instanceof NamedType
73
+ }
74
+ if (!nodeByType.has(48)) {
75
+ nodeByType.set(48, NamedType)
76
+ }
@@ -0,0 +1,56 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Expression } from "./Expression"
33
+ export class NewExpression extends Expression {
34
+ constructor(pointer: KNativePointer) {
35
+ assertValidPeer(pointer, 49)
36
+ super(pointer)
37
+ }
38
+ static createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression {
39
+ return new NewExpression(global.generatedEs2panda._CreateNewExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length))
40
+ }
41
+ static updateNewExpression(original: NewExpression | undefined, callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression {
42
+ return new NewExpression(global.generatedEs2panda._UpdateNewExpression(global.context, passNode(original), passNode(callee), passNodeArray(_arguments), _arguments.length))
43
+ }
44
+ get callee(): Expression | undefined {
45
+ return unpackNode(global.generatedEs2panda._NewExpressionCalleeConst(global.context, this.peer))
46
+ }
47
+ get arguments(): readonly Expression[] {
48
+ return unpackNodeArray(global.generatedEs2panda._NewExpressionArgumentsConst(global.context, this.peer))
49
+ }
50
+ }
51
+ export function isNewExpression(node: object | undefined): node is NewExpression {
52
+ return node instanceof NewExpression
53
+ }
54
+ if (!nodeByType.has(49)) {
55
+ nodeByType.set(49, NewExpression)
56
+ }
@@ -0,0 +1,50 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Literal } from "./Literal"
33
+ export class NullLiteral extends Literal {
34
+ constructor(pointer: KNativePointer) {
35
+ assertValidPeer(pointer, 50)
36
+ super(pointer)
37
+ }
38
+ static createNullLiteral(): NullLiteral {
39
+ return new NullLiteral(global.generatedEs2panda._CreateNullLiteral(global.context))
40
+ }
41
+ static updateNullLiteral(original?: NullLiteral): NullLiteral {
42
+ return new NullLiteral(global.generatedEs2panda._UpdateNullLiteral(global.context, passNode(original)))
43
+ }
44
+ }
45
+ export function isNullLiteral(node: object | undefined): node is NullLiteral {
46
+ return node instanceof NullLiteral
47
+ }
48
+ if (!nodeByType.has(50)) {
49
+ nodeByType.set(50, NullLiteral)
50
+ }
@@ -0,0 +1,47 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Literal } from "./Literal"
33
+ export class NumberLiteral extends Literal {
34
+ constructor(pointer: KNativePointer) {
35
+ assertValidPeer(pointer, 52)
36
+ super(pointer)
37
+ }
38
+ get str(): string {
39
+ return unpackString(global.generatedEs2panda._NumberLiteralStrConst(global.context, this.peer))
40
+ }
41
+ }
42
+ export function isNumberLiteral(node: object | undefined): node is NumberLiteral {
43
+ return node instanceof NumberLiteral
44
+ }
45
+ if (!nodeByType.has(52)) {
46
+ nodeByType.set(52, NumberLiteral)
47
+ }
@@ -0,0 +1,90 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { AnnotatedExpression } from "./AnnotatedExpression"
33
+ import { Decorator } from "./Decorator"
34
+ import { Expression } from "./Expression"
35
+ import { TypeNode } from "./TypeNode"
36
+ import { ValidationInfo } from "./ValidationInfo"
37
+ export class ObjectExpression extends AnnotatedExpression {
38
+ constructor(pointer: KNativePointer) {
39
+ assertValidPeer(pointer, 160)
40
+ super(pointer)
41
+ }
42
+ static createObjectExpression(nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression {
43
+ return new ObjectExpression(global.generatedEs2panda._CreateObjectExpression(global.context, nodeType, passNodeArray(properties), properties.length, trailingComma))
44
+ }
45
+ static updateObjectExpression(original: ObjectExpression | undefined, nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression {
46
+ return new ObjectExpression(global.generatedEs2panda._UpdateObjectExpression(global.context, passNode(original), nodeType, passNodeArray(properties), properties.length, trailingComma))
47
+ }
48
+ get properties(): readonly Expression[] {
49
+ return unpackNodeArray(global.generatedEs2panda._ObjectExpressionPropertiesConst(global.context, this.peer))
50
+ }
51
+ get isDeclaration(): boolean {
52
+ return global.generatedEs2panda._ObjectExpressionIsDeclarationConst(global.context, this.peer)
53
+ }
54
+ get isOptional(): boolean {
55
+ return global.generatedEs2panda._ObjectExpressionIsOptionalConst(global.context, this.peer)
56
+ }
57
+ get decorators(): readonly Decorator[] {
58
+ return unpackNodeArray(global.generatedEs2panda._ObjectExpressionDecoratorsConst(global.context, this.peer))
59
+ }
60
+ get validateExpression(): ValidationInfo | undefined {
61
+ return new ValidationInfo(global.generatedEs2panda._ObjectExpressionValidateExpression(global.context, this.peer))
62
+ }
63
+ get convertibleToObjectPattern(): boolean {
64
+ return global.generatedEs2panda._ObjectExpressionConvertibleToObjectPattern(global.context, this.peer)
65
+ }
66
+ /** @deprecated */
67
+ setDeclaration(): this {
68
+ global.generatedEs2panda._ObjectExpressionSetDeclaration(global.context, this.peer)
69
+ return this
70
+ }
71
+ /** @deprecated */
72
+ setOptional(optional_arg: boolean): this {
73
+ global.generatedEs2panda._ObjectExpressionSetOptional(global.context, this.peer, optional_arg)
74
+ return this
75
+ }
76
+ get typeAnnotation(): TypeNode | undefined {
77
+ return unpackNode(global.generatedEs2panda._ObjectExpressionTypeAnnotationConst(global.context, this.peer))
78
+ }
79
+ /** @deprecated */
80
+ setTsTypeAnnotation(typeAnnotation?: TypeNode): this {
81
+ global.generatedEs2panda._ObjectExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation))
82
+ return this
83
+ }
84
+ }
85
+ export function isObjectExpression(node: object | undefined): node is ObjectExpression {
86
+ return node instanceof ObjectExpression
87
+ }
88
+ if (!nodeByType.has(160)) {
89
+ nodeByType.set(160, ObjectExpression)
90
+ }
@@ -0,0 +1,50 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Expression } from "./Expression"
33
+ export class OmittedExpression extends Expression {
34
+ constructor(pointer: KNativePointer) {
35
+ assertValidPeer(pointer, 53)
36
+ super(pointer)
37
+ }
38
+ static createOmittedExpression(): OmittedExpression {
39
+ return new OmittedExpression(global.generatedEs2panda._CreateOmittedExpression(global.context))
40
+ }
41
+ static updateOmittedExpression(original?: OmittedExpression): OmittedExpression {
42
+ return new OmittedExpression(global.generatedEs2panda._UpdateOmittedExpression(global.context, passNode(original)))
43
+ }
44
+ }
45
+ export function isOmittedExpression(node: object | undefined): node is OmittedExpression {
46
+ return node instanceof OmittedExpression
47
+ }
48
+ if (!nodeByType.has(53)) {
49
+ nodeByType.set(53, OmittedExpression)
50
+ }
@@ -0,0 +1,50 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { TypeNode } from "./TypeNode"
33
+ export class OpaqueTypeNode extends TypeNode {
34
+ constructor(pointer: KNativePointer) {
35
+ assertValidPeer(pointer, 153)
36
+ super(pointer)
37
+ }
38
+ static create1OpaqueTypeNode(): OpaqueTypeNode {
39
+ return new OpaqueTypeNode(global.generatedEs2panda._CreateOpaqueTypeNode1(global.context))
40
+ }
41
+ static update1OpaqueTypeNode(original?: OpaqueTypeNode): OpaqueTypeNode {
42
+ return new OpaqueTypeNode(global.generatedEs2panda._UpdateOpaqueTypeNode1(global.context, passNode(original)))
43
+ }
44
+ }
45
+ export function isOpaqueTypeNode(node: object | undefined): node is OpaqueTypeNode {
46
+ return node instanceof OpaqueTypeNode
47
+ }
48
+ if (!nodeByType.has(153)) {
49
+ nodeByType.set(153, OpaqueTypeNode)
50
+ }
@@ -0,0 +1,57 @@
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
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ Es2pandaAstNodeType,
26
+ KNativePointer,
27
+ nodeByType,
28
+ ArktsObject,
29
+ unpackString
30
+ } from "../../reexport-for-generated"
31
+
32
+ import { Expression } from "./Expression"
33
+ import { TypeNode } from "./TypeNode"
34
+ export class PrefixAssertionExpression extends Expression {
35
+ constructor(pointer: KNativePointer) {
36
+ assertValidPeer(pointer, 54)
37
+ super(pointer)
38
+ }
39
+ static createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression {
40
+ return new PrefixAssertionExpression(global.generatedEs2panda._CreatePrefixAssertionExpression(global.context, passNode(expr), passNode(type)))
41
+ }
42
+ static updatePrefixAssertionExpression(original?: PrefixAssertionExpression, expr?: Expression, type?: TypeNode): PrefixAssertionExpression {
43
+ return new PrefixAssertionExpression(global.generatedEs2panda._UpdatePrefixAssertionExpression(global.context, passNode(original), passNode(expr), passNode(type)))
44
+ }
45
+ get expr(): Expression | undefined {
46
+ return unpackNode(global.generatedEs2panda._PrefixAssertionExpressionExprConst(global.context, this.peer))
47
+ }
48
+ get type(): TypeNode | undefined {
49
+ return unpackNode(global.generatedEs2panda._PrefixAssertionExpressionTypeConst(global.context, this.peer))
50
+ }
51
+ }
52
+ export function isPrefixAssertionExpression(node: object | undefined): node is PrefixAssertionExpression {
53
+ return node instanceof PrefixAssertionExpression
54
+ }
55
+ if (!nodeByType.has(54)) {
56
+ nodeByType.set(54, PrefixAssertionExpression)
57
+ }