@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
@@ -115,7 +115,6 @@ function replaceGensymWrappers(code: string): string {
115
115
  return code
116
116
  }
117
117
 
118
-
119
118
  function addExports(code: string): string {
120
119
  const exportAstNodes = [" enum", "let", "const", "class", "abstract class", "@Entry() @Component() final class", "@Component() final class", "interface", "@interface", "type", "enum", "final class", "function",
121
120
  "declare interface", "@memo_stable() declare interface", "@memo_stable() interface",
@@ -125,7 +124,7 @@ function addExports(code: string): string {
125
124
  code = code.replaceAll(`\n${astNodeText}`, `\nexport ${astNodeText}`)
126
125
  }
127
126
  )
128
- // TODO this is a temporary workaround and should be replaced with a proper import/export handling in future
127
+ // Improve: this is a temporary workaround and should be replaced with a proper import/export handling in future
129
128
  code = code.replaceAll(/\n(@memo\(\) @BuilderLambda\(\{value:"\w+"\}\)) function/g, '\n$1 export function')
130
129
  const fix = [
131
130
  ["export @memo() function", "@memo() export function"],
@@ -140,162 +139,12 @@ function addExports(code: string): string {
140
139
  return code.replaceAll("\nexport function main()", "\nfunction main()")
141
140
  }
142
141
 
143
- function removeAbstractFromInterfaces(code: string): string {
144
- const interfaces = [...code.matchAll(/interface([\s\S]*?){([\s\S]*?)\n}\n/g)].map(it => it[0])
145
- interfaces.forEach((content) => {
146
- const newContent = content.replaceAll('abstract ', '')
147
- code = code.replaceAll(content, newContent)
148
- })
149
- return code
150
- }
151
-
152
- function removeInvalidLambdaTyping(code: string): string {
153
- const knownTypes = ['boolean', 'int64', 'void']
154
- return code.replaceAll(/\(([^\n\(\)]*?)\): ([\S]*?) => {/g, (match, p1, p2) => {
155
- if (knownTypes.includes(p2)) {
156
- return match
157
- }
158
- return `(${p1}) => {`
159
- })
160
- }
161
-
162
- function returnOptionalParams(code: string): string {
163
- const reduce = (line: string): string => {
164
- if (line.includes("constructor")) {
165
- return line
166
- }
167
- for (var i = 0; i < line.length; i++) {
168
- if (line[i] == '(') {
169
- let ignore = false
170
- for (var k = i; k >= 0; k--) {
171
- if (line[k].match(/[a-zA-Z<>_0-9]/)) {
172
- break
173
- }
174
- if (line[k] == ':') {
175
- ignore = true
176
- }
177
- }
178
- if (ignore) {
179
- continue
180
- }
181
- const initi = i
182
- let j = i + 1, depth = 1
183
- let parts: string[] = []
184
- while (j < line.length) {
185
- if (line[j] == '(') {
186
- depth++
187
- }
188
- if (line[j] == ')') {
189
- depth--
190
- if (depth == 0) {
191
- parts.push(line.substring(i + 1, j))
192
- break
193
- }
194
- }
195
- if (line[j] == ',' && depth == 1) {
196
- parts.push(line.substring(i + 1, j))
197
- i = j + 1
198
- }
199
- j++
200
- }
201
- if (depth == 0 && parts.length && parts.every(it => it.includes(": ") && !it.includes("? "))) {
202
- let k = parts.length - 1
203
- while (k >= 0) {
204
- if (parts[k].endsWith(" | undefined")) {
205
- let w = parts[k].substring(0, parts[k].length - " | undefined".length)
206
- let i = w.indexOf(':')
207
- if (w[i - 1] != '?') {
208
- parts[k] = w.substring(0, i) + "?" + w.substring(i)
209
- }
210
- } else {
211
- break
212
- }
213
- k--
214
- }
215
- if (k != parts.length - 1) {
216
- let nline = line.substring(0, initi + 1) + parts.join(', ') + line.substring(j)
217
- return nline
218
- }
219
- }
220
- i = initi
221
- }
222
- }
223
- return line
224
- }
225
- return code.split('\n').map((line) => {
226
- let nline = reduce(line)
227
- while (nline != line) {
228
- line = nline
229
- nline = reduce(line)
230
- }
231
- return line
232
- }).join('\n')
233
- }
234
-
235
- function fixPropertyLines(code: string): string {
236
- /*
237
-
238
- for some properties the following construction is generated:
239
-
240
- private readonly <property>name = false;
241
-
242
- public name(<property>name) { // for readonly properties "setter" is also generated
243
- (this).<property>name = <property>name = false; // sometimes there is a typing here
244
- return;
245
- }
246
-
247
- public name() {
248
- return (this).<property>name;
249
- }
250
-
251
- this function wraps this back to `readonly name = false;`
252
-
253
- */
254
- return code.replaceAll(/(private|public)(.*)?<property>(.*?)\n((.*?)\n){9}/g, (match, p1, p2, p3) => {
255
- return `public ${p2} ${p3}`
256
- })
257
- }
258
-
259
- function fixDuplicateSettersInInterfaces(code: string): string {
260
- /*
261
-
262
- sometimes interfaces contains duplicate setters, this functions fixes it
263
-
264
- */
265
- code = code.replaceAll(/\n[ ]*(.*)interface(.*){\n([\s\S]*?)\n[ ]*}\n/g, (match, modifiers, p1, p2: string) => {
266
- const keep = p2.split('\n').filter((it) => !it.trimStart().startsWith(`set`))
267
- const setters = [...new Set(p2.split('\n').filter((it) => it.trimStart().startsWith(`set`)))]
268
- return `\n${modifiers}interface${p1}{\n${keep.join('\n')}\n${setters.join('\n')}\n}\n`
269
- })
270
- return code
271
- }
272
-
273
142
  function excludePartialInterfaces(code: string): string {
274
143
  return code
275
144
  .replaceAll(/export interface (.*)\$partial<>([\s\S]*?)}/g, '')
276
145
  .replaceAll(/interface (.*)\$partial<>([\s\S]*?)}/g, '')
277
146
  }
278
147
 
279
- function fixNamespace(code: string) {
280
- /*
281
- namespaces become abstract classes, and enums become final classes
282
- enum in namespace -> class in class -> not supported
283
-
284
- we have only one such place, so fix manually
285
- */
286
- code = code.replaceAll(/export (declare )?abstract class (Profiler|GestureControl|text|common2D|common|observer|unifiedDataChannel|uniformTypeDescriptor|drawing|uiEffect|intl|matrix4|image|pointer|promptAction|webview|window) {/g, `export $1 namespace $2 {`)
287
- code = code.replaceAll(`public static _$init$_() {}`, ``)
288
- code = code.replaceAll(`public static _$init$_(): void {}`, ``)
289
- code = code.replaceAll(/.*_\$initializerBlockInit\$_.*/g, ``)
290
- code = code.replaceAll(/public static ((?:un)?registerVsyncCallback)/g, "export function $1")
291
- code = code.replaceAll(/public static (setCursor)/g, "export function $1")
292
- code = code.replaceAll(/public static (restoreDefault)/g, "export function $1")
293
- code = code.replaceAll(/public static (requestFocus\(value)/g, "export function $1")
294
- code = code.replaceAll(/public static (getSystemFontFullNamesByType|getFontDescriptorByFullName|matchFontDescriptors|createEffect|createBrightnessBlender)/g, "export function $1")
295
- code = code.replaceAll('\n type Blender =', '\n export type Blender = ')
296
- return code
297
- }
298
-
299
148
  function fixEnums(code: string) {
300
149
  const lines = code.split('\n')
301
150
  const enums = []
@@ -334,8 +183,18 @@ function fixEnums(code: string) {
334
183
  return code
335
184
  }
336
185
 
186
+ function fixEmptyDeclareNamespace(code: string): string {
187
+ const lines = code.split('\n')
188
+ for (let i = 0; i < lines.length; i++) {
189
+ if (lines[i].startsWith('export declare namespace') && !lines[i].endsWith('{')) {
190
+ lines[i] += ' {}'
191
+ }
192
+ }
193
+ return lines.join('\n')
194
+ }
195
+
337
196
  /*
338
- TODO:
197
+ Improve:
339
198
  The lowerings insert %% and other special symbols into names of temporary variables.
340
199
  Until we keep feeding ast dumps back to the parser this function is needed.
341
200
  */
@@ -344,10 +203,8 @@ export function filterSource(text: string): string {
344
203
  // console.error(text.split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n'))
345
204
  const dumperUnwrappers = [
346
205
  addExports,
347
- fixNamespace,
206
+ fixEmptyDeclareNamespace,
348
207
  fixEnums,
349
- fixDuplicateSettersInInterfaces,
350
- removeAbstractFromInterfaces,
351
208
  replaceGensymWrappers, // nested
352
209
  replaceGensymWrappers, // nested
353
210
  replaceGensymWrappers,
@@ -356,9 +213,6 @@ export function filterSource(text: string): string {
356
213
  excludePartialInterfaces,
357
214
  (code: string) => code.replaceAll("<cctor>", "_cctor_"),
358
215
  (code: string) => code.replaceAll("public constructor() {}", ""),
359
- (code: string) => code.replaceAll("@Module()", ""),
360
- (code: string) => code.replaceAll("export * as from", "export * from"),
361
- fixPropertyLines
362
216
  ]
363
217
  // console.error("====")
364
218
  // console.error(dumperUnwrappers.reduceRight((code, f) => f(code), text).split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n'))
@@ -14,3 +14,7 @@ For each file in the `./arkts-api`:
14
14
  3. Add a reexport to the `./arkts-api/index.ts`
15
15
 
16
16
  Once all the sources are be removed we can drop this compatibility layer at all
17
+
18
+ ## Deprecated APIs
19
+ - Context.createCacheContextFromFile — Use Context.createCacheFromFile
20
+ - Context.destroyAndRecreate
@@ -73,16 +73,15 @@ export * from "./factory/nodeTests"
73
73
  export * from "./visitor"
74
74
  export * from "./peers/AstNode"
75
75
 
76
- export * from "./peers/Config"
77
- export * from "./peers/Context"
76
+ export * from "../../arkts-api/peers/Config"
77
+ export * from "../../arkts-api/peers/Context"
78
78
  export * from "./peers/Program"
79
79
  export * from "./peers/ImportPathManager"
80
- export * from "./peers/SourcePosition"
80
+ export * from "../../arkts-api/peers/SourcePosition"
81
81
  export * from "./peers/SourceRange"
82
82
  export * from "./peers/Diagnostic"
83
83
  export * from "./peers/DiagnosticInfo"
84
84
  export * from "./peers/DiagnosticKind"
85
85
  export * from "./peers/SuggestionInfo"
86
86
  export * from "./to-be-generated/MemberExpression"
87
- export * from "./static/globalUtils"
88
87
  export { global as arktsGlobal } from "./static/global"
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ArrayExpression, Expression } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateArrayExpression(original: ArrayExpression, elements: readonly Expression[]): ArrayExpression {
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ScriptFunction } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { ArrowFunctionExpression } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { isSameNativeObject } from '../peers/ArktsObject';
16
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { AstNode } from '../peers/AstNode';
18
18
  import { AssignmentExpression } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { BlockStatement, Statement } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateBlockStatement(original: BlockStatement, statementList: readonly Statement[]): BlockStatement {
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { TypeNode } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { CallExpression } from '../types';
20
20
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ClassDeclaration, ClassDefinition } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateClassDeclaration(original: ClassDeclaration, def?: ClassDefinition): ClassDeclaration {
@@ -21,7 +21,7 @@ import {
21
21
  TSTypeParameterDeclaration,
22
22
  TSTypeParameterInstantiation,
23
23
  } from '../../../generated';
24
- import { isSameNativeObject } from '../peers/ArktsObject';
24
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
25
25
  import { AstNode } from '../peers/AstNode';
26
26
  import { MethodDefinition } from '../types';
27
27
  import { updateThenAttach } from '../utilities/private';
@@ -49,7 +49,7 @@ export function updateClassDefinition(
49
49
  isSameNativeObject(body, original.body) &&
50
50
  isSameNativeObject(modifiers, original.modifiers) &&
51
51
  isSameNativeObject(flags, classDefinitionFlags(original))
52
- /* TODO: no getter for ctor */
52
+ /* Improve: no getter for ctor */
53
53
  ) {
54
54
  return original;
55
55
  }
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ClassProperty, Expression, TypeNode } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { updateThenAttach } from '../utilities/private';
19
19
  import { classPropertySetOptional, hasModifierFlag } from '../utilities/public';
20
20
  import { Es2pandaModifierFlags } from '../../../generated/Es2pandaEnums';
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ETSFunctionType, FunctionSignature } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
  import { Es2pandaScriptFunctionFlags } from '../../../generated/Es2pandaEnums';
20
20
 
@@ -28,7 +28,7 @@ export function updateETSFunctionType(
28
28
  isSameNativeObject(signature?.returnType, original.returnType) &&
29
29
  isSameNativeObject(signature?.params, original.params) &&
30
30
  isSameNativeObject(funcFlags, original.flags)
31
- /* TODO: no getter for signature's hasReceiver */
31
+ /* Improve: no getter for signature's hasReceiver */
32
32
  ) {
33
33
  return original;
34
34
  }
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ETSImportDeclaration, StringLiteral } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
  import { Es2pandaImportKinds } from '../../../generated/Es2pandaEnums';
@@ -30,7 +30,7 @@ export function updateETSImportDeclaration(
30
30
  isSameNativeObject(specifiers, original.specifiers) &&
31
31
  isSameNativeObject(importKind, Number(original.isTypeKind))
32
32
  ) {
33
- /* TODO: probably should set importMetadata, but no getter provided yet */
33
+ /* Improve: probably should set importMetadata, but no getter provided yet */
34
34
  return original;
35
35
  }
36
36
 
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { Identifier } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { ETSParameterExpression } from '../types';
20
20
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -26,7 +26,7 @@ export function updateETSParameterExpression(
26
26
  ): ETSParameterExpression {
27
27
  if (
28
28
  isSameNativeObject(identifier, original.identifier) &&
29
- !initializer // TODO: get this from ETSParameterExpression
29
+ !initializer // Improve: get this from ETSParameterExpression
30
30
  ) {
31
31
  return original;
32
32
  }
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { isSameNativeObject } from '../peers/ArktsObject';
16
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { AstNode } from '../peers/AstNode';
18
18
  import { ExpressionStatement } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -15,7 +15,7 @@
15
15
 
16
16
  import { AnnotationUsage, ScriptFunction } from '../../../generated';
17
17
  import { FunctionDeclaration } from '../types';
18
- import { isSameNativeObject } from '../peers/ArktsObject';
18
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
21
21
  export function updateFunctionDeclaration(
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ScriptFunction } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { FunctionExpression } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { isSameNativeObject } from '../peers/ArktsObject';
16
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { AstNode } from '../peers/AstNode';
18
18
  import { IfStatement } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { isSameNativeObject } from '../peers/ArktsObject';
16
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
17
17
  import { AstNode } from '../peers/AstNode';
18
18
  import { MemberExpression } from '../to-be-generated/MemberExpression';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { KInt } from '@koalaui/interop';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { MethodDefinition } from '../types';
20
20
  import { updateThenAttach } from '../utilities/private';
@@ -34,7 +34,7 @@ export function updateMethodDefinition(
34
34
  isSameNativeObject(key, original.name) &&
35
35
  isSameNativeObject(value, original.scriptFunction) &&
36
36
  isSameNativeObject(modifiers, original.modifiers)
37
- /* TODO: no getter for isComputed */
37
+ /* Improve: no getter for isComputed */
38
38
  ) {
39
39
  return original;
40
40
  }
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { NumberLiteral } from '../types';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, compose, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateNumberLiteral(original: NumberLiteral, value: number): NumberLiteral {
@@ -23,7 +23,7 @@ export function updateNumberLiteral(original: NumberLiteral, value: number): Num
23
23
  }
24
24
 
25
25
  const update = updateThenAttach(
26
- compose(NumberLiteral.create), // TODO: No UpdateNumberLiteral, need to change this
26
+ compose(NumberLiteral.create), // Improve: No UpdateNumberLiteral, need to change this
27
27
  attachModifiers
28
28
  );
29
29
  return update(original, value);
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ObjectExpression, Property } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
  import { Es2pandaAstNodeType } from '../../../generated/Es2pandaEnums';
20
20
 
@@ -26,8 +26,8 @@ export function updateObjectExpression(
26
26
  ): ObjectExpression {
27
27
  if (
28
28
  isSameNativeObject(properties, original.properties)
29
- /* TODO: no getter for nodeType */
30
- /* TODO: no getter for trailingComma */
29
+ /* Improve: no getter for nodeType */
30
+ /* Improve: no getter for trailingComma */
31
31
  ) {
32
32
  return original;
33
33
  }
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { Expression, Property } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateProperty(original: Property, key?: Expression, value?: Expression): Property {
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { FunctionSignature, ScriptFunction } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { updateThenAttach } from '../utilities/private';
20
20
 
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { ClassDefinition } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { StructDeclaration } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { TSInterfaceDeclaration, TSInterfaceHeritage } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { AstNode } from '../peers/AstNode';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { Identifier, TSTypeAliasDeclaration, TSTypeParameterDeclaration, TypeNode } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateTSTypeAliasDeclaration(
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { Identifier, TSTypeParameter, TypeNode } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { attachModifiers, updateThenAttach } from '../utilities/private';
19
19
 
20
20
  export function updateTSTypeParameter(
@@ -15,7 +15,7 @@
15
15
 
16
16
  import { LabelPair } from '../../../generated/peers/LabelPair';
17
17
  import { BlockStatement, CatchClause, Statement, TryStatement } from '../../../generated';
18
- import { isSameNativeObject } from '../peers/ArktsObject';
18
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
 
21
21
  export function updateTryStatement(
@@ -30,8 +30,8 @@ export function updateTryStatement(
30
30
  isSameNativeObject(block, original.block) &&
31
31
  isSameNativeObject(catchClauses, original.catchClauses) &&
32
32
  isSameNativeObject(finalizer, original.finallyBlock)
33
- /* TODO: no getter for finalizerInsertionsLabelPair */
34
- /* TODO: no getter for finalizerInsertionsStatement */
33
+ /* Improve: no getter for finalizerInsertionsLabelPair */
34
+ /* Improve: no getter for finalizerInsertionsStatement */
35
35
  ) {
36
36
  return original;
37
37
  }
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { KInt } from '@koalaui/interop';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { VariableDeclaration, VariableDeclarator } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
  import { Es2pandaVariableDeclarationKind } from '../../../generated/Es2pandaEnums';
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { Identifier } from '../../../generated';
17
- import { isSameNativeObject } from '../peers/ArktsObject';
17
+ import { isSameNativeObject } from '../../../arkts-api/peers/ArktsObject';
18
18
  import { VariableDeclarator } from '../types';
19
19
  import { attachModifiers, updateThenAttach } from '../utilities/private';
20
20
  import { Es2pandaVariableDeclaratorFlag } from '../../../generated/Es2pandaEnums';
@@ -29,7 +29,7 @@ export function updateVariableDeclarator(
29
29
  if (
30
30
  isSameNativeObject(name, original.name) &&
31
31
  isSameNativeObject(initializer, original.initializer)
32
- /* TODO: no getter for flag */
32
+ /* Improve: no getter for flag */
33
33
  ) {
34
34
  return original;
35
35
  }
@@ -13,12 +13,12 @@
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';
20
20
  import { passStringArray } from '../utilities/private';
21
- import { SourcePosition } from './SourcePosition';
21
+ import { SourcePosition } from '../../../arkts-api/peers/SourcePosition';
22
22
  import { SourceRange } from './SourceRange';
23
23
  import { DiagnosticInfo } from './DiagnosticInfo';
24
24
  import { SuggestionInfo } from './SuggestionInfo';