@idlizer/arktscgen 2.1.10-arktscgen-4 → 2.1.10-arktscgen-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/build/libarkts-copy/native/meson.build +1 -1
  2. package/build/libarkts-copy/native/src/bridges.cc +72 -115
  3. package/build/libarkts-copy/native/src/common.cc +225 -84
  4. package/build/libarkts-copy/native/src/common.h +22 -22
  5. package/build/libarkts-copy/native/src/memoryTracker.cc +30 -37
  6. package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
  7. package/build/libarkts-copy/package.json +21 -17
  8. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +176 -100
  9. package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
  10. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +17 -18
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +31 -30
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +20 -17
  13. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +12 -12
  14. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +38 -29
  15. package/build/libarkts-copy/src/arkts-api/index.ts +24 -24
  16. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -12
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +26 -24
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +52 -53
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
  42. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
  43. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -49
  44. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +17 -24
  45. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +29 -37
  46. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +5 -6
  47. package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
  48. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
  49. package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
  50. package/build/libarkts-copy/src/arkts-api/plugins.ts +98 -30
  51. package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
  52. package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
  53. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
  54. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
  55. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
  56. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +39 -23
  57. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +73 -61
  58. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +220 -173
  59. package/build/libarkts-copy/src/arkts-api/visitor.ts +606 -742
  60. package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
  61. package/build/libarkts-copy/src/checkSdk.ts +15 -18
  62. package/build/libarkts-copy/src/index.ts +29 -29
  63. package/build/libarkts-copy/src/plugin-utils.ts +52 -40
  64. package/build/libarkts-copy/src/reexport-for-generated.ts +11 -10
  65. package/build/libarkts-copy/src/tracer.ts +75 -69
  66. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
  67. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
  68. package/build/libarkts-copy/src/ts-api/index.ts +27 -35
  69. package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
  70. package/build/libarkts-copy/src/ts-api/types.ts +535 -395
  71. package/build/libarkts-copy/src/ts-api/utilities/private.ts +115 -112
  72. package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
  73. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
  74. package/build/libarkts-copy/src/utils.ts +97 -70
  75. package/build/libarkts-copy/tsconfig.json +3 -2
  76. package/lib/index.js +172 -77
  77. package/package.json +51 -52
  78. package/templates/Es2pandaNativeModule.ts +1 -0
  79. package/templates/peer.ts +1 -0
  80. package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16375
  81. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1344
  82. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5192
  83. package/build/libarkts-copy/src/generated/factory.ts +0 -1285
  84. package/build/libarkts-copy/src/generated/index.ts +0 -222
  85. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
  86. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
  87. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
  88. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
  89. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
  90. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
  91. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
  92. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
  93. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
  94. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
  95. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
  96. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
  97. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
  98. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
  99. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
  100. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
  101. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
  102. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
  103. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
  104. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
  105. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
  106. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
  107. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
  108. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
  109. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
  110. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
  111. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
  112. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
  113. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
  114. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
  115. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
  116. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
  117. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
  118. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
  119. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
  120. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
  121. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
  122. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
  123. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
  124. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
  125. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
  126. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
  127. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
  128. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
  129. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -69
  130. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
  131. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
  132. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
  133. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
  134. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
  135. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
  136. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
  137. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
  138. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
  139. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
  140. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
  141. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
  142. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
  143. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
  144. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
  145. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
  146. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
  147. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
  148. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
  149. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
  150. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
  151. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
  152. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
  153. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
  154. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
  155. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
  156. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
  157. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
  158. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
  159. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
  160. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
  161. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
  162. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
  163. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
  164. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
  165. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
  166. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
  167. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
  168. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
  169. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
  170. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
  171. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
  172. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
  173. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
  174. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
  175. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
  176. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
  177. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
  178. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
  179. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
  180. package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
  181. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
  182. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
  183. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
  184. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
  185. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
  186. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
  187. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
  188. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
  189. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
  190. package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
  191. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
  192. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
  193. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
  194. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
  195. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
  196. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
  197. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
  198. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
  199. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
  200. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
  201. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
  202. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
  203. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
  204. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
  205. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
  206. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
  207. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
  208. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
  209. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
  210. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
  211. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
  212. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
  213. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
  214. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
  215. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
  216. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
  217. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
  218. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
  219. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
  220. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
  221. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
  222. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
  223. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
  224. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
  225. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
  226. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
  227. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
  228. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
  229. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
  230. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
  231. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
  232. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
  233. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
  234. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
  235. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
  236. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
  237. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
  238. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
  239. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
  240. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
  241. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
  242. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
  243. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
  244. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
  245. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
  246. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
  247. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
  248. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
  249. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
  250. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
  251. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
  252. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
  253. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
  254. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
  255. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
  256. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
  257. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
  258. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
  259. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
  260. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
  261. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
  262. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
  263. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
  264. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
  265. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
  266. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
  267. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
  268. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
  269. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
  270. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
  271. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
  272. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
  273. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
  274. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
  275. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
  276. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
  277. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
  278. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
  279. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
  280. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
  281. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
  282. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
  283. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
@@ -13,10 +13,10 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import * as ts from "@koalaui/ets-tsc"
17
- import * as arkts from "../arkts-api"
16
+ import * as ts from '@koalaui/ets-tsc';
17
+ import * as arkts from '../arkts-api';
18
18
 
19
- import { throwError } from "../utils"
19
+ import { throwError } from '../utils';
20
20
  import {
21
21
  passModifiers,
22
22
  emptyImplementation,
@@ -24,8 +24,8 @@ import {
24
24
  unpackNode,
25
25
  unpackNodeArray,
26
26
  unpackVariableDeclarationKind,
27
- } from "./utilities/private"
28
- import { SyntaxKind } from "./static/enums"
27
+ } from './utilities/private';
28
+ import { SyntaxKind } from './static/enums';
29
29
 
30
30
  // Improve: write implementation
31
31
  export interface TransformationContext {}
@@ -34,84 +34,124 @@ export interface TransformationContext {}
34
34
  export interface Program {}
35
35
 
36
36
  // Improve: remove U type param
37
- export type NodeArray<T extends Node<U>, U extends arkts.AstNode | undefined = arkts.AstNode | undefined> = ts.NodeArray<T>
37
+ export type NodeArray<
38
+ T extends Node<U>,
39
+ U extends arkts.AstNode | undefined = arkts.AstNode | undefined,
40
+ > = ts.NodeArray<T>;
38
41
 
39
42
  export abstract class Node<T extends arkts.AstNode | undefined = arkts.AstNode | undefined> implements ts.Node {
40
43
  constructor(node: T) {
41
- this.node = node
44
+ this.node = node;
42
45
  }
43
46
 
44
- readonly node: T
47
+ readonly node: T;
45
48
 
46
49
  // Improve: remove any
47
50
  get parent(): any {
48
51
  if (this.node === undefined) {
49
- throwError('trying to get parent of undefined _node')
52
+ throwError('trying to get parent of undefined _node');
50
53
  }
51
- return unpackNode(this.node.parent)
54
+ return unpackNode(this.node.parent);
52
55
  }
53
56
 
54
57
  set parent(node: Node) {
55
58
  if (this.node === undefined) {
56
- throwError('trying to set parent of undefined')
59
+ throwError('trying to set parent of undefined');
57
60
  }
58
61
  if (node.node === undefined) {
59
- throwError('trying to set parent to undefined')
62
+ throwError('trying to set parent to undefined');
60
63
  }
61
- this.node.parent = node.node
64
+ this.node.parent = node.node;
62
65
  }
63
66
 
64
67
  set modifiers(flags: readonly Modifier[] | undefined) {
65
68
  if (this.node === undefined) {
66
- throwError('trying to set modifiers of undefined')
69
+ throwError('trying to set modifiers of undefined');
67
70
  }
68
- this.node.modifiers = passModifiers(flags)
71
+ this.node.modifiers = passModifiers(flags);
69
72
  }
70
73
 
71
74
  get modifiers(): NodeArray<Modifier> {
72
- return unpackModifiers(this.node?.modifiers)
75
+ return unpackModifiers(this.node?.modifiers);
73
76
  }
74
77
 
75
- abstract kind: SyntaxKind
78
+ abstract kind: SyntaxKind;
76
79
 
77
80
  // Improve:
78
- forEachChild<T>(cbNode: (node: ts.Node) => T | undefined, cbNodeArray?: ((nodes: ts.NodeArray<ts.Node>) => T | undefined) | undefined): T | undefined { throw new Error("Method not implemented.") }
79
- getSourceFile(): ts.SourceFile { throw new Error("Method not implemented.") }
80
- getChildCount(sourceFile?: ts.SourceFile | undefined): number { throw new Error("Method not implemented.") }
81
- getChildAt(index: number, sourceFile?: ts.SourceFile | undefined): ts.Node { throw new Error("Method not implemented.") }
82
- getChildren(sourceFile?: ts.SourceFile | undefined): ts.Node[] { throw new Error("Method not implemented.") }
83
-
84
- getStart(sourceFile?: ts.SourceFile | undefined, includeJsDocComment?: boolean | undefined): number { throw new Error("Method not implemented.") }
85
- getFullStart(): number { throw new Error("Method not implemented.") }
86
- getEnd(): number { throw new Error("Method not implemented.") }
87
- getWidth(sourceFile?: ts.SourceFileLike | undefined): number { throw new Error("Method not implemented.") }
88
- getFullWidth(): number { throw new Error("Method not implemented.") }
89
- getLeadingTriviaWidth(sourceFile?: ts.SourceFile | undefined): number { throw new Error("Method not implemented.") }
90
- getFullText(sourceFile?: ts.SourceFile | undefined): string { throw new Error("Method not implemented.") }
91
- getText(sourceFile?: ts.SourceFile | undefined): string { throw new Error("Method not implemented.") }
92
- getFirstToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined { throw new Error("Method not implemented.") }
93
- getLastToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined { throw new Error("Method not implemented.") }
94
-
95
- get symbol(): ts.Symbol { return emptyImplementation() }
96
- get flags(): ts.NodeFlags { return emptyImplementation() }
97
- get pos(): number { return emptyImplementation() }
98
- get end(): number { return emptyImplementation() }
81
+ forEachChild<T>(
82
+ cbNode: (node: ts.Node) => T | undefined,
83
+ cbNodeArray?: ((nodes: ts.NodeArray<ts.Node>) => T | undefined) | undefined
84
+ ): T | undefined {
85
+ throw new Error('Method not implemented.');
86
+ }
87
+ getSourceFile(): ts.SourceFile {
88
+ throw new Error('Method not implemented.');
89
+ }
90
+ getChildCount(sourceFile?: ts.SourceFile | undefined): number {
91
+ throw new Error('Method not implemented.');
92
+ }
93
+ getChildAt(index: number, sourceFile?: ts.SourceFile | undefined): ts.Node {
94
+ throw new Error('Method not implemented.');
95
+ }
96
+ getChildren(sourceFile?: ts.SourceFile | undefined): ts.Node[] {
97
+ throw new Error('Method not implemented.');
98
+ }
99
+
100
+ getStart(sourceFile?: ts.SourceFile | undefined, includeJsDocComment?: boolean | undefined): number {
101
+ throw new Error('Method not implemented.');
102
+ }
103
+ getFullStart(): number {
104
+ throw new Error('Method not implemented.');
105
+ }
106
+ getEnd(): number {
107
+ throw new Error('Method not implemented.');
108
+ }
109
+ getWidth(sourceFile?: ts.SourceFileLike | undefined): number {
110
+ throw new Error('Method not implemented.');
111
+ }
112
+ getFullWidth(): number {
113
+ throw new Error('Method not implemented.');
114
+ }
115
+ getLeadingTriviaWidth(sourceFile?: ts.SourceFile | undefined): number {
116
+ throw new Error('Method not implemented.');
117
+ }
118
+ getFullText(sourceFile?: ts.SourceFile | undefined): string {
119
+ throw new Error('Method not implemented.');
120
+ }
121
+ getText(sourceFile?: ts.SourceFile | undefined): string {
122
+ throw new Error('Method not implemented.');
123
+ }
124
+ getFirstToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined {
125
+ throw new Error('Method not implemented.');
126
+ }
127
+ getLastToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined {
128
+ throw new Error('Method not implemented.');
129
+ }
130
+
131
+ get symbol(): ts.Symbol {
132
+ return emptyImplementation();
133
+ }
134
+ get flags(): ts.NodeFlags {
135
+ return emptyImplementation();
136
+ }
137
+ get pos(): number {
138
+ return emptyImplementation();
139
+ }
140
+ get end(): number {
141
+ return emptyImplementation();
142
+ }
99
143
  }
100
144
 
101
145
  // Improve: add all tokens
102
- export type BinaryOperator =
103
- | ts.SyntaxKind.PlusToken
104
- | ts.SyntaxKind.MinusToken
105
-
106
- | ts.SyntaxKind.AsteriskToken
146
+ export type BinaryOperator = ts.SyntaxKind.PlusToken | ts.SyntaxKind.MinusToken | ts.SyntaxKind.AsteriskToken;
107
147
 
108
148
  export type BinaryOperatorToken = Token<BinaryOperator>;
109
149
 
110
150
  // Improve: rethink maybe (temporary solution)
111
151
  export class Token<TKind extends ts.TokenSyntaxKind> extends Node<undefined> {
112
152
  constructor(kind: TKind) {
113
- super(undefined)
114
- this.kind = kind
153
+ super(undefined);
154
+ this.kind = kind;
115
155
  }
116
156
 
117
157
  readonly kind: TKind;
@@ -137,272 +177,320 @@ export type ModifierSyntaxKind =
137
177
 
138
178
  export class Modifier extends Node<undefined> {
139
179
  constructor(kind: ModifierSyntaxKind) {
140
- super(undefined)
141
- this.kind = kind
180
+ super(undefined);
181
+ this.kind = kind;
142
182
  }
143
183
 
144
184
  public toString(): string {
145
- return `${this.kind}`
185
+ return `${this.kind}`;
146
186
  }
147
187
 
148
- kind: ModifierSyntaxKind
188
+ kind: ModifierSyntaxKind;
149
189
  }
150
190
 
151
191
  export abstract class Expression extends Node<arkts.AstNode> implements ts.Expression {
152
192
  // Improve: support minimal interface
153
- _expressionBrand: any
193
+ _expressionBrand: any;
154
194
  }
155
195
 
156
- export class FunctionDeclaration extends Node<arkts.FunctionDeclaration> implements ts.FunctionDeclaration, FunctionLikeDeclarationBase {
196
+ export class FunctionDeclaration
197
+ extends Node<arkts.FunctionDeclaration>
198
+ implements ts.FunctionDeclaration, FunctionLikeDeclarationBase
199
+ {
157
200
  constructor(node: arkts.FunctionDeclaration) {
158
- super(node)
159
- this.name = unpackNode(node.name)
160
- this.body = unpackNode(node.body)
161
- this.typeParameters = unpackNodeArray(node.typeParamsDecl?.parameters)
162
- this.type = unpackNode(node.returnType)
163
- this.parameters = unpackNodeArray(node.parameters)
201
+ super(node);
202
+ this.name = unpackNode(node.name);
203
+ this.body = unpackNode(node.body);
204
+ this.typeParameters = unpackNodeArray(node.typeParamsDecl?.parameters);
205
+ this.type = unpackNode(node.returnType);
206
+ this.parameters = unpackNodeArray(node.parameters);
164
207
  }
165
208
 
166
- readonly name?: Identifier | undefined
167
- readonly body?: Block | undefined
168
- readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined
169
- readonly type?: TypeNode | undefined
170
- readonly parameters: NodeArray<ParameterDeclaration>
171
- readonly kind: ts.SyntaxKind.FunctionDeclaration = ts.SyntaxKind.FunctionDeclaration
209
+ readonly name?: Identifier | undefined;
210
+ readonly body?: Block | undefined;
211
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined;
212
+ readonly type?: TypeNode | undefined;
213
+ readonly parameters: NodeArray<ParameterDeclaration>;
214
+ readonly kind: ts.SyntaxKind.FunctionDeclaration = ts.SyntaxKind.FunctionDeclaration;
172
215
 
173
216
  // brands
174
- _functionLikeDeclarationBrand: any
175
- _declarationBrand: any
176
- _statementBrand: any
217
+ _functionLikeDeclarationBrand: any;
218
+ _declarationBrand: any;
219
+ _statementBrand: any;
177
220
  }
178
221
 
179
- export class FunctionExpression extends Node<arkts.FunctionExpression> implements ts.FunctionExpression, FunctionLikeDeclarationBase {
222
+ export class FunctionExpression
223
+ extends Node<arkts.FunctionExpression>
224
+ implements ts.FunctionExpression, FunctionLikeDeclarationBase
225
+ {
180
226
  constructor(node: arkts.FunctionExpression) {
181
- super(node)
182
- this.name = unpackNode(node.scriptFunction.ident)
227
+ super(node);
228
+ this.name = unpackNode(node.scriptFunction.ident);
183
229
  if (node.scriptFunction.body === undefined) {
184
- throwError('body expected to be not undefined')
230
+ throwError('body expected to be not undefined');
185
231
  }
186
- this.body = unpackNode(node.scriptFunction.body)
187
- this.parameters = unpackNodeArray(node.scriptFunction.parameters)
232
+ this.body = unpackNode(node.scriptFunction.body);
233
+ this.parameters = unpackNodeArray(node.scriptFunction.parameters);
188
234
  }
189
235
 
190
- readonly name?: Identifier
191
- readonly body: Block
192
- readonly parameters: NodeArray<ParameterDeclaration>
193
- readonly kind: ts.SyntaxKind.FunctionExpression = ts.SyntaxKind.FunctionExpression
236
+ readonly name?: Identifier;
237
+ readonly body: Block;
238
+ readonly parameters: NodeArray<ParameterDeclaration>;
239
+ readonly kind: ts.SyntaxKind.FunctionExpression = ts.SyntaxKind.FunctionExpression;
194
240
 
195
241
  // brands
196
- _primaryExpressionBrand: any
197
- _memberExpressionBrand: any
198
- _leftHandSideExpressionBrand: any
199
- _updateExpressionBrand: any
200
- _unaryExpressionBrand: any
201
- _expressionBrand: any
202
- _functionLikeDeclarationBrand: any
203
- _declarationBrand: any
242
+ _primaryExpressionBrand: any;
243
+ _memberExpressionBrand: any;
244
+ _leftHandSideExpressionBrand: any;
245
+ _updateExpressionBrand: any;
246
+ _unaryExpressionBrand: any;
247
+ _expressionBrand: any;
248
+ _functionLikeDeclarationBrand: any;
249
+ _declarationBrand: any;
204
250
  }
205
251
 
206
252
  export class Identifier extends Node<arkts.Identifier> implements ts.Identifier, Expression {
207
253
  constructor(node: arkts.Identifier) {
208
- super(node)
209
- this.text = node.name
254
+ super(node);
255
+ this.text = node.name;
210
256
  }
211
257
 
212
- readonly text: string
213
- readonly kind: ts.SyntaxKind.Identifier = ts.SyntaxKind.Identifier
258
+ readonly text: string;
259
+ readonly kind: ts.SyntaxKind.Identifier = ts.SyntaxKind.Identifier;
214
260
 
215
261
  // Improve:
216
- get escapedText(): ts.__String { return emptyImplementation() }
262
+ get escapedText(): ts.__String {
263
+ return emptyImplementation();
264
+ }
217
265
 
218
266
  // brands
219
- _primaryExpressionBrand: any
220
- _memberExpressionBrand: any
221
- _leftHandSideExpressionBrand: any
222
- _updateExpressionBrand: any
223
- _unaryExpressionBrand: any
224
- _expressionBrand: any
225
- _declarationBrand: any
267
+ _primaryExpressionBrand: any;
268
+ _memberExpressionBrand: any;
269
+ _leftHandSideExpressionBrand: any;
270
+ _updateExpressionBrand: any;
271
+ _unaryExpressionBrand: any;
272
+ _expressionBrand: any;
273
+ _declarationBrand: any;
226
274
  }
227
275
 
228
276
  export class PrivateIdentifier extends Node<arkts.Identifier> implements ts.PrivateIdentifier, Expression {
229
277
  constructor(node: arkts.Identifier) {
230
- super(node)
231
- this.text = node.name
278
+ super(node);
279
+ this.text = node.name;
232
280
  if (!node.isPrivate) {
233
- throwError('identifier expected to be private')
281
+ throwError('identifier expected to be private');
234
282
  }
235
283
  }
236
284
 
237
- readonly text: string
238
- readonly kind: ts.SyntaxKind.PrivateIdentifier = ts.SyntaxKind.PrivateIdentifier
285
+ readonly text: string;
286
+ readonly kind: ts.SyntaxKind.PrivateIdentifier = ts.SyntaxKind.PrivateIdentifier;
239
287
 
240
288
  // Improve:
241
- get escapedText(): ts.__String { return emptyImplementation() }
289
+ get escapedText(): ts.__String {
290
+ return emptyImplementation();
291
+ }
242
292
 
243
293
  // brands
244
- _primaryExpressionBrand: any
245
- _memberExpressionBrand: any
246
- _leftHandSideExpressionBrand: any
247
- _updateExpressionBrand: any
248
- _unaryExpressionBrand: any
249
- _expressionBrand: any
250
- _declarationBrand: any
294
+ _primaryExpressionBrand: any;
295
+ _memberExpressionBrand: any;
296
+ _leftHandSideExpressionBrand: any;
297
+ _updateExpressionBrand: any;
298
+ _unaryExpressionBrand: any;
299
+ _expressionBrand: any;
300
+ _declarationBrand: any;
251
301
  }
252
302
 
253
303
  export abstract class Statement extends Node<arkts.AstNode> implements ts.Statement {
254
304
  // brands
255
- _statementBrand: any
305
+ _statementBrand: any;
256
306
  }
257
307
 
258
308
  export class Block extends Node<arkts.BlockStatement> implements ts.Block {
259
309
  constructor(node: arkts.BlockStatement) {
260
- super(node)
261
- this.statements = unpackNodeArray(node.statements)
310
+ super(node);
311
+ this.statements = unpackNodeArray(node.statements);
262
312
  }
263
313
 
264
- readonly statements: NodeArray<Statement>
265
- readonly kind: ts.SyntaxKind.Block = ts.SyntaxKind.Block
314
+ readonly statements: NodeArray<Statement>;
315
+ readonly kind: ts.SyntaxKind.Block = ts.SyntaxKind.Block;
266
316
 
267
317
  // brands
268
- _statementBrand: any
318
+ _statementBrand: any;
269
319
  }
270
320
 
271
321
  export class SourceFile extends Node<arkts.EtsScript> implements ts.SourceFile {
272
322
  constructor(node: arkts.EtsScript) {
273
- super(node)
323
+ super(node);
274
324
 
275
- this.statements = unpackNodeArray(this.node.statements)
325
+ this.statements = unpackNodeArray(this.node.statements);
276
326
  }
277
327
 
278
- readonly statements: NodeArray<Statement>
279
- readonly kind: ts.SyntaxKind.SourceFile = ts.SyntaxKind.SourceFile
328
+ readonly statements: NodeArray<Statement>;
329
+ readonly kind: ts.SyntaxKind.SourceFile = ts.SyntaxKind.SourceFile;
280
330
 
281
331
  // Improve:
282
- getLineAndCharacterOfPosition(pos: number): ts.LineAndCharacter { throw new Error("Method not implemented.") }
283
- getLineEndOfPosition(pos: number): number { throw new Error("Method not implemented.") }
284
- getLineStarts(): readonly number[] { throw new Error("Method not implemented.") }
285
- getPositionOfLineAndCharacter(line: number, character: number): number { throw new Error("Method not implemented.") }
286
- update(newText: string, textChangeRange: ts.TextChangeRange): ts.SourceFile { throw new Error("Method not implemented.") }
287
- get endOfFileToken(): ts.Token<ts.SyntaxKind.EndOfFileToken> { return emptyImplementation() }
288
- get fileName(): string { return emptyImplementation() }
289
- get text() { return emptyImplementation() }
290
- get amdDependencies(): readonly ts.AmdDependency[] { return emptyImplementation() }
291
- get referencedFiles(): readonly ts.FileReference[] { return emptyImplementation() }
292
- get typeReferenceDirectives(): readonly ts.FileReference[] { return emptyImplementation() }
293
- get libReferenceDirectives(): readonly ts.FileReference[] { return emptyImplementation() }
294
- get languageVariant(): ts.LanguageVariant { return emptyImplementation() }
295
- get isDeclarationFile(): boolean { return emptyImplementation() }
296
- get hasNoDefaultLib(): boolean { return emptyImplementation() }
297
- get languageVersion(): ts.ScriptTarget { return emptyImplementation() }
332
+ getLineAndCharacterOfPosition(pos: number): ts.LineAndCharacter {
333
+ throw new Error('Method not implemented.');
334
+ }
335
+ getLineEndOfPosition(pos: number): number {
336
+ throw new Error('Method not implemented.');
337
+ }
338
+ getLineStarts(): readonly number[] {
339
+ throw new Error('Method not implemented.');
340
+ }
341
+ getPositionOfLineAndCharacter(line: number, character: number): number {
342
+ throw new Error('Method not implemented.');
343
+ }
344
+ update(newText: string, textChangeRange: ts.TextChangeRange): ts.SourceFile {
345
+ throw new Error('Method not implemented.');
346
+ }
347
+ get endOfFileToken(): ts.Token<ts.SyntaxKind.EndOfFileToken> {
348
+ return emptyImplementation();
349
+ }
350
+ get fileName(): string {
351
+ return emptyImplementation();
352
+ }
353
+ get text() {
354
+ return emptyImplementation();
355
+ }
356
+ get amdDependencies(): readonly ts.AmdDependency[] {
357
+ return emptyImplementation();
358
+ }
359
+ get referencedFiles(): readonly ts.FileReference[] {
360
+ return emptyImplementation();
361
+ }
362
+ get typeReferenceDirectives(): readonly ts.FileReference[] {
363
+ return emptyImplementation();
364
+ }
365
+ get libReferenceDirectives(): readonly ts.FileReference[] {
366
+ return emptyImplementation();
367
+ }
368
+ get languageVariant(): ts.LanguageVariant {
369
+ return emptyImplementation();
370
+ }
371
+ get isDeclarationFile(): boolean {
372
+ return emptyImplementation();
373
+ }
374
+ get hasNoDefaultLib(): boolean {
375
+ return emptyImplementation();
376
+ }
377
+ get languageVersion(): ts.ScriptTarget {
378
+ return emptyImplementation();
379
+ }
298
380
 
299
381
  // brands
300
- _declarationBrand: any
382
+ _declarationBrand: any;
301
383
  }
302
384
 
303
- export abstract class LeftHandSideExpression extends Node<arkts.AstNode> implements ts.LeftHandSideExpression, Expression {
385
+ export abstract class LeftHandSideExpression
386
+ extends Node<arkts.AstNode>
387
+ implements ts.LeftHandSideExpression, Expression
388
+ {
304
389
  // brands
305
- _leftHandSideExpressionBrand: any
306
- _updateExpressionBrand: any
307
- _unaryExpressionBrand: any
308
- _expressionBrand: any
390
+ _leftHandSideExpressionBrand: any;
391
+ _updateExpressionBrand: any;
392
+ _unaryExpressionBrand: any;
393
+ _expressionBrand: any;
309
394
  }
310
395
 
311
396
  export class ExpressionStatement extends Node<arkts.ExpressionStatement> implements ts.ExpressionStatement, Statement {
312
397
  constructor(node: arkts.ExpressionStatement) {
313
- super(node)
314
- this.expression = unpackNode(this.node.expression)
398
+ super(node);
399
+ this.expression = unpackNode(this.node.expression);
315
400
  }
316
401
 
317
- readonly expression: Expression
318
- readonly kind: ts.SyntaxKind.ExpressionStatement = ts.SyntaxKind.ExpressionStatement
402
+ readonly expression: Expression;
403
+ readonly kind: ts.SyntaxKind.ExpressionStatement = ts.SyntaxKind.ExpressionStatement;
319
404
 
320
405
  // brands
321
- _statementBrand: any
406
+ _statementBrand: any;
322
407
  }
323
408
 
324
409
  export class CallExpression extends Node<arkts.CallExpression> implements ts.CallExpression, LeftHandSideExpression {
325
410
  constructor(node: arkts.CallExpression) {
326
- super(node)
327
- this.expression = unpackNode(node.expression)
328
- this.arguments = unpackNodeArray(node.arguments)
411
+ super(node);
412
+ this.expression = unpackNode(node.expression);
413
+ this.arguments = unpackNodeArray(node.arguments);
329
414
  }
330
415
 
331
- readonly expression: LeftHandSideExpression
332
- readonly arguments: NodeArray<Expression>
333
- readonly kind: ts.SyntaxKind.CallExpression = ts.SyntaxKind.CallExpression
416
+ readonly expression: LeftHandSideExpression;
417
+ readonly arguments: NodeArray<Expression>;
418
+ readonly kind: ts.SyntaxKind.CallExpression = ts.SyntaxKind.CallExpression;
334
419
 
335
420
  // brands
336
- _leftHandSideExpressionBrand: any
337
- _updateExpressionBrand: any
338
- _unaryExpressionBrand: any
339
- _expressionBrand: any
340
- _declarationBrand: any
421
+ _leftHandSideExpressionBrand: any;
422
+ _updateExpressionBrand: any;
423
+ _unaryExpressionBrand: any;
424
+ _expressionBrand: any;
425
+ _declarationBrand: any;
341
426
  }
342
427
 
343
- export class PropertyAccessExpression extends Node<arkts.MemberExpression> implements ts.PropertyAccessExpression, Expression {
428
+ export class PropertyAccessExpression
429
+ extends Node<arkts.MemberExpression>
430
+ implements ts.PropertyAccessExpression, Expression
431
+ {
344
432
  constructor(node: arkts.MemberExpression) {
345
- super(node)
346
- this.expression = unpackNode(node.object)
347
- this.name = unpackNode(node.property)
433
+ super(node);
434
+ this.expression = unpackNode(node.object);
435
+ this.name = unpackNode(node.property);
348
436
  }
349
437
 
350
- readonly expression: LeftHandSideExpression
351
- readonly name: Identifier
352
- readonly kind: ts.SyntaxKind.PropertyAccessExpression = ts.SyntaxKind.PropertyAccessExpression
438
+ readonly expression: LeftHandSideExpression;
439
+ readonly name: Identifier;
440
+ readonly kind: ts.SyntaxKind.PropertyAccessExpression = ts.SyntaxKind.PropertyAccessExpression;
353
441
 
354
442
  // brands
355
- _memberExpressionBrand: any
356
- _leftHandSideExpressionBrand: any
357
- _updateExpressionBrand: any
358
- _unaryExpressionBrand: any
359
- _expressionBrand: any
360
- _declarationBrand: any
443
+ _memberExpressionBrand: any;
444
+ _leftHandSideExpressionBrand: any;
445
+ _updateExpressionBrand: any;
446
+ _unaryExpressionBrand: any;
447
+ _expressionBrand: any;
448
+ _declarationBrand: any;
361
449
  }
362
450
 
363
451
  export class StringLiteral extends Node<arkts.StringLiteral> implements ts.StringLiteral {
364
452
  constructor(node: arkts.StringLiteral) {
365
- super(node)
453
+ super(node);
366
454
 
367
- this.text = node.str
455
+ this.text = node.str;
368
456
  }
369
457
 
370
- readonly text: string
371
- readonly kind: ts.SyntaxKind.StringLiteral = ts.SyntaxKind.StringLiteral
458
+ readonly text: string;
459
+ readonly kind: ts.SyntaxKind.StringLiteral = ts.SyntaxKind.StringLiteral;
372
460
 
373
461
  // brands
374
- _literalExpressionBrand: any
375
- _primaryExpressionBrand: any
376
- _memberExpressionBrand: any
377
- _leftHandSideExpressionBrand: any
378
- _updateExpressionBrand: any
379
- _unaryExpressionBrand: any
380
- _expressionBrand: any
381
- _declarationBrand: any
462
+ _literalExpressionBrand: any;
463
+ _primaryExpressionBrand: any;
464
+ _memberExpressionBrand: any;
465
+ _leftHandSideExpressionBrand: any;
466
+ _updateExpressionBrand: any;
467
+ _unaryExpressionBrand: any;
468
+ _expressionBrand: any;
469
+ _declarationBrand: any;
382
470
  }
383
471
 
384
472
  export class ClassDeclaration extends Node<arkts.ClassDeclaration> implements ts.ClassDeclaration {
385
473
  constructor(node: arkts.ClassDeclaration) {
386
- super(node)
387
- this.name = unpackNode(node.definition.name)
388
- this.members = unpackNodeArray(node.definition.members)
389
- this.typeParameters = unpackNodeArray(node.definition.typeParamsDecl?.parameters)
474
+ super(node);
475
+ this.name = unpackNode(node.definition.name);
476
+ this.members = unpackNodeArray(node.definition.members);
477
+ this.typeParameters = unpackNodeArray(node.definition.typeParamsDecl?.parameters);
390
478
  }
391
479
 
392
- readonly name: Identifier
393
- readonly members: NodeArray<ClassElement>
394
- readonly typeParameters?: NodeArray<TypeParameterDeclaration>
395
- readonly kind: ts.SyntaxKind.ClassDeclaration = ts.SyntaxKind.ClassDeclaration
480
+ readonly name: Identifier;
481
+ readonly members: NodeArray<ClassElement>;
482
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
483
+ readonly kind: ts.SyntaxKind.ClassDeclaration = ts.SyntaxKind.ClassDeclaration;
396
484
 
397
485
  // brands
398
- _declarationBrand: any
399
- _statementBrand: any
486
+ _declarationBrand: any;
487
+ _statementBrand: any;
400
488
  }
401
489
 
402
490
  export abstract class ClassElement extends Node<arkts.AstNode> implements ts.ClassElement {
403
491
  // brands
404
- _declarationBrand: any
405
- _classElementBrand: any
492
+ _declarationBrand: any;
493
+ _classElementBrand: any;
406
494
  }
407
495
 
408
496
  export type MemberName = Identifier | PrivateIdentifier;
@@ -412,13 +500,12 @@ export type MemberName = Identifier | PrivateIdentifier;
412
500
  export type PropertyName = Identifier | StringLiteral | NumericLiteral | PrivateIdentifier;
413
501
 
414
502
  // Improve: support
415
- export type DeclarationName =
416
- | PropertyName
417
- // | JsxAttributeName
418
- // | StringLiteralLike
419
- // | ElementAccessExpression
420
- // | BindingPattern
421
- // | EntityNameExpression;
503
+ export type DeclarationName = PropertyName;
504
+ // | JsxAttributeName
505
+ // | StringLiteralLike
506
+ // | ElementAccessExpression
507
+ // | BindingPattern
508
+ // | EntityNameExpression;
422
509
 
423
510
  export interface Declaration extends Node<arkts.AstNode> {}
424
511
 
@@ -426,14 +513,38 @@ export abstract class NamedDeclaration extends Node<arkts.AstNode> implements ts
426
513
  readonly name?: DeclarationName;
427
514
 
428
515
  // brands
429
- _declarationBrand: any
516
+ _declarationBrand: any;
430
517
  }
431
518
 
432
- export type SignatureDeclaration = ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | MethodSignature | ts.IndexSignatureDeclaration | FunctionTypeNode | ts.ConstructorTypeNode | ts.JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | ts.AccessorDeclaration | FunctionExpression | ArrowFunction;
519
+ export type SignatureDeclaration =
520
+ | ts.CallSignatureDeclaration
521
+ | ts.ConstructSignatureDeclaration
522
+ | MethodSignature
523
+ | ts.IndexSignatureDeclaration
524
+ | FunctionTypeNode
525
+ | ts.ConstructorTypeNode
526
+ | ts.JSDocFunctionType
527
+ | FunctionDeclaration
528
+ | MethodDeclaration
529
+ | ConstructorDeclaration
530
+ | ts.AccessorDeclaration
531
+ | FunctionExpression
532
+ | ArrowFunction;
433
533
 
434
534
  export interface SignatureDeclarationBase extends NamedDeclaration {}
435
535
 
436
- export type VariableLikeDeclaration = ts.VariableDeclaration | ParameterDeclaration | ts.BindingElement | PropertyDeclaration | ts.PropertyAssignment | PropertySignature | ts.JsxAttribute | ts.ShorthandPropertyAssignment | ts.EnumMember | ts.JSDocPropertyTag | ts.JSDocParameterTag;
536
+ export type VariableLikeDeclaration =
537
+ | ts.VariableDeclaration
538
+ | ParameterDeclaration
539
+ | ts.BindingElement
540
+ | PropertyDeclaration
541
+ | ts.PropertyAssignment
542
+ | PropertySignature
543
+ | ts.JsxAttribute
544
+ | ts.ShorthandPropertyAssignment
545
+ | ts.EnumMember
546
+ | ts.JSDocPropertyTag
547
+ | ts.JSDocParameterTag;
437
548
 
438
549
  export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
439
550
  // brands
@@ -442,414 +553,443 @@ export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
442
553
 
443
554
  // Improve: support
444
555
  // export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
445
- export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
556
+ export type FunctionLikeDeclaration =
557
+ | FunctionDeclaration
558
+ | MethodDeclaration
559
+ | ConstructorDeclaration
560
+ | FunctionExpression
561
+ | ArrowFunction;
446
562
 
447
563
  export class MethodSignature extends Node<arkts.AstNode> implements ts.MethodSignature, SignatureDeclarationBase {
448
564
  constructor(node: arkts.AstNode) {
449
- super(node)
565
+ super(node);
450
566
  }
451
567
 
452
568
  // readonly name: PropertyName
453
569
  // readonly parameters: NodeArray<ParameterDeclaration>
454
- readonly kind: ts.SyntaxKind.MethodSignature = ts.SyntaxKind.MethodSignature
570
+ readonly kind: ts.SyntaxKind.MethodSignature = ts.SyntaxKind.MethodSignature;
455
571
 
456
572
  // Improve:
457
- name: any
458
- parameters: any
573
+ name: any;
574
+ parameters: any;
459
575
 
460
576
  // brands
461
- _declarationBrand: any
462
- _typeElementBrand: any
577
+ _declarationBrand: any;
578
+ _typeElementBrand: any;
463
579
  }
464
580
 
465
581
  // export class MethodDeclaration extends Node implements ts.MethodDeclaration, FunctionLikeDeclarationBase, ClassElement {
466
582
  export class MethodDeclaration extends Node<arkts.MethodDefinition> implements ts.MethodDeclaration, ClassElement {
467
583
  constructor(node: arkts.MethodDefinition) {
468
- super(node)
469
- this.name = unpackNode(node.name)
470
- this.parameters = unpackNodeArray(node.scriptFunction.parameters)
471
- this.body = unpackNode(node.scriptFunction.body)
584
+ super(node);
585
+ this.name = unpackNode(node.name);
586
+ this.parameters = unpackNodeArray(node.scriptFunction.parameters);
587
+ this.body = unpackNode(node.scriptFunction.body);
472
588
  }
473
589
 
474
590
  // tsc: readonly name?: PropertyName
475
- readonly name: Identifier
476
- readonly parameters: NodeArray<ParameterDeclaration>
591
+ readonly name: Identifier;
592
+ readonly parameters: NodeArray<ParameterDeclaration>;
477
593
  // tsc: readonly body?: FunctionBody | undefined
478
- readonly body?: Block | undefined
479
- readonly kind: ts.SyntaxKind.MethodDeclaration = ts.SyntaxKind.MethodDeclaration
594
+ readonly body?: Block | undefined;
595
+ readonly kind: ts.SyntaxKind.MethodDeclaration = ts.SyntaxKind.MethodDeclaration;
480
596
 
481
597
  // brands
482
- _functionLikeDeclarationBrand: any
483
- _classElementBrand: any
484
- _objectLiteralBrand: any
485
- _declarationBrand: any
598
+ _functionLikeDeclarationBrand: any;
599
+ _classElementBrand: any;
600
+ _objectLiteralBrand: any;
601
+ _declarationBrand: any;
486
602
  }
487
603
 
488
604
  // export class ConstructorDeclaration extends Node<arkts.MethodDefinition> implements ts.ConstructorDeclaration, FunctionLikeDeclarationBase, ClassElement {
489
- export class ConstructorDeclaration extends Node<arkts.MethodDefinition> implements ts.ConstructorDeclaration, ClassElement {
605
+ export class ConstructorDeclaration
606
+ extends Node<arkts.MethodDefinition>
607
+ implements ts.ConstructorDeclaration, ClassElement
608
+ {
490
609
  constructor(node: arkts.MethodDefinition) {
491
- super(node)
492
- this.name = unpackNode(node.name)
493
- this.parameters = unpackNodeArray(node.scriptFunction.parameters)
494
- this.body = unpackNode(node.scriptFunction.body)
610
+ super(node);
611
+ this.name = unpackNode(node.name);
612
+ this.parameters = unpackNodeArray(node.scriptFunction.parameters);
613
+ this.body = unpackNode(node.scriptFunction.body);
495
614
  }
496
615
 
497
616
  // ts: readonly name?: PropertyName
498
- readonly name: Identifier
499
- readonly parameters: NodeArray<ParameterDeclaration>
617
+ readonly name: Identifier;
618
+ readonly parameters: NodeArray<ParameterDeclaration>;
500
619
  // ts: readonly body?: FunctionBody | undefined
501
- readonly body?: Block
502
- readonly kind: ts.SyntaxKind.Constructor = ts.SyntaxKind.Constructor
620
+ readonly body?: Block;
621
+ readonly kind: ts.SyntaxKind.Constructor = ts.SyntaxKind.Constructor;
503
622
 
504
623
  // brands
505
- _functionLikeDeclarationBrand: any
506
- _classElementBrand: any
507
- _objectLiteralBrand: any
508
- _declarationBrand: any
624
+ _functionLikeDeclarationBrand: any;
625
+ _classElementBrand: any;
626
+ _objectLiteralBrand: any;
627
+ _declarationBrand: any;
509
628
  }
510
629
 
511
630
  // Improve: specify arkts.AstNode type
512
631
  export class PropertySignature extends Node<arkts.AstNode> implements ts.TypeElement {
513
632
  constructor(node: arkts.AstNode) {
514
- super(node)
633
+ super(node);
515
634
  }
516
635
 
517
- readonly name?: PropertyName
518
- readonly kind: ts.SyntaxKind.PropertySignature = ts.SyntaxKind.PropertySignature
636
+ readonly name?: PropertyName;
637
+ readonly kind: ts.SyntaxKind.PropertySignature = ts.SyntaxKind.PropertySignature;
519
638
 
520
639
  // brands
521
- _typeElementBrand: any
522
- _declarationBrand: any
640
+ _typeElementBrand: any;
641
+ _declarationBrand: any;
523
642
  }
524
643
 
525
644
  // Improve: specify arkts.AstNode type
526
645
  export class PropertyDeclaration extends Node<arkts.AstNode> implements ts.PropertyDeclaration, ClassElement {
527
646
  constructor(node: arkts.AstNode) {
528
- super(node)
647
+ super(node);
529
648
  }
530
649
 
531
- readonly kind: ts.SyntaxKind.PropertyDeclaration = ts.SyntaxKind.PropertyDeclaration
650
+ readonly kind: ts.SyntaxKind.PropertyDeclaration = ts.SyntaxKind.PropertyDeclaration;
532
651
 
533
652
  // Improve:
534
- name: any
653
+ name: any;
535
654
 
536
655
  // brands
537
- _classElementBrand: any
538
- _declarationBrand: any
656
+ _classElementBrand: any;
657
+ _declarationBrand: any;
539
658
  }
540
659
 
541
660
  // Improve: specify arkts.AstNode type
542
- export class GetAccessorDeclaration extends Node<arkts.AstNode> implements ts.GetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement {
661
+ export class GetAccessorDeclaration
662
+ extends Node<arkts.AstNode>
663
+ implements ts.GetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement
664
+ {
543
665
  constructor(node: arkts.AstNode) {
544
- super(node)
666
+ super(node);
545
667
  }
546
668
 
547
669
  // readonly name: PropertyName
548
670
  // readonly parameters: NodeArray<ParameterDeclaration>
549
- readonly kind: ts.SyntaxKind.GetAccessor = ts.SyntaxKind.GetAccessor
671
+ readonly kind: ts.SyntaxKind.GetAccessor = ts.SyntaxKind.GetAccessor;
550
672
 
551
673
  // Improve:
552
- name: any
553
- parameters: any
674
+ name: any;
675
+ parameters: any;
554
676
 
555
677
  // brands
556
- _functionLikeDeclarationBrand: any
557
- _declarationBrand: any
558
- _classElementBrand: any
559
- _typeElementBrand: any
560
- _objectLiteralBrand: any
678
+ _functionLikeDeclarationBrand: any;
679
+ _declarationBrand: any;
680
+ _classElementBrand: any;
681
+ _typeElementBrand: any;
682
+ _objectLiteralBrand: any;
561
683
  }
562
684
 
563
685
  // Improve: specify arkts.AstNode type
564
- export class SetAccessorDeclaration extends Node<arkts.AstNode> implements ts.SetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement {
686
+ export class SetAccessorDeclaration
687
+ extends Node<arkts.AstNode>
688
+ implements ts.SetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement
689
+ {
565
690
  constructor(node: arkts.AstNode) {
566
- super(node)
691
+ super(node);
567
692
  }
568
693
 
569
694
  // readonly name: PropertyName
570
695
  // readonly parameters: NodeArray<ParameterDeclaration>
571
- readonly kind: ts.SyntaxKind.SetAccessor = ts.SyntaxKind.SetAccessor
696
+ readonly kind: ts.SyntaxKind.SetAccessor = ts.SyntaxKind.SetAccessor;
572
697
 
573
698
  // Improve:
574
- name: any
575
- parameters: any
699
+ name: any;
700
+ parameters: any;
576
701
 
577
702
  // brands
578
- _functionLikeDeclarationBrand: any
579
- _declarationBrand: any
580
- _classElementBrand: any
581
- _typeElementBrand: any
582
- _objectLiteralBrand: any
703
+ _functionLikeDeclarationBrand: any;
704
+ _declarationBrand: any;
705
+ _classElementBrand: any;
706
+ _typeElementBrand: any;
707
+ _objectLiteralBrand: any;
583
708
  }
584
709
 
585
- export class ParameterDeclaration extends Node<arkts.ETSParameterExpression> implements ts.ParameterDeclaration, NamedDeclaration {
710
+ export class ParameterDeclaration
711
+ extends Node<arkts.ETSParameterExpression>
712
+ implements ts.ParameterDeclaration, NamedDeclaration
713
+ {
586
714
  constructor(node: arkts.ETSParameterExpression) {
587
- super(node)
715
+ super(node);
588
716
  }
589
717
 
590
- readonly kind: ts.SyntaxKind.Parameter = ts.SyntaxKind.Parameter
718
+ readonly kind: ts.SyntaxKind.Parameter = ts.SyntaxKind.Parameter;
591
719
 
592
720
  // Improve:
593
- name: any
721
+ name: any;
594
722
 
595
723
  // brands
596
- _declarationBrand: any
724
+ _declarationBrand: any;
597
725
  }
598
726
 
599
727
  export type BindingName = Identifier | ts.BindingPattern;
600
728
 
601
729
  export class VariableStatement extends Node<arkts.VariableDeclaration> implements ts.VariableStatement {
602
730
  constructor(node: arkts.VariableDeclaration) {
603
- super(node)
604
- this.declarationList = new VariableDeclarationList(node)
731
+ super(node);
732
+ this.declarationList = new VariableDeclarationList(node);
605
733
  }
606
734
 
607
- readonly declarationList: VariableDeclarationList
608
- readonly kind: ts.SyntaxKind.VariableStatement = ts.SyntaxKind.VariableStatement
735
+ readonly declarationList: VariableDeclarationList;
736
+ readonly kind: ts.SyntaxKind.VariableStatement = ts.SyntaxKind.VariableStatement;
609
737
 
610
738
  // brands
611
- _statementBrand: any
739
+ _statementBrand: any;
612
740
  }
613
741
 
614
742
  export class VariableDeclarationList extends Node<arkts.VariableDeclaration> implements ts.VariableDeclarationList {
615
743
  constructor(node: arkts.VariableDeclaration) {
616
- super(node)
617
- this.declarations = unpackNodeArray(node.declarators)
744
+ super(node);
745
+ this.declarations = unpackNodeArray(node.declarators);
618
746
  }
619
747
 
620
- readonly declarations: NodeArray<VariableDeclaration>
621
- get flags(): ts.NodeFlags { return unpackVariableDeclarationKind(this.node.declarationKind) }
622
- readonly kind: ts.SyntaxKind.VariableDeclarationList = ts.SyntaxKind.VariableDeclarationList
748
+ readonly declarations: NodeArray<VariableDeclaration>;
749
+ get flags(): ts.NodeFlags {
750
+ return unpackVariableDeclarationKind(this.node.declarationKind);
751
+ }
752
+ readonly kind: ts.SyntaxKind.VariableDeclarationList = ts.SyntaxKind.VariableDeclarationList;
623
753
  }
624
754
 
625
- export class VariableDeclaration extends Node<arkts.VariableDeclarator> implements ts.VariableDeclaration, NamedDeclaration {
755
+ export class VariableDeclaration
756
+ extends Node<arkts.VariableDeclarator>
757
+ implements ts.VariableDeclaration, NamedDeclaration
758
+ {
626
759
  constructor(node: arkts.VariableDeclarator) {
627
- super(node)
628
- this.name = unpackNode(node.name)
760
+ super(node);
761
+ this.name = unpackNode(node.name);
629
762
  }
630
763
 
631
- readonly name: Identifier
632
- readonly kind: ts.SyntaxKind.VariableDeclaration = ts.SyntaxKind.VariableDeclaration
764
+ readonly name: Identifier;
765
+ readonly kind: ts.SyntaxKind.VariableDeclaration = ts.SyntaxKind.VariableDeclaration;
633
766
 
634
767
  // brands
635
- _declarationBrand: any
768
+ _declarationBrand: any;
636
769
  }
637
770
 
638
771
  export class TypeParameterDeclaration extends Node<arkts.TSTypeParameter> implements ts.TypeParameterDeclaration {
639
772
  constructor(node: arkts.TSTypeParameter) {
640
- super(node)
641
- this.name = unpackNode(node.name)
773
+ super(node);
774
+ this.name = unpackNode(node.name);
642
775
  }
643
776
 
644
- readonly name: Identifier
645
- readonly kind: ts.SyntaxKind.TypeParameter = ts.SyntaxKind.TypeParameter
777
+ readonly name: Identifier;
778
+ readonly kind: ts.SyntaxKind.TypeParameter = ts.SyntaxKind.TypeParameter;
646
779
 
647
780
  // brands
648
- _declarationBrand: any
781
+ _declarationBrand: any;
649
782
  }
650
783
 
651
784
  export abstract class TypeNode extends Node<arkts.AstNode> implements ts.TypeNode {
652
785
  // brands
653
- _typeNodeBrand: any
786
+ _typeNodeBrand: any;
654
787
  }
655
788
 
656
- export class KeywordTypeNode extends Node<arkts.ETSPrimitiveType | arkts.ETSTypeReference> implements ts.KeywordTypeNode, TypeNode {
789
+ export class KeywordTypeNode
790
+ extends Node<arkts.ETSPrimitiveType | arkts.ETSTypeReference>
791
+ implements ts.KeywordTypeNode, TypeNode
792
+ {
657
793
  constructor(node: arkts.ETSPrimitiveType | arkts.ETSTypeReference) {
658
- super(node)
794
+ super(node);
659
795
  }
660
796
 
661
- readonly kind: ts.KeywordTypeSyntaxKind = ts.SyntaxKind.UnknownKeyword
797
+ readonly kind: ts.KeywordTypeSyntaxKind = ts.SyntaxKind.UnknownKeyword;
662
798
 
663
799
  // brands
664
- _typeNodeBrand: any
800
+ _typeNodeBrand: any;
665
801
  }
666
802
 
667
803
  export class TypeReferenceNode extends Node<arkts.AstNode> implements ts.TypeReferenceNode, TypeNode {
668
804
  constructor(node: arkts.AstNode) {
669
- super(node)
805
+ super(node);
670
806
  }
671
807
 
672
- readonly kind: ts.SyntaxKind.TypeReference = ts.SyntaxKind.TypeReference
808
+ readonly kind: ts.SyntaxKind.TypeReference = ts.SyntaxKind.TypeReference;
673
809
 
674
810
  // Improve:
675
- typeName: any
811
+ typeName: any;
676
812
 
677
813
  // brands
678
- _typeNodeBrand: any
814
+ _typeNodeBrand: any;
679
815
  }
680
816
 
681
- export class FunctionTypeNode extends Node<arkts.AstNode> implements ts.FunctionTypeNode, TypeNode, SignatureDeclarationBase {
817
+ export class FunctionTypeNode
818
+ extends Node<arkts.AstNode>
819
+ implements ts.FunctionTypeNode, TypeNode, SignatureDeclarationBase
820
+ {
682
821
  constructor(node: arkts.AstNode) {
683
- super(node)
822
+ super(node);
684
823
  }
685
824
 
686
- readonly name?: DeclarationName
687
- readonly kind: ts.SyntaxKind.FunctionType = ts.SyntaxKind.FunctionType
825
+ readonly name?: DeclarationName;
826
+ readonly kind: ts.SyntaxKind.FunctionType = ts.SyntaxKind.FunctionType;
688
827
 
689
828
  // Improve: support minimal interface
690
- parameters: any
691
- type: any
829
+ parameters: any;
830
+ type: any;
692
831
 
693
832
  // brands
694
- _typeNodeBrand: any
695
- _declarationBrand: any
833
+ _typeNodeBrand: any;
834
+ _declarationBrand: any;
696
835
  }
697
836
 
698
837
  export class UnionTypeNode extends Node<arkts.ETSUnionType> implements ts.UnionTypeNode, TypeNode {
699
838
  constructor(node: arkts.ETSUnionType) {
700
- super(node)
701
- this.types = unpackNodeArray(node.types)
839
+ super(node);
840
+ this.types = unpackNodeArray(node.types);
702
841
  }
703
842
 
704
- readonly types: NodeArray<TypeNode>
705
- readonly kind: ts.SyntaxKind.UnionType = ts.SyntaxKind.UnionType
843
+ readonly types: NodeArray<TypeNode>;
844
+ readonly kind: ts.SyntaxKind.UnionType = ts.SyntaxKind.UnionType;
706
845
 
707
846
  // brands
708
- _typeNodeBrand: any
847
+ _typeNodeBrand: any;
709
848
  }
710
849
 
711
850
  export class ReturnStatement extends Node<arkts.ReturnStatement> implements ts.ReturnStatement, Statement {
712
851
  constructor(node: arkts.ReturnStatement) {
713
- super(node)
714
- this.expression = unpackNode(node.argument)
852
+ super(node);
853
+ this.expression = unpackNode(node.argument);
715
854
  }
716
855
 
717
- readonly expression: Expression | undefined
718
- readonly kind: ts.SyntaxKind.ReturnStatement = ts.SyntaxKind.ReturnStatement
856
+ readonly expression: Expression | undefined;
857
+ readonly kind: ts.SyntaxKind.ReturnStatement = ts.SyntaxKind.ReturnStatement;
719
858
 
720
859
  // brands
721
- _statementBrand: any
860
+ _statementBrand: any;
722
861
  }
723
862
 
724
863
  export class IfStatement extends Node<arkts.IfStatement> implements ts.IfStatement {
725
864
  constructor(node: arkts.IfStatement) {
726
- super(node)
865
+ super(node);
727
866
  }
728
867
 
729
- readonly kind: ts.SyntaxKind.IfStatement = ts.SyntaxKind.IfStatement
868
+ readonly kind: ts.SyntaxKind.IfStatement = ts.SyntaxKind.IfStatement;
730
869
 
731
870
  // Improve:
732
- thenStatement: any
733
- expression: any
871
+ thenStatement: any;
872
+ expression: any;
734
873
 
735
874
  // brands
736
- _statementBrand: any
875
+ _statementBrand: any;
737
876
  }
738
877
 
739
878
  export class BinaryExpression extends Node<arkts.BinaryExpression> implements ts.BinaryExpression {
740
879
  constructor(node: arkts.BinaryExpression) {
741
- super(node)
880
+ super(node);
742
881
  }
743
882
 
744
- readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression
883
+ readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression;
745
884
 
746
885
  // Improve:
747
- left: any
748
- right: any
749
- operatorToken: any
886
+ left: any;
887
+ right: any;
888
+ operatorToken: any;
750
889
 
751
890
  // brands
752
- _expressionBrand: any
753
- _declarationBrand: any
891
+ _expressionBrand: any;
892
+ _declarationBrand: any;
754
893
  }
755
894
 
756
895
  export class AssignmentExpression extends Node<arkts.AssignmentExpression> implements ts.AssignmentExpression<any> {
757
896
  constructor(node: arkts.AssignmentExpression) {
758
- super(node)
897
+ super(node);
759
898
  }
760
899
 
761
- readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression
900
+ readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression;
762
901
 
763
902
  // Improve:
764
- right: any
765
- left: any
766
- operatorToken: any
903
+ right: any;
904
+ left: any;
905
+ operatorToken: any;
767
906
 
768
907
  // brands
769
- _expressionBrand: any
770
- _declarationBrand: any
908
+ _expressionBrand: any;
909
+ _declarationBrand: any;
771
910
  }
772
911
 
773
912
  export class ArrowFunction extends Node<arkts.ArrowFunctionExpression> implements ts.ArrowFunction {
774
913
  constructor(node: arkts.ArrowFunctionExpression) {
775
- super(node)
914
+ super(node);
776
915
  if (node.scriptFunction.body === undefined) {
777
- throwError('node.scriptFunction.body not expected to be undefined')
916
+ throwError('node.scriptFunction.body not expected to be undefined');
778
917
  }
779
- this.body = unpackNode(node.scriptFunction.body)
780
- this.parameters = unpackNodeArray(node.scriptFunction.parameters)
918
+ this.body = unpackNode(node.scriptFunction.body);
919
+ this.parameters = unpackNodeArray(node.scriptFunction.parameters);
781
920
  }
782
921
 
783
- get name(): never { return throwError(`name doesn't exist for ArrowFunction`) }
784
- readonly body: Block
785
- readonly parameters: NodeArray<ParameterDeclaration>
786
- readonly kind: ts.SyntaxKind.ArrowFunction = ts.SyntaxKind.ArrowFunction
922
+ get name(): never {
923
+ return throwError(`name doesn't exist for ArrowFunction`);
924
+ }
925
+ readonly body: Block;
926
+ readonly parameters: NodeArray<ParameterDeclaration>;
927
+ readonly kind: ts.SyntaxKind.ArrowFunction = ts.SyntaxKind.ArrowFunction;
787
928
 
788
929
  // Improve:
789
- equalsGreaterThanToken: any
930
+ equalsGreaterThanToken: any;
790
931
 
791
932
  // brands
792
- _expressionBrand: any
793
- _functionLikeDeclarationBrand: any
794
- _declarationBrand: any
933
+ _expressionBrand: any;
934
+ _functionLikeDeclarationBrand: any;
935
+ _declarationBrand: any;
795
936
  }
796
937
 
797
938
  export class NumericLiteral extends Node<arkts.NumberLiteral> implements ts.NumericLiteral, Declaration {
798
939
  constructor(node: arkts.NumberLiteral) {
799
- super(node)
940
+ super(node);
800
941
 
801
- this.text = `${node.value}`
942
+ this.text = `${node.value}`;
802
943
  }
803
944
 
804
- readonly text: string
805
- readonly kind: ts.SyntaxKind.NumericLiteral = ts.SyntaxKind.NumericLiteral
945
+ readonly text: string;
946
+ readonly kind: ts.SyntaxKind.NumericLiteral = ts.SyntaxKind.NumericLiteral;
806
947
 
807
948
  // brands
808
- _literalExpressionBrand: any
809
- _declarationBrand: any
810
- _primaryExpressionBrand: any
811
- _memberExpressionBrand: any
812
- _leftHandSideExpressionBrand: any
813
- _updateExpressionBrand: any
814
- _unaryExpressionBrand: any
815
- _expressionBrand: any
949
+ _literalExpressionBrand: any;
950
+ _declarationBrand: any;
951
+ _primaryExpressionBrand: any;
952
+ _memberExpressionBrand: any;
953
+ _leftHandSideExpressionBrand: any;
954
+ _updateExpressionBrand: any;
955
+ _unaryExpressionBrand: any;
956
+ _expressionBrand: any;
816
957
  }
817
958
 
818
959
  export class SuperExpression extends Node<arkts.SuperExpression> implements ts.SuperExpression {
819
960
  constructor(node: arkts.SuperExpression) {
820
- super(node)
961
+ super(node);
821
962
  }
822
963
 
823
- readonly kind: ts.SyntaxKind.SuperKeyword = ts.SyntaxKind.SuperKeyword
964
+ readonly kind: ts.SyntaxKind.SuperKeyword = ts.SyntaxKind.SuperKeyword;
824
965
 
825
966
  // brands
826
- _primaryExpressionBrand: any
827
- _memberExpressionBrand: any
828
- _leftHandSideExpressionBrand: any
829
- _updateExpressionBrand: any
830
- _unaryExpressionBrand: any
831
- _expressionBrand: any
967
+ _primaryExpressionBrand: any;
968
+ _memberExpressionBrand: any;
969
+ _leftHandSideExpressionBrand: any;
970
+ _updateExpressionBrand: any;
971
+ _unaryExpressionBrand: any;
972
+ _expressionBrand: any;
832
973
  }
833
974
 
834
975
  export class HeritageClause extends Node<arkts.SuperExpression> implements ts.HeritageClause {
835
976
  constructor(node: arkts.SuperExpression) {
836
- super(node)
977
+ super(node);
837
978
  }
838
979
 
839
- readonly kind: ts.SyntaxKind.HeritageClause = ts.SyntaxKind.HeritageClause
980
+ readonly kind: ts.SyntaxKind.HeritageClause = ts.SyntaxKind.HeritageClause;
840
981
  // token: ts.SyntaxKind.ExtendsKeyword | ts.SyntaxKind.ImplementsKeyword
841
982
  // types: ts.NodeArray<ts.ExpressionWithTypeArguments>
842
983
 
843
984
  // Improve:
844
- token: any
845
- types: any
985
+ token: any;
986
+ types: any;
846
987
  }
847
988
 
848
-
849
989
  // Improve: there is no ParenthesizedExpression in ArkTS,
850
990
  // so for temporary solution we're just gonna ignore this type of nodes
851
991
  // and replace it with Expression underneath
852
- export type ParenthesizedExpression = Expression
992
+ export type ParenthesizedExpression = Expression;
853
993
  // export class ParenthesizedExpression extends Node<undefined> implements ts.ParenthesizedExpression {
854
994
  // constructor(expression: Expression) {
855
995
  // super(undefined)
@@ -871,65 +1011,65 @@ export type ParenthesizedExpression = Expression
871
1011
  // Improve:
872
1012
  export class ImportDeclaration extends Node<arkts.UnsupportedNode> implements ts.ImportDeclaration {
873
1013
  constructor(node: arkts.UnsupportedNode) {
874
- super(node)
1014
+ super(node);
875
1015
  }
876
1016
 
877
- readonly kind: ts.SyntaxKind.ImportDeclaration = ts.SyntaxKind.ImportDeclaration
1017
+ readonly kind: ts.SyntaxKind.ImportDeclaration = ts.SyntaxKind.ImportDeclaration;
878
1018
 
879
1019
  // Improve:
880
- moduleSpecifier: any
1020
+ moduleSpecifier: any;
881
1021
 
882
1022
  // brands
883
- _statementBrand: any
1023
+ _statementBrand: any;
884
1024
  }
885
1025
 
886
1026
  // Improve:
887
1027
  export class ImportClause extends Node<arkts.UnsupportedNode> implements ts.ImportClause {
888
1028
  constructor(node: arkts.UnsupportedNode) {
889
- super(node)
1029
+ super(node);
890
1030
  }
891
1031
 
892
- readonly kind: ts.SyntaxKind.ImportClause = ts.SyntaxKind.ImportClause
1032
+ readonly kind: ts.SyntaxKind.ImportClause = ts.SyntaxKind.ImportClause;
893
1033
 
894
1034
  // Improve:
895
- isTypeOnly: any
1035
+ isTypeOnly: any;
896
1036
 
897
1037
  // brands
898
- _declarationBrand: any
1038
+ _declarationBrand: any;
899
1039
  }
900
1040
 
901
1041
  // Improve:
902
1042
  export class NamedImports extends Node<arkts.UnsupportedNode> implements ts.NamedImports {
903
1043
  constructor(node: arkts.UnsupportedNode) {
904
- super(node)
1044
+ super(node);
905
1045
  }
906
1046
 
907
- readonly kind: ts.SyntaxKind.NamedImports = ts.SyntaxKind.NamedImports
1047
+ readonly kind: ts.SyntaxKind.NamedImports = ts.SyntaxKind.NamedImports;
908
1048
 
909
1049
  // Improve:
910
- elements: any
1050
+ elements: any;
911
1051
  }
912
1052
 
913
1053
  export class ImportSpecifier extends Node<arkts.Identifier> implements ts.ImportSpecifier {
914
1054
  constructor(node: arkts.Identifier) {
915
- super(node)
916
- this.name = unpackNode(this.node)
1055
+ super(node);
1056
+ this.name = unpackNode(this.node);
917
1057
  }
918
1058
 
919
- readonly name: Identifier
920
- readonly kind: ts.SyntaxKind.ImportSpecifier = ts.SyntaxKind.ImportSpecifier
1059
+ readonly name: Identifier;
1060
+ readonly kind: ts.SyntaxKind.ImportSpecifier = ts.SyntaxKind.ImportSpecifier;
921
1061
 
922
1062
  // Improve:
923
- isTypeOnly: any
1063
+ isTypeOnly: any;
924
1064
 
925
1065
  // brands
926
- _declarationBrand: any
1066
+ _declarationBrand: any;
927
1067
  }
928
1068
 
929
1069
  export class UnsupportedNode extends Node<arkts.AstNode> implements ts.Node {
930
1070
  constructor(node: arkts.AstNode) {
931
- super(node)
1071
+ super(node);
932
1072
  }
933
1073
 
934
- readonly kind: ts.SyntaxKind = SyntaxKind.Unknown
1074
+ readonly kind: ts.SyntaxKind = SyntaxKind.Unknown;
935
1075
  }