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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/build/libarkts-copy/generator/options.json5 +151 -0
  2. package/build/libarkts-copy/native/meson.build +11 -12
  3. package/build/libarkts-copy/native/meson_options.txt +1 -1
  4. package/build/libarkts-copy/native/mingw.cross +14 -0
  5. package/build/libarkts-copy/native/src/bridges.cc +77 -1
  6. package/build/libarkts-copy/native/src/common.cc +5 -5
  7. package/build/libarkts-copy/native/src/generated/bridges.cc +312 -33
  8. package/build/libarkts-copy/package.json +24 -20
  9. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +19 -1
  10. package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +2 -1
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +18 -12
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +1 -1
  13. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +15 -26
  14. package/build/libarkts-copy/src/arkts-api/index.ts +2 -4
  15. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +0 -4
  16. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +1 -22
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +7 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +1 -22
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +2 -5
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +1 -1
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +44 -0
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +1 -4
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +3 -7
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +1 -1
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +10 -0
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +11 -7
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +3 -6
  28. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +13 -12
  29. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +1 -1
  30. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -4
  31. package/build/libarkts-copy/src/arkts-api/plugins.ts +12 -3
  32. package/build/libarkts-copy/src/arkts-api/static/global.ts +2 -2
  33. package/build/libarkts-copy/src/{wrapper-compat/arkts-api → arkts-api}/static/globalUtils.ts +4 -4
  34. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +0 -8
  35. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +57 -0
  36. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +1 -1
  37. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +6 -8
  38. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +153 -29
  39. package/build/libarkts-copy/src/arkts-api/visitor.ts +16 -10
  40. package/build/libarkts-copy/src/checkSdk.ts +15 -0
  41. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +343 -321
  42. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +93 -12
  43. package/build/libarkts-copy/src/generated/factory.ts +38 -25
  44. package/build/libarkts-copy/src/generated/index.ts +2 -0
  45. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +1 -1
  46. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +15 -3
  47. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +1 -1
  48. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +1 -1
  49. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +10 -2
  50. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +11 -2
  51. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +20 -4
  52. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -2
  53. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +1 -1
  54. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +12 -9
  55. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +1 -1
  56. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +77 -0
  57. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +1 -1
  58. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +3 -1
  59. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +1 -1
  60. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +1 -1
  61. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +1 -1
  62. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +1 -1
  63. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +1 -1
  64. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +29 -5
  65. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +1 -1
  66. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -1
  67. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +1 -1
  68. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +1 -1
  69. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +1 -1
  70. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +1 -1
  71. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +1 -1
  72. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +1 -1
  73. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +12 -3
  74. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -1
  75. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +14 -2
  76. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +1 -1
  77. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +1 -1
  78. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +103 -0
  79. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +1 -1
  80. package/build/libarkts-copy/src/generated/peers/Program.ts +8 -0
  81. package/build/libarkts-copy/src/generated/peers/Property.ts +1 -1
  82. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +1 -1
  83. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +1 -1
  84. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +26 -9
  85. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +1 -1
  86. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +1 -1
  87. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +1 -1
  88. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +1 -1
  89. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +1 -1
  90. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -1
  91. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +1 -1
  92. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +1 -1
  93. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +1 -1
  94. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +1 -1
  95. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +1 -1
  96. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -1
  97. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +1 -1
  98. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -1
  99. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +12 -3
  100. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +1 -1
  101. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +1 -1
  102. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -1
  103. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -1
  104. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -1
  105. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +1 -1
  106. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +1 -1
  107. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -1
  108. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +1 -1
  109. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +12 -3
  110. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +1 -1
  111. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +1 -1
  112. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +1 -1
  113. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -1
  114. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -1
  115. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +1 -1
  116. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +1 -1
  117. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +1 -1
  118. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +1 -1
  119. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +1 -1
  120. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +1 -1
  121. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +1 -1
  122. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +1 -1
  123. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +1 -1
  124. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +1 -1
  125. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +1 -1
  126. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +1 -1
  127. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -1
  128. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +1 -1
  129. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +1 -1
  130. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +1 -1
  131. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +29 -4
  132. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +1 -1
  133. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +1 -1
  134. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +1 -1
  135. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +1 -1
  136. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -1
  137. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +1 -1
  138. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +1 -1
  139. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +1 -1
  140. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +1 -1
  141. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +1 -1
  142. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +1 -1
  143. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +1 -1
  144. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +1 -1
  145. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +1 -1
  146. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +1 -1
  147. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -1
  148. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +1 -1
  149. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +1 -1
  150. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -1
  151. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +1 -1
  152. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +1 -1
  153. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +1 -1
  154. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -3
  155. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +1 -1
  156. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +1 -1
  157. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +1 -1
  158. package/build/libarkts-copy/src/index.ts +1 -4
  159. package/build/libarkts-copy/src/plugin-utils.ts +37 -37
  160. package/build/libarkts-copy/src/reexport-for-generated.ts +7 -0
  161. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +14 -14
  162. package/build/libarkts-copy/src/ts-api/index.ts +1 -1
  163. package/build/libarkts-copy/src/ts-api/types.ts +56 -56
  164. package/build/libarkts-copy/src/ts-api/utilities/private.ts +6 -6
  165. package/build/libarkts-copy/src/ts-api/utilities/public.ts +3 -3
  166. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +4 -4
  167. package/build/libarkts-copy/src/utils.ts +13 -159
  168. package/build/libarkts-copy/src/wrapper-compat/README.md +4 -0
  169. package/build/libarkts-copy/src/wrapper-compat/arkts-api/index.ts +3 -4
  170. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrayExpression.ts +1 -1
  171. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrowFunctionExpression.ts +1 -1
  172. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/AssignmentExpression.ts +1 -1
  173. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/BlockStatement.ts +1 -1
  174. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/CallExpression.ts +1 -1
  175. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDeclaration.ts +1 -1
  176. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDefinition.ts +2 -2
  177. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassProperty.ts +1 -1
  178. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSFunctionType.ts +2 -2
  179. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSImportDeclaration.ts +2 -2
  180. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSParameterExpression.ts +2 -2
  181. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ExpressionStatement.ts +1 -1
  182. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionDeclaration.ts +1 -1
  183. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionExpression.ts +1 -1
  184. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/IfStatement.ts +1 -1
  185. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MemberExpression.ts +1 -1
  186. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MethodDefinition.ts +2 -2
  187. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/NumberLiteral.ts +2 -2
  188. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ObjectExpression.ts +3 -3
  189. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/Property.ts +1 -1
  190. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ScriptFunction.ts +1 -1
  191. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/StructDeclaration.ts +1 -1
  192. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSInterfaceDeclaration.ts +1 -1
  193. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +1 -1
  194. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeParameter.ts +1 -1
  195. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TryStatement.ts +3 -3
  196. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclaration.ts +1 -1
  197. package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclarator.ts +2 -2
  198. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +2 -2
  199. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +1 -1
  200. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticKind.ts +1 -1
  201. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ImportPathManager.ts +2 -2
  202. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Program.ts +1 -1
  203. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourceRange.ts +2 -2
  204. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts +1 -1
  205. package/build/libarkts-copy/src/wrapper-compat/arkts-api/to-be-generated/MemberExpression.ts +1 -1
  206. package/build/libarkts-copy/src/wrapper-compat/arkts-api/types.ts +10 -11
  207. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/nativePtrDecoder.ts +1 -1
  208. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/private.ts +4 -4
  209. package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/public.ts +6 -6
  210. package/build/libarkts-copy/src/wrapper-compat/arkts-api/visitor.ts +10 -10
  211. package/lib/index.js +7194 -7097
  212. package/package.json +2 -2
  213. package/templates/Es2pandaNativeModule.ts +1 -1
  214. package/templates/bridges.cc +5 -0
  215. package/build/libarkts-copy/src/arkts-api/CheckedBackFilter.ts +0 -131
  216. package/build/libarkts-copy/src/arkts-api/CompileWithCache.ts +0 -193
  217. package/build/libarkts-copy/src/arkts-api/InferVoidReturnType.ts +0 -89
  218. package/build/libarkts-copy/src/arkts-api/SetBaseOverloads.ts +0 -44
  219. package/build/libarkts-copy/src/arkts-api/node-utilities/AnnotationUsage.ts +0 -29
  220. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +0 -49
  221. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDeclaration.ts +0 -54
  222. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +0 -68
  223. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +0 -54
  224. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ArktsObject.ts +0 -45
  225. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Config.ts +0 -53
  226. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Context.ts +0 -60
  227. package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourcePosition.ts +0 -38
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { ArktsObject } from './ArktsObject';
16
+ import { ArktsObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { global } from '../static/global';
18
18
  import { KNativePointer } from '@koalaui/interop';
19
19
  import { DiagnosticKind } from './DiagnosticKind';
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { ArktsObject } from './ArktsObject';
16
+ import { ArktsObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { global } from '../static/global';
18
18
  import { KNativePointer } from '@koalaui/interop';
19
19
  import { Es2pandaPluginDiagnosticType as PluginDiagnosticType } from '../../../generated/Es2pandaEnums';
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { ArktsObject } from "./ArktsObject"
16
+ import { ArktsObject } from "../../../arkts-api/peers/ArktsObject"
17
17
  import { global } from "../static/global"
18
18
  import { KNativePointer } from "@koalaui/interop"
19
19
 
@@ -29,6 +29,6 @@ export class ImportPathManager extends ArktsObject {
29
29
  }
30
30
 
31
31
  resolvePath(currentModulePath: string, importPath: string): string {
32
- return ''; // TODO: no longer support this.
32
+ return ''; // Improve: no longer support this.
33
33
  }
34
34
  }
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { ArktsObject } from "./ArktsObject"
16
+ import { ArktsObject } from "../../../arkts-api/peers/ArktsObject"
17
17
  import { global } from "../static/global"
18
18
  import { acceptNativeObjectArrayResult, unpackString } from "../utilities/private"
19
19
  import { KNativePointer } from "@koalaui/interop"
@@ -12,8 +12,8 @@
12
12
  * See the License for the specific language governing permissions and
13
13
  * limitations under the License.
14
14
  */
15
- import { SourcePosition } from './SourcePosition';
16
- import { ArktsObject } from './ArktsObject';
15
+ import { SourcePosition } from '../../../arkts-api/peers/SourcePosition';
16
+ import { ArktsObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { global } from '../static/global';
18
18
  import { KNativePointer } from '@koalaui/interop';
19
19
 
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { ArktsObject } from './ArktsObject';
16
+ import { ArktsObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { global } from '../static/global';
18
18
  import { KNativePointer } from '@koalaui/interop';
19
19
  import { DiagnosticKind } from './DiagnosticKind';
@@ -92,7 +92,7 @@ export class MemberExpression extends Expression {
92
92
  }
93
93
 
94
94
  get optional(): boolean {
95
- return false; // todo: no corresponding method in es2panda
95
+ return false; // Improve: no corresponding method in es2panda
96
96
  }
97
97
 
98
98
  /** @deprecated */
@@ -35,9 +35,9 @@ import {
35
35
  updatePeerByNode,
36
36
  } from './utilities/private';
37
37
  import { proceedToState } from './utilities/public';
38
- import { AstNode } from './peers/AstNode';
39
- import { Config } from './peers/Config';
40
- import { Context } from './peers/Context';
38
+ import { AstNode } from '../../arkts-api/peers/AstNode';
39
+ import { Config } from '../../arkts-api/peers/Config';
40
+ import { Context } from '../../arkts-api/peers/Context';
41
41
  import { nodeByType } from './class-by-peer';
42
42
  import { MemberExpression } from './to-be-generated/MemberExpression';
43
43
  import {
@@ -56,7 +56,6 @@ import {
56
56
  TSTypeParameterInstantiation,
57
57
  TypeNode,
58
58
  } from '../../generated';
59
- import { createCallExpression, updateCallExpression } from 'src/arkts-api/node-utilities/CallExpression';
60
59
 
61
60
  export class EtsScript extends AstNode {
62
61
  constructor(peer: KPtr) {
@@ -81,7 +80,7 @@ export class EtsScript extends AstNode {
81
80
  if (!global.configIsInitialized()) {
82
81
  global.config = Config.createDefault().peer;
83
82
  }
84
- global.compilerContext = Context.createFromString(source) as any; // TODO commonize context
83
+ global.compilerContext = Context.createFromString(source) as any; // Improve: commonize context
85
84
  proceedToState(state, global.context);
86
85
  return new EtsScript(
87
86
  global.es2panda._ProgramAst(global.context, global.es2panda._ContextProgram(global.context))
@@ -145,7 +144,7 @@ export class ExpressionStatement extends AstNode {
145
144
  }
146
145
  }
147
146
 
148
- // TODO:
147
+ // Improve:
149
148
  // the CallExpression idl Create signature doesn't include the trailing block at all.
150
149
  // Need to clarify with the compiler people if they will provide create signature with a trailing block argument.
151
150
  export class CallExpression extends Expression {
@@ -398,13 +397,13 @@ export class FunctionDeclaration extends AstNode {
398
397
  global.generatedEs2panda._CreateFunctionDeclaration(
399
398
  global.context,
400
399
  scriptFunction.peer,
401
- // TODO: support annotations
400
+ // Improve: support annotations
402
401
  arrayOfNullptr,
403
402
  0,
404
403
  isAnon
405
404
  )
406
405
  );
407
- // TODO: maybe wrong
406
+ // Improve: maybe wrong
408
407
  res.modifiers = scriptFunction.modifiers;
409
408
  if (annotations) {
410
409
  res.annotations = annotations;
@@ -423,7 +422,7 @@ export class FunctionDeclaration extends AstNode {
423
422
  global.context,
424
423
  node.peer,
425
424
  scriptFunction.peer,
426
- // TODO: support annotations
425
+ // Improve: support annotations
427
426
  passNodeArray(annotations),
428
427
  0,
429
428
  isAnon
@@ -626,7 +625,7 @@ export class StructDeclaration extends AstNode {
626
625
  constructor(peer: KPtr) {
627
626
  assertValidPeer(peer, Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION);
628
627
  super(peer);
629
- // TODO: is struct definition the same as struct definition?
628
+ // Improve: is struct definition the same as struct definition?
630
629
  this.definition = unpackNonNullableNode(
631
630
  global.generatedEs2panda._ClassDeclarationDefinition(global.context, this.peer)
632
631
  );
@@ -711,7 +710,7 @@ export class MethodDefinition extends AstNode {
711
710
  );
712
711
  }
713
712
 
714
- // TODO: does not work
713
+ // Improve: does not work
715
714
  isConstructor(): boolean {
716
715
  return global.generatedEs2panda._MethodDefinitionIsConstructorConst(global.context, this.peer);
717
716
  }
@@ -61,7 +61,7 @@ export class NativePtrDecoder extends ArrayDecoder<pointer> {
61
61
  return global.interop._GetPtrVectorSize(blob)
62
62
  }
63
63
  disposeArray(blob: pointer): void {
64
- // TODO
64
+ // Improve:
65
65
  }
66
66
  getArrayElement(blob: pointer, index: int32): pointer {
67
67
  return global.interop._GetPtrVectorElement(blob, index)
@@ -27,7 +27,7 @@ import { NativePtrDecoder } from './nativePtrDecoder';
27
27
  import { Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from '../../../generated/Es2pandaEnums';
28
28
  import { classByPeer } from '../class-by-peer';
29
29
  import type { AstNode } from '../peers/AstNode';
30
- import { ArktsObject } from '../peers/ArktsObject';
30
+ import { ArktsObject } from '../../../arkts-api/peers/ArktsObject';
31
31
  import { Es2pandaAstNodeType } from '../../../generated/Es2pandaEnums';
32
32
 
33
33
  export const arrayOfNullptr = new BigUint64Array([nullptr]);
@@ -128,8 +128,8 @@ export function scriptFunctionHasBody(peer: KNativePointer): boolean {
128
128
  );
129
129
  }
130
130
 
131
- // TODO: remove this
132
- // TODO: update scopes and other data
131
+ // Improve: remove this
132
+ // Improve: update scopes and other data
133
133
  export function updatePeerByNode<T extends AstNode>(peer: KNativePointer, original: T | undefined): KNativePointer {
134
134
  if (peer === nullptr) {
135
135
  throwError('updatePeerByNode called on NULLPTR');
@@ -150,7 +150,7 @@ export function updatePeerByNode<T extends AstNode>(peer: KNativePointer, origin
150
150
  return peer;
151
151
  }
152
152
 
153
- // TODO: update scopes and other data
153
+ // Improve: update scopes and other data
154
154
  export function updateNodeByNode<T extends AstNode>(node: T, original: AstNode): T {
155
155
  if (original.peer === nullptr) {
156
156
  throwError('update called on NULLPTR');
@@ -40,7 +40,7 @@ import {
40
40
  } from '../../../generated';
41
41
  import { Program } from '../peers/Program';
42
42
  import { clearNodeCache, nodeByType } from '../class-by-peer';
43
- import { SourcePosition } from '../peers/SourcePosition';
43
+ import { SourcePosition } from '../../../arkts-api/peers/SourcePosition';
44
44
  import { MemberExpression } from '../to-be-generated/MemberExpression';
45
45
 
46
46
  export function proceedToState(state: Es2pandaContextState, context: KNativePointer, forceDtsEmit = false): void {
@@ -166,7 +166,7 @@ export function getAnnotations(node: AstNode): readonly AnnotationUsage[] {
166
166
 
167
167
  export function getOriginalNode(node: AstNode): AstNode {
168
168
  if (node === undefined) {
169
- // TODO: fix this
169
+ // Improve: fix this
170
170
  throwError('there is no arkts pair of ts node (unable to getOriginalNode)');
171
171
  }
172
172
  if (node.originalPeer === nullptr) {
@@ -195,15 +195,15 @@ export function ImportSpecifierIsRemovableConst(node: ImportSpecifier): boolean
195
195
  return global.generatedEs2panda._ImportSpecifierIsRemovableConst(global.context, node.peer);
196
196
  }
197
197
 
198
- // TODO: It seems like Definition overrides AstNode modifiers
199
- // with it's own modifiers which is completely unrelated set of flags.
198
+ // Improve: It seems like Definition overrides AstNode modifiers
199
+ // with its own modifiers which is completely unrelated set of flags.
200
200
  // Use this function if you need
201
201
  // the language level modifiers: public, declare, export, etc.
202
202
  export function classDefinitionFlags(node: ClassDefinition): Es2pandaModifierFlags {
203
203
  return global.generatedEs2panda._AstNodeModifiers(global.context, node.peer);
204
204
  }
205
205
 
206
- // TODO: Import statements should be inserted to the statements
206
+ // Improve: Import statements should be inserted to the statements
207
207
  export function importDeclarationInsert(node: ETSImportDeclaration, program: Program): void {
208
208
  global.es2panda._InsertETSImportDeclarationAndParse(global.context, program.peer, node.peer);
209
209
  }
@@ -224,7 +224,7 @@ export function hasModifierFlag(node: AstNode, flag: Es2pandaModifierFlags): boo
224
224
  return (modifiers & flag) === flag;
225
225
  }
226
226
 
227
- // TODO: ClassProperty's optional flag is set by AstNode's modifiers flags.
227
+ // Improve: ClassProperty's optional flag is set by AstNode's modifiers flags.
228
228
  export function classPropertySetOptional(node: ClassProperty, value: boolean): ClassProperty {
229
229
  if (value) {
230
230
  node.modifiers |= Es2pandaModifierFlags.MODIFIER_FLAGS_OPTIONAL;
@@ -64,7 +64,7 @@ import { Es2pandaAstNodeType } from '../../generated/Es2pandaEnums';
64
64
 
65
65
  type Visitor = (node: AstNode) => AstNode;
66
66
 
67
- // TODO: rethink (remove as)
67
+ // Improve: rethink (remove as)
68
68
  function nodeVisitor<T extends AstNode | undefined>(node: T, visitor: Visitor): T {
69
69
  if (node === undefined) {
70
70
  return node;
@@ -72,7 +72,7 @@ function nodeVisitor<T extends AstNode | undefined>(node: T, visitor: Visitor):
72
72
  return visitor(node) as T;
73
73
  }
74
74
 
75
- // TODO: rethink (remove as)
75
+ // Improve: rethink (remove as)
76
76
  function nodesVisitor<T extends AstNode, TIn extends readonly T[] | undefined>(
77
77
  nodes: TIn,
78
78
  visitor: Visitor
@@ -97,7 +97,7 @@ export function visitEachChild(node: AstNode, visitor: Visitor): AstNode {
97
97
  script = visitInnerExpression(script, visitor);
98
98
  script = visitTrivialExpression(script, visitor);
99
99
  script = visitLiteral(script, visitor);
100
- // TODO
100
+ // Improve:
101
101
  return visitWithoutUpdate(script, visitor);
102
102
  }
103
103
 
@@ -194,7 +194,7 @@ function visitInnerExpression(node: AstNode, visitor: Visitor): AstNode {
194
194
  updated = true;
195
195
  return factory.updateProperty(node, node.key, nodeVisitor(node.value, visitor));
196
196
  }
197
- // TODO
197
+ // Improve:
198
198
  return node;
199
199
  }
200
200
 
@@ -211,7 +211,7 @@ function visitTrivialExpression(node: AstNode, visitor: Visitor): AstNode {
211
211
  node.operatorType
212
212
  );
213
213
  }
214
- // TODO
214
+ // Improve:
215
215
  return node;
216
216
  }
217
217
 
@@ -245,7 +245,7 @@ function visitDeclaration(node: AstNode, visitor: Visitor): AstNode {
245
245
  nodeVisitor(node.typeParams, visitor),
246
246
  nodeVisitor(node.body, visitor),
247
247
  node.isStatic,
248
- // TODO: how do I get it?
248
+ // Improve: how do I get it?
249
249
  true
250
250
  );
251
251
  }
@@ -258,7 +258,7 @@ function visitDeclaration(node: AstNode, visitor: Visitor): AstNode {
258
258
  nodesVisitor(node.declarators, visitor)
259
259
  );
260
260
  }
261
- // TODO
261
+ // Improve:
262
262
  return node;
263
263
  }
264
264
 
@@ -344,7 +344,7 @@ function visitStatement(node: AstNode, visitor: Visitor): AstNode {
344
344
  []
345
345
  );
346
346
  }
347
- // TODO
347
+ // Improve:
348
348
  return node;
349
349
  }
350
350
 
@@ -389,7 +389,7 @@ function visitDefinitionBody(node: AstNode, visitor: Visitor): AstNode {
389
389
  node.isComputed
390
390
  );
391
391
  }
392
- // TODO
392
+ // Improve:
393
393
  return node;
394
394
  }
395
395
 
@@ -409,7 +409,7 @@ function visitLiteral(node: AstNode, visitor: Visitor): AstNode {
409
409
  return node;
410
410
  }
411
411
 
412
- // TODO: apply this to all nodes that does not require updating
412
+ // Improve: apply this to all nodes that does not require updating
413
413
  function visitWithoutUpdate<T extends AstNode>(node: T, visitor: Visitor): T {
414
414
  if (updated) {
415
415
  return node;