typia 9.7.1 → 9.7.2

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 (411) hide show
  1. package/lib/AssertionGuard.d.mts +27 -25
  2. package/lib/AssertionGuard.d.ts +27 -25
  3. package/lib/CamelCase.d.mts +1 -1
  4. package/lib/CamelCase.d.ts +1 -1
  5. package/lib/IRandomGenerator.d.mts +44 -42
  6. package/lib/IRandomGenerator.d.ts +44 -42
  7. package/lib/IReadableURLSearchParams.d.mts +2 -2
  8. package/lib/IReadableURLSearchParams.d.ts +2 -2
  9. package/lib/PascalCase.d.mts +1 -1
  10. package/lib/PascalCase.d.ts +1 -1
  11. package/lib/Primitive.d.mts +20 -22
  12. package/lib/Primitive.d.ts +20 -22
  13. package/lib/Resolved.d.mts +16 -18
  14. package/lib/Resolved.d.ts +16 -18
  15. package/lib/SnakeCase.d.mts +3 -2
  16. package/lib/SnakeCase.d.ts +3 -2
  17. package/lib/TypeGuardError.d.mts +88 -61
  18. package/lib/TypeGuardError.d.ts +88 -61
  19. package/lib/TypeGuardError.js +40 -29
  20. package/lib/TypeGuardError.js.map +1 -1
  21. package/lib/TypeGuardError.mjs +70 -48
  22. package/lib/factories/MetadataCollection.js +4 -12
  23. package/lib/factories/MetadataCollection.js.map +1 -1
  24. package/lib/factories/MetadataCollection.mjs +4 -12
  25. package/lib/factories/MetadataCommentTagFactory.js +5 -15
  26. package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
  27. package/lib/factories/MetadataCommentTagFactory.mjs +5 -15
  28. package/lib/factories/MetadataFactory.js +1 -3
  29. package/lib/factories/MetadataFactory.js.map +1 -1
  30. package/lib/factories/MetadataFactory.mjs +1 -3
  31. package/lib/factories/ProtobufFactory.js +1 -3
  32. package/lib/factories/ProtobufFactory.js.map +1 -1
  33. package/lib/factories/ProtobufFactory.mjs +1 -3
  34. package/lib/functional.d.mts +196 -195
  35. package/lib/functional.d.ts +196 -195
  36. package/lib/functional.js +18 -54
  37. package/lib/functional.js.map +1 -1
  38. package/lib/functional.mjs +18 -54
  39. package/lib/http.d.mts +303 -319
  40. package/lib/http.d.ts +303 -319
  41. package/lib/http.js +26 -78
  42. package/lib/http.js.map +1 -1
  43. package/lib/http.mjs +26 -78
  44. package/lib/internal/_ProtobufReader.d.mts +3 -9
  45. package/lib/internal/_ProtobufReader.d.ts +3 -9
  46. package/lib/internal/_ProtobufReader.js.map +1 -1
  47. package/lib/internal/_ProtobufReader.mjs +3 -9
  48. package/lib/internal/_ProtobufSizer.d.mts +4 -12
  49. package/lib/internal/_ProtobufSizer.d.ts +4 -12
  50. package/lib/internal/_ProtobufSizer.js.map +1 -1
  51. package/lib/internal/_ProtobufSizer.mjs +4 -12
  52. package/lib/internal/_ProtobufWriter.d.mts +5 -15
  53. package/lib/internal/_ProtobufWriter.d.ts +5 -15
  54. package/lib/internal/_ProtobufWriter.js.map +1 -1
  55. package/lib/internal/_ProtobufWriter.mjs +5 -15
  56. package/lib/internal/_jsonStringifyString.d.mts +4 -4
  57. package/lib/internal/_jsonStringifyString.d.ts +4 -4
  58. package/lib/internal/_jsonStringifyString.js +4 -4
  59. package/lib/internal/_jsonStringifyString.mjs +4 -4
  60. package/lib/json.d.mts +174 -195
  61. package/lib/json.d.ts +174 -195
  62. package/lib/json.js +16 -48
  63. package/lib/json.js.map +1 -1
  64. package/lib/json.mjs +16 -48
  65. package/lib/llm.d.mts +275 -192
  66. package/lib/llm.d.ts +275 -192
  67. package/lib/llm.js +4 -12
  68. package/lib/llm.js.map +1 -1
  69. package/lib/llm.mjs +4 -12
  70. package/lib/misc.d.mts +149 -172
  71. package/lib/misc.d.ts +149 -172
  72. package/lib/misc.js +17 -51
  73. package/lib/misc.js.map +1 -1
  74. package/lib/misc.mjs +17 -51
  75. package/lib/module.d.mts +263 -275
  76. package/lib/module.d.ts +263 -275
  77. package/lib/module.js +18 -54
  78. package/lib/module.js.map +1 -1
  79. package/lib/module.mjs +18 -54
  80. package/lib/notations.d.mts +153 -174
  81. package/lib/notations.d.ts +153 -174
  82. package/lib/notations.js +24 -72
  83. package/lib/notations.js.map +1 -1
  84. package/lib/notations.mjs +24 -72
  85. package/lib/programmers/FeatureProgrammer.d.mts +19 -41
  86. package/lib/programmers/FeatureProgrammer.d.ts +19 -41
  87. package/lib/programmers/FeatureProgrammer.js.map +1 -1
  88. package/lib/programmers/ImportProgrammer.js +3 -9
  89. package/lib/programmers/ImportProgrammer.js.map +1 -1
  90. package/lib/programmers/ImportProgrammer.mjs +3 -9
  91. package/lib/programmers/RandomProgrammer.js +6 -0
  92. package/lib/programmers/RandomProgrammer.js.map +1 -1
  93. package/lib/programmers/RandomProgrammer.mjs +6 -0
  94. package/lib/programmers/helpers/ProtobufWire.d.mts +13 -13
  95. package/lib/programmers/helpers/ProtobufWire.d.ts +13 -13
  96. package/lib/programmers/internal/check_array_length.js +2 -6
  97. package/lib/programmers/internal/check_array_length.js.map +1 -1
  98. package/lib/programmers/internal/check_array_length.mjs +2 -6
  99. package/lib/programmers/internal/check_bigint.js +2 -6
  100. package/lib/programmers/internal/check_bigint.js.map +1 -1
  101. package/lib/programmers/internal/check_bigint.mjs +2 -6
  102. package/lib/programmers/internal/check_dynamic_key.js +2 -6
  103. package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
  104. package/lib/programmers/internal/check_dynamic_key.mjs +2 -6
  105. package/lib/programmers/internal/check_dynamic_properties.js +3 -9
  106. package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
  107. package/lib/programmers/internal/check_dynamic_properties.mjs +3 -9
  108. package/lib/programmers/internal/check_everything.js +1 -3
  109. package/lib/programmers/internal/check_everything.js.map +1 -1
  110. package/lib/programmers/internal/check_everything.mjs +1 -3
  111. package/lib/programmers/internal/check_native.js +2 -6
  112. package/lib/programmers/internal/check_native.js.map +1 -1
  113. package/lib/programmers/internal/check_native.mjs +2 -6
  114. package/lib/programmers/internal/check_number.js +2 -6
  115. package/lib/programmers/internal/check_number.js.map +1 -1
  116. package/lib/programmers/internal/check_number.mjs +2 -6
  117. package/lib/programmers/internal/check_object.js +2 -6
  118. package/lib/programmers/internal/check_object.js.map +1 -1
  119. package/lib/programmers/internal/check_object.mjs +2 -6
  120. package/lib/programmers/internal/check_string.js +2 -6
  121. package/lib/programmers/internal/check_string.js.map +1 -1
  122. package/lib/programmers/internal/check_string.mjs +2 -6
  123. package/lib/programmers/internal/check_template.js +1 -3
  124. package/lib/programmers/internal/check_template.js.map +1 -1
  125. package/lib/programmers/internal/check_template.mjs +1 -3
  126. package/lib/programmers/internal/check_union_array_like.js +1 -3
  127. package/lib/programmers/internal/check_union_array_like.js.map +1 -1
  128. package/lib/programmers/internal/check_union_array_like.mjs +1 -3
  129. package/lib/programmers/internal/decode_union_object.js +2 -6
  130. package/lib/programmers/internal/decode_union_object.js.map +1 -1
  131. package/lib/programmers/internal/decode_union_object.mjs +2 -6
  132. package/lib/programmers/internal/feature_object_entries.js +1 -3
  133. package/lib/programmers/internal/feature_object_entries.js.map +1 -1
  134. package/lib/programmers/internal/feature_object_entries.mjs +1 -3
  135. package/lib/programmers/internal/json_schema_escaped.js +2 -6
  136. package/lib/programmers/internal/json_schema_escaped.js.map +1 -1
  137. package/lib/programmers/internal/json_schema_escaped.mjs +2 -6
  138. package/lib/programmers/internal/json_schema_object.js +3 -9
  139. package/lib/programmers/internal/json_schema_object.js.map +1 -1
  140. package/lib/programmers/internal/json_schema_object.mjs +3 -9
  141. package/lib/programmers/internal/metadata_to_pattern.js +1 -3
  142. package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
  143. package/lib/programmers/internal/metadata_to_pattern.mjs +1 -3
  144. package/lib/programmers/internal/postfix_of_tuple.js +1 -3
  145. package/lib/programmers/internal/postfix_of_tuple.js.map +1 -1
  146. package/lib/programmers/internal/postfix_of_tuple.mjs +1 -3
  147. package/lib/programmers/internal/prune_object_properties.js +1 -3
  148. package/lib/programmers/internal/prune_object_properties.js.map +1 -1
  149. package/lib/programmers/internal/prune_object_properties.mjs +1 -3
  150. package/lib/programmers/internal/stringify_dynamic_properties.js +2 -6
  151. package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
  152. package/lib/programmers/internal/stringify_dynamic_properties.mjs +2 -6
  153. package/lib/programmers/internal/stringify_native.js +1 -3
  154. package/lib/programmers/internal/stringify_native.js.map +1 -1
  155. package/lib/programmers/internal/stringify_native.mjs +1 -3
  156. package/lib/programmers/internal/stringify_regular_properties.js +2 -6
  157. package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
  158. package/lib/programmers/internal/stringify_regular_properties.mjs +2 -6
  159. package/lib/programmers/internal/template_to_pattern.js +1 -3
  160. package/lib/programmers/internal/template_to_pattern.js.map +1 -1
  161. package/lib/programmers/internal/template_to_pattern.mjs +1 -3
  162. package/lib/programmers/internal/wrap_metadata_rest_tuple.js +1 -3
  163. package/lib/programmers/internal/wrap_metadata_rest_tuple.js.map +1 -1
  164. package/lib/programmers/internal/wrap_metadata_rest_tuple.mjs +1 -3
  165. package/lib/programmers/json/JsonStringifyProgrammer.js +2 -2
  166. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
  167. package/lib/programmers/json/JsonStringifyProgrammer.mjs +2 -2
  168. package/lib/protobuf.d.mts +290 -297
  169. package/lib/protobuf.d.ts +290 -297
  170. package/lib/protobuf.js +17 -51
  171. package/lib/protobuf.js.map +1 -1
  172. package/lib/protobuf.mjs +17 -51
  173. package/lib/reflect.d.mts +2 -4
  174. package/lib/reflect.d.ts +2 -4
  175. package/lib/reflect.js +1 -3
  176. package/lib/reflect.js.map +1 -1
  177. package/lib/reflect.mjs +1 -3
  178. package/lib/schemas/json/IJsonApplication.d.mts +4 -4
  179. package/lib/schemas/json/IJsonApplication.d.ts +4 -4
  180. package/lib/schemas/json/IJsonSchemaCollection.d.mts +73 -56
  181. package/lib/schemas/json/IJsonSchemaCollection.d.ts +73 -56
  182. package/lib/schemas/json/IJsonSchemaUnit.d.mts +83 -70
  183. package/lib/schemas/json/IJsonSchemaUnit.d.ts +83 -70
  184. package/lib/schemas/metadata/Metadata.d.mts +1 -3
  185. package/lib/schemas/metadata/Metadata.d.ts +1 -3
  186. package/lib/schemas/metadata/Metadata.js +9 -27
  187. package/lib/schemas/metadata/Metadata.js.map +1 -1
  188. package/lib/schemas/metadata/Metadata.mjs +9 -27
  189. package/lib/schemas/metadata/MetadataAliasType.d.mts +1 -3
  190. package/lib/schemas/metadata/MetadataAliasType.d.ts +1 -3
  191. package/lib/schemas/metadata/MetadataAliasType.js +3 -9
  192. package/lib/schemas/metadata/MetadataAliasType.js.map +1 -1
  193. package/lib/schemas/metadata/MetadataAliasType.mjs +3 -9
  194. package/lib/schemas/metadata/MetadataApplication.d.mts +1 -3
  195. package/lib/schemas/metadata/MetadataApplication.d.ts +1 -3
  196. package/lib/schemas/metadata/MetadataApplication.js +2 -6
  197. package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
  198. package/lib/schemas/metadata/MetadataApplication.mjs +2 -6
  199. package/lib/schemas/metadata/MetadataArray.d.mts +1 -3
  200. package/lib/schemas/metadata/MetadataArray.d.ts +1 -3
  201. package/lib/schemas/metadata/MetadataArray.js +1 -3
  202. package/lib/schemas/metadata/MetadataArray.js.map +1 -1
  203. package/lib/schemas/metadata/MetadataArray.mjs +1 -3
  204. package/lib/schemas/metadata/MetadataArrayType.d.mts +1 -3
  205. package/lib/schemas/metadata/MetadataArrayType.d.ts +1 -3
  206. package/lib/schemas/metadata/MetadataArrayType.js +3 -9
  207. package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
  208. package/lib/schemas/metadata/MetadataArrayType.mjs +3 -9
  209. package/lib/schemas/metadata/MetadataAtomic.js +1 -3
  210. package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
  211. package/lib/schemas/metadata/MetadataAtomic.mjs +1 -3
  212. package/lib/schemas/metadata/MetadataEscaped.d.mts +1 -3
  213. package/lib/schemas/metadata/MetadataEscaped.d.ts +1 -3
  214. package/lib/schemas/metadata/MetadataEscaped.js +3 -9
  215. package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
  216. package/lib/schemas/metadata/MetadataEscaped.mjs +3 -9
  217. package/lib/schemas/metadata/MetadataFunction.d.mts +1 -3
  218. package/lib/schemas/metadata/MetadataFunction.d.ts +1 -3
  219. package/lib/schemas/metadata/MetadataFunction.js +2 -6
  220. package/lib/schemas/metadata/MetadataFunction.js.map +1 -1
  221. package/lib/schemas/metadata/MetadataFunction.mjs +2 -6
  222. package/lib/schemas/metadata/MetadataObject.d.mts +1 -3
  223. package/lib/schemas/metadata/MetadataObject.d.ts +1 -3
  224. package/lib/schemas/metadata/MetadataObject.js +1 -3
  225. package/lib/schemas/metadata/MetadataObject.js.map +1 -1
  226. package/lib/schemas/metadata/MetadataObject.mjs +1 -3
  227. package/lib/schemas/metadata/MetadataObjectType.d.mts +1 -3
  228. package/lib/schemas/metadata/MetadataObjectType.d.ts +1 -3
  229. package/lib/schemas/metadata/MetadataObjectType.js +5 -15
  230. package/lib/schemas/metadata/MetadataObjectType.js.map +1 -1
  231. package/lib/schemas/metadata/MetadataObjectType.mjs +6 -18
  232. package/lib/schemas/metadata/MetadataParameter.js +1 -3
  233. package/lib/schemas/metadata/MetadataParameter.js.map +1 -1
  234. package/lib/schemas/metadata/MetadataParameter.mjs +1 -3
  235. package/lib/schemas/metadata/MetadataProperty.d.mts +1 -3
  236. package/lib/schemas/metadata/MetadataProperty.d.ts +1 -3
  237. package/lib/schemas/metadata/MetadataProperty.js +3 -9
  238. package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
  239. package/lib/schemas/metadata/MetadataProperty.mjs +3 -9
  240. package/lib/schemas/metadata/MetadataTemplate.js +1 -3
  241. package/lib/schemas/metadata/MetadataTemplate.js.map +1 -1
  242. package/lib/schemas/metadata/MetadataTemplate.mjs +1 -3
  243. package/lib/schemas/metadata/MetadataTuple.d.mts +1 -3
  244. package/lib/schemas/metadata/MetadataTuple.d.ts +1 -3
  245. package/lib/schemas/metadata/MetadataTuple.js +2 -6
  246. package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
  247. package/lib/schemas/metadata/MetadataTuple.mjs +2 -6
  248. package/lib/schemas/metadata/MetadataTupleType.js +2 -6
  249. package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
  250. package/lib/schemas/metadata/MetadataTupleType.mjs +3 -9
  251. package/lib/tags/Constant.d.mts +16 -16
  252. package/lib/tags/Constant.d.ts +16 -16
  253. package/lib/tags/ContentMediaType.d.mts +7 -7
  254. package/lib/tags/ContentMediaType.d.ts +7 -7
  255. package/lib/tags/Default.d.mts +19 -19
  256. package/lib/tags/Default.d.ts +19 -19
  257. package/lib/tags/Example.d.mts +18 -18
  258. package/lib/tags/Example.d.ts +18 -18
  259. package/lib/tags/Examples.d.mts +23 -23
  260. package/lib/tags/Examples.d.ts +23 -23
  261. package/lib/tags/ExclusiveMaximum.d.mts +8 -5
  262. package/lib/tags/ExclusiveMaximum.d.ts +8 -5
  263. package/lib/tags/ExclusiveMinimum.d.mts +8 -5
  264. package/lib/tags/ExclusiveMinimum.d.ts +8 -5
  265. package/lib/tags/Format.d.mts +12 -8
  266. package/lib/tags/Format.d.ts +12 -8
  267. package/lib/tags/JsonSchemaPlugin.d.mts +20 -18
  268. package/lib/tags/JsonSchemaPlugin.d.ts +20 -18
  269. package/lib/tags/MaxItems.d.mts +9 -9
  270. package/lib/tags/MaxItems.d.ts +9 -9
  271. package/lib/tags/MaxLength.d.mts +6 -5
  272. package/lib/tags/MaxLength.d.ts +6 -5
  273. package/lib/tags/Maximum.d.mts +9 -7
  274. package/lib/tags/Maximum.d.ts +9 -7
  275. package/lib/tags/MinItems.d.mts +9 -9
  276. package/lib/tags/MinItems.d.ts +9 -9
  277. package/lib/tags/MinLength.d.mts +6 -5
  278. package/lib/tags/MinLength.d.ts +6 -5
  279. package/lib/tags/Minimum.d.mts +9 -7
  280. package/lib/tags/Minimum.d.ts +9 -7
  281. package/lib/tags/MultipleOf.d.mts +10 -7
  282. package/lib/tags/MultipleOf.d.ts +10 -7
  283. package/lib/tags/Pattern.d.mts +7 -4
  284. package/lib/tags/Pattern.d.ts +7 -4
  285. package/lib/tags/Sequence.d.mts +19 -17
  286. package/lib/tags/Sequence.d.ts +19 -17
  287. package/lib/tags/TagBase.d.mts +21 -28
  288. package/lib/tags/TagBase.d.ts +21 -28
  289. package/lib/tags/Type.d.mts +12 -11
  290. package/lib/tags/Type.d.ts +12 -11
  291. package/lib/tags/UniqueItems.d.mts +10 -9
  292. package/lib/tags/UniqueItems.d.ts +10 -9
  293. package/lib/tags/internal/FormatCheatSheet.d.mts +1 -3
  294. package/lib/tags/internal/FormatCheatSheet.d.ts +1 -3
  295. package/lib/tags/internal/FormatCheatSheet.js +1 -3
  296. package/lib/tags/internal/FormatCheatSheet.js.map +1 -1
  297. package/lib/tags/internal/FormatCheatSheet.mjs +1 -3
  298. package/lib/transformers/ITransformOptions.d.mts +27 -19
  299. package/lib/transformers/ITransformOptions.d.ts +27 -19
  300. package/lib/transformers/ImportTransformer.js +5 -10
  301. package/lib/transformers/ImportTransformer.js.map +1 -1
  302. package/lib/transformers/ImportTransformer.mjs +5 -10
  303. package/lib/transformers/NoTransformConfigurationError.js +1 -3
  304. package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
  305. package/lib/transformers/NoTransformConfigurationError.mjs +1 -3
  306. package/lib/transformers/features/llm/LlmApplicationTransformer.js +1 -3
  307. package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
  308. package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +1 -3
  309. package/lib/typings/Equal.d.mts +6 -6
  310. package/lib/typings/Equal.d.ts +6 -6
  311. package/package.json +2 -1
  312. package/src/AssertionGuard.ts +27 -25
  313. package/src/CamelCase.ts +1 -1
  314. package/src/IRandomGenerator.ts +44 -42
  315. package/src/IReadableURLSearchParams.ts +2 -2
  316. package/src/PascalCase.ts +1 -1
  317. package/src/Primitive.ts +20 -22
  318. package/src/Resolved.ts +16 -18
  319. package/src/SnakeCase.ts +3 -2
  320. package/src/TypeGuardError.ts +101 -64
  321. package/src/factories/MetadataCollection.ts +4 -12
  322. package/src/factories/MetadataCommentTagFactory.ts +8 -24
  323. package/src/factories/MetadataFactory.ts +1 -3
  324. package/src/factories/ProtobufFactory.ts +1 -3
  325. package/src/functional.ts +214 -249
  326. package/src/http.ts +329 -397
  327. package/src/internal/_ProtobufReader.ts +3 -9
  328. package/src/internal/_ProtobufSizer.ts +4 -12
  329. package/src/internal/_ProtobufWriter.ts +5 -15
  330. package/src/internal/_jsonStringifyString.ts +4 -4
  331. package/src/json.ts +190 -243
  332. package/src/llm.ts +279 -204
  333. package/src/misc.ts +166 -223
  334. package/src/module.ts +281 -329
  335. package/src/notations.ts +177 -246
  336. package/src/programmers/FeatureProgrammer.ts +19 -41
  337. package/src/programmers/ImportProgrammer.ts +3 -9
  338. package/src/programmers/RandomProgrammer.ts +6 -1
  339. package/src/programmers/helpers/ProtobufWire.ts +13 -13
  340. package/src/programmers/internal/check_array_length.ts +2 -6
  341. package/src/programmers/internal/check_bigint.ts +2 -6
  342. package/src/programmers/internal/check_dynamic_key.ts +2 -6
  343. package/src/programmers/internal/check_dynamic_properties.ts +3 -9
  344. package/src/programmers/internal/check_everything.ts +1 -3
  345. package/src/programmers/internal/check_native.ts +2 -6
  346. package/src/programmers/internal/check_number.ts +2 -6
  347. package/src/programmers/internal/check_object.ts +3 -9
  348. package/src/programmers/internal/check_string.ts +2 -6
  349. package/src/programmers/internal/check_template.ts +1 -3
  350. package/src/programmers/internal/check_union_array_like.ts +2 -6
  351. package/src/programmers/internal/decode_union_object.ts +3 -9
  352. package/src/programmers/internal/feature_object_entries.ts +1 -3
  353. package/src/programmers/internal/json_schema_escaped.ts +2 -6
  354. package/src/programmers/internal/json_schema_object.ts +4 -12
  355. package/src/programmers/internal/metadata_to_pattern.ts +1 -3
  356. package/src/programmers/internal/postfix_of_tuple.ts +1 -3
  357. package/src/programmers/internal/prune_object_properties.ts +1 -3
  358. package/src/programmers/internal/stringify_dynamic_properties.ts +2 -6
  359. package/src/programmers/internal/stringify_native.ts +1 -3
  360. package/src/programmers/internal/stringify_regular_properties.ts +2 -6
  361. package/src/programmers/internal/template_to_pattern.ts +1 -3
  362. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +1 -3
  363. package/src/programmers/json/JsonStringifyProgrammer.ts +2 -2
  364. package/src/protobuf.ts +307 -348
  365. package/src/reflect.ts +3 -7
  366. package/src/schemas/json/IJsonApplication.ts +4 -4
  367. package/src/schemas/json/IJsonSchemaCollection.ts +73 -56
  368. package/src/schemas/json/IJsonSchemaUnit.ts +83 -70
  369. package/src/schemas/metadata/IMetadataTypeTag.ts +1 -3
  370. package/src/schemas/metadata/Metadata.ts +9 -27
  371. package/src/schemas/metadata/MetadataAliasType.ts +3 -9
  372. package/src/schemas/metadata/MetadataApplication.ts +2 -6
  373. package/src/schemas/metadata/MetadataArray.ts +1 -3
  374. package/src/schemas/metadata/MetadataArrayType.ts +3 -9
  375. package/src/schemas/metadata/MetadataAtomic.ts +1 -3
  376. package/src/schemas/metadata/MetadataEscaped.ts +3 -9
  377. package/src/schemas/metadata/MetadataFunction.ts +2 -6
  378. package/src/schemas/metadata/MetadataObject.ts +1 -3
  379. package/src/schemas/metadata/MetadataObjectType.ts +6 -18
  380. package/src/schemas/metadata/MetadataParameter.ts +1 -3
  381. package/src/schemas/metadata/MetadataProperty.ts +3 -9
  382. package/src/schemas/metadata/MetadataTemplate.ts +1 -3
  383. package/src/schemas/metadata/MetadataTuple.ts +2 -6
  384. package/src/schemas/metadata/MetadataTupleType.ts +3 -9
  385. package/src/tags/Constant.ts +16 -16
  386. package/src/tags/ContentMediaType.ts +7 -7
  387. package/src/tags/Default.ts +19 -19
  388. package/src/tags/Example.ts +18 -18
  389. package/src/tags/Examples.ts +23 -23
  390. package/src/tags/ExclusiveMaximum.ts +8 -5
  391. package/src/tags/ExclusiveMinimum.ts +8 -5
  392. package/src/tags/Format.ts +12 -8
  393. package/src/tags/JsonSchemaPlugin.ts +20 -18
  394. package/src/tags/MaxItems.ts +9 -9
  395. package/src/tags/MaxLength.ts +6 -5
  396. package/src/tags/Maximum.ts +9 -7
  397. package/src/tags/MinItems.ts +9 -9
  398. package/src/tags/MinLength.ts +6 -5
  399. package/src/tags/Minimum.ts +9 -7
  400. package/src/tags/MultipleOf.ts +10 -7
  401. package/src/tags/Pattern.ts +7 -4
  402. package/src/tags/Sequence.ts +19 -17
  403. package/src/tags/TagBase.ts +21 -28
  404. package/src/tags/Type.ts +12 -11
  405. package/src/tags/UniqueItems.ts +10 -9
  406. package/src/tags/internal/FormatCheatSheet.ts +1 -3
  407. package/src/transformers/ITransformOptions.ts +27 -19
  408. package/src/transformers/ImportTransformer.ts +5 -10
  409. package/src/transformers/NoTransformConfigurationError.ts +1 -3
  410. package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
  411. package/src/typings/Equal.ts +6 -6
package/lib/Resolved.d.ts CHANGED
@@ -5,30 +5,28 @@ import { ValueOf } from "./typings/ValueOf";
5
5
  /**
6
6
  * Resolved type that erases every method.
7
7
  *
8
- * `Resolved` is a TMP (Type Meta Programming) type which converts
9
- * its argument as a resolved type that erases every method property.
8
+ * `Resolved` is a TMP (Type Meta Programming) type which converts its argument
9
+ * as a resolved type that erases every method property.
10
10
  *
11
- * If the target argument is a built-in class which returns its origin primitive type
12
- * through the `valueOf()` method like the `String` or `Number`, its return type will
13
- * be the `string` or `number`. Otherwise, if the built-in class does not have the
14
- * `valueOf()` method, the return type will be the same as the target argument.
11
+ * If the target argument is a built-in class which returns its origin primitive
12
+ * type through the `valueOf()` method like the `String` or `Number`, its return
13
+ * type will be the `string` or `number`. Otherwise, if the built-in class does
14
+ * not have the `valueOf()` method, the return type will be the same as the
15
+ * target argument.
15
16
  *
16
- * Otherwise, if the target argument is a type of custom class, all of its custom methods
17
- * will be erased and its prototype will be changed to the primitive `object`.
18
- * Therefore, the return type of the TMP type will finally be the resolved object.
17
+ * Otherwise, if the target argument is a type of custom class, all of its
18
+ * custom methods will be erased and its prototype will be changed to the
19
+ * primitive `object`. Therefore, the return type of the TMP type will finally
20
+ * be the resolved object.
19
21
  *
20
- * Before | After
21
- * ------------------------|----------------------------------------
22
- * `Boolean` | `boolean`
23
- * `Number` | `number`
24
- * `BigInt` | `bigint`
25
- * `String` | `string`
26
- * `Class` | `interface`
27
- * Native Class or Others | No change
22
+ * Before | After
23
+ * ------------------------|---------------------------------------- `Boolean` |
24
+ * `boolean` `Number` | `number` `BigInt` | `bigint` `String` | `string` `Class`
25
+ * | `interface` Native Class or Others | No change
28
26
  *
29
- * @template T Target argument type.
30
27
  * @author Jeongho Nam - https://github.com/samchon
31
28
  * @author Kyungsu Kang - https://github.com/kakasoo
29
+ * @template T Target argument type.
32
30
  */
33
31
  export type Resolved<T> = Equal<T, ResolvedMain<T>> extends true ? T : ResolvedMain<T>;
34
32
  type ResolvedMain<T> = T extends [never] ? never : ValueOf<T> extends boolean | number | bigint | string ? ValueOf<T> : T extends Function ? never : T extends object ? ResolvedObject<T> : ValueOf<T>;
@@ -4,12 +4,13 @@ import { ValueOf } from "./typings/ValueOf";
4
4
  /**
5
5
  * Snake case type.
6
6
  *
7
- * `SnakeCase` type is a type that all keys of an object are converted to snake case.
7
+ * `SnakeCase` type is a type that all keys of an object are converted to snake
8
+ * case.
8
9
  *
9
10
  * It also erases every method property like {@link Resolved} type.
10
11
  *
11
- * @template T Target type to be snake cased
12
12
  * @author Jeongho Nam - https://github.com/samchon
13
+ * @template T Target type to be snake cased
13
14
  */
14
15
  export type SnakeCase<T> = Equal<T, SnakageMain<T>> extends true ? T : SnakageMain<T>;
15
16
  type SnakageMain<T> = T extends [never] ? never : T extends {
@@ -4,12 +4,13 @@ import { ValueOf } from "./typings/ValueOf";
4
4
  /**
5
5
  * Snake case type.
6
6
  *
7
- * `SnakeCase` type is a type that all keys of an object are converted to snake case.
7
+ * `SnakeCase` type is a type that all keys of an object are converted to snake
8
+ * case.
8
9
  *
9
10
  * It also erases every method property like {@link Resolved} type.
10
11
  *
11
- * @template T Target type to be snake cased
12
12
  * @author Jeongho Nam - https://github.com/samchon
13
+ * @template T Target type to be snake cased
13
14
  */
14
15
  export type SnakeCase<T> = Equal<T, SnakageMain<T>> extends true ? T : SnakageMain<T>;
15
16
  type SnakageMain<T> = T extends [never] ? never : T extends {
@@ -1,51 +1,55 @@
1
1
  /**
2
- * Custom error class thrown when runtime assertion fails in `typia.assert<T>()` function.
2
+ * Custom error class thrown when runtime assertion fails in `typia.assert<T>()`
3
+ * function.
3
4
  *
4
5
  * This error is thrown by the `typia.assert<T>()` function when the input value
5
6
  * doesn't match the expected type.
6
7
  *
7
- * The error provides detailed information about the first assertion failure encountered,
8
- * including the access path where the error occurred, the expected type, and the actual value.
8
+ * The error provides detailed information about the first assertion failure
9
+ * encountered, including the access path where the error occurred, the expected
10
+ * type, and the actual value.
9
11
  *
10
- * @template T - The expected type (generic for type safety)
11
12
  * @author Jeongho Nam - https://github.com/samchon
12
13
  * @example
13
- * ```typescript
14
- * interface IMember {
15
- * name: string;
16
- * age: number & ExclusiveMinimum<19>;
17
- * }
14
+ * ```typescript
15
+ * interface IMember {
16
+ * name: string;
17
+ * age: number & ExclusiveMinimum<19>;
18
+ * }
18
19
  *
19
- * try {
20
- * typia.assert<IMember>({ name: "John", age: 18 });
21
- * } catch (error) {
22
- * if (error instanceof TypeGuardError) {
23
- * console.log(error.method); // "typia.assert"
24
- * console.log(error.path); // "input.age"
25
- * console.log(error.expected); // "number & ExclusiveMinimum<19>"
26
- * console.log(error.value); // 18
20
+ * try {
21
+ * typia.assert<IMember>({ name: "John", age: 18 });
22
+ * } catch (error) {
23
+ * if (error instanceof TypeGuardError) {
24
+ * console.log(error.method); // "typia.assert"
25
+ * console.log(error.path); // "input.age"
26
+ * console.log(error.expected); // "number & ExclusiveMinimum<19>"
27
+ * console.log(error.value); // 18
28
+ * }
27
29
  * }
28
- * }
29
- * ```
30
+ * ```;
31
+ *
32
+ * @template T - The expected type (generic for type safety)
30
33
  */
31
34
  export declare class TypeGuardError<T = any> extends Error {
32
35
  /**
33
36
  * The name of the typia method that threw this error.
34
37
  *
35
- * @example "typia.assert"
38
+ * @example
39
+ * typia.assert;
36
40
  */
37
41
  readonly method: string;
38
42
  /**
39
43
  * The access path to the property where the assertion error occurred.
40
44
  *
41
- * Uses dot notation to indicate the path for nested object properties.
42
- * May be `undefined` if the error occurred at the root level.
45
+ * Uses dot notation to indicate the path for nested object properties. May be
46
+ * `undefined` if the error occurred at the root level.
43
47
  *
44
48
  * @example
45
- * - `"input.age"` - Error in the age property of the object
46
- * - `"input.profile.email"` - Error in the email property of a nested object
47
- * - `"input[0].name"` - Error in the name property of the first array element
48
- * - `undefined` - Error occurred at the root level
49
+ * - `"input.age"` - Error in the age property of the object
50
+ * - `"input.profile.email"` - Error in the email property of a nested object
51
+ * - `"input[0].name"` - Error in the name property of the first array element
52
+ * - `undefined` - Error occurred at the root level
49
53
  */
50
54
  readonly path: string | undefined;
51
55
  /**
@@ -55,38 +59,48 @@ export declare class TypeGuardError<T = any> extends Error {
55
59
  * for complex types.
56
60
  *
57
61
  * @example
58
- * - `"string"` - Expected string type
59
- * - `"number & ExclusiveMinimum<19>"` - Expected number greater than 19
60
- * - `"undefined"` - Expected undefined (when superfluous property found in assertion)
61
- * - `"{ name: string; age: number }"` - Expected object type
62
+ * - `"string"` - Expected string type
63
+ * - `"number & ExclusiveMinimum<19>"` - Expected number greater than 19
64
+ * - `"undefined"` - Expected undefined (when superfluous property found in assertion)
65
+ * - `"{ name: string; age: number }"` - Expected object type
62
66
  */
63
67
  readonly expected: string;
64
68
  /**
65
69
  * The actual value that failed assertion.
66
70
  *
67
- * Stores the actual value at the error path as-is.
68
- * Useful for debugging by comparing the expected type with the actual value.
71
+ * Stores the actual value at the error path as-is. Useful for debugging by
72
+ * comparing the expected type with the actual value.
69
73
  *
70
74
  * @example
71
- * - `18` - Numeric value
72
- * - `"invalid"` - String value
73
- * - `{ name: "John", age: 18, sex: 1 }` - Object value
75
+ * - `18` - Numeric value
76
+ * - `"invalid"` - String value
77
+ * - `{ name: "John", age: 18, sex: 1 }` - Object value
74
78
  */
75
79
  readonly value: unknown;
76
80
  /**
77
- * Creates a new TypeGuardError instance.
81
+ * Optional human-readable description of the type guard error
78
82
  *
79
- * @param props - Object containing the properties needed to create the error
83
+ * This field is rarely populated in standard typia type assertion and is
84
+ * primarily intended for specialized AI agent libraries or custom validation
85
+ * scenarios that require additional context beyond the technical type
86
+ * information. Most assertion errors rely solely on the path, expected, and
87
+ * value fields for comprehensive error reporting.
88
+ */
89
+ readonly description?: string | undefined;
90
+ /**
91
+ * Creates a new TypeGuardError instance.
80
92
  *
81
93
  * @example
82
- * ```typescript
83
- * const error = new TypeGuardError({
84
- * method: "typia.assert",
85
- * path: "input.age",
86
- * expected: "number & ExclusiveMinimum<19>",
87
- * value: 18
88
- * });
89
- * ```
94
+ * ```typescript
95
+ * const error = new TypeGuardError({
96
+ * method: "typia.assert",
97
+ * path: "input.age",
98
+ * expected: "number & ExclusiveMinimum<19>",
99
+ * value: 18
100
+ * });
101
+ * ```;
102
+ *
103
+ * @param props - Object containing the properties needed to create the error
90
104
  */
91
105
  constructor(props: TypeGuardError.IProps);
92
106
  }
@@ -95,43 +109,56 @@ export declare namespace TypeGuardError {
95
109
  * Interface for properties passed to the TypeGuardError constructor.
96
110
  *
97
111
  * @example
98
- * ```typescript
99
- * const props: TypeGuardError.IProps = {
100
- * method: "typia.assertEquals",
101
- * path: "input.sex",
102
- * expected: "undefined",
103
- * value: 1,
104
- * message: "Custom error message" // optional
105
- * };
106
- * ```
112
+ * ```typescript
113
+ * const props: TypeGuardError.IProps = {
114
+ * method: "typia.assertEquals",
115
+ * path: "input.sex",
116
+ * expected: "undefined",
117
+ * value: 1,
118
+ * message: "Custom error message" // optional
119
+ * };
120
+ * ```;
107
121
  */
108
122
  interface IProps {
109
123
  /**
110
124
  * The name of the typia method that threw the error.
111
125
  *
112
- * @example "typia.assert", "typia.assertEquals"
126
+ * @example
127
+ * typia.assert, "typia.assertEquals";
113
128
  */
114
129
  method: string;
115
130
  /**
116
- * The access path to the property where the assertion error occurred (optional).
131
+ * The access path to the property where the assertion error occurred
132
+ * (optional).
117
133
  *
118
- * @example "input.age", "input.profile.email"
134
+ * @example
135
+ * input.age, "input.profile.email";
119
136
  */
120
137
  path?: undefined | string;
121
138
  /**
122
139
  * String representation of the expected type at the error location.
123
140
  *
124
- * @example "string", "number & ExclusiveMinimum<19>"
141
+ * @example
142
+ * string, "number & ExclusiveMinimum<19>";
125
143
  */
126
144
  expected: string;
145
+ /** The actual value that failed assertion. */
146
+ value: unknown;
127
147
  /**
128
- * The actual value that failed assertion.
148
+ * Optional human-readable description of the type guard error
149
+ *
150
+ * This field is rarely populated in standard typia type assertion and is
151
+ * primarily intended for specialized AI agent libraries or custom
152
+ * validation scenarios that require additional context beyond the technical
153
+ * type information. Most assertion errors rely solely on the path,
154
+ * expected, and value fields for comprehensive error reporting.
129
155
  */
130
- value: unknown;
156
+ description?: string;
131
157
  /**
132
158
  * Custom error message (optional).
133
159
  *
134
- * If not provided, a default format message will be automatically generated.
160
+ * If not provided, a default format message will be automatically
161
+ * generated.
135
162
  */
136
163
  message?: undefined | string;
137
164
  }
@@ -1,51 +1,55 @@
1
1
  /**
2
- * Custom error class thrown when runtime assertion fails in `typia.assert<T>()` function.
2
+ * Custom error class thrown when runtime assertion fails in `typia.assert<T>()`
3
+ * function.
3
4
  *
4
5
  * This error is thrown by the `typia.assert<T>()` function when the input value
5
6
  * doesn't match the expected type.
6
7
  *
7
- * The error provides detailed information about the first assertion failure encountered,
8
- * including the access path where the error occurred, the expected type, and the actual value.
8
+ * The error provides detailed information about the first assertion failure
9
+ * encountered, including the access path where the error occurred, the expected
10
+ * type, and the actual value.
9
11
  *
10
- * @template T - The expected type (generic for type safety)
11
12
  * @author Jeongho Nam - https://github.com/samchon
12
13
  * @example
13
- * ```typescript
14
- * interface IMember {
15
- * name: string;
16
- * age: number & ExclusiveMinimum<19>;
17
- * }
14
+ * ```typescript
15
+ * interface IMember {
16
+ * name: string;
17
+ * age: number & ExclusiveMinimum<19>;
18
+ * }
18
19
  *
19
- * try {
20
- * typia.assert<IMember>({ name: "John", age: 18 });
21
- * } catch (error) {
22
- * if (error instanceof TypeGuardError) {
23
- * console.log(error.method); // "typia.assert"
24
- * console.log(error.path); // "input.age"
25
- * console.log(error.expected); // "number & ExclusiveMinimum<19>"
26
- * console.log(error.value); // 18
20
+ * try {
21
+ * typia.assert<IMember>({ name: "John", age: 18 });
22
+ * } catch (error) {
23
+ * if (error instanceof TypeGuardError) {
24
+ * console.log(error.method); // "typia.assert"
25
+ * console.log(error.path); // "input.age"
26
+ * console.log(error.expected); // "number & ExclusiveMinimum<19>"
27
+ * console.log(error.value); // 18
28
+ * }
27
29
  * }
28
- * }
29
- * ```
30
+ * ```;
31
+ *
32
+ * @template T - The expected type (generic for type safety)
30
33
  */
31
34
  export declare class TypeGuardError<T = any> extends Error {
32
35
  /**
33
36
  * The name of the typia method that threw this error.
34
37
  *
35
- * @example "typia.assert"
38
+ * @example
39
+ * typia.assert;
36
40
  */
37
41
  readonly method: string;
38
42
  /**
39
43
  * The access path to the property where the assertion error occurred.
40
44
  *
41
- * Uses dot notation to indicate the path for nested object properties.
42
- * May be `undefined` if the error occurred at the root level.
45
+ * Uses dot notation to indicate the path for nested object properties. May be
46
+ * `undefined` if the error occurred at the root level.
43
47
  *
44
48
  * @example
45
- * - `"input.age"` - Error in the age property of the object
46
- * - `"input.profile.email"` - Error in the email property of a nested object
47
- * - `"input[0].name"` - Error in the name property of the first array element
48
- * - `undefined` - Error occurred at the root level
49
+ * - `"input.age"` - Error in the age property of the object
50
+ * - `"input.profile.email"` - Error in the email property of a nested object
51
+ * - `"input[0].name"` - Error in the name property of the first array element
52
+ * - `undefined` - Error occurred at the root level
49
53
  */
50
54
  readonly path: string | undefined;
51
55
  /**
@@ -55,38 +59,48 @@ export declare class TypeGuardError<T = any> extends Error {
55
59
  * for complex types.
56
60
  *
57
61
  * @example
58
- * - `"string"` - Expected string type
59
- * - `"number & ExclusiveMinimum<19>"` - Expected number greater than 19
60
- * - `"undefined"` - Expected undefined (when superfluous property found in assertion)
61
- * - `"{ name: string; age: number }"` - Expected object type
62
+ * - `"string"` - Expected string type
63
+ * - `"number & ExclusiveMinimum<19>"` - Expected number greater than 19
64
+ * - `"undefined"` - Expected undefined (when superfluous property found in assertion)
65
+ * - `"{ name: string; age: number }"` - Expected object type
62
66
  */
63
67
  readonly expected: string;
64
68
  /**
65
69
  * The actual value that failed assertion.
66
70
  *
67
- * Stores the actual value at the error path as-is.
68
- * Useful for debugging by comparing the expected type with the actual value.
71
+ * Stores the actual value at the error path as-is. Useful for debugging by
72
+ * comparing the expected type with the actual value.
69
73
  *
70
74
  * @example
71
- * - `18` - Numeric value
72
- * - `"invalid"` - String value
73
- * - `{ name: "John", age: 18, sex: 1 }` - Object value
75
+ * - `18` - Numeric value
76
+ * - `"invalid"` - String value
77
+ * - `{ name: "John", age: 18, sex: 1 }` - Object value
74
78
  */
75
79
  readonly value: unknown;
76
80
  /**
77
- * Creates a new TypeGuardError instance.
81
+ * Optional human-readable description of the type guard error
78
82
  *
79
- * @param props - Object containing the properties needed to create the error
83
+ * This field is rarely populated in standard typia type assertion and is
84
+ * primarily intended for specialized AI agent libraries or custom validation
85
+ * scenarios that require additional context beyond the technical type
86
+ * information. Most assertion errors rely solely on the path, expected, and
87
+ * value fields for comprehensive error reporting.
88
+ */
89
+ readonly description?: string | undefined;
90
+ /**
91
+ * Creates a new TypeGuardError instance.
80
92
  *
81
93
  * @example
82
- * ```typescript
83
- * const error = new TypeGuardError({
84
- * method: "typia.assert",
85
- * path: "input.age",
86
- * expected: "number & ExclusiveMinimum<19>",
87
- * value: 18
88
- * });
89
- * ```
94
+ * ```typescript
95
+ * const error = new TypeGuardError({
96
+ * method: "typia.assert",
97
+ * path: "input.age",
98
+ * expected: "number & ExclusiveMinimum<19>",
99
+ * value: 18
100
+ * });
101
+ * ```;
102
+ *
103
+ * @param props - Object containing the properties needed to create the error
90
104
  */
91
105
  constructor(props: TypeGuardError.IProps);
92
106
  }
@@ -95,43 +109,56 @@ export declare namespace TypeGuardError {
95
109
  * Interface for properties passed to the TypeGuardError constructor.
96
110
  *
97
111
  * @example
98
- * ```typescript
99
- * const props: TypeGuardError.IProps = {
100
- * method: "typia.assertEquals",
101
- * path: "input.sex",
102
- * expected: "undefined",
103
- * value: 1,
104
- * message: "Custom error message" // optional
105
- * };
106
- * ```
112
+ * ```typescript
113
+ * const props: TypeGuardError.IProps = {
114
+ * method: "typia.assertEquals",
115
+ * path: "input.sex",
116
+ * expected: "undefined",
117
+ * value: 1,
118
+ * message: "Custom error message" // optional
119
+ * };
120
+ * ```;
107
121
  */
108
122
  interface IProps {
109
123
  /**
110
124
  * The name of the typia method that threw the error.
111
125
  *
112
- * @example "typia.assert", "typia.assertEquals"
126
+ * @example
127
+ * typia.assert, "typia.assertEquals";
113
128
  */
114
129
  method: string;
115
130
  /**
116
- * The access path to the property where the assertion error occurred (optional).
131
+ * The access path to the property where the assertion error occurred
132
+ * (optional).
117
133
  *
118
- * @example "input.age", "input.profile.email"
134
+ * @example
135
+ * input.age, "input.profile.email";
119
136
  */
120
137
  path?: undefined | string;
121
138
  /**
122
139
  * String representation of the expected type at the error location.
123
140
  *
124
- * @example "string", "number & ExclusiveMinimum<19>"
141
+ * @example
142
+ * string, "number & ExclusiveMinimum<19>";
125
143
  */
126
144
  expected: string;
145
+ /** The actual value that failed assertion. */
146
+ value: unknown;
127
147
  /**
128
- * The actual value that failed assertion.
148
+ * Optional human-readable description of the type guard error
149
+ *
150
+ * This field is rarely populated in standard typia type assertion and is
151
+ * primarily intended for specialized AI agent libraries or custom
152
+ * validation scenarios that require additional context beyond the technical
153
+ * type information. Most assertion errors rely solely on the path,
154
+ * expected, and value fields for comprehensive error reporting.
129
155
  */
130
- value: unknown;
156
+ description?: string;
131
157
  /**
132
158
  * Custom error message (optional).
133
159
  *
134
- * If not provided, a default format message will be automatically generated.
160
+ * If not provided, a default format message will be automatically
161
+ * generated.
135
162
  */
136
163
  message?: undefined | string;
137
164
  }
@@ -2,52 +2,56 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypeGuardError = void 0;
4
4
  /**
5
- * Custom error class thrown when runtime assertion fails in `typia.assert<T>()` function.
5
+ * Custom error class thrown when runtime assertion fails in `typia.assert<T>()`
6
+ * function.
6
7
  *
7
8
  * This error is thrown by the `typia.assert<T>()` function when the input value
8
9
  * doesn't match the expected type.
9
10
  *
10
- * The error provides detailed information about the first assertion failure encountered,
11
- * including the access path where the error occurred, the expected type, and the actual value.
11
+ * The error provides detailed information about the first assertion failure
12
+ * encountered, including the access path where the error occurred, the expected
13
+ * type, and the actual value.
12
14
  *
13
- * @template T - The expected type (generic for type safety)
14
15
  * @author Jeongho Nam - https://github.com/samchon
15
16
  * @example
16
- * ```typescript
17
- * interface IMember {
18
- * name: string;
19
- * age: number & ExclusiveMinimum<19>;
20
- * }
17
+ * ```typescript
18
+ * interface IMember {
19
+ * name: string;
20
+ * age: number & ExclusiveMinimum<19>;
21
+ * }
21
22
  *
22
- * try {
23
- * typia.assert<IMember>({ name: "John", age: 18 });
24
- * } catch (error) {
25
- * if (error instanceof TypeGuardError) {
26
- * console.log(error.method); // "typia.assert"
27
- * console.log(error.path); // "input.age"
28
- * console.log(error.expected); // "number & ExclusiveMinimum<19>"
29
- * console.log(error.value); // 18
23
+ * try {
24
+ * typia.assert<IMember>({ name: "John", age: 18 });
25
+ * } catch (error) {
26
+ * if (error instanceof TypeGuardError) {
27
+ * console.log(error.method); // "typia.assert"
28
+ * console.log(error.path); // "input.age"
29
+ * console.log(error.expected); // "number & ExclusiveMinimum<19>"
30
+ * console.log(error.value); // 18
31
+ * }
30
32
  * }
31
- * }
32
- * ```
33
+ * ```;
34
+ *
35
+ * @template T - The expected type (generic for type safety)
33
36
  */
34
37
  class TypeGuardError extends Error {
35
38
  /**
36
39
  * Creates a new TypeGuardError instance.
37
40
  *
38
- * @param props - Object containing the properties needed to create the error
39
- *
40
41
  * @example
41
- * ```typescript
42
- * const error = new TypeGuardError({
43
- * method: "typia.assert",
44
- * path: "input.age",
45
- * expected: "number & ExclusiveMinimum<19>",
46
- * value: 18
47
- * });
48
- * ```
42
+ * ```typescript
43
+ * const error = new TypeGuardError({
44
+ * method: "typia.assert",
45
+ * path: "input.age",
46
+ * expected: "number & ExclusiveMinimum<19>",
47
+ * value: 18
48
+ * });
49
+ * ```;
50
+ *
51
+ * @param props - Object containing the properties needed to create the error
49
52
  */
50
53
  constructor(props) {
54
+ var _a;
51
55
  // MESSAGE CONSTRUCTION
52
56
  // Use custom message if provided, otherwise generate default format
53
57
  super(props.message ||
@@ -64,6 +68,13 @@ class TypeGuardError extends Error {
64
68
  this.path = props.path;
65
69
  this.expected = props.expected;
66
70
  this.value = props.value;
71
+ if (props.description || props.value === undefined)
72
+ this.description =
73
+ (_a = props.description) !== null && _a !== void 0 ? _a : [
74
+ "The value at this path is `undefined`.",
75
+ "",
76
+ `Please fill the \`${props.expected}\` typed value next time.`,
77
+ ].join("\n");
67
78
  }
68
79
  }
69
80
  exports.TypeGuardError = TypeGuardError;
@@ -1 +1 @@
1
- {"version":3,"file":"TypeGuardError.js","sourceRoot":"","sources":["../src/TypeGuardError.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,cAAwB,SAAQ,KAAK;IA4DhD;;;;;;;;;;;;;;OAcG;IACH,YAAmB,KAA4B;QAC7C,uBAAuB;QACvB,oEAAoE;QACpE,KAAK,CACH,KAAK,CAAC,OAAO;YACX,YAAY,KAAK,CAAC,MAAM,mBACtB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EACrC,kBAAkB,KAAK,CAAC,QAAQ,EAAE,CACrC,CAAC;QAEF,uBAAuB;QACvB,8EAA8E;QAC9E,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QACnC,IAAI,MAAM,CAAC,cAAc;YAAE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;;YACxD,IAAY,CAAC,SAAS,GAAG,KAAK,CAAC;QAErC,iBAAiB;QACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,CAAC;CACF;AAjGD,wCAiGC"}
1
+ {"version":3,"file":"TypeGuardError.js","sourceRoot":"","sources":["../src/TypeGuardError.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,cAAwB,SAAQ,KAAK;IAwEhD;;;;;;;;;;;;;;OAcG;IACH,YAAmB,KAA4B;;QAC7C,uBAAuB;QACvB,oEAAoE;QACpE,KAAK,CACH,KAAK,CAAC,OAAO;YACX,YAAY,KAAK,CAAC,MAAM,mBACtB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EACrC,kBAAkB,KAAK,CAAC,QAAQ,EAAE,CACrC,CAAC;QAEF,uBAAuB;QACvB,8EAA8E;QAC9E,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QACnC,IAAI,MAAM,CAAC,cAAc;YAAE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;;YACxD,IAAY,CAAC,SAAS,GAAG,KAAK,CAAC;QAErC,iBAAiB;QACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;YAChD,IAAI,CAAC,WAAW;gBACd,MAAA,KAAK,CAAC,WAAW,mCACjB;oBACE,wCAAwC;oBACxC,EAAE;oBACF,qBAAqB,KAAK,CAAC,QAAQ,2BAA2B;iBAC/D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;CACF;AArHD,wCAqHC"}