typia 13.0.0-dev.20260605.1 → 13.0.0-dev.20260612.1

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 (540) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +171 -171
  3. package/lib/_virtual/_isTypeInt16.mjs +4 -0
  4. package/lib/_virtual/_isTypeInt16.mjs.map +1 -0
  5. package/lib/_virtual/_isTypeInt8.mjs +4 -0
  6. package/lib/_virtual/_isTypeInt8.mjs.map +1 -0
  7. package/lib/_virtual/_isTypeUint16.mjs +4 -0
  8. package/lib/_virtual/_isTypeUint16.mjs.map +1 -0
  9. package/lib/_virtual/_isTypeUint8.mjs +4 -0
  10. package/lib/_virtual/_isTypeUint8.mjs.map +1 -0
  11. package/lib/executable/TypiaGenerateWizard.d.ts +2 -1
  12. package/lib/executable/TypiaGenerateWizard.js +466 -63
  13. package/lib/executable/TypiaGenerateWizard.js.map +1 -1
  14. package/lib/executable/TypiaGenerateWizard2.mjs +467 -64
  15. package/lib/executable/TypiaGenerateWizard2.mjs.map +1 -1
  16. package/lib/executable/typia.js +28 -12
  17. package/lib/executable/typia.js.map +1 -1
  18. package/lib/executable/typia2.mjs +28 -12
  19. package/lib/executable/typia2.mjs.map +1 -1
  20. package/lib/internal/_isFormatUrl.js +1 -1
  21. package/lib/internal/_isFormatUrl.js.map +1 -1
  22. package/lib/internal/_isFormatUrl2.mjs +1 -1
  23. package/lib/internal/_isFormatUrl2.mjs.map +1 -1
  24. package/lib/internal/_isTypeInt16.d.ts +1 -0
  25. package/lib/internal/_isTypeInt16.js +8 -0
  26. package/lib/internal/_isTypeInt16.js.map +1 -0
  27. package/lib/internal/_isTypeInt16.mjs +3 -0
  28. package/lib/internal/_isTypeInt16.mjs.map +1 -0
  29. package/lib/internal/_isTypeInt162.mjs +11 -0
  30. package/lib/internal/_isTypeInt162.mjs.map +1 -0
  31. package/lib/internal/_isTypeInt8.d.ts +1 -0
  32. package/lib/internal/_isTypeInt8.js +8 -0
  33. package/lib/internal/_isTypeInt8.js.map +1 -0
  34. package/lib/internal/_isTypeInt8.mjs +3 -0
  35. package/lib/internal/_isTypeInt8.mjs.map +1 -0
  36. package/lib/internal/_isTypeInt82.mjs +11 -0
  37. package/lib/internal/_isTypeInt82.mjs.map +1 -0
  38. package/lib/internal/_isTypeUint16.d.ts +1 -0
  39. package/lib/internal/_isTypeUint16.js +8 -0
  40. package/lib/internal/_isTypeUint16.js.map +1 -0
  41. package/lib/internal/_isTypeUint16.mjs +3 -0
  42. package/lib/internal/_isTypeUint16.mjs.map +1 -0
  43. package/lib/internal/_isTypeUint162.mjs +11 -0
  44. package/lib/internal/_isTypeUint162.mjs.map +1 -0
  45. package/lib/internal/_isTypeUint8.d.ts +1 -0
  46. package/lib/internal/_isTypeUint8.js +8 -0
  47. package/lib/internal/_isTypeUint8.js.map +1 -0
  48. package/lib/internal/_isTypeUint8.mjs +3 -0
  49. package/lib/internal/_isTypeUint8.mjs.map +1 -0
  50. package/lib/internal/_isTypeUint82.mjs +11 -0
  51. package/lib/internal/_isTypeUint82.mjs.map +1 -0
  52. package/lib/internal/_notationSnake.js +1 -1
  53. package/lib/internal/_notationSnake.js.map +1 -1
  54. package/lib/internal/_notationSnake2.mjs +1 -1
  55. package/lib/internal/_notationSnake2.mjs.map +1 -1
  56. package/lib/misc.d.ts +54 -0
  57. package/lib/misc.js +20 -0
  58. package/lib/misc.js.map +1 -1
  59. package/lib/misc.mjs +1 -1
  60. package/lib/misc2.mjs +21 -1
  61. package/lib/misc2.mjs.map +1 -1
  62. package/lib/notations.d.ts +127 -1
  63. package/lib/notations.js +40 -0
  64. package/lib/notations.js.map +1 -1
  65. package/lib/notations.mjs +1 -1
  66. package/lib/notations2.mjs +41 -1
  67. package/lib/notations2.mjs.map +1 -1
  68. package/lib/re-exports.d.ts +1 -1
  69. package/lib/re-exports.js.map +1 -1
  70. package/native/adapter/adapter.go +29 -29
  71. package/native/adapter/adapter_options_branch_matrix_test.go +54 -0
  72. package/native/adapter/visit.go +173 -168
  73. package/native/adapter/visit_property_chain_edges_test.go +129 -0
  74. package/native/cmd/ttsc-typia/any_array_type_tags_transform_test.go +204 -0
  75. package/native/cmd/ttsc-typia/atomic_intersection_schema_transform_test.go +148 -0
  76. package/native/cmd/ttsc-typia/boolean_literal_discriminant_schema_transform_test.go +374 -0
  77. package/native/cmd/ttsc-typia/build.go +199 -190
  78. package/native/cmd/ttsc-typia/build_reports_semantic_diagnostics_test.go +34 -0
  79. package/native/cmd/ttsc-typia/build_reports_syntactic_diagnostics_test.go +34 -0
  80. package/native/cmd/ttsc-typia/command_routes_and_diagnostics_coverage_test.go +314 -0
  81. package/native/cmd/ttsc-typia/demo_rejects_bad_flag_test.go +25 -0
  82. package/native/cmd/ttsc-typia/dynamic_key_path_helper_alias_transform_test.go +159 -0
  83. package/native/cmd/ttsc-typia/exclude_type_tag_transform_test.go +176 -0
  84. package/native/cmd/ttsc-typia/inline_type_display_name_transform_test.go +290 -0
  85. package/native/cmd/ttsc-typia/instance_union_create_is_transform_test.go +248 -0
  86. package/native/cmd/ttsc-typia/intersection_union_validation_transform_test.go +590 -0
  87. package/native/cmd/ttsc-typia/json_stringify_constant_atomic_union_transform_test.go +171 -0
  88. package/native/cmd/ttsc-typia/main.go +97 -97
  89. package/native/cmd/ttsc-typia/main_wasm.go +226 -226
  90. package/native/cmd/ttsc-typia/misc_clone_bigint_wrapper_transform_test.go +153 -0
  91. package/native/cmd/ttsc-typia/misc_equal_cover_transform_test.go +271 -0
  92. package/native/cmd/ttsc-typia/non_trailing_rest_tuple_transform_test.go +156 -0
  93. package/native/cmd/ttsc-typia/notation_kebab_case_transform_test.go +186 -0
  94. package/native/cmd/ttsc-typia/nullable_primitive_property_is_transform_test.go +236 -0
  95. package/native/cmd/ttsc-typia/object_custom_tag_validation_transform_test.go +332 -0
  96. package/native/cmd/ttsc-typia/object_union_explicit_pointer_schema_transform_test.go +269 -0
  97. package/native/cmd/ttsc-typia/plugin_options_missing_config_test.go +26 -0
  98. package/native/cmd/ttsc-typia/plugin_options_undefined_false_test.go +36 -0
  99. package/native/cmd/ttsc-typia/project_catalog_transform_coverage_test.go +73 -0
  100. package/native/cmd/ttsc-typia/protobuf_sequence_field_numbers_transform_test.go +107 -0
  101. package/native/cmd/ttsc-typia/recursive_visit_tracking_transform_test.go +473 -0
  102. package/native/cmd/ttsc-typia/run_default_build_route_test.go +31 -0
  103. package/native/cmd/ttsc-typia/schema_dts_role_transform_test.go +404 -0
  104. package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +162 -0
  105. package/native/cmd/ttsc-typia/transform.go +270 -270
  106. package/native/cmd/ttsc-typia/transform_declaration_source_produces_no_js_test.go +59 -0
  107. package/native/cmd/ttsc-typia/transform_fixtures_emit_coverage_test.go +513 -0
  108. package/native/cmd/ttsc-typia/transform_helpers_test.go +155 -0
  109. package/native/core/context/EmitFactory.go +39 -39
  110. package/native/core/context/IProgrammerProps.go +14 -14
  111. package/native/core/context/ITransformOptions.go +9 -9
  112. package/native/core/context/ITypiaContext.go +28 -28
  113. package/native/core/context/ImportProgrammer.go +354 -329
  114. package/native/core/context/TransformerError.go +117 -117
  115. package/native/core/context/import_programmer_statement_coverage_test.go +71 -0
  116. package/native/core/context/index.go +1 -1
  117. package/native/core/context/transformer_error_formatting_test.go +100 -0
  118. package/native/core/factories/CommentFactory.go +27 -27
  119. package/native/core/factories/ExpressionFactory.go +357 -353
  120. package/native/core/factories/FormatCheatSheet.go +30 -30
  121. package/native/core/factories/IdentifierFactory.go +172 -172
  122. package/native/core/factories/JsonMetadataFactory.go +154 -160
  123. package/native/core/factories/LiteralFactory.go +282 -282
  124. package/native/core/factories/MetadataCommentTagFactory.go +446 -433
  125. package/native/core/factories/MetadataFactory.go +543 -543
  126. package/native/core/factories/MetadataTypeTagFactory.go +560 -560
  127. package/native/core/factories/MetadataTypeTagSchemaFactory.go +117 -117
  128. package/native/core/factories/NumericRangeFactory.go +132 -132
  129. package/native/core/factories/ProtobufFactory.go +1090 -1066
  130. package/native/core/factories/StatementFactory.go +114 -114
  131. package/native/core/factories/TemplateFactory.go +82 -82
  132. package/native/core/factories/TypeFactory.go +176 -166
  133. package/native/core/factories/ValueFactory.go +43 -43
  134. package/native/core/factories/factory_utility_coverage_test.go +1006 -0
  135. package/native/core/factories/index.go +1 -1
  136. package/native/core/factories/internal/metadata/IMetadataIteratorProps.go +65 -63
  137. package/native/core/factories/internal/metadata/MetadataHelper.go +378 -367
  138. package/native/core/factories/internal/metadata/comment_tags_coverage_test.go +184 -0
  139. package/native/core/factories/internal/metadata/emend_metadata_atomics.go +80 -80
  140. package/native/core/factories/internal/metadata/emplace_metadata_alias.go +34 -34
  141. package/native/core/factories/internal/metadata/emplace_metadata_array_type.go +44 -44
  142. package/native/core/factories/internal/metadata/emplace_metadata_object.go +418 -231
  143. package/native/core/factories/internal/metadata/emplace_metadata_tuple.go +69 -58
  144. package/native/core/factories/internal/metadata/explore_metadata.go +75 -39
  145. package/native/core/factories/internal/metadata/iterate_metadata.go +55 -55
  146. package/native/core/factories/internal/metadata/iterate_metadata_alias.go +36 -36
  147. package/native/core/factories/internal/metadata/iterate_metadata_array.go +77 -77
  148. package/native/core/factories/internal/metadata/iterate_metadata_atomic.go +63 -63
  149. package/native/core/factories/internal/metadata/iterate_metadata_coalesce.go +30 -30
  150. package/native/core/factories/internal/metadata/iterate_metadata_collection.go +365 -247
  151. package/native/core/factories/internal/metadata/iterate_metadata_collection_branch_matrix_test.go +201 -0
  152. package/native/core/factories/internal/metadata/iterate_metadata_comment_tags.go +34 -34
  153. package/native/core/factories/internal/metadata/iterate_metadata_constant.go +139 -102
  154. package/native/core/factories/internal/metadata/iterate_metadata_escape.go +56 -56
  155. package/native/core/factories/internal/metadata/iterate_metadata_function.go +93 -93
  156. package/native/core/factories/internal/metadata/iterate_metadata_intersection.go +991 -340
  157. package/native/core/factories/internal/metadata/iterate_metadata_intersection_coverage_test.go +106 -0
  158. package/native/core/factories/internal/metadata/iterate_metadata_intersection_shareable_name_test.go +22 -0
  159. package/native/core/factories/internal/metadata/iterate_metadata_map.go +55 -60
  160. package/native/core/factories/internal/metadata/iterate_metadata_native.go +122 -117
  161. package/native/core/factories/internal/metadata/iterate_metadata_object.go +35 -35
  162. package/native/core/factories/internal/metadata/iterate_metadata_set.go +41 -46
  163. package/native/core/factories/internal/metadata/iterate_metadata_sort.go +202 -157
  164. package/native/core/factories/internal/metadata/iterate_metadata_template.go +41 -41
  165. package/native/core/factories/internal/metadata/iterate_metadata_tuple.go +24 -24
  166. package/native/core/factories/internal/metadata/iterate_metadata_union.go +24 -22
  167. package/native/core/factories/internal/metadata/js_doc_parameter_name_reads_qualified_name_test.go +55 -0
  168. package/native/core/factories/internal/metadata/optional_coalesce_coverage_test.go +38 -0
  169. package/native/core/factories/internal/metadata/sort_constants_coverage_test.go +63 -0
  170. package/native/core/factories/json_metadata_factory_dedupes_bigint_diagnostics_test.go +36 -0
  171. package/native/core/factories/json_metadata_factory_rejects_bigint_native_test.go +29 -0
  172. package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +239 -0
  173. package/native/core/factories/protobuf_factory_rejects_invalid_field_names_test.go +75 -0
  174. package/native/core/index.go +1 -1
  175. package/native/core/programmers/AssertProgrammer.go +511 -500
  176. package/native/core/programmers/IsProgrammer.go +386 -384
  177. package/native/core/programmers/RandomProgrammer.go +1313 -1302
  178. package/native/core/programmers/ValidateProgrammer.go +488 -475
  179. package/native/core/programmers/functional/FunctionalAssertFunctionProgrammer.go +172 -172
  180. package/native/core/programmers/functional/FunctionalAssertParametersProgrammer.go +135 -135
  181. package/native/core/programmers/functional/FunctionalAssertReturnProgrammer.go +131 -131
  182. package/native/core/programmers/functional/FunctionalIsFunctionProgrammer.go +106 -106
  183. package/native/core/programmers/functional/FunctionalIsParametersProgrammer.go +222 -222
  184. package/native/core/programmers/functional/FunctionalIsReturnProgrammer.go +129 -129
  185. package/native/core/programmers/functional/FunctionalValidateFunctionProgrammer.go +172 -172
  186. package/native/core/programmers/functional/FunctionalValidateParametersProgrammer.go +252 -252
  187. package/native/core/programmers/functional/FunctionalValidateReturnProgrammer.go +147 -147
  188. package/native/core/programmers/functional/functional_assert_helper_coverage_test.go +26 -0
  189. package/native/core/programmers/functional/index.go +1 -1
  190. package/native/core/programmers/functional/internal/FunctionalGeneralProgrammer.go +53 -53
  191. package/native/core/programmers/helpers/AtomicPredicator.go +75 -62
  192. package/native/core/programmers/helpers/CloneJoiner.go +307 -271
  193. package/native/core/programmers/helpers/FunctionProgrammer.go +201 -126
  194. package/native/core/programmers/helpers/HttpMetadataUtil.go +30 -30
  195. package/native/core/programmers/helpers/ICheckEntry.go +14 -14
  196. package/native/core/programmers/helpers/IExpressionEntry.go +15 -13
  197. package/native/core/programmers/helpers/ModuloText.go +26 -23
  198. package/native/core/programmers/helpers/NotationJoiner.go +204 -204
  199. package/native/core/programmers/helpers/OptionPredicator.go +39 -23
  200. package/native/core/programmers/helpers/ProtobufUtil.go +273 -297
  201. package/native/core/programmers/helpers/ProtobufWire.go +14 -14
  202. package/native/core/programmers/helpers/PruneJoiner.go +290 -290
  203. package/native/core/programmers/helpers/RandomJoiner.go +229 -203
  204. package/native/core/programmers/helpers/StringifyJoinder.go +409 -409
  205. package/native/core/programmers/helpers/StringifyPredicator.go +25 -25
  206. package/native/core/programmers/helpers/UnionExplorer.go +966 -963
  207. package/native/core/programmers/helpers/UnionPredicator.go +92 -95
  208. package/native/core/programmers/helpers/clone_joiner_optional_condition_test.go +70 -0
  209. package/native/core/programmers/helpers/disable_function_programmer_declare.go +10 -10
  210. package/native/core/programmers/helpers/function_programmer_unique_names_test.go +54 -0
  211. package/native/core/programmers/helpers/joiner_branch_coverage_test.go +147 -0
  212. package/native/core/programmers/helpers/union_explorer_coverage_test.go +135 -0
  213. package/native/core/programmers/helpers/union_predicator_checks_neighbor_flag_test.go +34 -0
  214. package/native/core/programmers/helpers/union_predicator_skips_atomic_like_native_fields_test.go +65 -0
  215. package/native/core/programmers/helpers/union_predicator_skips_collection_bucket_fields_test.go +72 -0
  216. package/native/core/programmers/helpers/union_predicator_skips_shared_native_names_test.go +239 -0
  217. package/native/core/programmers/helpers/union_predicator_skips_shared_object_fields_test.go +43 -0
  218. package/native/core/programmers/helpers/union_predicator_skips_shared_template_fields_test.go +57 -0
  219. package/native/core/programmers/http/HttpAssertFormDataProgrammer.go +116 -116
  220. package/native/core/programmers/http/HttpAssertHeadersProgrammer.go +59 -59
  221. package/native/core/programmers/http/HttpAssertQueryProgrammer.go +71 -71
  222. package/native/core/programmers/http/HttpFormDataProgrammer.go +416 -416
  223. package/native/core/programmers/http/HttpHeadersProgrammer.go +428 -428
  224. package/native/core/programmers/http/HttpIsFormDataProgrammer.go +142 -142
  225. package/native/core/programmers/http/HttpIsHeadersProgrammer.go +53 -53
  226. package/native/core/programmers/http/HttpIsQueryProgrammer.go +65 -65
  227. package/native/core/programmers/http/HttpParameterProgrammer.go +190 -190
  228. package/native/core/programmers/http/HttpQueryProgrammer.go +484 -484
  229. package/native/core/programmers/http/HttpValidateFormDataProgrammer.go +110 -110
  230. package/native/core/programmers/http/HttpValidateHeadersProgrammer.go +56 -56
  231. package/native/core/programmers/http/HttpValidateQueryProgrammer.go +68 -68
  232. package/native/core/programmers/http/http_programmer_helper_coverage_test.go +120 -0
  233. package/native/core/programmers/http/index.go +1 -1
  234. package/native/core/programmers/index.go +1 -1
  235. package/native/core/programmers/internal/CheckerProgrammer.go +1990 -1749
  236. package/native/core/programmers/internal/FeatureProgrammer.go +1330 -770
  237. package/native/core/programmers/internal/internal_utility_coverage_test.go +384 -0
  238. package/native/core/programmers/iterate/check_array_length.go +64 -64
  239. package/native/core/programmers/iterate/check_bigint.go +78 -73
  240. package/native/core/programmers/iterate/check_dynamic_key.go +271 -270
  241. package/native/core/programmers/iterate/check_dynamic_key_tag_rows_test.go +46 -0
  242. package/native/core/programmers/iterate/check_dynamic_properties.go +292 -292
  243. package/native/core/programmers/iterate/check_everything.go +33 -33
  244. package/native/core/programmers/iterate/check_exclude.go +88 -0
  245. package/native/core/programmers/iterate/check_native.go +38 -45
  246. package/native/core/programmers/iterate/check_number.go +180 -169
  247. package/native/core/programmers/iterate/check_object.go +113 -91
  248. package/native/core/programmers/iterate/check_object_strict_optional_undefined_test.go +74 -0
  249. package/native/core/programmers/iterate/check_object_type_tags.go +64 -0
  250. package/native/core/programmers/iterate/check_string.go +78 -73
  251. package/native/core/programmers/iterate/check_template.go +150 -78
  252. package/native/core/programmers/iterate/check_union_array_like.go +422 -422
  253. package/native/core/programmers/iterate/decode_union_object.go +157 -157
  254. package/native/core/programmers/iterate/feature_object_entries.go +188 -175
  255. package/native/core/programmers/iterate/iterate_check_coverage_test.go +178 -0
  256. package/native/core/programmers/iterate/iterate_utility_coverage_test.go +302 -0
  257. package/native/core/programmers/iterate/json_schema_alias.go +62 -62
  258. package/native/core/programmers/iterate/json_schema_array.go +66 -66
  259. package/native/core/programmers/iterate/json_schema_bigint.go +17 -17
  260. package/native/core/programmers/iterate/json_schema_boolean.go +17 -17
  261. package/native/core/programmers/iterate/json_schema_constant.go +53 -53
  262. package/native/core/programmers/iterate/json_schema_description.go +21 -21
  263. package/native/core/programmers/iterate/json_schema_discriminator.go +57 -57
  264. package/native/core/programmers/iterate/json_schema_escaped.go +68 -68
  265. package/native/core/programmers/iterate/json_schema_jsDocTags.go +48 -48
  266. package/native/core/programmers/iterate/json_schema_native.go +106 -106
  267. package/native/core/programmers/iterate/json_schema_number.go +17 -17
  268. package/native/core/programmers/iterate/json_schema_object.go +184 -180
  269. package/native/core/programmers/iterate/json_schema_plugin.go +47 -47
  270. package/native/core/programmers/iterate/json_schema_station.go +251 -251
  271. package/native/core/programmers/iterate/json_schema_string.go +17 -17
  272. package/native/core/programmers/iterate/json_schema_template.go +63 -63
  273. package/native/core/programmers/iterate/json_schema_title.go +25 -25
  274. package/native/core/programmers/iterate/json_schema_tuple.go +41 -41
  275. package/native/core/programmers/iterate/metadata_to_pattern.go +64 -64
  276. package/native/core/programmers/iterate/postfix_of_tuple.go +12 -12
  277. package/native/core/programmers/iterate/prune_object_properties.go +105 -105
  278. package/native/core/programmers/iterate/stringify_dynamic_properties.go +219 -219
  279. package/native/core/programmers/iterate/stringify_native.go +14 -14
  280. package/native/core/programmers/iterate/stringify_regular_properties.go +112 -112
  281. package/native/core/programmers/iterate/template_to_pattern.go +29 -29
  282. package/native/core/programmers/iterate/wrap_metadata_rest_tuple.go +23 -22
  283. package/native/core/programmers/json/JsonApplicationProgrammer.go +380 -380
  284. package/native/core/programmers/json/JsonAssertParseProgrammer.go +115 -115
  285. package/native/core/programmers/json/JsonAssertStringifyProgrammer.go +108 -108
  286. package/native/core/programmers/json/JsonIsParseProgrammer.go +162 -162
  287. package/native/core/programmers/json/JsonIsStringifyProgrammer.go +113 -113
  288. package/native/core/programmers/json/JsonSchemaProgrammer.go +94 -94
  289. package/native/core/programmers/json/JsonSchemasProgrammer.go +142 -148
  290. package/native/core/programmers/json/JsonStringifyProgrammer.go +1508 -1462
  291. package/native/core/programmers/json/JsonValidateParseProgrammer.go +105 -105
  292. package/native/core/programmers/json/JsonValidateStringifyProgrammer.go +126 -126
  293. package/native/core/programmers/json/index.go +1 -1
  294. package/native/core/programmers/json/json_schema_programmer_coverage_test.go +198 -0
  295. package/native/core/programmers/json/json_schemas_programmer_dedupes_bigint_diagnostics_test.go +37 -0
  296. package/native/core/programmers/json/json_schemas_programmer_rejects_bigint_native_test.go +29 -0
  297. package/native/core/programmers/json/json_stringify_programmer_coverage_test.go +422 -0
  298. package/native/core/programmers/llm/LlmApplicationProgrammer.go +515 -515
  299. package/native/core/programmers/llm/LlmCoerceProgrammer.go +109 -109
  300. package/native/core/programmers/llm/LlmControllerProgrammer.go +51 -51
  301. package/native/core/programmers/llm/LlmMetadataFactory.go +89 -89
  302. package/native/core/programmers/llm/LlmParametersProgrammer.go +141 -141
  303. package/native/core/programmers/llm/LlmParseProgrammer.go +121 -121
  304. package/native/core/programmers/llm/LlmSchemaProgrammer.go +846 -831
  305. package/native/core/programmers/llm/LlmStructuredOutputProgrammer.go +147 -147
  306. package/native/core/programmers/llm/index.go +1 -1
  307. package/native/core/programmers/llm/llm_application_programmer_coverage_test.go +166 -0
  308. package/native/core/programmers/llm/llm_schema_programmer_coverage_test.go +282 -0
  309. package/native/core/programmers/llm/llm_schema_programmer_dedupes_bigint_diagnostics_test.go +38 -0
  310. package/native/core/programmers/llm/llm_schema_programmer_rejects_bigint_native_test.go +30 -0
  311. package/native/core/programmers/llm/llm_schema_programmer_rejects_exclude_tag_in_strict_test.go +52 -0
  312. package/native/core/programmers/misc/MiscAssertCloneProgrammer.go +102 -102
  313. package/native/core/programmers/misc/MiscAssertPruneProgrammer.go +117 -117
  314. package/native/core/programmers/misc/MiscCloneProgrammer.go +1254 -1236
  315. package/native/core/programmers/misc/MiscEqualProgrammer.go +637 -0
  316. package/native/core/programmers/misc/MiscIsCloneProgrammer.go +117 -117
  317. package/native/core/programmers/misc/MiscIsPruneProgrammer.go +106 -106
  318. package/native/core/programmers/misc/MiscLiteralsProgrammer.go +125 -125
  319. package/native/core/programmers/misc/MiscPruneProgrammer.go +837 -821
  320. package/native/core/programmers/misc/MiscValidateCloneProgrammer.go +123 -123
  321. package/native/core/programmers/misc/MiscValidatePruneProgrammer.go +114 -114
  322. package/native/core/programmers/misc/index.go +1 -1
  323. package/native/core/programmers/misc/misc_programmer_helper_coverage_test.go +284 -0
  324. package/native/core/programmers/misc/misc_prune_programmer_branch_matrix_test.go +145 -0
  325. package/native/core/programmers/notations/NotationAssertGeneralProgrammer.go +107 -107
  326. package/native/core/programmers/notations/NotationGeneralProgrammer.go +1441 -1410
  327. package/native/core/programmers/notations/NotationIsGeneralProgrammer.go +112 -112
  328. package/native/core/programmers/notations/NotationValidateGeneralProgrammer.go +131 -131
  329. package/native/core/programmers/notations/index.go +1 -1
  330. package/native/core/programmers/notations/notation_general_helpers_test.go +395 -0
  331. package/native/core/programmers/notations/notation_general_programmer_snake_prefix_test.go +44 -0
  332. package/native/core/programmers/programmer_direct_helper_coverage_test.go +70 -0
  333. package/native/core/programmers/protobuf/ProtobufAssertDecodeProgrammer.go +125 -125
  334. package/native/core/programmers/protobuf/ProtobufAssertEncodeProgrammer.go +143 -143
  335. package/native/core/programmers/protobuf/ProtobufDecodeProgrammer.go +861 -861
  336. package/native/core/programmers/protobuf/ProtobufEncodeProgrammer.go +1266 -1225
  337. package/native/core/programmers/protobuf/ProtobufIsDecodeProgrammer.go +122 -122
  338. package/native/core/programmers/protobuf/ProtobufIsEncodeProgrammer.go +115 -115
  339. package/native/core/programmers/protobuf/ProtobufMessageProgrammer.go +269 -269
  340. package/native/core/programmers/protobuf/ProtobufValidateDecodeProgrammer.go +111 -111
  341. package/native/core/programmers/protobuf/ProtobufValidateEncodeProgrammer.go +145 -145
  342. package/native/core/programmers/protobuf/index.go +1 -1
  343. package/native/core/programmers/protobuf/protobuf_programmer_helper_coverage_test.go +454 -0
  344. package/native/core/programmers/random_programmer_helper_coverage_test.go +367 -0
  345. package/native/core/schemas/index.go +1 -1
  346. package/native/core/schemas/metadata/IMetadataDictionary.go +8 -8
  347. package/native/core/schemas/metadata/IMetadataTypeTagSequence.go +53 -0
  348. package/native/core/schemas/metadata/MetadataAlias.go +36 -28
  349. package/native/core/schemas/metadata/MetadataAliasType.go +64 -52
  350. package/native/core/schemas/metadata/MetadataApplication.go +41 -41
  351. package/native/core/schemas/metadata/MetadataArray.go +36 -28
  352. package/native/core/schemas/metadata/MetadataArrayType.go +59 -47
  353. package/native/core/schemas/metadata/MetadataAtomic.go +69 -69
  354. package/native/core/schemas/metadata/MetadataCollection.go +698 -547
  355. package/native/core/schemas/metadata/MetadataComponents.go +122 -122
  356. package/native/core/schemas/metadata/MetadataConstant.go +47 -47
  357. package/native/core/schemas/metadata/MetadataConstantValue.go +97 -97
  358. package/native/core/schemas/metadata/MetadataEscaped.go +40 -36
  359. package/native/core/schemas/metadata/MetadataFunction.go +46 -46
  360. package/native/core/schemas/metadata/MetadataMap.go +45 -37
  361. package/native/core/schemas/metadata/MetadataNative.go +72 -72
  362. package/native/core/schemas/metadata/MetadataObject.go +36 -28
  363. package/native/core/schemas/metadata/MetadataObjectType.go +189 -146
  364. package/native/core/schemas/metadata/MetadataParameter.go +46 -46
  365. package/native/core/schemas/metadata/MetadataProperty.go +50 -50
  366. package/native/core/schemas/metadata/MetadataSchema.go +1485 -863
  367. package/native/core/schemas/metadata/MetadataSet.go +41 -33
  368. package/native/core/schemas/metadata/MetadataTemplate.go +70 -70
  369. package/native/core/schemas/metadata/MetadataTuple.go +20 -20
  370. package/native/core/schemas/metadata/MetadataTupleType.go +69 -57
  371. package/native/core/schemas/metadata/index.go +1 -1
  372. package/native/core/schemas/metadata/metadata_object_type_required_literal_property_test.go +51 -0
  373. package/native/core/schemas/metadata/metadata_schema_covers_tag_matrix_test.go +125 -0
  374. package/native/core/schemas/metadata/metadata_schema_sole_literal_caches_pointer_test.go +38 -0
  375. package/native/core/schemas/metadata/schema_sequence_and_json_coverage_test.go +427 -0
  376. package/native/core/schemas/protobuf/IProtobufProperty.go +6 -6
  377. package/native/core/schemas/protobuf/IProtobufPropertyType.go +55 -55
  378. package/native/core/schemas/protobuf/IProtobufSchema.go +54 -54
  379. package/native/core/schemas/protobuf/index.go +1 -1
  380. package/native/core/schemas/protobuf/protobuf_marker_coverage_test.go +58 -0
  381. package/native/core/typings/Writable.go +5 -5
  382. package/native/core/utils/PatternUtil.go +57 -57
  383. package/native/core/utils/ProtobufNameEncoder.go +47 -47
  384. package/native/go.mod +31 -31
  385. package/native/go.sum +22 -22
  386. package/native/go.work +22 -22
  387. package/native/transform/CallExpressionTransformer.go +680 -646
  388. package/native/transform/FileTransformer.go +197 -198
  389. package/native/transform/ITransformProps.go +5 -5
  390. package/native/transform/ImportTransformer.go +285 -285
  391. package/native/transform/NodeTransformer.go +25 -25
  392. package/native/transform/TransformerError.go +11 -11
  393. package/native/transform/TypiaGenerator.go +168 -168
  394. package/native/transform/call_expression_transformer_registry_coverage_test.go +53 -0
  395. package/native/transform/call_expression_transformer_target_test.go +46 -0
  396. package/native/transform/features/AssertTransformer.go +39 -39
  397. package/native/transform/features/CreateAssertTransformer.go +39 -39
  398. package/native/transform/features/CreateIsTransformer.go +35 -35
  399. package/native/transform/features/CreateRandomTransformer.go +47 -47
  400. package/native/transform/features/CreateValidateTransformer.go +35 -35
  401. package/native/transform/features/IsTransformer.go +35 -35
  402. package/native/transform/features/RandomTransformer.go +54 -54
  403. package/native/transform/features/ValidateTransformer.go +35 -35
  404. package/native/transform/features/feature_transformer_entry_coverage_test.go +57 -0
  405. package/native/transform/features/functional/FunctionalGenericTransformer.go +70 -70
  406. package/native/transform/features/http/CreateHttpAssertFormDataTransformer.go +22 -22
  407. package/native/transform/features/http/CreateHttpAssertHeadersTransformer.go +22 -22
  408. package/native/transform/features/http/CreateHttpAssertQueryTransformer.go +28 -28
  409. package/native/transform/features/http/CreateHttpFormDataTransformer.go +22 -22
  410. package/native/transform/features/http/CreateHttpHeadersTransformer.go +22 -22
  411. package/native/transform/features/http/CreateHttpIsFormDataTransformer.go +22 -22
  412. package/native/transform/features/http/CreateHttpIsHeadersTransformer.go +22 -22
  413. package/native/transform/features/http/CreateHttpIsQueryTransformer.go +28 -28
  414. package/native/transform/features/http/CreateHttpParameterTransformer.go +22 -22
  415. package/native/transform/features/http/CreateHttpQueryTransformer.go +28 -28
  416. package/native/transform/features/http/CreateHttpValidateFormDataTransformer.go +22 -22
  417. package/native/transform/features/http/CreateHttpValidateHeadersTransformer.go +22 -22
  418. package/native/transform/features/http/CreateHttpValidateQueryTransformer.go +28 -28
  419. package/native/transform/features/http/HttpAssertFormDataTransformer.go +22 -22
  420. package/native/transform/features/http/HttpAssertHeadersTransformer.go +22 -22
  421. package/native/transform/features/http/HttpAssertQueryTransformer.go +28 -28
  422. package/native/transform/features/http/HttpFormDataTransformer.go +22 -22
  423. package/native/transform/features/http/HttpHeadersTransformer.go +22 -22
  424. package/native/transform/features/http/HttpIsFormDataTransformer.go +22 -22
  425. package/native/transform/features/http/HttpIsHeadersTransformer.go +22 -22
  426. package/native/transform/features/http/HttpIsQueryTransformer.go +28 -28
  427. package/native/transform/features/http/HttpParameterTransformer.go +22 -22
  428. package/native/transform/features/http/HttpQueryTransformer.go +28 -28
  429. package/native/transform/features/http/HttpValidateFormDataTransformer.go +22 -22
  430. package/native/transform/features/http/HttpValidateHeadersTransformer.go +22 -22
  431. package/native/transform/features/http/HttpValidateQueryTransformer.go +28 -28
  432. package/native/transform/features/http/http_transformer_entry_coverage_test.go +65 -0
  433. package/native/transform/features/json/JsonApplicationTransformer.go +75 -75
  434. package/native/transform/features/json/JsonAssertParseTransformer.go +22 -22
  435. package/native/transform/features/json/JsonAssertStringifyTransformer.go +22 -22
  436. package/native/transform/features/json/JsonCreateAssertParseTransformer.go +22 -22
  437. package/native/transform/features/json/JsonCreateAssertStringifyTransformer.go +22 -22
  438. package/native/transform/features/json/JsonCreateIsParseTransformer.go +22 -22
  439. package/native/transform/features/json/JsonCreateIsStringifyTransformer.go +22 -22
  440. package/native/transform/features/json/JsonCreateStringifyTransformer.go +22 -22
  441. package/native/transform/features/json/JsonCreateValidateParseTransformer.go +22 -22
  442. package/native/transform/features/json/JsonCreateValidateStringifyProgrammer.go +22 -22
  443. package/native/transform/features/json/JsonIsParseTransformer.go +22 -22
  444. package/native/transform/features/json/JsonIsStringifyTransformer.go +22 -22
  445. package/native/transform/features/json/JsonSchemaTransformer.go +175 -175
  446. package/native/transform/features/json/JsonSchemasTransformer.go +109 -109
  447. package/native/transform/features/json/JsonStringifyTransformer.go +22 -22
  448. package/native/transform/features/json/JsonValidateParseTransformer.go +22 -22
  449. package/native/transform/features/json/JsonValidateStringifyTransformer.go +22 -22
  450. package/native/transform/features/json/json_transformer_entry_coverage_test.go +56 -0
  451. package/native/transform/features/llm/LlmApplicationTransformer.go +54 -54
  452. package/native/transform/features/llm/LlmCoerceTransformer.go +63 -63
  453. package/native/transform/features/llm/LlmControllerTransformer.go +59 -59
  454. package/native/transform/features/llm/LlmCreateCoerceTransformer.go +54 -54
  455. package/native/transform/features/llm/LlmCreateParseTransformer.go +54 -54
  456. package/native/transform/features/llm/LlmParametersTransformer.go +49 -49
  457. package/native/transform/features/llm/LlmParseTransformer.go +63 -63
  458. package/native/transform/features/llm/LlmSchemaTransformer.go +167 -167
  459. package/native/transform/features/llm/LlmStructuredOutputTransformer.go +55 -55
  460. package/native/transform/features/llm/llm_transformer_entry_coverage_test.go +48 -0
  461. package/native/transform/features/misc/MiscAssertCloneTransformer.go +22 -22
  462. package/native/transform/features/misc/MiscAssertPruneTransformer.go +22 -22
  463. package/native/transform/features/misc/MiscCloneTransformer.go +22 -22
  464. package/native/transform/features/misc/MiscCoverTransformer.go +14 -0
  465. package/native/transform/features/misc/MiscCreateAssertCloneTransformer.go +22 -22
  466. package/native/transform/features/misc/MiscCreateAssertPruneTransformer.go +22 -22
  467. package/native/transform/features/misc/MiscCreateCloneTransformer.go +22 -22
  468. package/native/transform/features/misc/MiscCreateCoverTransformer.go +14 -0
  469. package/native/transform/features/misc/MiscCreateEqualTransformer.go +14 -0
  470. package/native/transform/features/misc/MiscCreateIsCloneTransformer.go +22 -22
  471. package/native/transform/features/misc/MiscCreateIsPruneTransformer.go +22 -22
  472. package/native/transform/features/misc/MiscCreatePruneTransformer.go +22 -22
  473. package/native/transform/features/misc/MiscCreateValidateCloneTransformer.go +22 -22
  474. package/native/transform/features/misc/MiscCreateValidatePruneTransformer.go +22 -22
  475. package/native/transform/features/misc/MiscEqualTransformer.go +73 -0
  476. package/native/transform/features/misc/MiscIsCloneTransformer.go +22 -22
  477. package/native/transform/features/misc/MiscIsPruneTransformer.go +22 -22
  478. package/native/transform/features/misc/MiscLiteralsTransformer.go +32 -32
  479. package/native/transform/features/misc/MiscPruneTransformer.go +22 -22
  480. package/native/transform/features/misc/MiscValidateCloneTransformer.go +22 -22
  481. package/native/transform/features/misc/MiscValidatePruneTransformer.go +22 -22
  482. package/native/transform/features/misc/misc_transformer_entry_coverage_test.go +56 -0
  483. package/native/transform/features/notations/NotationAssertGeneralTransformer.go +27 -27
  484. package/native/transform/features/notations/NotationCreateAssertGeneralTransformer.go +27 -27
  485. package/native/transform/features/notations/NotationCreateGeneralTransformer.go +27 -27
  486. package/native/transform/features/notations/NotationCreateIsGeneralTransformer.go +27 -27
  487. package/native/transform/features/notations/NotationCreateValidateGeneralTransformer.go +27 -27
  488. package/native/transform/features/notations/NotationGeneralTransformer.go +36 -36
  489. package/native/transform/features/notations/NotationIsGeneralTransformer.go +27 -27
  490. package/native/transform/features/notations/NotationValidateGeneralTransformer.go +27 -27
  491. package/native/transform/features/notations/notation_transformer_entry_coverage_test.go +58 -0
  492. package/native/transform/features/protobuf/ProtobufAssertDecodeTransformer.go +22 -22
  493. package/native/transform/features/protobuf/ProtobufAssertEncodeTransformer.go +22 -22
  494. package/native/transform/features/protobuf/ProtobufCreateAssertDecodeTransformer.go +22 -22
  495. package/native/transform/features/protobuf/ProtobufCreateAssertEncodeTransformer.go +22 -22
  496. package/native/transform/features/protobuf/ProtobufCreateDecodeTransformer.go +22 -22
  497. package/native/transform/features/protobuf/ProtobufCreateEncodeTransformer.go +22 -22
  498. package/native/transform/features/protobuf/ProtobufCreateIsDecodeTransformer.go +22 -22
  499. package/native/transform/features/protobuf/ProtobufCreateIsEncodeTransformer.go +22 -22
  500. package/native/transform/features/protobuf/ProtobufCreateValidateDecodeTransformer.go +22 -22
  501. package/native/transform/features/protobuf/ProtobufCreateValidateEncodeTransformer.go +22 -22
  502. package/native/transform/features/protobuf/ProtobufDecodeTransformer.go +22 -22
  503. package/native/transform/features/protobuf/ProtobufEncodeTransformer.go +22 -22
  504. package/native/transform/features/protobuf/ProtobufIsDecodeTransformer.go +22 -22
  505. package/native/transform/features/protobuf/ProtobufIsEncodeTransformer.go +22 -22
  506. package/native/transform/features/protobuf/ProtobufMessageTransformer.go +31 -31
  507. package/native/transform/features/protobuf/ProtobufValidateDecodeTransformer.go +22 -22
  508. package/native/transform/features/protobuf/ProtobufValidateEncodeTransformer.go +22 -22
  509. package/native/transform/features/protobuf/protobuf_transformer_entry_coverage_test.go +56 -0
  510. package/native/transform/features/reflect/ReflectMetadataTransformer.go +73 -73
  511. package/native/transform/features/reflect/ReflectNameTransformer.go +100 -100
  512. package/native/transform/features/reflect/ReflectSchemaTransformer.go +153 -153
  513. package/native/transform/features/reflect/ReflectSchemasTransformer.go +68 -68
  514. package/native/transform/features/reflect/reflect_metadata_transformer_edge_branches_test.go +55 -0
  515. package/native/transform/features/reflect/reflect_transformer_entry_coverage_test.go +46 -0
  516. package/native/transform/file_transformer_coverage_test.go +90 -0
  517. package/native/transform/import_transformer_coverage_test.go +153 -0
  518. package/native/transform/index.go +1 -1
  519. package/native/transform/internal/GenericTransformer.go +236 -236
  520. package/native/transform/transform.go +55 -55
  521. package/native/transform/typia_generator_helpers_coverage_test.go +166 -0
  522. package/package.json +11 -6
  523. package/src/TypeGuardError.ts +146 -146
  524. package/src/executable/TypiaGenerateWizard.ts +856 -333
  525. package/src/executable/generate/ttsc.ts +71 -71
  526. package/src/executable/typia.ts +76 -53
  527. package/src/internal/_isFormatUrl.ts +4 -4
  528. package/src/internal/_isTypeInt16.ts +5 -0
  529. package/src/internal/_isTypeInt8.ts +5 -0
  530. package/src/internal/_isTypeUint16.ts +5 -0
  531. package/src/internal/_isTypeUint8.ts +5 -0
  532. package/src/internal/_jsonStringifyNumber.ts +2 -2
  533. package/src/internal/_llmApplicationFinalize.ts +20 -20
  534. package/src/internal/_notationSnake.ts +43 -43
  535. package/src/llm.ts +480 -480
  536. package/src/misc.ts +538 -448
  537. package/src/notations.ts +828 -624
  538. package/src/re-exports.ts +35 -34
  539. package/src/transform.ts +60 -60
  540. package/native/go.work.sum +0 -6
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,171 +1,171 @@
1
- # Typia
2
-
3
- ![Typia Logo](https://typia.io/logo.png)
4
-
5
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
6
- [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
7
- [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
8
- [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Atest)
9
- [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
10
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
-
12
- ```typescript
13
- // RUNTIME VALIDATORS
14
- export function is<T>(input: unknown): input is T; // returns boolean
15
- export function assert<T>(input: unknown): T; // throws TypeGuardError
16
- export function assertGuard<T>(input: unknown): asserts input is T;
17
- export function validate<T>(input: unknown): IValidation<T>; // detailed
18
-
19
- // JSON FUNCTIONS
20
- export namespace json {
21
- export function schema<T>(): IJsonSchemaUnit<T>; // JSON schema
22
- export function assertParse<T>(input: string): T; // type safe parser
23
- export function assertStringify<T>(input: T): string; // safe and faster
24
- }
25
-
26
- // AI FUNCTION CALLING HARNESS
27
- export namespace llm {
28
- // collection of function calling schemas + validators/parsers
29
- export function application<Class>(): ILlmApplication<Class>;
30
- export function structuredOutput<P>(): ILlmStructuredOutput;
31
- // lenient json parser + type coercion
32
- export function parse<T>(str: string): T;
33
- }
34
-
35
- // PROTOCOL BUFFER
36
- export namespace protobuf {
37
- export function message<T>(): string; // Protocol Buffer message
38
- export function assertDecode<T>(buffer: Uint8Array): T; // safe decoder
39
- export function assertEncode<T>(input: T): Uint8Array; // safe encoder
40
- }
41
-
42
- // RANDOM GENERATOR
43
- export function random<T>(g?: Partial<IRandomGenerator>): T;
44
- ```
45
-
46
- `typia` is a transformer library supporting below features:
47
-
48
- - Super-fast Runtime Validators
49
- - Enhanced JSON schema and serde functions
50
- - LLM function calling harness
51
- - Protocol Buffer encoder and decoder
52
- - Random data generator
53
-
54
- > [!NOTE]
55
- >
56
- > - **Only one line** required, with pure TypeScript type
57
- > - Runtime validator is **20,000x faster** than `class-validator`
58
- > - JSON serialization is **200x faster** than `class-transformer`
59
- > - LLM function calling harness turns **6.75% → 100%** accuracy
60
-
61
- <!--
62
- ## Setup
63
-
64
- Install `typia@next` with the [`ttsc`](https://github.com/samchon/ttsc) toolchain.
65
-
66
- ```bash
67
- # install
68
- npm i typia@next
69
- npm i -D ttsc @typescript/native-preview
70
-
71
- # build
72
- npx ttsc
73
-
74
- # run a script directly
75
- npx ttsx src/index.ts
76
- ```
77
-
78
- You **must** use `ttsc` and `ttsx`. The stock `tsc`, `ts-node`, and `tsx` cannot apply the `typia` transform, so they will not work.
79
-
80
- For bundler integration (Vite, Next.js, Webpack, Rollup, esbuild, ...), use [`@ttsc/unplugin`](https://github.com/samchon/ttsc/tree/master/packages/unplugin).
81
- -->
82
-
83
- ## Transformation
84
-
85
- If you call `typia` function, it would be compiled like below.
86
-
87
- This is the key concept of `typia`, transforming TypeScript type to a runtime function. The `typia.is<T>()` function is transformed to a dedicated type checker by analyzing the target type `T` in the compilation level.
88
-
89
- This feature enables developers to ensure type safety in their applications, leveraging TypeScript's static typing while also providing runtime validation. Instead of defining additional schemas, you can simply utilize the pure TypeScript type itself.
90
-
91
- ```typescript
92
- //----
93
- // examples/checkString.ts
94
- //----
95
- import typia, { tags } from "typia";
96
- export const checkString = typia.createIs<string>();
97
-
98
- //----
99
- // examples/checkString.js
100
- //----
101
- import typia from "typia";
102
- export const checkString = (() => {
103
- return (input) => "string" === typeof input;
104
- })();
105
- ```
106
-
107
- ## Sponsors
108
-
109
- [![Backers](https://opencollective.com/typia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
110
-
111
- Thanks for your support.
112
-
113
- Your [donation](https://opencollective.com/typia) encourages `typia` development.
114
-
115
- ## Playground
116
-
117
- You can experience how typia works by [playground website](https://typia.io/playground):
118
-
119
- - 💻 https://typia.io/playground
120
-
121
- ## Guide Documents
122
-
123
- Check out the document in the [website](https://typia.io/docs/):
124
-
125
- ### 🏠 Home
126
-
127
- - [Introduction](https://typia.io/docs/)
128
- - [Setup](https://typia.io/docs/setup/)
129
- - [Legacy (TypeScript v6)](https://typia.io/docs/setup/legacy)
130
- - [TSGO (TypeScript v7)](https://typia.io/docs/setup/tsgo)
131
- - [Pure TypeScript](https://typia.io/docs/pure/)
132
-
133
- ### 📖 Features
134
-
135
- - Runtime Validators
136
- - [`assert()` function](https://typia.io/docs/validators/assert/)
137
- - [`is()` function](https://typia.io/docs/validators/is/)
138
- - [`validate()` function](https://typia.io/docs/validators/validate/)
139
- - [Functional Module](https://typia.io/docs/validators/functional)
140
- - [Special Tags](https://typia.io/docs/validators/tags/)
141
- - Enhanced JSON
142
- - [JSON Schema](https://typia.io/docs/json/schema/)
143
- - [`stringify()` functions](https://typia.io/docs/json/stringify/)
144
- - [`parse()` functions](https://typia.io/docs/json/parse/)
145
- - LLM Function Calling Harness
146
- - [`application()` function](https://typia.io/docs/llm/application/)
147
- - [`structuredOutput()` function](https://typia.io/docs/llm/structuredOutput/)
148
- - [`HttpLlm` module](https://typia.io/docs/llm/http/)
149
- - [`LlmJson` module](https://typia.io/docs/llm/json/)
150
- - Protocol Buffer
151
- - [Message Schema](https://typia.io/docs/protobuf/message)
152
- - [`decode()` functions](https://typia.io/docs/protobuf/decode/)
153
- - [`encode()` functions](https://typia.io/docs/protobuf/encode/)
154
- - [Random Generator](https://typia.io/docs/random/)
155
- - [Miscellaneous](https://typia.io/docs/misc/)
156
-
157
- ### 🔗 Appendix
158
-
159
- - [API Documents](https://typia.io/api)
160
- - Utilization Cases
161
- - [MCP](https://typia.io/docs/utilization/mcp/)
162
- - [Vercel AI SDK](https://typia.io/docs/utilization/vercel/)
163
- - [LangChain](https://typia.io/docs/utilization/langchain/)
164
- - [NestJS](https://typia.io/docs/utilization/nestjs/)
165
- - [tRPC](https://typia.io/docs/utilization/trpc/)
166
- - [⇲ Benchmark Result](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
167
- - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22474)
168
-
169
- ## Inspired By
170
-
171
- - [`typescript-is`](https://github.com/woutervh-/typescript-is)
1
+ # Typia
2
+
3
+ ![Typia Logo](https://typia.io/logo.png)
4
+
5
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
6
+ [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
7
+ [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
8
+ [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Atest)
9
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
10
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
+
12
+ ```typescript
13
+ // RUNTIME VALIDATORS
14
+ export function is<T>(input: unknown): input is T; // returns boolean
15
+ export function assert<T>(input: unknown): T; // throws TypeGuardError
16
+ export function assertGuard<T>(input: unknown): asserts input is T;
17
+ export function validate<T>(input: unknown): IValidation<T>; // detailed
18
+
19
+ // JSON FUNCTIONS
20
+ export namespace json {
21
+ export function schema<T>(): IJsonSchemaUnit<T>; // JSON schema
22
+ export function assertParse<T>(input: string): T; // type safe parser
23
+ export function assertStringify<T>(input: T): string; // safe and faster
24
+ }
25
+
26
+ // AI FUNCTION CALLING HARNESS
27
+ export namespace llm {
28
+ // collection of function calling schemas + validators/parsers
29
+ export function application<Class>(): ILlmApplication<Class>;
30
+ export function structuredOutput<P>(): ILlmStructuredOutput;
31
+ // lenient json parser + type coercion
32
+ export function parse<T>(str: string): T;
33
+ }
34
+
35
+ // PROTOCOL BUFFER
36
+ export namespace protobuf {
37
+ export function message<T>(): string; // Protocol Buffer message
38
+ export function assertDecode<T>(buffer: Uint8Array): T; // safe decoder
39
+ export function assertEncode<T>(input: T): Uint8Array; // safe encoder
40
+ }
41
+
42
+ // RANDOM GENERATOR
43
+ export function random<T>(g?: Partial<IRandomGenerator>): T;
44
+ ```
45
+
46
+ `typia` is a transformer library supporting below features:
47
+
48
+ - Super-fast Runtime Validators
49
+ - Enhanced JSON schema and serde functions
50
+ - LLM function calling harness
51
+ - Protocol Buffer encoder and decoder
52
+ - Random data generator
53
+
54
+ > [!NOTE]
55
+ >
56
+ > - **Only one line** required, with pure TypeScript type
57
+ > - Runtime validator is **20,000x faster** than `class-validator`
58
+ > - JSON serialization is **200x faster** than `class-transformer`
59
+ > - LLM function calling harness turns **6.75% → 100%** accuracy
60
+
61
+ <!--
62
+ ## Setup
63
+
64
+ Install `typia@next` with the [`ttsc`](https://github.com/samchon/ttsc) toolchain.
65
+
66
+ ```bash
67
+ # install
68
+ npm i typia@next
69
+ npm i -D ttsc @typescript/native-preview
70
+
71
+ # build
72
+ npx ttsc
73
+
74
+ # run a script directly
75
+ npx ttsx src/index.ts
76
+ ```
77
+
78
+ You **must** use `ttsc` and `ttsx`. The stock `tsc`, `ts-node`, and `tsx` cannot apply the `typia` transform, so they will not work.
79
+
80
+ For bundler integration (Vite, Next.js, Webpack, Rollup, esbuild, ...), use [`@ttsc/unplugin`](https://github.com/samchon/ttsc/tree/master/packages/unplugin).
81
+ -->
82
+
83
+ ## Transformation
84
+
85
+ If you call `typia` function, it would be compiled like below.
86
+
87
+ This is the key concept of `typia`, transforming TypeScript type to a runtime function. The `typia.is<T>()` function is transformed to a dedicated type checker by analyzing the target type `T` in the compilation level.
88
+
89
+ This feature enables developers to ensure type safety in their applications, leveraging TypeScript's static typing while also providing runtime validation. Instead of defining additional schemas, you can simply utilize the pure TypeScript type itself.
90
+
91
+ ```typescript
92
+ //----
93
+ // examples/checkString.ts
94
+ //----
95
+ import typia, { tags } from "typia";
96
+ export const checkString = typia.createIs<string>();
97
+
98
+ //----
99
+ // examples/checkString.js
100
+ //----
101
+ import typia from "typia";
102
+ export const checkString = (() => {
103
+ return (input) => "string" === typeof input;
104
+ })();
105
+ ```
106
+
107
+ ## Sponsors
108
+
109
+ [![Backers](https://opencollective.com/typia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
110
+
111
+ Thanks for your support.
112
+
113
+ Your [donation](https://opencollective.com/typia) encourages `typia` development.
114
+
115
+ ## Playground
116
+
117
+ You can experience how typia works by [playground website](https://typia.io/playground):
118
+
119
+ - 💻 https://typia.io/playground
120
+
121
+ ## Guide Documents
122
+
123
+ Check out the document in the [website](https://typia.io/docs/):
124
+
125
+ ### 🏠 Home
126
+
127
+ - [Introduction](https://typia.io/docs/)
128
+ - [Setup](https://typia.io/docs/setup/)
129
+ - [Legacy (TypeScript v6)](https://typia.io/docs/setup/legacy)
130
+ - [TSGO (TypeScript v7)](https://typia.io/docs/setup/tsgo)
131
+ - [Pure TypeScript](https://typia.io/docs/pure/)
132
+
133
+ ### 📖 Features
134
+
135
+ - Runtime Validators
136
+ - [`assert()` function](https://typia.io/docs/validators/assert/)
137
+ - [`is()` function](https://typia.io/docs/validators/is/)
138
+ - [`validate()` function](https://typia.io/docs/validators/validate/)
139
+ - [Functional Module](https://typia.io/docs/validators/functional)
140
+ - [Special Tags](https://typia.io/docs/validators/tags/)
141
+ - Enhanced JSON
142
+ - [JSON Schema](https://typia.io/docs/json/schema/)
143
+ - [`stringify()` functions](https://typia.io/docs/json/stringify/)
144
+ - [`parse()` functions](https://typia.io/docs/json/parse/)
145
+ - LLM Function Calling Harness
146
+ - [`application()` function](https://typia.io/docs/llm/application/)
147
+ - [`structuredOutput()` function](https://typia.io/docs/llm/structuredOutput/)
148
+ - [`HttpLlm` module](https://typia.io/docs/llm/http/)
149
+ - [`LlmJson` module](https://typia.io/docs/llm/json/)
150
+ - Protocol Buffer
151
+ - [Message Schema](https://typia.io/docs/protobuf/message)
152
+ - [`decode()` functions](https://typia.io/docs/protobuf/decode/)
153
+ - [`encode()` functions](https://typia.io/docs/protobuf/encode/)
154
+ - [Random Generator](https://typia.io/docs/random/)
155
+ - [Miscellaneous](https://typia.io/docs/misc/)
156
+
157
+ ### 🔗 Appendix
158
+
159
+ - [API Documents](https://typia.io/api)
160
+ - Utilization Cases
161
+ - [MCP](https://typia.io/docs/utilization/mcp/)
162
+ - [Vercel AI SDK](https://typia.io/docs/utilization/vercel/)
163
+ - [LangChain](https://typia.io/docs/utilization/langchain/)
164
+ - [NestJS](https://typia.io/docs/utilization/nestjs/)
165
+ - [tRPC](https://typia.io/docs/utilization/trpc/)
166
+ - [⇲ Benchmark Result](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
167
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22474)
168
+
169
+ ## Inspired By
170
+
171
+ - [`typescript-is`](https://github.com/woutervh-/typescript-is)
@@ -0,0 +1,4 @@
1
+ var _isTypeInt16 = {};
2
+
3
+ export { _isTypeInt16 as __exports };
4
+ //# sourceMappingURL=_isTypeInt16.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_isTypeInt16.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var _isTypeInt8 = {};
2
+
3
+ export { _isTypeInt8 as __exports };
4
+ //# sourceMappingURL=_isTypeInt8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_isTypeInt8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var _isTypeUint16 = {};
2
+
3
+ export { _isTypeUint16 as __exports };
4
+ //# sourceMappingURL=_isTypeUint16.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_isTypeUint16.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var _isTypeUint8 = {};
2
+
3
+ export { _isTypeUint8 as __exports };
4
+ //# sourceMappingURL=_isTypeUint8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_isTypeUint8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,8 +1,9 @@
1
1
  export declare namespace TypiaGenerateWizard {
2
2
  function generate(): Promise<void>;
3
3
  interface IArguments {
4
- input: string;
4
+ input?: string;
5
5
  output: string;
6
6
  project: string;
7
+ files: string[];
7
8
  }
8
9
  }