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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/build/libarkts-copy/native/meson.build +1 -1
  2. package/build/libarkts-copy/native/src/bridges.cc +72 -115
  3. package/build/libarkts-copy/native/src/common.cc +225 -84
  4. package/build/libarkts-copy/native/src/common.h +22 -22
  5. package/build/libarkts-copy/native/src/memoryTracker.cc +30 -37
  6. package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
  7. package/build/libarkts-copy/package.json +23 -19
  8. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +176 -100
  9. package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
  10. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +17 -18
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +31 -30
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +20 -17
  13. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +12 -12
  14. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +44 -29
  15. package/build/libarkts-copy/src/arkts-api/index.ts +24 -24
  16. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -12
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +47 -13
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +80 -35
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
  42. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
  43. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -49
  44. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +17 -24
  45. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +29 -37
  46. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +5 -6
  47. package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
  48. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
  49. package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
  50. package/build/libarkts-copy/src/arkts-api/plugins.ts +98 -30
  51. package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
  52. package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
  53. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
  54. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
  55. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
  56. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +39 -23
  57. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +73 -61
  58. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +220 -173
  59. package/build/libarkts-copy/src/arkts-api/visitor.ts +606 -742
  60. package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
  61. package/build/libarkts-copy/src/checkSdk.ts +15 -18
  62. package/build/libarkts-copy/src/index.ts +29 -29
  63. package/build/libarkts-copy/src/plugin-utils.ts +52 -40
  64. package/build/libarkts-copy/src/reexport-for-generated.ts +11 -10
  65. package/build/libarkts-copy/src/tracer.ts +75 -69
  66. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
  67. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
  68. package/build/libarkts-copy/src/ts-api/index.ts +27 -35
  69. package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
  70. package/build/libarkts-copy/src/ts-api/types.ts +535 -395
  71. package/build/libarkts-copy/src/ts-api/utilities/private.ts +115 -112
  72. package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
  73. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
  74. package/build/libarkts-copy/src/utils.ts +97 -70
  75. package/build/libarkts-copy/tsconfig.json +3 -2
  76. package/lib/index.js +428 -159
  77. package/package.json +51 -53
  78. package/templates/Es2pandaNativeModule.ts +1 -0
  79. package/templates/factory.ts +1 -1
  80. package/templates/peer.ts +2 -1
  81. package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16382
  82. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1350
  83. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5195
  84. package/build/libarkts-copy/src/generated/factory.ts +0 -1286
  85. package/build/libarkts-copy/src/generated/index.ts +0 -222
  86. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
  87. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
  88. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
  89. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
  90. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
  91. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
  92. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
  93. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
  94. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
  95. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
  96. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
  97. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
  98. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
  99. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
  100. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
  101. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
  102. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
  103. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
  104. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
  105. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
  106. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
  107. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
  108. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
  109. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
  110. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
  111. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
  112. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
  113. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
  114. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
  115. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
  116. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
  117. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
  118. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
  119. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
  120. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
  121. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
  122. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
  123. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
  124. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
  125. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
  126. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
  127. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
  128. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
  129. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
  130. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -75
  131. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
  132. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
  133. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
  134. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
  135. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
  136. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
  137. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
  138. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
  139. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
  140. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
  141. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
  142. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
  143. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
  144. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
  145. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
  146. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
  147. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
  148. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
  149. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
  150. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
  151. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
  152. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
  153. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
  154. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
  155. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
  156. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
  157. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
  158. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
  159. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
  160. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
  161. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
  162. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
  163. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
  164. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
  165. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
  166. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
  167. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
  168. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
  169. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
  170. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
  171. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
  172. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
  173. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
  174. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
  175. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
  176. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
  177. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
  178. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
  179. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
  180. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
  181. package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
  182. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
  183. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
  184. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
  185. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
  186. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
  187. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
  188. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
  189. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
  190. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
  191. package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
  192. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
  193. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
  194. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
  195. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
  196. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
  197. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
  198. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
  199. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
  200. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
  201. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
  202. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
  203. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
  204. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
  205. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
  206. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
  207. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
  208. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
  209. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
  210. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
  211. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
  212. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
  213. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
  214. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
  215. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
  216. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
  217. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
  218. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
  219. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
  220. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
  221. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
  222. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
  223. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
  224. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
  225. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
  226. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
  227. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
  228. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
  229. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
  230. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
  231. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
  232. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
  233. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
  234. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
  235. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
  236. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
  237. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
  238. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
  239. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
  240. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
  241. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
  242. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
  243. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
  244. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
  245. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
  246. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
  247. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
  248. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
  249. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
  250. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
  251. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
  252. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
  253. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
  254. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
  255. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
  256. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
  257. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
  258. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
  259. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
  260. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
  261. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
  262. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
  263. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
  264. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
  265. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
  266. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
  267. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
  268. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
  269. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
  270. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
  271. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
  272. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
  273. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
  274. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
  275. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
  276. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
  277. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
  278. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
  279. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
  280. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
  281. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
  282. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
  283. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
  284. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
@@ -13,9 +13,9 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { throwError } from "../../utils"
17
- import * as ts from "@koalaui/ets-tsc"
18
- import * as arkts from "../../arkts-api"
16
+ import { throwError } from '../../utils';
17
+ import * as ts from '@koalaui/ets-tsc';
18
+ import * as arkts from '../../arkts-api';
19
19
 
20
20
  import {
21
21
  passNode,
@@ -26,11 +26,8 @@ import {
26
26
  passIdentifier,
27
27
  passTypeParams,
28
28
  passVariableDeclarationKind,
29
- } from "../utilities/private"
30
- import {
31
- SyntaxKind,
32
- NodeFlags,
33
- } from "../static/enums"
29
+ } from '../utilities/private';
30
+ import { SyntaxKind, NodeFlags } from '../static/enums';
34
31
  import {
35
32
  Es2pandaContextState,
36
33
  Es2pandaPrimitiveType,
@@ -41,12 +38,11 @@ import {
41
38
  Es2pandaClassDefinitionModifiers,
42
39
  Es2pandaVariableDeclarationKind,
43
40
  Es2pandaVariableDeclaratorFlag,
44
- } from "../../arkts-api"
41
+ } from '../../arkts-api';
45
42
  import {
46
43
  // ts types:
47
44
  Modifier,
48
45
  BinaryOperatorToken,
49
-
50
46
  Node,
51
47
  Token,
52
48
  Identifier,
@@ -83,7 +79,7 @@ import {
83
79
  ImportDeclaration,
84
80
  ImportClause,
85
81
  ImportSpecifier,
86
- } from "../types"
82
+ } from '../types';
87
83
 
88
84
  // Improve: add flags and base
89
85
  export function createNodeFactory() {
@@ -141,7 +137,7 @@ export function createNodeFactory() {
141
137
  updateParenthesizedExpression,
142
138
  // createImportDeclaration,
143
139
  createImportSpecifier,
144
- }
140
+ };
145
141
 
146
142
  // @api
147
143
  // function createSourceFile(
@@ -149,9 +145,12 @@ export function createNodeFactory() {
149
145
  // endOfFileToken: EndOfFileToken,
150
146
  // flags: NodeFlags,
151
147
  // ): SourceFile;
152
- function createSourceFile(source: string, state: Es2pandaContextState = Es2pandaContextState.ES2PANDA_STATE_PARSED): SourceFile {
153
- const node = arkts.EtsScript.createFromSource(source, state)
154
- return new SourceFile(node)
148
+ function createSourceFile(
149
+ source: string,
150
+ state: Es2pandaContextState = Es2pandaContextState.ES2PANDA_STATE_PARSED
151
+ ): SourceFile {
152
+ const node = arkts.EtsScript.createFromSource(source, state);
153
+ return new SourceFile(node);
155
154
  }
156
155
 
157
156
  // Improve: fix (now doesn't create a new node)
@@ -165,32 +164,16 @@ export function createNodeFactory() {
165
164
  // hasNoDefaultLib?: boolean,
166
165
  // libReferences?: readonly FileReference[]
167
166
  // ): SourceFile;
168
- function updateSourceFile(
169
- node: SourceFile,
170
- statements: readonly Statement[]
171
- ): SourceFile {
172
- return new SourceFile(
173
- arkts.EtsScript.updateByStatements(
174
- node.node,
175
- passNodeArray(statements)
176
- )
177
- )
167
+ function updateSourceFile(node: SourceFile, statements: readonly Statement[]): SourceFile {
168
+ return new SourceFile(arkts.EtsScript.updateByStatements(node.node, passNodeArray(statements)));
178
169
  }
179
170
 
180
171
  // @api
181
172
  // createIdentifier(
182
173
  // text: string
183
174
  // ): Identifier;
184
- function createIdentifier(
185
- text: string,
186
- typeAnnotation?: TypeNode | undefined
187
- ): Identifier {
188
- return new Identifier(
189
- arkts.factory.createIdentifier(
190
- text,
191
- passNode(typeAnnotation)
192
- )
193
- )
175
+ function createIdentifier(text: string, typeAnnotation?: TypeNode | undefined): Identifier {
176
+ return new Identifier(arkts.factory.createIdentifier(text, passNode(typeAnnotation)));
194
177
  }
195
178
 
196
179
  // @api
@@ -198,14 +181,8 @@ export function createNodeFactory() {
198
181
  // text: string,
199
182
  // isSingleQuote?: boolean
200
183
  // ): StringLiteral;
201
- function createStringLiteral(
202
- str: string
203
- ): StringLiteral {
204
- return new StringLiteral(
205
- arkts.factory.createStringLiteral(
206
- str
207
- )
208
- )
184
+ function createStringLiteral(str: string): StringLiteral {
185
+ return new StringLiteral(arkts.factory.createStringLiteral(str));
209
186
  }
210
187
 
211
188
  // @api
@@ -213,14 +190,8 @@ export function createNodeFactory() {
213
190
  // value: string | number,
214
191
  // numericLiteralFlags: TokenFlags = TokenFlags.None
215
192
  // ): NumericLiteral {
216
- function createNumericLiteral(
217
- value: number
218
- ): NumericLiteral {
219
- return new NumericLiteral(
220
- arkts.factory.createNumberLiteral(
221
- value
222
- )
223
- )
193
+ function createNumericLiteral(value: number): NumericLiteral {
194
+ return new NumericLiteral(arkts.factory.createNumberLiteral(value));
224
195
  }
225
196
 
226
197
  // @api
@@ -238,7 +209,7 @@ export function createNodeFactory() {
238
209
  passVariableDeclarationKind(flags),
239
210
  passNodeArray(declarations)
240
211
  )
241
- )
212
+ );
242
213
  }
243
214
 
244
215
  // @api
@@ -257,7 +228,7 @@ export function createNodeFactory() {
257
228
  passVariableDeclarationKind(node.flags),
258
229
  passNodeArray(declarations)
259
230
  )
260
- )
231
+ );
261
232
  }
262
233
 
263
234
  // @api
@@ -269,14 +240,13 @@ export function createNodeFactory() {
269
240
  modifiers: readonly Modifier[] | undefined,
270
241
  declarationList: VariableDeclarationList | readonly VariableDeclaration[]
271
242
  ): VariableStatement {
272
- const node: arkts.VariableDeclaration = (declarationList instanceof VariableDeclarationList) ? declarationList.node : createVariableDeclarationList(declarationList, undefined).node
243
+ const node: arkts.VariableDeclaration =
244
+ declarationList instanceof VariableDeclarationList
245
+ ? declarationList.node
246
+ : createVariableDeclarationList(declarationList, undefined).node;
273
247
  return new VariableStatement(
274
- arkts.factory.createVariableDeclaration(
275
- passModifiers(modifiers),
276
- node.declarationKind,
277
- node.declarators
278
- )
279
- )
248
+ arkts.factory.createVariableDeclaration(passModifiers(modifiers), node.declarationKind, node.declarators)
249
+ );
280
250
  }
281
251
 
282
252
  // @api
@@ -297,7 +267,7 @@ export function createNodeFactory() {
297
267
  declarationList.node.declarationKind,
298
268
  declarationList.node.declarators
299
269
  )
300
- )
270
+ );
301
271
  }
302
272
 
303
273
  // @api
@@ -320,7 +290,7 @@ export function createNodeFactory() {
320
290
  passIdentifier(name, type),
321
291
  passNode(initializer)
322
292
  )
323
- )
293
+ );
324
294
  }
325
295
 
326
296
  // @api
@@ -346,7 +316,7 @@ export function createNodeFactory() {
346
316
  passIdentifier(name, type),
347
317
  passNode(initializer)
348
318
  )
349
- )
319
+ );
350
320
  }
351
321
 
352
322
  // @api
@@ -378,13 +348,15 @@ export function createNodeFactory() {
378
348
  type?.node
379
349
  ),
380
350
  0,
381
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
351
+ passModifiers(modifiers) |
352
+ Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC |
353
+ Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
382
354
  body === undefined,
383
355
  passIdentifier(name)
384
356
  ),
385
357
  false
386
358
  )
387
- )
359
+ );
388
360
  }
389
361
 
390
362
  // @api
@@ -420,13 +392,15 @@ export function createNodeFactory() {
420
392
  type?.node
421
393
  ),
422
394
  0,
423
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
395
+ passModifiers(modifiers) |
396
+ Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC |
397
+ Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
424
398
  body === undefined,
425
399
  passIdentifier(name)
426
400
  ),
427
401
  false
428
402
  )
429
- )
403
+ );
430
404
  }
431
405
 
432
406
  // @api
@@ -448,13 +422,10 @@ export function createNodeFactory() {
448
422
  ): ParameterDeclaration {
449
423
  return new ParameterDeclaration(
450
424
  arkts.factory.createParameterDeclaration(
451
- arkts.factory.createIdentifier(
452
- (name instanceof Identifier) ? name.node.name : name,
453
- type?.node
454
- ),
425
+ arkts.factory.createIdentifier(name instanceof Identifier ? name.node.name : name, type?.node),
455
426
  initializer?.node
456
427
  )
457
- )
428
+ );
458
429
  }
459
430
 
460
431
  // @api
@@ -479,13 +450,10 @@ export function createNodeFactory() {
479
450
  return new ParameterDeclaration(
480
451
  arkts.factory.updateParameterDeclaration(
481
452
  node.node,
482
- arkts.factory.createIdentifier(
483
- (name instanceof Identifier) ? name.node.name : name,
484
- type?.node
485
- ),
453
+ arkts.factory.createIdentifier(name instanceof Identifier ? name.node.name : name, type?.node),
486
454
  initializer?.node
487
455
  )
488
- )
456
+ );
489
457
  }
490
458
 
491
459
  // @api
@@ -508,7 +476,7 @@ export function createNodeFactory() {
508
476
  defaultType?.node,
509
477
  passModifiers(modifiers)
510
478
  )
511
- )
479
+ );
512
480
  }
513
481
 
514
482
  // @api
@@ -534,21 +502,15 @@ export function createNodeFactory() {
534
502
  defaultType?.node,
535
503
  passModifiers(modifiers)
536
504
  )
537
- )
505
+ );
538
506
  }
539
507
 
540
508
  // @api
541
509
  // createETSUnionTypeNode(
542
510
  // types: readonly TypeNode[]
543
511
  // ): UnionTypeNode
544
- function createETSUnionTypeNode(
545
- types: readonly TypeNode[]
546
- ): UnionTypeNode {
547
- return new UnionTypeNode(
548
- arkts.factory.createETSUnionType(
549
- passNodeArray(types)
550
- )
551
- )
512
+ function createETSUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode {
513
+ return new UnionTypeNode(arkts.factory.createETSUnionType(passNodeArray(types)));
552
514
  }
553
515
 
554
516
  // @api
@@ -556,17 +518,8 @@ export function createNodeFactory() {
556
518
  // node: UnionTypeNode,
557
519
  // types: NodeArray<TypeNode>
558
520
  // ): UnionTypeNode
559
- function updateETSUnionTypeNode(
560
- node: UnionTypeNode,
561
- types: readonly TypeNode[]
562
- ): UnionTypeNode {
563
- return new UnionTypeNode(
564
- arkts.factory.updateETSUnionType(
565
- node.node,
566
- passNodeArray(types)
567
- )
568
- )
569
-
521
+ function updateETSUnionTypeNode(node: UnionTypeNode, types: readonly TypeNode[]): UnionTypeNode {
522
+ return new UnionTypeNode(arkts.factory.updateETSUnionType(node.node, passNodeArray(types)));
570
523
  }
571
524
 
572
525
  // @api
@@ -574,15 +527,8 @@ export function createNodeFactory() {
574
527
  // typeName: string | EntityName,
575
528
  // typeArguments?: readonly TypeNode[]
576
529
  // ): TypeReferenceNode;
577
- function createETSTypeReferenceNode(
578
- typeName: Identifier,
579
- typeArguments?: undefined
580
- ): TypeReferenceNode {
581
- return new TypeReferenceNode(
582
- arkts.factory.createETSTypeReferenceFromId(
583
- typeName.node
584
- )
585
- )
530
+ function createETSTypeReferenceNode(typeName: Identifier, typeArguments?: undefined): TypeReferenceNode {
531
+ return new TypeReferenceNode(arkts.factory.createETSTypeReferenceFromId(typeName.node));
586
532
  }
587
533
 
588
534
  // @api
@@ -596,50 +542,31 @@ export function createNodeFactory() {
596
542
  typeName: Identifier,
597
543
  typeArguments?: undefined
598
544
  ): TypeReferenceNode {
599
- return new TypeReferenceNode(
600
- arkts.factory.updateTypeReferenceFromId(
601
- node.node,
602
- typeName.node
603
- )
604
- )
545
+ return new TypeReferenceNode(arkts.factory.updateTypeReferenceFromId(node.node, typeName.node));
605
546
  }
606
547
 
607
548
  // @api
608
549
  // createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(
609
550
  // kind: TKind
610
551
  // ): KeywordTypeNode<TKind>;
611
- function createKeywordTypeNode(
612
- TKind: ts.KeywordTypeSyntaxKind
613
- ): KeywordTypeNode {
614
- function createKeywordTypeNodeFromString(
615
- keyword: string
616
- ): KeywordTypeNode {
552
+ function createKeywordTypeNode(TKind: ts.KeywordTypeSyntaxKind): KeywordTypeNode {
553
+ function createKeywordTypeNodeFromString(keyword: string): KeywordTypeNode {
617
554
  return new KeywordTypeNode(
618
- arkts.factory.createETSTypeReferenceFromId(
619
- arkts.factory.createIdentifier(
620
- keyword
621
- )
622
- )
623
- )
555
+ arkts.factory.createETSTypeReferenceFromId(arkts.factory.createIdentifier(keyword))
556
+ );
624
557
  }
625
558
 
626
- function createKeywordTypeNodeFromKind(
627
- kind: number
628
- ): KeywordTypeNode {
629
- return new KeywordTypeNode(
630
- arkts.factory.createPrimitiveType(
631
- kind
632
- )
633
- )
559
+ function createKeywordTypeNodeFromKind(kind: number): KeywordTypeNode {
560
+ return new KeywordTypeNode(arkts.factory.createPrimitiveType(kind));
634
561
  }
635
562
 
636
563
  const keywords = new Map<ts.KeywordTypeSyntaxKind, KeywordTypeNode>([
637
- [ts.SyntaxKind.NumberKeyword, createKeywordTypeNodeFromString("number")],
638
- [ts.SyntaxKind.StringKeyword, createKeywordTypeNodeFromString("string")],
639
- [ts.SyntaxKind.AnyKeyword, createKeywordTypeNodeFromString("any")],
564
+ [ts.SyntaxKind.NumberKeyword, createKeywordTypeNodeFromString('number')],
565
+ [ts.SyntaxKind.StringKeyword, createKeywordTypeNodeFromString('string')],
566
+ [ts.SyntaxKind.AnyKeyword, createKeywordTypeNodeFromString('any')],
640
567
  [ts.SyntaxKind.VoidKeyword, createKeywordTypeNodeFromKind(8)],
641
- ])
642
- return keywords.get(TKind) ?? throwError('unsupported keyword')
568
+ ]);
569
+ return keywords.get(TKind) ?? throwError('unsupported keyword');
643
570
  }
644
571
 
645
572
  // @api
@@ -647,15 +574,8 @@ export function createNodeFactory() {
647
574
  // statements: readonly Statement[],
648
575
  // multiLine?: boolean
649
576
  // ): Block;
650
- function createBlock(
651
- statements: readonly Statement[],
652
- multiline?: boolean
653
- ): Block {
654
- return new Block(
655
- arkts.factory.createBlock(
656
- passNodeArray(statements)
657
- )
658
- )
577
+ function createBlock(statements: readonly Statement[], multiline?: boolean): Block {
578
+ return new Block(arkts.factory.createBlock(passNodeArray(statements)));
659
579
  }
660
580
 
661
581
  // @api
@@ -663,30 +583,16 @@ export function createNodeFactory() {
663
583
  // node: Block,
664
584
  // statements: readonly Statement[]
665
585
  // ): Block;
666
- function updateBlock(
667
- node: Block,
668
- statements: readonly Statement[]
669
- ): Block {
670
- return new Block(
671
- arkts.factory.updateBlock(
672
- node.node,
673
- passNodeArray(statements)
674
- )
675
- )
586
+ function updateBlock(node: Block, statements: readonly Statement[]): Block {
587
+ return new Block(arkts.factory.updateBlock(node.node, passNodeArray(statements)));
676
588
  }
677
589
 
678
590
  // @api
679
591
  // createExpressionStatement(
680
592
  // expression: Expression
681
593
  // ): ExpressionStatement;
682
- function createExpressionStatement(
683
- expression: Expression
684
- ): ExpressionStatement {
685
- return new ExpressionStatement(
686
- arkts.factory.createExpressionStatement(
687
- expression.node
688
- )
689
- )
594
+ function createExpressionStatement(expression: Expression): ExpressionStatement {
595
+ return new ExpressionStatement(arkts.factory.createExpressionStatement(expression.node));
690
596
  }
691
597
 
692
598
  // @api
@@ -694,30 +600,16 @@ export function createNodeFactory() {
694
600
  // node: ExpressionStatement,
695
601
  // expression: Expression
696
602
  // ): ExpressionStatement;
697
- function updateExpressionStatement(
698
- node: ExpressionStatement,
699
- expression: Expression
700
- ): ExpressionStatement {
701
- return new ExpressionStatement(
702
- arkts.factory.updateExpressionStatement(
703
- node.node,
704
- expression.node
705
- )
706
- )
603
+ function updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement {
604
+ return new ExpressionStatement(arkts.factory.updateExpressionStatement(node.node, expression.node));
707
605
  }
708
606
 
709
607
  // @api
710
608
  // createReturnStatement(
711
609
  // expression?: Expression
712
610
  // ): ReturnStatement;
713
- function createReturnStatement(
714
- expression: Expression
715
- ): ReturnStatement {
716
- return new ReturnStatement(
717
- arkts.factory.createReturnStatement(
718
- expression.node
719
- )
720
- )
611
+ function createReturnStatement(expression: Expression): ReturnStatement {
612
+ return new ReturnStatement(arkts.factory.createReturnStatement(expression.node));
721
613
  }
722
614
 
723
615
  // @api
@@ -725,16 +617,8 @@ export function createNodeFactory() {
725
617
  // node: ReturnStatement,
726
618
  // expression: Expression | undefined
727
619
  // ): ReturnStatement
728
- function updateReturnStatement(
729
- node: ReturnStatement,
730
- expression: Expression
731
- ): ReturnStatement {
732
- return new ReturnStatement(
733
- arkts.factory.updateReturnStatement(
734
- node.node,
735
- expression.node
736
- )
737
- )
620
+ function updateReturnStatement(node: ReturnStatement, expression: Expression): ReturnStatement {
621
+ return new ReturnStatement(arkts.factory.updateReturnStatement(node.node, expression.node));
738
622
  }
739
623
 
740
624
  // @api
@@ -754,7 +638,7 @@ export function createNodeFactory() {
754
638
  false,
755
639
  false
756
640
  )
757
- )
641
+ );
758
642
  }
759
643
 
760
644
  // @api
@@ -777,7 +661,7 @@ export function createNodeFactory() {
777
661
  false,
778
662
  false
779
663
  )
780
- )
664
+ );
781
665
  }
782
666
 
783
667
  // @api
@@ -794,11 +678,12 @@ export function createNodeFactory() {
794
678
  return new CallExpression(
795
679
  arkts.factory.createCallExpression(
796
680
  expression.node,
797
- (typeArguments !== undefined) ?
798
- arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments)) : undefined,
681
+ typeArguments !== undefined
682
+ ? arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments))
683
+ : undefined,
799
684
  passNodeArray(argumentsArray)
800
685
  )
801
- )
686
+ );
802
687
  }
803
688
 
804
689
  // @api
@@ -818,11 +703,12 @@ export function createNodeFactory() {
818
703
  arkts.factory.updateCallExpression(
819
704
  node.node,
820
705
  expression.node,
821
- (typeArguments !== undefined) ?
822
- arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments)) : undefined,
706
+ typeArguments !== undefined
707
+ ? arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments))
708
+ : undefined,
823
709
  passNodeArray(argumentsArray)
824
710
  )
825
- )
711
+ );
826
712
  }
827
713
 
828
714
  // @api
@@ -837,12 +723,8 @@ export function createNodeFactory() {
837
723
  elseStatement?: undefined
838
724
  ): IfStatement {
839
725
  return new IfStatement(
840
- arkts.factory.createIfStatement(
841
- passNode(expression),
842
- passNode(thenStatement),
843
- passNode(elseStatement),
844
- )
845
- )
726
+ arkts.factory.createIfStatement(passNode(expression), passNode(thenStatement), passNode(elseStatement))
727
+ );
846
728
  }
847
729
 
848
730
  // @api
@@ -862,9 +744,9 @@ export function createNodeFactory() {
862
744
  node.node,
863
745
  passNode(expression),
864
746
  passNode(thenStatement),
865
- passNode(elseStatement),
747
+ passNode(elseStatement)
866
748
  )
867
- )
749
+ );
868
750
  }
869
751
 
870
752
  // Improve: rewrite maybe
@@ -872,10 +754,8 @@ export function createNodeFactory() {
872
754
  // createToken(
873
755
  // token: SyntaxKind._
874
756
  // ): _;
875
- function createToken<TKind extends ts.TokenSyntaxKind>(
876
- token: TKind
877
- ) {
878
- return new Token(token)
757
+ function createToken<TKind extends ts.TokenSyntaxKind>(token: TKind) {
758
+ return new Token(token);
879
759
  }
880
760
 
881
761
  // @api
@@ -890,12 +770,8 @@ export function createNodeFactory() {
890
770
  right: Expression
891
771
  ): BinaryExpression {
892
772
  return new BinaryExpression(
893
- arkts.factory.createBinaryExpression(
894
- passNode(left),
895
- passToken(operator),
896
- passNode(right),
897
- )
898
- )
773
+ arkts.factory.createBinaryExpression(passNode(left), passToken(operator), passNode(right))
774
+ );
899
775
  }
900
776
 
901
777
  // @api
@@ -912,13 +788,8 @@ export function createNodeFactory() {
912
788
  right: Expression
913
789
  ): BinaryExpression {
914
790
  return new BinaryExpression(
915
- arkts.factory.updateBinaryExpression(
916
- node.node,
917
- passNode(left),
918
- passToken(operator),
919
- passNode(right),
920
- )
921
- )
791
+ arkts.factory.updateBinaryExpression(node.node, passNode(left), passToken(operator), passNode(right))
792
+ );
922
793
  }
923
794
 
924
795
  // @api
@@ -953,7 +824,7 @@ export function createNodeFactory() {
953
824
  undefined
954
825
  )
955
826
  )
956
- )
827
+ );
957
828
  }
958
829
 
959
830
  // @api
@@ -973,7 +844,7 @@ export function createNodeFactory() {
973
844
  parameters: readonly ParameterDeclaration[],
974
845
  type: undefined,
975
846
  equalsGreaterThanToken: Token<ts.SyntaxKind.EqualsGreaterThanToken> | undefined,
976
- body: Block,
847
+ body: Block
977
848
  ): ArrowFunction {
978
849
  return new ArrowFunction(
979
850
  arkts.factory.updateArrowFunction(
@@ -992,7 +863,7 @@ export function createNodeFactory() {
992
863
  undefined
993
864
  )
994
865
  )
995
- )
866
+ );
996
867
  }
997
868
 
998
869
  // @api
@@ -1023,7 +894,7 @@ export function createNodeFactory() {
1023
894
  undefined
1024
895
  )
1025
896
  )
1026
- )
897
+ );
1027
898
  }
1028
899
 
1029
900
  // @api
@@ -1057,7 +928,7 @@ export function createNodeFactory() {
1057
928
  passTypeParams(typeParameters)
1058
929
  )
1059
930
  )
1060
- )
931
+ );
1061
932
  }
1062
933
 
1063
934
  // @api
@@ -1080,7 +951,7 @@ export function createNodeFactory() {
1080
951
  ),
1081
952
  Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE
1082
953
  )
1083
- )
954
+ );
1084
955
  }
1085
956
 
1086
957
  // @api
@@ -1106,7 +977,7 @@ export function createNodeFactory() {
1106
977
  ),
1107
978
  Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE
1108
979
  )
1109
- )
980
+ );
1110
981
  }
1111
982
 
1112
983
  // Improve: fix modifiers
@@ -1131,7 +1002,7 @@ export function createNodeFactory() {
1131
1002
  type: TypeNode | undefined,
1132
1003
  body: Block | undefined
1133
1004
  ): MethodDeclaration {
1134
- const _name = passIdentifier(name)
1005
+ const _name = passIdentifier(name);
1135
1006
  return new MethodDeclaration(
1136
1007
  arkts.factory.createMethodDefinition(
1137
1008
  Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD,
@@ -1145,7 +1016,8 @@ export function createNodeFactory() {
1145
1016
  passNode(type)
1146
1017
  ),
1147
1018
  0,
1148
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC || Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
1019
+ passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC ||
1020
+ Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
1149
1021
  false,
1150
1022
  _name
1151
1023
  )
@@ -1153,7 +1025,7 @@ export function createNodeFactory() {
1153
1025
  passModifiers(modifiers),
1154
1026
  false
1155
1027
  )
1156
- )
1028
+ );
1157
1029
  }
1158
1030
 
1159
1031
  // @api
@@ -1179,7 +1051,7 @@ export function createNodeFactory() {
1179
1051
  type: undefined,
1180
1052
  body: Block | undefined
1181
1053
  ): MethodDeclaration {
1182
- const _name = passIdentifier(name)
1054
+ const _name = passIdentifier(name);
1183
1055
  return new MethodDeclaration(
1184
1056
  arkts.factory.updateMethodDefinition(
1185
1057
  node.node,
@@ -1196,7 +1068,8 @@ export function createNodeFactory() {
1196
1068
  passNode(type)
1197
1069
  ),
1198
1070
  0,
1199
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC || Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
1071
+ passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC ||
1072
+ Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC,
1200
1073
  false,
1201
1074
  _name
1202
1075
  )
@@ -1204,7 +1077,7 @@ export function createNodeFactory() {
1204
1077
  passModifiers(modifiers),
1205
1078
  false
1206
1079
  )
1207
- )
1080
+ );
1208
1081
  }
1209
1082
 
1210
1083
  // @api
@@ -1218,9 +1091,7 @@ export function createNodeFactory() {
1218
1091
  parameters: readonly ParameterDeclaration[],
1219
1092
  body: Block | undefined
1220
1093
  ): ConstructorDeclaration {
1221
- const _name = arkts.factory.createIdentifier(
1222
- "constructor"
1223
- )
1094
+ const _name = arkts.factory.createIdentifier('constructor');
1224
1095
  return new ConstructorDeclaration(
1225
1096
  arkts.factory.createMethodDefinition(
1226
1097
  Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR,
@@ -1234,8 +1105,11 @@ export function createNodeFactory() {
1234
1105
  // Improve: change to void maybe
1235
1106
  undefined
1236
1107
  ),
1237
- passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
1238
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1108
+ passModifiersToScriptFunction(modifiers) |
1109
+ Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
1110
+ passModifiers(modifiers) |
1111
+ Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC |
1112
+ Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1239
1113
  false,
1240
1114
  _name
1241
1115
  )
@@ -1243,7 +1117,7 @@ export function createNodeFactory() {
1243
1117
  passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1244
1118
  false
1245
1119
  )
1246
- )
1120
+ );
1247
1121
  }
1248
1122
 
1249
1123
  // @api
@@ -1259,10 +1133,7 @@ export function createNodeFactory() {
1259
1133
  parameters: readonly ParameterDeclaration[],
1260
1134
  body: Block | undefined
1261
1135
  ): ConstructorDeclaration {
1262
- const _name = arkts.factory.updateIdentifier(
1263
- node.node.name,
1264
- "constructor"
1265
- )
1136
+ const _name = arkts.factory.updateIdentifier(node.node.name, 'constructor');
1266
1137
  return new ConstructorDeclaration(
1267
1138
  arkts.factory.updateMethodDefinition(
1268
1139
  node.node,
@@ -1279,8 +1150,11 @@ export function createNodeFactory() {
1279
1150
  // Improve: change to void maybe
1280
1151
  undefined
1281
1152
  ),
1282
- passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
1283
- passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1153
+ passModifiersToScriptFunction(modifiers) |
1154
+ Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
1155
+ passModifiers(modifiers) |
1156
+ Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC |
1157
+ Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1284
1158
  false,
1285
1159
  _name
1286
1160
  )
@@ -1288,42 +1162,30 @@ export function createNodeFactory() {
1288
1162
  passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR,
1289
1163
  false
1290
1164
  )
1291
- )
1292
-
1165
+ );
1293
1166
  }
1294
1167
 
1295
1168
  // @api
1296
1169
  // tsc: createSuper(
1297
1170
  // ): SuperExpression;
1298
- function createSuper(
1299
- ): SuperExpression {
1300
- return new SuperExpression(
1301
- arkts.factory.createSuperExpression()
1302
- )
1171
+ function createSuper(): SuperExpression {
1172
+ return new SuperExpression(arkts.factory.createSuperExpression());
1303
1173
  }
1304
1174
 
1305
1175
  // @api
1306
1176
  // tsc: updateSuper(
1307
1177
  // node: SuperExpression
1308
1178
  // ): SuperExpression;
1309
- function updateSuper(
1310
- node: SuperExpression
1311
- ): SuperExpression {
1312
- return new SuperExpression(
1313
- arkts.factory.updateSuperExpression(
1314
- node.node,
1315
- )
1316
- )
1179
+ function updateSuper(node: SuperExpression): SuperExpression {
1180
+ return new SuperExpression(arkts.factory.updateSuperExpression(node.node));
1317
1181
  }
1318
1182
 
1319
1183
  // @api
1320
1184
  // tsc: createParenthesizedExpression(
1321
1185
  // expression: Expression
1322
1186
  // ): ParenthesizedExpression;
1323
- function createParenthesizedExpression(
1324
- expression: Expression
1325
- ): ParenthesizedExpression {
1326
- return expression
1187
+ function createParenthesizedExpression(expression: Expression): ParenthesizedExpression {
1188
+ return expression;
1327
1189
  // Improve:
1328
1190
  // return new ParenthesizedExpression(
1329
1191
  // expression
@@ -1339,7 +1201,7 @@ export function createNodeFactory() {
1339
1201
  node: ParenthesizedExpression,
1340
1202
  expression: Expression
1341
1203
  ): ParenthesizedExpression {
1342
- return expression
1204
+ return expression;
1343
1205
  // Improve:
1344
1206
  // return new ParenthesizedExpression(
1345
1207
  // expression
@@ -1381,9 +1243,7 @@ export function createNodeFactory() {
1381
1243
  propertyName: Identifier | undefined,
1382
1244
  name: Identifier
1383
1245
  ): ImportSpecifier {
1384
- return new ImportSpecifier(
1385
- name.node
1386
- )
1246
+ return new ImportSpecifier(name.node);
1387
1247
  }
1388
1248
  }
1389
1249