typia 15.1.0 → 15.2.0

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 (295) hide show
  1. package/lib/TypeGuardError.js.map +1 -1
  2. package/lib/basic.js.map +1 -1
  3. package/lib/compare.js.map +1 -1
  4. package/lib/functional.js.map +1 -1
  5. package/lib/http.js.map +1 -1
  6. package/lib/index.js.map +1 -1
  7. package/lib/internal/_IProtobufWriter.js.map +1 -1
  8. package/lib/internal/_ProtobufReader.js.map +1 -1
  9. package/lib/internal/_ProtobufSizer.js.map +1 -1
  10. package/lib/internal/_ProtobufWriter.js.map +1 -1
  11. package/lib/internal/_accessExpressionAsString.js.map +1 -1
  12. package/lib/internal/_assertGuard.js.map +1 -1
  13. package/lib/internal/_coerceLlmArguments.js.map +1 -1
  14. package/lib/internal/_createLlmEvaluation.js.map +1 -1
  15. package/lib/internal/_createStandardSchema.js.map +1 -1
  16. package/lib/internal/_decimal.js.map +1 -1
  17. package/lib/internal/_functionalTypeGuardErrorFactory.js.map +1 -1
  18. package/lib/internal/_httpFormDataReadArray.js.map +1 -1
  19. package/lib/internal/_httpFormDataReadBigint.js.map +1 -1
  20. package/lib/internal/_httpFormDataReadBlob.js.map +1 -1
  21. package/lib/internal/_httpFormDataReadBoolean.js.map +1 -1
  22. package/lib/internal/_httpFormDataReadFile.js.map +1 -1
  23. package/lib/internal/_httpFormDataReadNumber.js.map +1 -1
  24. package/lib/internal/_httpFormDataReadString.js.map +1 -1
  25. package/lib/internal/_httpHeaderReadBigint.js.map +1 -1
  26. package/lib/internal/_httpHeaderReadBoolean.js.map +1 -1
  27. package/lib/internal/_httpHeaderReadNumber.js.map +1 -1
  28. package/lib/internal/_httpParameterReadBigint.js.map +1 -1
  29. package/lib/internal/_httpParameterReadBoolean.js.map +1 -1
  30. package/lib/internal/_httpParameterReadNumber.js.map +1 -1
  31. package/lib/internal/_httpParameterReadString.js.map +1 -1
  32. package/lib/internal/_httpQueryParseURLSearchParams.js.map +1 -1
  33. package/lib/internal/_httpQueryReadArray.js.map +1 -1
  34. package/lib/internal/_httpQueryReadBigint.js.map +1 -1
  35. package/lib/internal/_httpQueryReadBoolean.js.map +1 -1
  36. package/lib/internal/_httpQueryReadNumber.js.map +1 -1
  37. package/lib/internal/_httpQueryReadString.js.map +1 -1
  38. package/lib/internal/_isBetween.js.map +1 -1
  39. package/lib/internal/_isBigintString.js.map +1 -1
  40. package/lib/internal/_isFormatByte.js.map +1 -1
  41. package/lib/internal/_isFormatDate.js.map +1 -1
  42. package/lib/internal/_isFormatDateTime.js.map +1 -1
  43. package/lib/internal/_isFormatDuration.js.map +1 -1
  44. package/lib/internal/_isFormatEmail.js.map +1 -1
  45. package/lib/internal/_isFormatHostname.js.map +1 -1
  46. package/lib/internal/_isFormatIdnEmail.js.map +1 -1
  47. package/lib/internal/_isFormatIdnHostname.js.map +1 -1
  48. package/lib/internal/_isFormatIpv4.js.map +1 -1
  49. package/lib/internal/_isFormatIpv6.js.map +1 -1
  50. package/lib/internal/_isFormatIri.js.map +1 -1
  51. package/lib/internal/_isFormatIriReference.js.map +1 -1
  52. package/lib/internal/_isFormatJsonPointer.js.map +1 -1
  53. package/lib/internal/_isFormatPassword.js.map +1 -1
  54. package/lib/internal/_isFormatRegex.js.map +1 -1
  55. package/lib/internal/_isFormatRelativeJsonPointer.js.map +1 -1
  56. package/lib/internal/_isFormatTime.js.map +1 -1
  57. package/lib/internal/_isFormatUri.js.map +1 -1
  58. package/lib/internal/_isFormatUriReference.js.map +1 -1
  59. package/lib/internal/_isFormatUriTemplate.js.map +1 -1
  60. package/lib/internal/_isFormatUrl.js.map +1 -1
  61. package/lib/internal/_isFormatUuid.js.map +1 -1
  62. package/lib/internal/_isMultipleOf.js.map +1 -1
  63. package/lib/internal/_isTypeFloat.js.map +1 -1
  64. package/lib/internal/_isTypeInt16.js.map +1 -1
  65. package/lib/internal/_isTypeInt32.js.map +1 -1
  66. package/lib/internal/_isTypeInt64.js.map +1 -1
  67. package/lib/internal/_isTypeInt64Bigint.js.map +1 -1
  68. package/lib/internal/_isTypeInt8.js.map +1 -1
  69. package/lib/internal/_isTypeUint16.js.map +1 -1
  70. package/lib/internal/_isTypeUint32.js.map +1 -1
  71. package/lib/internal/_isTypeUint64.js.map +1 -1
  72. package/lib/internal/_isTypeUint64Bigint.js.map +1 -1
  73. package/lib/internal/_isTypeUint8.js.map +1 -1
  74. package/lib/internal/_isUniqueItems.js.map +1 -1
  75. package/lib/internal/_jsonStringifyArray.js.map +1 -1
  76. package/lib/internal/_jsonStringifyElement.js.map +1 -1
  77. package/lib/internal/_jsonStringifyNumber.js.map +1 -1
  78. package/lib/internal/_jsonStringifyProperty.js.map +1 -1
  79. package/lib/internal/_jsonStringifyRest.js.map +1 -1
  80. package/lib/internal/_jsonStringifyString.js.map +1 -1
  81. package/lib/internal/_jsonStringifyTail.js.map +1 -1
  82. package/lib/internal/_llmApplicationFinalize.js +8 -1
  83. package/lib/internal/_llmApplicationFinalize.js.map +1 -1
  84. package/lib/internal/_notationAny.js.map +1 -1
  85. package/lib/internal/_notationAssign.js.map +1 -1
  86. package/lib/internal/_notationCamel.js.map +1 -1
  87. package/lib/internal/_notationKebab.js.map +1 -1
  88. package/lib/internal/_notationKeyCollision.js.map +1 -1
  89. package/lib/internal/_notationPascal.js.map +1 -1
  90. package/lib/internal/_notationSnake.js.map +1 -1
  91. package/lib/internal/_parseLlmArguments.js.map +1 -1
  92. package/lib/internal/_plainCloneAny.js.map +1 -1
  93. package/lib/internal/_randomArray.js.map +1 -1
  94. package/lib/internal/_randomBigint.js.map +1 -1
  95. package/lib/internal/_randomBoolean.js.map +1 -1
  96. package/lib/internal/_randomFormatByte.js.map +1 -1
  97. package/lib/internal/_randomFormatDate.js.map +1 -1
  98. package/lib/internal/_randomFormatDatetime.js.map +1 -1
  99. package/lib/internal/_randomFormatDuration.js.map +1 -1
  100. package/lib/internal/_randomFormatEmail.js.map +1 -1
  101. package/lib/internal/_randomFormatHostname.js.map +1 -1
  102. package/lib/internal/_randomFormatIdnEmail.js.map +1 -1
  103. package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
  104. package/lib/internal/_randomFormatIpv4.js.map +1 -1
  105. package/lib/internal/_randomFormatIpv6.js.map +1 -1
  106. package/lib/internal/_randomFormatIri.js.map +1 -1
  107. package/lib/internal/_randomFormatIriReference.js.map +1 -1
  108. package/lib/internal/_randomFormatJsonPointer.js.map +1 -1
  109. package/lib/internal/_randomFormatPassword.js.map +1 -1
  110. package/lib/internal/_randomFormatRegex.js.map +1 -1
  111. package/lib/internal/_randomFormatRelativeJsonPointer.js.map +1 -1
  112. package/lib/internal/_randomFormatTime.js.map +1 -1
  113. package/lib/internal/_randomFormatUri.js.map +1 -1
  114. package/lib/internal/_randomFormatUriReference.js.map +1 -1
  115. package/lib/internal/_randomFormatUriTemplate.js.map +1 -1
  116. package/lib/internal/_randomFormatUrl.js.map +1 -1
  117. package/lib/internal/_randomFormatUuid.js.map +1 -1
  118. package/lib/internal/_randomInteger.js.map +1 -1
  119. package/lib/internal/_randomMultiple.js.map +1 -1
  120. package/lib/internal/_randomNumber.js.map +1 -1
  121. package/lib/internal/_randomPattern.js.map +1 -1
  122. package/lib/internal/_randomPick.js.map +1 -1
  123. package/lib/internal/_randomString.js.map +1 -1
  124. package/lib/internal/_randomStringLength.js.map +1 -1
  125. package/lib/internal/_stringLength.js.map +1 -1
  126. package/lib/internal/_stringLengthGte.js.map +1 -1
  127. package/lib/internal/_stringLengthLte.js.map +1 -1
  128. package/lib/internal/_throwTypeGuardError.js.map +1 -1
  129. package/lib/internal/_validateReport.js.map +1 -1
  130. package/lib/internal/private/__notationRename.js.map +1 -1
  131. package/lib/internal/private/__randomComposition.js.map +1 -1
  132. package/lib/internal/private/__randomEpoch.js.map +1 -1
  133. package/lib/json.js.map +1 -1
  134. package/lib/llm.js.map +1 -1
  135. package/lib/module.js.map +1 -1
  136. package/lib/notations.js.map +1 -1
  137. package/lib/plain.js.map +1 -1
  138. package/lib/protobuf.js.map +1 -1
  139. package/lib/re-exports.js.map +1 -1
  140. package/lib/reflect.js.map +1 -1
  141. package/lib/transform.d.ts +5 -2
  142. package/lib/transform.js +6 -2
  143. package/lib/transform.js.map +1 -1
  144. package/lib/transform.mjs +7 -3
  145. package/lib/transform.mjs.map +1 -1
  146. package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
  147. package/native/cmd/ttsc-typia/build.go +3 -1
  148. package/native/cmd/ttsc-typia/content_mapper_transform_ts71_test.go +102 -0
  149. package/native/cmd/ttsc-typia/diagnostics.go +1 -1
  150. package/native/cmd/ttsc-typia/distinct_programs_concurrent_emit_test.go +167 -0
  151. package/native/cmd/ttsc-typia/exact_optional_family_emission_contract_test.go +2 -1
  152. package/native/cmd/ttsc-typia/project_dependencies_heritage_forms_transform_test.go +84 -0
  153. package/native/cmd/ttsc-typia/schema_literal_helpers_test.go +2 -1
  154. package/native/cmd/ttsc-typia/transform.go +7 -6
  155. package/native/core/context/EmitFactory.go +20 -29
  156. package/native/core/context/ImportProgrammer.go +5 -7
  157. package/native/core/context/NodeFactory.go +25 -0
  158. package/native/core/context/node_factory_ownership_test.go +45 -0
  159. package/native/core/factories/ExpressionFactory.go +13 -14
  160. package/native/core/factories/IdentifierFactory.go +3 -5
  161. package/native/core/factories/LiteralFactory.go +6 -8
  162. package/native/core/factories/NumericRangeFactory.go +8 -10
  163. package/native/core/factories/StatementFactory.go +5 -7
  164. package/native/core/factories/TemplateFactory.go +1 -3
  165. package/native/core/factories/TypeFactory.go +7 -9
  166. package/native/core/factories/ValueFactory.go +5 -7
  167. package/native/core/factories/factory_utility_coverage_test.go +21 -20
  168. package/native/core/factories/internal/metadata/MetadataHelper.go +13 -13
  169. package/native/core/factories/internal/metadata/comment_tags_coverage_test.go +7 -16
  170. package/native/core/factories/internal/metadata/emplace_metadata_object.go +36 -27
  171. package/native/core/factories/internal/metadata/iterate_metadata_alias.go +2 -2
  172. package/native/core/factories/internal/metadata/iterate_metadata_constant.go +4 -4
  173. package/native/core/factories/internal/metadata/iterate_metadata_function.go +2 -2
  174. package/native/core/factories/internal/metadata/iterate_metadata_intersection.go +11 -11
  175. package/native/core/factories/internal/metadata/js_doc_link_text_test.go +6 -16
  176. package/native/core/factories/internal/metadata/js_doc_parameter_name_reads_qualified_name_test.go +2 -1
  177. package/native/core/factories/internal/metadata/js_doc_source_helpers_test.go +44 -0
  178. package/native/core/factories/internal/metadata/js_doc_type_tag_blank_separation_test.go +16 -22
  179. package/native/core/factories/numeric_range_factory_enforces_64bit_bounds_test.go +2 -1
  180. package/native/core/programmers/AssertProgrammer.go +16 -18
  181. package/native/core/programmers/IsProgrammer.go +10 -12
  182. package/native/core/programmers/RandomProgrammer.go +29 -31
  183. package/native/core/programmers/ValidateProgrammer.go +20 -22
  184. package/native/core/programmers/compare/CompareEqualProgrammer.go +1 -3
  185. package/native/core/programmers/compare/CompareLessProgrammer.go +1 -3
  186. package/native/core/programmers/functional/FunctionalAssertFunctionProgrammer.go +3 -5
  187. package/native/core/programmers/functional/FunctionalAssertParametersProgrammer.go +2 -2
  188. package/native/core/programmers/functional/FunctionalAssertReturnProgrammer.go +2 -2
  189. package/native/core/programmers/functional/FunctionalIsFunctionProgrammer.go +2 -2
  190. package/native/core/programmers/functional/FunctionalIsParametersProgrammer.go +8 -10
  191. package/native/core/programmers/functional/FunctionalIsReturnProgrammer.go +2 -2
  192. package/native/core/programmers/functional/FunctionalValidateFunctionProgrammer.go +4 -6
  193. package/native/core/programmers/functional/FunctionalValidateParametersProgrammer.go +2 -2
  194. package/native/core/programmers/functional/FunctionalValidateReturnProgrammer.go +2 -2
  195. package/native/core/programmers/helpers/ClassifyJoiner.go +1 -3
  196. package/native/core/programmers/helpers/CloneJoiner.go +8 -14
  197. package/native/core/programmers/helpers/FunctionProgrammer.go +3 -5
  198. package/native/core/programmers/helpers/NotationJoiner.go +6 -12
  199. package/native/core/programmers/helpers/PruneJoiner.go +10 -12
  200. package/native/core/programmers/helpers/RandomJoiner.go +5 -7
  201. package/native/core/programmers/helpers/StringifyJoinder.go +15 -17
  202. package/native/core/programmers/helpers/UnionExplorer.go +24 -26
  203. package/native/core/programmers/http/HttpAssertFormDataProgrammer.go +2 -4
  204. package/native/core/programmers/http/HttpAssertHeadersProgrammer.go +1 -1
  205. package/native/core/programmers/http/HttpAssertQueryProgrammer.go +1 -1
  206. package/native/core/programmers/http/HttpFormDataProgrammer.go +9 -11
  207. package/native/core/programmers/http/HttpHeadersProgrammer.go +7 -9
  208. package/native/core/programmers/http/HttpIsFormDataProgrammer.go +2 -4
  209. package/native/core/programmers/http/HttpIsHeadersProgrammer.go +1 -1
  210. package/native/core/programmers/http/HttpIsQueryProgrammer.go +1 -1
  211. package/native/core/programmers/http/HttpParameterProgrammer.go +2 -4
  212. package/native/core/programmers/http/HttpQueryProgrammer.go +8 -10
  213. package/native/core/programmers/http/HttpValidateFormDataProgrammer.go +2 -4
  214. package/native/core/programmers/http/HttpValidateHeadersProgrammer.go +1 -1
  215. package/native/core/programmers/http/HttpValidateQueryProgrammer.go +1 -1
  216. package/native/core/programmers/internal/CheckerProgrammer.go +26 -28
  217. package/native/core/programmers/internal/FeatureProgrammer.go +32 -34
  218. package/native/core/programmers/iterate/check_array_length.go +1 -1
  219. package/native/core/programmers/iterate/check_bigint.go +2 -4
  220. package/native/core/programmers/iterate/check_dynamic_key.go +5 -7
  221. package/native/core/programmers/iterate/check_dynamic_properties.go +43 -57
  222. package/native/core/programmers/iterate/check_everything.go +3 -5
  223. package/native/core/programmers/iterate/check_exclude.go +2 -4
  224. package/native/core/programmers/iterate/check_native.go +2 -4
  225. package/native/core/programmers/iterate/check_number.go +2 -4
  226. package/native/core/programmers/iterate/check_object.go +3 -5
  227. package/native/core/programmers/iterate/check_object_type_tags.go +1 -1
  228. package/native/core/programmers/iterate/check_string.go +2 -4
  229. package/native/core/programmers/iterate/check_template.go +7 -9
  230. package/native/core/programmers/iterate/decode_union_object.go +2 -4
  231. package/native/core/programmers/iterate/feature_object_entries.go +2 -4
  232. package/native/core/programmers/json/JsonAssertParseProgrammer.go +2 -2
  233. package/native/core/programmers/json/JsonAssertStringifyProgrammer.go +2 -4
  234. package/native/core/programmers/json/JsonIsParseProgrammer.go +4 -6
  235. package/native/core/programmers/json/JsonIsStringifyProgrammer.go +2 -4
  236. package/native/core/programmers/json/JsonStringifyProgrammer.go +37 -39
  237. package/native/core/programmers/json/JsonValidateParseProgrammer.go +2 -2
  238. package/native/core/programmers/json/JsonValidateStringifyProgrammer.go +2 -4
  239. package/native/core/programmers/llm/LlmApplicationProgrammer.go +1 -3
  240. package/native/core/programmers/llm/LlmCoerceProgrammer.go +2 -4
  241. package/native/core/programmers/llm/LlmControllerProgrammer.go +1 -3
  242. package/native/core/programmers/llm/LlmEvaluationProgrammer.go +1 -3
  243. package/native/core/programmers/llm/LlmParametersProgrammer.go +1 -3
  244. package/native/core/programmers/llm/LlmParseProgrammer.go +3 -5
  245. package/native/core/programmers/llm/LlmSchemaProgrammer.go +5 -7
  246. package/native/core/programmers/llm/LlmStructuredOutputProgrammer.go +2 -4
  247. package/native/core/programmers/llm/llm_schema_programmer_coverage_test.go +1 -1
  248. package/native/core/programmers/notations/NotationAssertGeneralProgrammer.go +1 -3
  249. package/native/core/programmers/notations/NotationGeneralProgrammer.go +26 -28
  250. package/native/core/programmers/notations/NotationIsGeneralProgrammer.go +1 -3
  251. package/native/core/programmers/notations/NotationValidateGeneralProgrammer.go +1 -3
  252. package/native/core/programmers/plain/PlainAssertClassifyProgrammer.go +2 -4
  253. package/native/core/programmers/plain/PlainAssertCloneProgrammer.go +2 -4
  254. package/native/core/programmers/plain/PlainAssertPruneProgrammer.go +2 -4
  255. package/native/core/programmers/plain/PlainClassifyProgrammer.go +44 -46
  256. package/native/core/programmers/plain/PlainCloneProgrammer.go +30 -32
  257. package/native/core/programmers/plain/PlainIsCloneProgrammer.go +2 -4
  258. package/native/core/programmers/plain/PlainIsPruneProgrammer.go +2 -4
  259. package/native/core/programmers/plain/PlainPruneProgrammer.go +26 -28
  260. package/native/core/programmers/plain/PlainValidateClassifyProgrammer.go +2 -4
  261. package/native/core/programmers/plain/PlainValidateCloneProgrammer.go +2 -4
  262. package/native/core/programmers/plain/PlainValidatePruneProgrammer.go +2 -4
  263. package/native/core/programmers/protobuf/ProtobufAssertDecodeProgrammer.go +2 -4
  264. package/native/core/programmers/protobuf/ProtobufAssertEncodeProgrammer.go +2 -4
  265. package/native/core/programmers/protobuf/ProtobufDecodeProgrammer.go +24 -25
  266. package/native/core/programmers/protobuf/ProtobufEncodeProgrammer.go +23 -25
  267. package/native/core/programmers/protobuf/ProtobufIsDecodeProgrammer.go +2 -4
  268. package/native/core/programmers/protobuf/ProtobufIsEncodeProgrammer.go +2 -4
  269. package/native/core/programmers/protobuf/ProtobufMessageProgrammer.go +1 -3
  270. package/native/core/programmers/protobuf/ProtobufValidateDecodeProgrammer.go +2 -4
  271. package/native/core/programmers/protobuf/ProtobufValidateEncodeProgrammer.go +3 -5
  272. package/native/core/programmers/protobuf/protobuf_programmer_helper_coverage_test.go +1 -1
  273. package/native/core/programmers/reflect/ReflectLiteralsProgrammer.go +1 -3
  274. package/native/core/schemas/metadata/MetadataCollection.go +2 -2
  275. package/native/core/schemas/metadata/MetadataDefaultLibrary.go +1 -1
  276. package/native/core/schemas/metadata/MetadataDependency.go +13 -13
  277. package/native/core/utils/PromiseTypeFactory.go +3 -3
  278. package/native/go.mod +3 -4
  279. package/native/go.work +1 -1
  280. package/native/transform/CallExpressionTransformer.go +4 -4
  281. package/native/transform/FileTransformer.go +2 -4
  282. package/native/transform/features/RandomTransformer.go +1 -3
  283. package/native/transform/features/compare/CompareEqualTransformer.go +1 -1
  284. package/native/transform/features/compare/CompareLessTransformer.go +1 -1
  285. package/native/transform/features/functional/FunctionalGenericTransformer.go +2 -2
  286. package/native/transform/features/llm/LlmCoerceTransformer.go +1 -1
  287. package/native/transform/features/llm/LlmEvaluationProbabilityDeclarations.go +1 -1
  288. package/native/transform/features/llm/LlmEvaluationTransformer.go +1 -1
  289. package/native/transform/features/llm/LlmParseTransformer.go +1 -1
  290. package/native/transform/features/llm/LlmSchemaTransformer.go +1 -3
  291. package/native/transform/features/reflect/ReflectNameTransformer.go +1 -3
  292. package/native/transform/file_transformer_coverage_test.go +2 -1
  293. package/native/transform/internal/GenericTransformer.go +1 -3
  294. package/package.json +6 -6
  295. package/src/transform.ts +6 -2
@@ -14,10 +14,8 @@ type identifierFactoryNamespace struct{}
14
14
 
15
15
  var IdentifierFactory = identifierFactoryNamespace{}
16
16
 
17
- var identifierFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
18
-
19
17
  func (identifierFactoryNamespace) Identifier(name string, emit ...*shimprinter.EmitContext) *shimast.Node {
20
- f := nativecontext.EmitFactoryOf(identifierFactory_factory, emit...)
18
+ f := nativecontext.NodeFactoryOf(emit...)
21
19
  if identifierFactory_variable(name) {
22
20
  return f.NewIdentifier(name)
23
21
  }
@@ -29,7 +27,7 @@ func (identifierFactoryNamespace) Identifier(name string, emit ...*shimprinter.E
29
27
  // factories use; a required parameter also makes a forgotten context a compile
30
28
  // error rather than a silent metadata gap.
31
29
  func (identifierFactoryNamespace) Access(ec *shimprinter.EmitContext, input *shimast.Expression, key string, chain ...bool) *shimast.Node {
32
- f := nativecontext.EmitFactory(ec, identifierFactory_factory)
30
+ f := nativecontext.NodeFactoryOf(ec)
33
31
  postfix := IdentifierFactory.Identifier(key, ec)
34
32
  optional := len(chain) != 0 && chain[0]
35
33
  var questionDot *shimast.QuestionDotToken
@@ -217,7 +215,7 @@ func identifierFactory_surrogate(str string) (rune, int) {
217
215
  }
218
216
 
219
217
  func (identifierFactoryNamespace) Parameter(name any, typeNode *shimast.TypeNode, init *shimast.Node, emit ...*shimprinter.EmitContext) *shimast.Node {
220
- f := nativecontext.EmitFactoryOf(identifierFactory_factory, emit...)
218
+ f := nativecontext.NodeFactoryOf(emit...)
221
219
  var binding *shimast.BindingName
222
220
  switch v := name.(type) {
223
221
  case string:
@@ -100,10 +100,8 @@ func (obj LiteralFactory_OrderedObject) MarshalJSON() ([]byte, error) {
100
100
  return buffer.Bytes(), nil
101
101
  }
102
102
 
103
- var literalFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
104
-
105
103
  func (literalFactoryNamespace) Write(input any, emit ...*shimprinter.EmitContext) *shimast.Node {
106
- f := nativecontext.EmitFactoryOf(literalFactory_factory, emit...)
104
+ f := nativecontext.NodeFactoryOf(emit...)
107
105
  if input == nil {
108
106
  return f.NewKeywordExpression(shimast.KindNullKeyword)
109
107
  }
@@ -200,7 +198,7 @@ func literalFactory_fieldName(name string) string {
200
198
  }
201
199
 
202
200
  func literalFactory_writeObject(obj map[string]any, emit ...*shimprinter.EmitContext) *shimast.Node {
203
- f := nativecontext.EmitFactoryOf(literalFactory_factory, emit...)
201
+ f := nativecontext.NodeFactoryOf(emit...)
204
202
  keys := make([]string, 0, len(obj))
205
203
  for key, value := range obj {
206
204
  if literalFactory_isNilLike(value) {
@@ -232,7 +230,7 @@ func literalFactory_writeObject(obj map[string]any, emit ...*shimprinter.EmitCon
232
230
  }
233
231
 
234
232
  func literalFactory_writeOrderedObject(obj LiteralFactory_OrderedObject, emit ...*shimprinter.EmitContext) *shimast.Node {
235
- f := nativecontext.EmitFactoryOf(literalFactory_factory, emit...)
233
+ f := nativecontext.NodeFactoryOf(emit...)
236
234
  properties := make([]*shimast.Node, 0, len(obj.Keys))
237
235
  for _, key := range obj.Keys {
238
236
  value, ok := obj.Values[key]
@@ -329,7 +327,7 @@ func literalFactory_isNilLike(value any) bool {
329
327
  }
330
328
 
331
329
  func literalFactory_writeArray(array []any, emit ...*shimprinter.EmitContext) *shimast.Node {
332
- f := nativecontext.EmitFactoryOf(literalFactory_factory, emit...)
330
+ f := nativecontext.NodeFactoryOf(emit...)
333
331
  elements := make([]*shimast.Node, 0, len(array))
334
332
  for _, elem := range array {
335
333
  elements = append(elements, LiteralFactory.Write(elem, emit...))
@@ -341,7 +339,7 @@ func literalFactory_writeArray(array []any, emit ...*shimprinter.EmitContext) *s
341
339
  }
342
340
 
343
341
  func literalFactory_writeBoolean(value bool, emit ...*shimprinter.EmitContext) *shimast.Node {
344
- f := nativecontext.EmitFactoryOf(literalFactory_factory, emit...)
342
+ f := nativecontext.NodeFactoryOf(emit...)
345
343
  if value {
346
344
  return f.NewKeywordExpression(shimast.KindTrueKeyword)
347
345
  }
@@ -357,5 +355,5 @@ func literalFactory_writeBigint(value any, emit ...*shimprinter.EmitContext) *sh
357
355
  }
358
356
 
359
357
  func literalFactory_writeString(value string, emit ...*shimprinter.EmitContext) *shimast.Node {
360
- return nativecontext.EmitFactoryOf(literalFactory_factory, emit...).NewStringLiteral(value, shimast.TokenFlagsNone)
358
+ return nativecontext.NodeFactoryOf(emit...).NewStringLiteral(value, shimast.TokenFlagsNone)
361
359
  }
@@ -10,8 +10,6 @@ type numericRangeFactoryNamespace struct{}
10
10
 
11
11
  var NumericRangeFactory = numericRangeFactoryNamespace{}
12
12
 
13
- var numericRangeFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
14
-
15
13
  func (numericRangeFactoryNamespace) Number(t string, input *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
16
14
  switch t {
17
15
  case "int32":
@@ -25,7 +23,7 @@ func (numericRangeFactoryNamespace) Number(t string, input *shimast.Expression,
25
23
  case "float":
26
24
  return numericRangeFactory_between("-3.4028235e38", "3.4028235e38", emit...)(input)
27
25
  default:
28
- return nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...).NewKeywordExpression(shimast.KindTrueKeyword)
26
+ return nativecontext.NodeFactoryOf(emit...).NewKeywordExpression(shimast.KindTrueKeyword)
29
27
  }
30
28
  }
31
29
 
@@ -42,7 +40,7 @@ func (numericRangeFactoryNamespace) Bigint(t string, input *shimast.Expression,
42
40
  case "uint64":
43
41
  return numericRangeFactory_bigint_between("0", "18446744073709551615", input, emit...)
44
42
  default:
45
- return nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...).NewKeywordExpression(shimast.KindTrueKeyword)
43
+ return nativecontext.NodeFactoryOf(emit...).NewKeywordExpression(shimast.KindTrueKeyword)
46
44
  }
47
45
  }
48
46
 
@@ -83,7 +81,7 @@ func numericRangeFactory_number_uint64(input *shimast.Expression, emit ...*shimp
83
81
  }
84
82
 
85
83
  func numericRangeFactory_integer(input *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
86
- f := nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...)
84
+ f := nativecontext.NodeFactoryOf(emit...)
87
85
  return f.NewBinaryExpression(
88
86
  nil,
89
87
  f.NewCallExpression(
@@ -100,7 +98,7 @@ func numericRangeFactory_integer(input *shimast.Expression, emit ...*shimprinter
100
98
  }
101
99
 
102
100
  func numericRangeFactory_between(x string, y string, emit ...*shimprinter.EmitContext) func(input *shimast.Expression) *shimast.Node {
103
- f := nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...)
101
+ f := nativecontext.NodeFactoryOf(emit...)
104
102
  return func(input *shimast.Expression) *shimast.Node {
105
103
  return numericRangeFactory_logical_and(
106
104
  f.NewBinaryExpression(
@@ -129,7 +127,7 @@ func numericRangeFactory_between(x string, y string, emit ...*shimprinter.EmitCo
129
127
  // rounding that broke the number path -- while the string form parses the digits
130
128
  // exactly.
131
129
  func numericRangeFactory_bigint_literal(value string, emit ...*shimprinter.EmitContext) *shimast.Node {
132
- f := nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...)
130
+ f := nativecontext.NodeFactoryOf(emit...)
133
131
  return f.NewCallExpression(
134
132
  f.NewIdentifier("BigInt"),
135
133
  nil,
@@ -144,7 +142,7 @@ func numericRangeFactory_bigint_literal(value string, emit ...*shimprinter.EmitC
144
142
  // Both comparisons are inclusive because a bigint represents the true 64-bit
145
143
  // bounds exactly, unlike the number path's exclusive approximation.
146
144
  func numericRangeFactory_bigint_between(x string, y string, input *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
147
- f := nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...)
145
+ f := nativecontext.NodeFactoryOf(emit...)
148
146
  return numericRangeFactory_logical_and(
149
147
  f.NewBinaryExpression(
150
148
  nil,
@@ -165,11 +163,11 @@ func numericRangeFactory_bigint_between(x string, y string, input *shimast.Expre
165
163
  }
166
164
 
167
165
  func numericRangeFactory_logical_and(x *shimast.Expression, y *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
168
- return nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...).NewBinaryExpression(
166
+ return nativecontext.NodeFactoryOf(emit...).NewBinaryExpression(
169
167
  nil,
170
168
  x,
171
169
  nil,
172
- nativecontext.EmitFactoryOf(numericRangeFactory_factory, emit...).NewToken(shimast.KindAmpersandAmpersandToken),
170
+ nativecontext.NodeFactoryOf(emit...).NewToken(shimast.KindAmpersandAmpersandToken),
173
171
  y,
174
172
  )
175
173
  }
@@ -60,10 +60,8 @@ type StatementFactory_EntryProps struct {
60
60
  Value string
61
61
  }
62
62
 
63
- var statementFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
64
-
65
63
  func (statementFactoryNamespace) Mut(props StatementFactory_MutProps, emit ...*shimprinter.EmitContext) *shimast.Node {
66
- f := nativecontext.EmitFactoryOf(statementFactory_factory, emit...)
64
+ f := nativecontext.NodeFactoryOf(emit...)
67
65
  typeNode := props.Type
68
66
  if typeNode == nil && props.Initializer == nil {
69
67
  typeNode = TypeFactory.Keyword("any", emit...)
@@ -84,7 +82,7 @@ func (statementFactoryNamespace) Mut(props StatementFactory_MutProps, emit ...*s
84
82
  }
85
83
 
86
84
  func (statementFactoryNamespace) Constant(props StatementFactory_ConstantProps, emit ...*shimprinter.EmitContext) *shimast.Node {
87
- f := nativecontext.EmitFactoryOf(statementFactory_factory, emit...)
85
+ f := nativecontext.NodeFactoryOf(emit...)
88
86
  typeNode := props.Type
89
87
  if typeNode == nil && props.Value == nil {
90
88
  typeNode = TypeFactory.Keyword("any", emit...)
@@ -105,7 +103,7 @@ func (statementFactoryNamespace) Constant(props StatementFactory_ConstantProps,
105
103
  }
106
104
 
107
105
  func (statementFactoryNamespace) Entry(props StatementFactory_EntryProps, emit ...*shimprinter.EmitContext) *shimast.Node {
108
- f := nativecontext.EmitFactoryOf(statementFactory_factory, emit...)
106
+ f := nativecontext.NodeFactoryOf(emit...)
109
107
  key := f.NewBindingElement(
110
108
  nil,
111
109
  nil,
@@ -130,14 +128,14 @@ func (statementFactoryNamespace) Entry(props StatementFactory_EntryProps, emit .
130
128
  }
131
129
 
132
130
  func (statementFactoryNamespace) Transpile(script string, emit ...*shimprinter.EmitContext) *shimast.Node {
133
- f := nativecontext.EmitFactoryOf(statementFactory_factory, emit...)
131
+ f := nativecontext.NodeFactoryOf(emit...)
134
132
  return f.NewExpressionStatement(
135
133
  f.NewIdentifier(script),
136
134
  )
137
135
  }
138
136
 
139
137
  func (statementFactoryNamespace) Block(expression *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
140
- f := nativecontext.EmitFactoryOf(statementFactory_factory, emit...)
138
+ f := nativecontext.NodeFactoryOf(emit...)
141
139
  return f.NewBlock(
142
140
  f.NewNodeList([]*shimast.Node{
143
141
  f.NewExpressionStatement(expression),
@@ -27,10 +27,8 @@ type TemplateFactory_IIterator struct {
27
27
  Index int
28
28
  }
29
29
 
30
- var templateFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
31
-
32
30
  func (templateFactoryNamespace) Generate(expressions []*shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
33
- f := nativecontext.EmitFactoryOf(templateFactory_factory, emit...)
31
+ f := nativecontext.NodeFactoryOf(emit...)
34
32
  allString := true
35
33
  for _, exp := range expressions {
36
34
  if !shimast.IsStringLiteral(exp) {
@@ -54,8 +54,6 @@ type TypeFactory_GetFullNameProps struct {
54
54
  AliasTypeArguments *bool
55
55
  }
56
56
 
57
- var typeFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
58
-
59
57
  func (typeFactoryNamespace) IsFunction(t *shimchecker.Type) bool {
60
58
  return TypeFactory.GetFunction(t) != nil
61
59
  }
@@ -65,10 +63,10 @@ func (typeFactoryNamespace) GetFunction(t *shimchecker.Type) *shimast.Node {
65
63
  return nil
66
64
  }
67
65
  symbol := t.Symbol()
68
- if symbol == nil || len(symbol.Declarations) == 0 {
66
+ if symbol == nil || len(shimast.SymbolDeclarationsOf(symbol)) == 0 {
69
67
  return nil
70
68
  }
71
- node := symbol.Declarations[0]
69
+ node := shimast.SymbolDeclarationsOf(symbol)[0]
72
70
  if shimast.IsFunctionLike(node) {
73
71
  return node
74
72
  }
@@ -93,10 +91,10 @@ func (typeFactoryNamespace) GetReturnTypeOfClassMethod(props TypeFactory_GetRetu
93
91
  return nil
94
92
  }
95
93
  symbol := props.Checker.GetPropertyOfType(props.Class, props.Function)
96
- if symbol == nil || symbol.ValueDeclaration == nil {
94
+ if symbol == nil || shimast.SymbolValueDeclarationOf(symbol) == nil {
97
95
  return nil
98
96
  }
99
- functor := props.Checker.GetTypeOfSymbolAtLocation(symbol, symbol.ValueDeclaration)
97
+ functor := props.Checker.GetTypeOfSymbolAtLocation(symbol, shimast.SymbolValueDeclarationOf(symbol))
100
98
  signatures := props.Checker.GetSignaturesOfType(functor, shimchecker.SignatureKindCall)
101
99
  if len(signatures) == 0 {
102
100
  return nil
@@ -165,10 +163,10 @@ func typeFactory_explore_name(node *shimast.Node, name string) string {
165
163
  }
166
164
 
167
165
  func typeFactory_get_name(symbol *shimast.Symbol) string {
168
- if symbol == nil || len(symbol.Declarations) == 0 || symbol.Declarations[0].Parent == nil {
166
+ if symbol == nil || len(shimast.SymbolDeclarationsOf(symbol)) == 0 || shimast.SymbolDeclarationsOf(symbol)[0].Parent == nil {
169
167
  return "__type"
170
168
  }
171
- return typeFactory_explore_name(symbol.Declarations[0].Parent, symbol.Name)
169
+ return typeFactory_explore_name(shimast.SymbolDeclarationsOf(symbol)[0].Parent, shimast.SymbolNameOf(symbol))
172
170
  }
173
171
 
174
172
  func typeFactory_get_type_arguments(checker *shimchecker.Checker, t *shimchecker.Type) (output []*shimchecker.Type) {
@@ -182,7 +180,7 @@ func typeFactory_get_type_arguments(checker *shimchecker.Checker, t *shimchecker
182
180
  }
183
181
 
184
182
  func (typeFactoryNamespace) Keyword(t string, emit ...*shimprinter.EmitContext) *shimast.Node {
185
- f := nativecontext.EmitFactoryOf(typeFactory_factory, emit...)
183
+ f := nativecontext.NodeFactoryOf(emit...)
186
184
  var kind shimast.KeywordTypeSyntaxKind
187
185
  switch t {
188
186
  case "void":
@@ -10,18 +10,16 @@ type valueFactoryNamespace struct{}
10
10
 
11
11
  var ValueFactory = valueFactoryNamespace{}
12
12
 
13
- var valueFactory_factory = shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
14
-
15
13
  func (valueFactoryNamespace) NULL(emit ...*shimprinter.EmitContext) *shimast.Node {
16
- return nativecontext.EmitFactoryOf(valueFactory_factory, emit...).NewKeywordExpression(shimast.KindNullKeyword)
14
+ return nativecontext.NodeFactoryOf(emit...).NewKeywordExpression(shimast.KindNullKeyword)
17
15
  }
18
16
 
19
17
  func (valueFactoryNamespace) UNDEFINED(emit ...*shimprinter.EmitContext) *shimast.Node {
20
- return nativecontext.EmitFactoryOf(valueFactory_factory, emit...).NewIdentifier("undefined")
18
+ return nativecontext.NodeFactoryOf(emit...).NewIdentifier("undefined")
21
19
  }
22
20
 
23
21
  func (valueFactoryNamespace) BOOLEAN(value bool, emit ...*shimprinter.EmitContext) *shimast.Node {
24
- f := nativecontext.EmitFactoryOf(valueFactory_factory, emit...)
22
+ f := nativecontext.NodeFactoryOf(emit...)
25
23
  if value {
26
24
  return f.NewKeywordExpression(shimast.KindTrueKeyword)
27
25
  }
@@ -35,9 +33,9 @@ func (valueFactoryNamespace) INPUT(ec *shimprinter.EmitContext, str ...string) *
35
33
  if len(str) != 0 {
36
34
  name = str[0]
37
35
  }
38
- return nativecontext.EmitFactory(ec, valueFactory_factory).NewIdentifier(name)
36
+ return nativecontext.NodeFactoryOf(ec).NewIdentifier(name)
39
37
  }
40
38
 
41
39
  func (valueFactoryNamespace) TYPEOF(input *shimast.Expression, emit ...*shimprinter.EmitContext) *shimast.Node {
42
- return nativecontext.EmitFactoryOf(valueFactory_factory, emit...).NewTypeOfExpression(input)
40
+ return nativecontext.NodeFactoryOf(emit...).NewTypeOfExpression(input)
43
41
  }
@@ -4,6 +4,7 @@
4
4
  package factories
5
5
 
6
6
  import (
7
+ nativecontext "github.com/samchon/typia/packages/typia/native/core/context"
7
8
  "math/big"
8
9
  "os"
9
10
  "path/filepath"
@@ -37,7 +38,7 @@ import (
37
38
  // @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package unit Test in process. AST helpers use the node factory; checker-backed cases write a temporary TypeScript fixture, load it through driver.LoadProgram, and close the program. No compiler or JavaScript subprocess is launched.
38
39
  func TestFactoryUtilityCoverage(t *testing.T) {
39
40
  emit := shimprinter.NewEmitContext()
40
- input := expressionFactory_factory.NewIdentifier("input")
41
+ input := nativecontext.NodeFactoryOf().NewIdentifier("input")
41
42
  for _, name := range []string{"int32", "uint32", "int64", "uint64", "float", "double", "unknown"} {
42
43
  if NumericRangeFactory.Number(name, input) == nil {
43
44
  t.Fatalf("number range %s returned nil", name)
@@ -63,26 +64,26 @@ func TestFactoryUtilityCoverage(t *testing.T) {
63
64
  if ExpressionFactory.IsArray(input) == nil ||
64
65
  ExpressionFactory.IsObject(ExpressionFactory_IsObjectProps{Input: input, CheckNull: true, CheckArray: true}) == nil ||
65
66
  ExpressionFactory.IsInstanceOf("Date", input) == nil ||
66
- ExpressionFactory.Coalesce(input, expressionFactory_factory.NewIdentifier("fallback")) == nil {
67
+ ExpressionFactory.Coalesce(input, nativecontext.NodeFactoryOf().NewIdentifier("fallback")) == nil {
67
68
  t.Fatal("basic expression factory branch returned nil")
68
69
  }
69
70
  if ExpressionFactory.Currying(ExpressionFactory_CurryingProps{
70
- Function: expressionFactory_factory.NewIdentifier("fn"),
71
+ Function: nativecontext.NodeFactoryOf().NewIdentifier("fn"),
71
72
  Arguments: nil,
72
73
  }) == nil {
73
74
  t.Fatal("zero-argument currying returned nil")
74
75
  }
75
76
  if ExpressionFactory.Currying(ExpressionFactory_CurryingProps{
76
- Function: expressionFactory_factory.NewIdentifier("fn"),
77
+ Function: nativecontext.NodeFactoryOf().NewIdentifier("fn"),
77
78
  Arguments: []*shimast.Expression{
78
- expressionFactory_factory.NewIdentifier("a"),
79
- expressionFactory_factory.NewIdentifier("b"),
79
+ nativecontext.NodeFactoryOf().NewIdentifier("a"),
80
+ nativecontext.NodeFactoryOf().NewIdentifier("b"),
80
81
  },
81
82
  }) == nil {
82
83
  t.Fatal("multi-argument currying returned nil")
83
84
  }
84
- call := expressionFactory_factory.NewCallExpression(
85
- expressionFactory_factory.NewIdentifier("already"),
85
+ call := nativecontext.NodeFactoryOf().NewCallExpression(
86
+ nativecontext.NodeFactoryOf().NewIdentifier("already"),
86
87
  nil,
87
88
  nil,
88
89
  nil,
@@ -101,7 +102,7 @@ func TestFactoryUtilityCoverage(t *testing.T) {
101
102
  t.Fatal("identifier escaped text mismatch")
102
103
  }
103
104
  if ExpressionFactory.GetEscapedText(ExpressionFactory_GetEscapedTextProps{
104
- Input: expressionFactory_factory.NewStringLiteral("text", shimast.TokenFlagsNone),
105
+ Input: nativecontext.NodeFactoryOf().NewStringLiteral("text", shimast.TokenFlagsNone),
105
106
  }) != "text" {
106
107
  t.Fatal("string escaped text mismatch")
107
108
  }
@@ -202,7 +203,7 @@ export let inner!: Outer.Inner;
202
203
  if assignedSymbol == nil {
203
204
  t.Fatal("holder.assigned symbol was not found")
204
205
  }
205
- assignedType := prog.Checker.GetTypeOfSymbolAtLocation(assignedSymbol, assignedSymbol.ValueDeclaration)
206
+ assignedType := prog.Checker.GetTypeOfSymbolAtLocation(assignedSymbol, shimast.SymbolValueDeclarationOf(assignedSymbol))
206
207
  assignedDeclaredType := shimchecker.Checker_getTypeOfSymbol(prog.Checker, assignedSymbol)
207
208
  if TypeFactory.GetFunction(assignedDeclaredType) == nil && TypeFactory.GetFunction(assignedType) == nil {
208
209
  t.Fatal("property assignment initializer should be recognized as function-like")
@@ -212,7 +213,7 @@ export let inner!: Outer.Inner;
212
213
  if fieldSymbol == nil {
213
214
  t.Fatal("example.field symbol was not found")
214
215
  }
215
- fieldType := prog.Checker.GetTypeOfSymbolAtLocation(fieldSymbol, fieldSymbol.ValueDeclaration)
216
+ fieldType := prog.Checker.GetTypeOfSymbolAtLocation(fieldSymbol, shimast.SymbolValueDeclarationOf(fieldSymbol))
216
217
  fieldDeclaredType := shimchecker.Checker_getTypeOfSymbol(prog.Checker, fieldSymbol)
217
218
  if TypeFactory.GetFunction(fieldDeclaredType) == nil && TypeFactory.GetFunction(fieldType) == nil {
218
219
  t.Fatal("property declaration initializer should be recognized as function-like")
@@ -259,7 +260,7 @@ export let inner!: Outer.Inner;
259
260
  }
260
261
  if IdentifierFactory.Parameter("value", nil, nil) == nil ||
261
262
  IdentifierFactory.Parameter(input, TypeFactory.Keyword("string"), nil) == nil ||
262
- IdentifierFactory.Parameter(123, nil, expressionFactory_factory.NewToken(shimast.KindQuestionToken)) == nil {
263
+ IdentifierFactory.Parameter(123, nil, nativecontext.NodeFactoryOf().NewToken(shimast.KindQuestionToken)) == nil {
263
264
  t.Fatal("identifier parameter branch returned nil")
264
265
  }
265
266
 
@@ -309,12 +310,12 @@ export let inner!: Outer.Inner;
309
310
  t.Fatal("literal factory branch returned nil")
310
311
  }
311
312
  if TemplateFactory.Generate([]*shimast.Expression{
312
- expressionFactory_factory.NewStringLiteral("a", shimast.TokenFlagsNone),
313
- expressionFactory_factory.NewStringLiteral("b", shimast.TokenFlagsNone),
313
+ nativecontext.NodeFactoryOf().NewStringLiteral("a", shimast.TokenFlagsNone),
314
+ nativecontext.NodeFactoryOf().NewStringLiteral("b", shimast.TokenFlagsNone),
314
315
  }) == nil || TemplateFactory.Generate([]*shimast.Expression{
315
- expressionFactory_factory.NewStringLiteral("a", shimast.TokenFlagsNone),
316
+ nativecontext.NodeFactoryOf().NewStringLiteral("a", shimast.TokenFlagsNone),
316
317
  input,
317
- expressionFactory_factory.NewStringLiteral("b", shimast.TokenFlagsNone),
318
+ nativecontext.NodeFactoryOf().NewStringLiteral("b", shimast.TokenFlagsNone),
318
319
  }) == nil {
319
320
  t.Fatal("template factory branch returned nil")
320
321
  }
@@ -872,7 +873,7 @@ export let inner!: Outer.Inner;
872
873
  type factoryUtilityImporter struct{}
873
874
 
874
875
  func (factoryUtilityImporter) Internal(name string) *shimast.Node {
875
- return expressionFactory_factory.NewIdentifier(name)
876
+ return nativecontext.NodeFactoryOf().NewIdentifier(name)
876
877
  }
877
878
 
878
879
  func factoryUtilitySequenceTag(value int) schemametadata.IMetadataTypeTag {
@@ -893,15 +894,15 @@ func factoryUtilityMustPanic(t *testing.T, run func()) {
893
894
  }
894
895
 
895
896
  func (factoryUtilityImporter) Instance(props ExpressionFactory_IInstance) *shimast.Node {
896
- return expressionFactory_factory.NewIdentifier(props.Name)
897
+ return nativecontext.NodeFactoryOf().NewIdentifier(props.Name)
897
898
  }
898
899
 
899
900
  func (factoryUtilityImporter) Namespace(props ExpressionFactory_INamespace) *shimast.Node {
900
- return expressionFactory_factory.NewIdentifier(props.Name)
901
+ return nativecontext.NodeFactoryOf().NewIdentifier(props.Name)
901
902
  }
902
903
 
903
904
  func (factoryUtilityImporter) Default(props ExpressionFactory_IDefault) *shimast.Node {
904
- return expressionFactory_factory.NewIdentifier(props.Name)
905
+ return nativecontext.NodeFactoryOf().NewIdentifier(props.Name)
905
906
  }
906
907
 
907
908
  func factoryUtilityLiteralMetadata(value string) *schemametadata.MetadataSchema {
@@ -88,10 +88,10 @@ func metadata_type_symbol_base_name(typ *nativechecker.Type) string {
88
88
  }
89
89
 
90
90
  func metadata_symbol_name(symbol *nativeast.Symbol) string {
91
- if symbol == nil || len(symbol.Declarations) == 0 || symbol.Declarations[0].Parent == nil {
91
+ if symbol == nil || len(nativeast.SymbolDeclarationsOf(symbol)) == 0 || nativeast.SymbolDeclarationsOf(symbol)[0].Parent == nil {
92
92
  return "__type"
93
93
  }
94
- return metadata_explore_symbol_name(symbol.Declarations[0].Parent, symbol.Name)
94
+ return metadata_explore_symbol_name(nativeast.SymbolDeclarationsOf(symbol)[0].Parent, nativeast.SymbolNameOf(symbol))
95
95
  }
96
96
 
97
97
  func metadata_explore_symbol_name(node *nativeast.Node, name string) string {
@@ -122,10 +122,10 @@ func metadata_get_function_node(checker *nativechecker.Checker, typ *nativecheck
122
122
  return nil
123
123
  }
124
124
  symbol := typ.Symbol()
125
- if symbol == nil || len(symbol.Declarations) == 0 {
125
+ if symbol == nil || len(nativeast.SymbolDeclarationsOf(symbol)) == 0 {
126
126
  return nil
127
127
  }
128
- node := symbol.Declarations[0]
128
+ node := nativeast.SymbolDeclarationsOf(symbol)[0]
129
129
  if nativeast.IsFunctionLike(node) {
130
130
  return node
131
131
  }
@@ -172,10 +172,10 @@ func metadata_get_return_type_of_class_method(props struct {
172
172
  return nil
173
173
  }
174
174
  symbol := props.Checker.GetPropertyOfType(props.Class, props.Function)
175
- if symbol == nil || symbol.ValueDeclaration == nil {
175
+ if symbol == nil || nativeast.SymbolValueDeclarationOf(symbol) == nil {
176
176
  return nil
177
177
  }
178
- functor := props.Checker.GetTypeOfSymbolAtLocation(symbol, symbol.ValueDeclaration)
178
+ functor := props.Checker.GetTypeOfSymbolAtLocation(symbol, nativeast.SymbolValueDeclarationOf(symbol))
179
179
  signatures := props.Checker.GetSignaturesOfType(functor, nativechecker.SignatureKindCall)
180
180
  if len(signatures) == 0 {
181
181
  return nil
@@ -271,7 +271,7 @@ func metadata_node_type_js_doc_tags(symbol *nativeast.Symbol) []schemametadata.I
271
271
  // other callable object type. See metadata_get_function_node for why the lib
272
272
  // `Function` must be treated as a function type (#2178).
273
273
  func metadata_is_global_function_interface(symbol *nativeast.Symbol, node *nativeast.Node) bool {
274
- if symbol == nil || symbol.Name != "Function" {
274
+ if symbol == nil || nativeast.SymbolNameOf(symbol) != "Function" {
275
275
  return false
276
276
  }
277
277
  if node == nil || node.Kind != nativeast.KindInterfaceDeclaration {
@@ -341,7 +341,7 @@ func metadata_symbol_from_default_lib(symbol *nativeast.Symbol) bool {
341
341
  if src == nil {
342
342
  continue
343
343
  }
344
- return schemametadata.MetadataDefaultLibrary_isFileNamed(src.FileName())
344
+ return schemametadata.MetadataDefaultLibrary_isFileNamed(string(src.FileName()))
345
345
  }
346
346
  return false
347
347
  }
@@ -415,7 +415,7 @@ func metadata_symbol_has_runtime_provider(checker *nativechecker.Checker, symbol
415
415
  return true
416
416
  }
417
417
  }
418
- if checker == nil || symbol.Flags&nativeast.SymbolFlagsValue == 0 {
418
+ if checker == nil || nativeast.SymbolFlagsOf(symbol)&nativeast.SymbolFlagsValue == 0 {
419
419
  return false
420
420
  }
421
421
  constructor := checker.GetTypeOfSymbol(symbol)
@@ -464,10 +464,10 @@ func metadata_node_in_node_buffer_module(node *nativeast.Node) bool {
464
464
  }
465
465
 
466
466
  func metadata_symbol_is_node_buffer_native_export(symbol *nativeast.Symbol, name string) bool {
467
- if symbol == nil || symbol.ValueDeclaration == nil || (name != "Blob" && name != "File") {
467
+ if symbol == nil || nativeast.SymbolValueDeclarationOf(symbol) == nil || (name != "Blob" && name != "File") {
468
468
  return false
469
469
  }
470
- declaration := symbol.ValueDeclaration
470
+ declaration := nativeast.SymbolValueDeclarationOf(symbol)
471
471
  if declaration.Kind != nativeast.KindClassDeclaration && declaration.Kind != nativeast.KindVariableDeclaration {
472
472
  return false
473
473
  }
@@ -500,8 +500,8 @@ func metadata_node_declarations(symbol *nativeast.Symbol) []*nativeast.Node {
500
500
  output = append(output, node)
501
501
  }
502
502
  }
503
- appendNode(symbol.ValueDeclaration)
504
- for _, node := range symbol.Declarations {
503
+ appendNode(nativeast.SymbolValueDeclarationOf(symbol))
504
+ for _, node := range nativeast.SymbolDeclarationsOf(symbol) {
505
505
  appendNode(node)
506
506
  }
507
507
  return output
@@ -4,17 +4,13 @@
4
4
  package metadata
5
5
 
6
6
  import (
7
- "path/filepath"
8
7
  "reflect"
9
8
  "testing"
10
9
 
11
- nativeast "github.com/microsoft/typescript-go/shim/ast"
12
- nativecore "github.com/microsoft/typescript-go/shim/core"
13
- nativeparser "github.com/microsoft/typescript-go/shim/parser"
14
10
  schemametadata "github.com/samchon/typia/packages/typia/native/core/schemas/metadata"
15
11
  )
16
12
 
17
- // TestCommentTagsCoverage exercises metadata comment tag application.
13
+ // TestCommentTagsCoverage verifies metadata comment tag application.
18
14
  //
19
15
  // Comment tags are collected from checker symbols before metadata sorting, so
20
16
  // synthetic TypeScript fixtures rarely hit every tag kind deterministically.
@@ -29,7 +25,7 @@ import (
29
25
  // @evidence contracts/testing.md#behavioral-verification The comment-tag dispatcher calls a test analyzer on constructed property metadata. Exactly one callback, its property/location inputs, each exact test tag and one propagated error are asserted, and a repeated call must leave the callback count unchanged. Parsed JSDoc presence and nil-helper fallbacks are also checked; the real analyzer's parsing semantics are not exercised here.
30
26
  // @evidence contracts/testing.md#independent-expectations Authored callback inputs and marker tags establish the dispatch and once-only contract independently of the dispatcher. The test analyzer deliberately supplies tag/error outputs, so those outputs do not establish real comment-tag parsing; that belongs to factory tests.
31
27
  // @evidence contracts/testing.md#distinguishing-cases Every tag bucket, repeated application and parsing are exercised once; this test has few negatives.
32
- // @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls internal helpers with constructed metadata and an installed analyzer; it needs no program load or process.
28
+ // @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command runs this same-package Test in process. Dispatcher cases use constructed metadata and an installed analyzer; the JSDoc case loads one test-owned source through the compiler binder to obtain its real property symbol. Cleanup closes that Program and removes its fixture without launching a compiler or native host subprocess.
33
29
  func TestCommentTagsCoverage(t *testing.T) {
34
30
  oldAnalyzer := MetadataCommentTagAnalyzer
35
31
  calls := 0
@@ -146,9 +142,7 @@ func TestCommentTagsCoverage(t *testing.T) {
146
142
  Name: "NoAnalyzer",
147
143
  Properties: []*schemametadata.MetadataProperty{property},
148
144
  })})
149
- file := nativeparser.ParseSourceFile(
150
- nativeast.SourceFileParseOptions{FileName: filepath.ToSlash(filepath.Join(t.TempDir(), "comment.ts"))},
151
- `interface Box {
145
+ program, file := jsDocTestSource(t, `interface Box {
152
146
  /**
153
147
  * box description
154
148
  * @type {string}
@@ -156,14 +150,11 @@ func TestCommentTagsCoverage(t *testing.T) {
156
150
  */
157
151
  field: string;
158
152
  }
159
- `,
160
- nativecore.ScriptKindTS,
161
- )
153
+ `)
162
154
  member := file.Statements.Nodes[0].AsInterfaceDeclaration().Members.Nodes[0]
163
- symbol := &nativeast.Symbol{
164
- Name: "field",
165
- ValueDeclaration: member,
166
- Declarations: []*nativeast.Node{member},
155
+ symbol := program.Checker.GetSymbolAtLocation(member.Name())
156
+ if symbol == nil {
157
+ t.Fatal("comment property symbol was not bound")
167
158
  }
168
159
  if len(metadata_node_js_doc_tags(symbol)) == 0 || metadata_node_description(symbol) == nil {
169
160
  t.Fatal("parsed JSDoc tags and description should be discovered")