typia 9.7.1 → 10.0.0-dev.20251107

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 (424) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +153 -153
  3. package/lib/AssertionGuard.d.mts +27 -25
  4. package/lib/AssertionGuard.d.ts +27 -25
  5. package/lib/CamelCase.d.mts +1 -1
  6. package/lib/CamelCase.d.ts +1 -1
  7. package/lib/IRandomGenerator.d.mts +44 -42
  8. package/lib/IRandomGenerator.d.ts +44 -42
  9. package/lib/IReadableURLSearchParams.d.mts +2 -2
  10. package/lib/IReadableURLSearchParams.d.ts +2 -2
  11. package/lib/PascalCase.d.mts +1 -1
  12. package/lib/PascalCase.d.ts +1 -1
  13. package/lib/Primitive.d.mts +20 -22
  14. package/lib/Primitive.d.ts +20 -22
  15. package/lib/Resolved.d.mts +16 -18
  16. package/lib/Resolved.d.ts +16 -18
  17. package/lib/SnakeCase.d.mts +3 -2
  18. package/lib/SnakeCase.d.ts +3 -2
  19. package/lib/TypeGuardError.d.mts +88 -61
  20. package/lib/TypeGuardError.d.ts +88 -61
  21. package/lib/TypeGuardError.js +40 -29
  22. package/lib/TypeGuardError.js.map +1 -1
  23. package/lib/TypeGuardError.mjs +70 -48
  24. package/lib/factories/MetadataCollection.js +4 -12
  25. package/lib/factories/MetadataCollection.js.map +1 -1
  26. package/lib/factories/MetadataCollection.mjs +4 -12
  27. package/lib/factories/MetadataCommentTagFactory.js +5 -15
  28. package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
  29. package/lib/factories/MetadataCommentTagFactory.mjs +5 -15
  30. package/lib/factories/MetadataFactory.js +1 -3
  31. package/lib/factories/MetadataFactory.js.map +1 -1
  32. package/lib/factories/MetadataFactory.mjs +1 -3
  33. package/lib/factories/ProtobufFactory.js +2 -4
  34. package/lib/factories/ProtobufFactory.js.map +1 -1
  35. package/lib/factories/ProtobufFactory.mjs +2 -4
  36. package/lib/functional.d.mts +196 -195
  37. package/lib/functional.d.ts +196 -195
  38. package/lib/functional.js +18 -54
  39. package/lib/functional.js.map +1 -1
  40. package/lib/functional.mjs +18 -54
  41. package/lib/http.d.mts +303 -319
  42. package/lib/http.d.ts +303 -319
  43. package/lib/http.js +26 -78
  44. package/lib/http.js.map +1 -1
  45. package/lib/http.mjs +26 -78
  46. package/lib/internal/_ProtobufReader.d.mts +3 -9
  47. package/lib/internal/_ProtobufReader.d.ts +3 -9
  48. package/lib/internal/_ProtobufReader.js.map +1 -1
  49. package/lib/internal/_ProtobufReader.mjs +3 -9
  50. package/lib/internal/_ProtobufSizer.d.mts +4 -12
  51. package/lib/internal/_ProtobufSizer.d.ts +4 -12
  52. package/lib/internal/_ProtobufSizer.js.map +1 -1
  53. package/lib/internal/_ProtobufSizer.mjs +4 -12
  54. package/lib/internal/_ProtobufWriter.d.mts +5 -15
  55. package/lib/internal/_ProtobufWriter.d.ts +5 -15
  56. package/lib/internal/_ProtobufWriter.js.map +1 -1
  57. package/lib/internal/_ProtobufWriter.mjs +5 -15
  58. package/lib/internal/_jsonStringifyString.d.mts +4 -4
  59. package/lib/internal/_jsonStringifyString.d.ts +4 -4
  60. package/lib/internal/_jsonStringifyString.js +4 -4
  61. package/lib/internal/_jsonStringifyString.mjs +4 -4
  62. package/lib/json.d.mts +174 -195
  63. package/lib/json.d.ts +174 -195
  64. package/lib/json.js +16 -48
  65. package/lib/json.js.map +1 -1
  66. package/lib/json.mjs +16 -48
  67. package/lib/llm.d.mts +275 -192
  68. package/lib/llm.d.ts +275 -192
  69. package/lib/llm.js +4 -12
  70. package/lib/llm.js.map +1 -1
  71. package/lib/llm.mjs +4 -12
  72. package/lib/misc.d.mts +149 -172
  73. package/lib/misc.d.ts +149 -172
  74. package/lib/misc.js +17 -51
  75. package/lib/misc.js.map +1 -1
  76. package/lib/misc.mjs +17 -51
  77. package/lib/module.d.mts +263 -275
  78. package/lib/module.d.ts +263 -275
  79. package/lib/module.js +18 -54
  80. package/lib/module.js.map +1 -1
  81. package/lib/module.mjs +18 -54
  82. package/lib/notations.d.mts +153 -174
  83. package/lib/notations.d.ts +153 -174
  84. package/lib/notations.js +24 -72
  85. package/lib/notations.js.map +1 -1
  86. package/lib/notations.mjs +24 -72
  87. package/lib/programmers/FeatureProgrammer.d.mts +19 -41
  88. package/lib/programmers/FeatureProgrammer.d.ts +19 -41
  89. package/lib/programmers/FeatureProgrammer.js.map +1 -1
  90. package/lib/programmers/ImportProgrammer.js +3 -9
  91. package/lib/programmers/ImportProgrammer.js.map +1 -1
  92. package/lib/programmers/ImportProgrammer.mjs +3 -9
  93. package/lib/programmers/RandomProgrammer.js +6 -0
  94. package/lib/programmers/RandomProgrammer.js.map +1 -1
  95. package/lib/programmers/RandomProgrammer.mjs +6 -0
  96. package/lib/programmers/helpers/ProtobufWire.d.mts +13 -13
  97. package/lib/programmers/helpers/ProtobufWire.d.ts +13 -13
  98. package/lib/programmers/internal/check_array_length.js +2 -6
  99. package/lib/programmers/internal/check_array_length.js.map +1 -1
  100. package/lib/programmers/internal/check_array_length.mjs +2 -6
  101. package/lib/programmers/internal/check_bigint.js +2 -6
  102. package/lib/programmers/internal/check_bigint.js.map +1 -1
  103. package/lib/programmers/internal/check_bigint.mjs +2 -6
  104. package/lib/programmers/internal/check_dynamic_key.js +2 -6
  105. package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
  106. package/lib/programmers/internal/check_dynamic_key.mjs +2 -6
  107. package/lib/programmers/internal/check_dynamic_properties.js +3 -9
  108. package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
  109. package/lib/programmers/internal/check_dynamic_properties.mjs +3 -9
  110. package/lib/programmers/internal/check_everything.js +1 -3
  111. package/lib/programmers/internal/check_everything.js.map +1 -1
  112. package/lib/programmers/internal/check_everything.mjs +1 -3
  113. package/lib/programmers/internal/check_native.js +2 -6
  114. package/lib/programmers/internal/check_native.js.map +1 -1
  115. package/lib/programmers/internal/check_native.mjs +2 -6
  116. package/lib/programmers/internal/check_number.js +2 -6
  117. package/lib/programmers/internal/check_number.js.map +1 -1
  118. package/lib/programmers/internal/check_number.mjs +2 -6
  119. package/lib/programmers/internal/check_object.js +2 -6
  120. package/lib/programmers/internal/check_object.js.map +1 -1
  121. package/lib/programmers/internal/check_object.mjs +2 -6
  122. package/lib/programmers/internal/check_string.js +2 -6
  123. package/lib/programmers/internal/check_string.js.map +1 -1
  124. package/lib/programmers/internal/check_string.mjs +2 -6
  125. package/lib/programmers/internal/check_template.js +1 -3
  126. package/lib/programmers/internal/check_template.js.map +1 -1
  127. package/lib/programmers/internal/check_template.mjs +1 -3
  128. package/lib/programmers/internal/check_union_array_like.js +1 -3
  129. package/lib/programmers/internal/check_union_array_like.js.map +1 -1
  130. package/lib/programmers/internal/check_union_array_like.mjs +1 -3
  131. package/lib/programmers/internal/decode_union_object.js +2 -6
  132. package/lib/programmers/internal/decode_union_object.js.map +1 -1
  133. package/lib/programmers/internal/decode_union_object.mjs +2 -6
  134. package/lib/programmers/internal/feature_object_entries.js +1 -3
  135. package/lib/programmers/internal/feature_object_entries.js.map +1 -1
  136. package/lib/programmers/internal/feature_object_entries.mjs +1 -3
  137. package/lib/programmers/internal/json_schema_escaped.js +2 -6
  138. package/lib/programmers/internal/json_schema_escaped.js.map +1 -1
  139. package/lib/programmers/internal/json_schema_escaped.mjs +2 -6
  140. package/lib/programmers/internal/json_schema_object.js +3 -9
  141. package/lib/programmers/internal/json_schema_object.js.map +1 -1
  142. package/lib/programmers/internal/json_schema_object.mjs +3 -9
  143. package/lib/programmers/internal/json_schema_station.d.mts +2 -2
  144. package/lib/programmers/internal/json_schema_station.d.ts +2 -2
  145. package/lib/programmers/internal/metadata_to_pattern.js +1 -3
  146. package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
  147. package/lib/programmers/internal/metadata_to_pattern.mjs +1 -3
  148. package/lib/programmers/internal/postfix_of_tuple.js +1 -3
  149. package/lib/programmers/internal/postfix_of_tuple.js.map +1 -1
  150. package/lib/programmers/internal/postfix_of_tuple.mjs +1 -3
  151. package/lib/programmers/internal/prune_object_properties.js +1 -3
  152. package/lib/programmers/internal/prune_object_properties.js.map +1 -1
  153. package/lib/programmers/internal/prune_object_properties.mjs +1 -3
  154. package/lib/programmers/internal/stringify_dynamic_properties.js +2 -6
  155. package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
  156. package/lib/programmers/internal/stringify_dynamic_properties.mjs +2 -6
  157. package/lib/programmers/internal/stringify_native.js +1 -3
  158. package/lib/programmers/internal/stringify_native.js.map +1 -1
  159. package/lib/programmers/internal/stringify_native.mjs +1 -3
  160. package/lib/programmers/internal/stringify_regular_properties.js +2 -6
  161. package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
  162. package/lib/programmers/internal/stringify_regular_properties.mjs +2 -6
  163. package/lib/programmers/internal/template_to_pattern.js +1 -3
  164. package/lib/programmers/internal/template_to_pattern.js.map +1 -1
  165. package/lib/programmers/internal/template_to_pattern.mjs +1 -3
  166. package/lib/programmers/internal/wrap_metadata_rest_tuple.js +1 -3
  167. package/lib/programmers/internal/wrap_metadata_rest_tuple.js.map +1 -1
  168. package/lib/programmers/internal/wrap_metadata_rest_tuple.mjs +1 -3
  169. package/lib/programmers/json/JsonStringifyProgrammer.js +2 -2
  170. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
  171. package/lib/programmers/json/JsonStringifyProgrammer.mjs +2 -2
  172. package/lib/programmers/llm/LlmApplicationProgrammer.js +5 -1
  173. package/lib/programmers/llm/LlmApplicationProgrammer.js.map +1 -1
  174. package/lib/programmers/llm/LlmApplicationProgrammer.mjs +5 -1
  175. package/lib/programmers/llm/LlmSchemaProgrammer.js +1 -4
  176. package/lib/programmers/llm/LlmSchemaProgrammer.js.map +1 -1
  177. package/lib/programmers/llm/LlmSchemaProgrammer.mjs +1 -35
  178. package/lib/protobuf.d.mts +290 -297
  179. package/lib/protobuf.d.ts +290 -297
  180. package/lib/protobuf.js +17 -51
  181. package/lib/protobuf.js.map +1 -1
  182. package/lib/protobuf.mjs +17 -51
  183. package/lib/reflect.d.mts +2 -4
  184. package/lib/reflect.d.ts +2 -4
  185. package/lib/reflect.js +1 -3
  186. package/lib/reflect.js.map +1 -1
  187. package/lib/reflect.mjs +1 -3
  188. package/lib/schemas/json/IJsonApplication.d.mts +4 -4
  189. package/lib/schemas/json/IJsonApplication.d.ts +4 -4
  190. package/lib/schemas/json/IJsonSchemaCollection.d.mts +73 -56
  191. package/lib/schemas/json/IJsonSchemaCollection.d.ts +73 -56
  192. package/lib/schemas/json/IJsonSchemaUnit.d.mts +83 -70
  193. package/lib/schemas/json/IJsonSchemaUnit.d.ts +83 -70
  194. package/lib/schemas/metadata/Metadata.d.mts +1 -3
  195. package/lib/schemas/metadata/Metadata.d.ts +1 -3
  196. package/lib/schemas/metadata/Metadata.js +9 -27
  197. package/lib/schemas/metadata/Metadata.js.map +1 -1
  198. package/lib/schemas/metadata/Metadata.mjs +9 -27
  199. package/lib/schemas/metadata/MetadataAliasType.d.mts +1 -3
  200. package/lib/schemas/metadata/MetadataAliasType.d.ts +1 -3
  201. package/lib/schemas/metadata/MetadataAliasType.js +3 -9
  202. package/lib/schemas/metadata/MetadataAliasType.js.map +1 -1
  203. package/lib/schemas/metadata/MetadataAliasType.mjs +3 -9
  204. package/lib/schemas/metadata/MetadataApplication.d.mts +1 -3
  205. package/lib/schemas/metadata/MetadataApplication.d.ts +1 -3
  206. package/lib/schemas/metadata/MetadataApplication.js +2 -6
  207. package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
  208. package/lib/schemas/metadata/MetadataApplication.mjs +2 -6
  209. package/lib/schemas/metadata/MetadataArray.d.mts +1 -3
  210. package/lib/schemas/metadata/MetadataArray.d.ts +1 -3
  211. package/lib/schemas/metadata/MetadataArray.js +1 -3
  212. package/lib/schemas/metadata/MetadataArray.js.map +1 -1
  213. package/lib/schemas/metadata/MetadataArray.mjs +1 -3
  214. package/lib/schemas/metadata/MetadataArrayType.d.mts +1 -3
  215. package/lib/schemas/metadata/MetadataArrayType.d.ts +1 -3
  216. package/lib/schemas/metadata/MetadataArrayType.js +3 -9
  217. package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
  218. package/lib/schemas/metadata/MetadataArrayType.mjs +3 -9
  219. package/lib/schemas/metadata/MetadataAtomic.js +1 -3
  220. package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
  221. package/lib/schemas/metadata/MetadataAtomic.mjs +1 -3
  222. package/lib/schemas/metadata/MetadataEscaped.d.mts +1 -3
  223. package/lib/schemas/metadata/MetadataEscaped.d.ts +1 -3
  224. package/lib/schemas/metadata/MetadataEscaped.js +3 -9
  225. package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
  226. package/lib/schemas/metadata/MetadataEscaped.mjs +3 -9
  227. package/lib/schemas/metadata/MetadataFunction.d.mts +1 -3
  228. package/lib/schemas/metadata/MetadataFunction.d.ts +1 -3
  229. package/lib/schemas/metadata/MetadataFunction.js +2 -6
  230. package/lib/schemas/metadata/MetadataFunction.js.map +1 -1
  231. package/lib/schemas/metadata/MetadataFunction.mjs +2 -6
  232. package/lib/schemas/metadata/MetadataObject.d.mts +1 -3
  233. package/lib/schemas/metadata/MetadataObject.d.ts +1 -3
  234. package/lib/schemas/metadata/MetadataObject.js +1 -3
  235. package/lib/schemas/metadata/MetadataObject.js.map +1 -1
  236. package/lib/schemas/metadata/MetadataObject.mjs +1 -3
  237. package/lib/schemas/metadata/MetadataObjectType.d.mts +1 -3
  238. package/lib/schemas/metadata/MetadataObjectType.d.ts +1 -3
  239. package/lib/schemas/metadata/MetadataObjectType.js +5 -15
  240. package/lib/schemas/metadata/MetadataObjectType.js.map +1 -1
  241. package/lib/schemas/metadata/MetadataObjectType.mjs +6 -18
  242. package/lib/schemas/metadata/MetadataParameter.js +1 -3
  243. package/lib/schemas/metadata/MetadataParameter.js.map +1 -1
  244. package/lib/schemas/metadata/MetadataParameter.mjs +1 -3
  245. package/lib/schemas/metadata/MetadataProperty.d.mts +1 -3
  246. package/lib/schemas/metadata/MetadataProperty.d.ts +1 -3
  247. package/lib/schemas/metadata/MetadataProperty.js +3 -9
  248. package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
  249. package/lib/schemas/metadata/MetadataProperty.mjs +3 -9
  250. package/lib/schemas/metadata/MetadataTemplate.js +1 -3
  251. package/lib/schemas/metadata/MetadataTemplate.js.map +1 -1
  252. package/lib/schemas/metadata/MetadataTemplate.mjs +1 -3
  253. package/lib/schemas/metadata/MetadataTuple.d.mts +1 -3
  254. package/lib/schemas/metadata/MetadataTuple.d.ts +1 -3
  255. package/lib/schemas/metadata/MetadataTuple.js +2 -6
  256. package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
  257. package/lib/schemas/metadata/MetadataTuple.mjs +2 -6
  258. package/lib/schemas/metadata/MetadataTupleType.js +2 -6
  259. package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
  260. package/lib/schemas/metadata/MetadataTupleType.mjs +3 -9
  261. package/lib/tags/Constant.d.mts +16 -16
  262. package/lib/tags/Constant.d.ts +16 -16
  263. package/lib/tags/ContentMediaType.d.mts +7 -7
  264. package/lib/tags/ContentMediaType.d.ts +7 -7
  265. package/lib/tags/Default.d.mts +19 -19
  266. package/lib/tags/Default.d.ts +19 -19
  267. package/lib/tags/Example.d.mts +18 -18
  268. package/lib/tags/Example.d.ts +18 -18
  269. package/lib/tags/Examples.d.mts +23 -23
  270. package/lib/tags/Examples.d.ts +23 -23
  271. package/lib/tags/ExclusiveMaximum.d.mts +8 -5
  272. package/lib/tags/ExclusiveMaximum.d.ts +8 -5
  273. package/lib/tags/ExclusiveMinimum.d.mts +8 -5
  274. package/lib/tags/ExclusiveMinimum.d.ts +8 -5
  275. package/lib/tags/Format.d.mts +12 -8
  276. package/lib/tags/Format.d.ts +12 -8
  277. package/lib/tags/JsonSchemaPlugin.d.mts +20 -18
  278. package/lib/tags/JsonSchemaPlugin.d.ts +20 -18
  279. package/lib/tags/MaxItems.d.mts +9 -9
  280. package/lib/tags/MaxItems.d.ts +9 -9
  281. package/lib/tags/MaxLength.d.mts +6 -5
  282. package/lib/tags/MaxLength.d.ts +6 -5
  283. package/lib/tags/Maximum.d.mts +9 -7
  284. package/lib/tags/Maximum.d.ts +9 -7
  285. package/lib/tags/MinItems.d.mts +9 -9
  286. package/lib/tags/MinItems.d.ts +9 -9
  287. package/lib/tags/MinLength.d.mts +6 -5
  288. package/lib/tags/MinLength.d.ts +6 -5
  289. package/lib/tags/Minimum.d.mts +9 -7
  290. package/lib/tags/Minimum.d.ts +9 -7
  291. package/lib/tags/MultipleOf.d.mts +10 -7
  292. package/lib/tags/MultipleOf.d.ts +10 -7
  293. package/lib/tags/Pattern.d.mts +7 -4
  294. package/lib/tags/Pattern.d.ts +7 -4
  295. package/lib/tags/Sequence.d.mts +19 -17
  296. package/lib/tags/Sequence.d.ts +19 -17
  297. package/lib/tags/TagBase.d.mts +21 -28
  298. package/lib/tags/TagBase.d.ts +21 -28
  299. package/lib/tags/Type.d.mts +12 -11
  300. package/lib/tags/Type.d.ts +12 -11
  301. package/lib/tags/UniqueItems.d.mts +10 -9
  302. package/lib/tags/UniqueItems.d.ts +10 -9
  303. package/lib/tags/internal/FormatCheatSheet.d.mts +1 -3
  304. package/lib/tags/internal/FormatCheatSheet.d.ts +1 -3
  305. package/lib/tags/internal/FormatCheatSheet.js +1 -3
  306. package/lib/tags/internal/FormatCheatSheet.js.map +1 -1
  307. package/lib/tags/internal/FormatCheatSheet.mjs +1 -3
  308. package/lib/transformers/ITransformOptions.d.mts +27 -19
  309. package/lib/transformers/ITransformOptions.d.ts +27 -19
  310. package/lib/transformers/ImportTransformer.js +5 -10
  311. package/lib/transformers/ImportTransformer.js.map +1 -1
  312. package/lib/transformers/ImportTransformer.mjs +5 -10
  313. package/lib/transformers/NoTransformConfigurationError.js +1 -3
  314. package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
  315. package/lib/transformers/NoTransformConfigurationError.mjs +1 -3
  316. package/lib/transformers/features/llm/LlmApplicationTransformer.js +1 -3
  317. package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
  318. package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +1 -3
  319. package/lib/typings/Equal.d.mts +6 -6
  320. package/lib/typings/Equal.d.ts +6 -6
  321. package/package.json +121 -120
  322. package/src/AssertionGuard.ts +41 -39
  323. package/src/CamelCase.ts +75 -75
  324. package/src/IRandomGenerator.ts +337 -335
  325. package/src/IReadableURLSearchParams.ts +9 -9
  326. package/src/PascalCase.ts +71 -71
  327. package/src/Primitive.ts +90 -92
  328. package/src/Resolved.ts +72 -74
  329. package/src/SnakeCase.ts +127 -126
  330. package/src/TypeGuardError.ts +216 -179
  331. package/src/factories/MetadataCollection.ts +270 -278
  332. package/src/factories/MetadataCommentTagFactory.ts +632 -648
  333. package/src/factories/MetadataFactory.ts +402 -404
  334. package/src/factories/ProtobufFactory.ts +873 -875
  335. package/src/functional.ts +705 -740
  336. package/src/http.ts +972 -1040
  337. package/src/internal/_ProtobufReader.ts +188 -194
  338. package/src/internal/_ProtobufSizer.ts +137 -145
  339. package/src/internal/_ProtobufWriter.ts +135 -145
  340. package/src/internal/_jsonStringifyString.ts +42 -42
  341. package/src/json.ts +643 -696
  342. package/src/llm.ts +615 -540
  343. package/src/misc.ts +594 -651
  344. package/src/module.ts +889 -937
  345. package/src/notations.ts +751 -820
  346. package/src/programmers/FeatureProgrammer.ts +605 -627
  347. package/src/programmers/ImportProgrammer.ts +179 -185
  348. package/src/programmers/RandomProgrammer.ts +1195 -1190
  349. package/src/programmers/helpers/ProtobufWire.ts +34 -34
  350. package/src/programmers/internal/check_array_length.ts +43 -47
  351. package/src/programmers/internal/check_bigint.ts +46 -50
  352. package/src/programmers/internal/check_dynamic_key.ts +197 -201
  353. package/src/programmers/internal/check_dynamic_properties.ts +231 -237
  354. package/src/programmers/internal/check_everything.ts +21 -23
  355. package/src/programmers/internal/check_native.ts +23 -27
  356. package/src/programmers/internal/check_number.ts +108 -112
  357. package/src/programmers/internal/check_object.ts +72 -78
  358. package/src/programmers/internal/check_string.ts +46 -50
  359. package/src/programmers/internal/check_template.ts +46 -48
  360. package/src/programmers/internal/check_union_array_like.ts +331 -335
  361. package/src/programmers/internal/decode_union_object.ts +110 -116
  362. package/src/programmers/internal/feature_object_entries.ts +59 -61
  363. package/src/programmers/internal/json_schema_escaped.ts +78 -82
  364. package/src/programmers/internal/json_schema_object.ts +150 -158
  365. package/src/programmers/internal/json_schema_station.ts +2 -2
  366. package/src/programmers/internal/metadata_to_pattern.ts +40 -42
  367. package/src/programmers/internal/postfix_of_tuple.ts +3 -5
  368. package/src/programmers/internal/prune_object_properties.ts +69 -71
  369. package/src/programmers/internal/stringify_dynamic_properties.ts +158 -162
  370. package/src/programmers/internal/stringify_native.ts +5 -7
  371. package/src/programmers/internal/stringify_regular_properties.ts +77 -81
  372. package/src/programmers/internal/template_to_pattern.ts +21 -23
  373. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +21 -23
  374. package/src/programmers/json/JsonStringifyProgrammer.ts +1124 -1124
  375. package/src/programmers/llm/LlmApplicationProgrammer.ts +10 -1
  376. package/src/programmers/llm/LlmSchemaProgrammer.ts +2 -7
  377. package/src/protobuf.ts +820 -861
  378. package/src/reflect.ts +46 -50
  379. package/src/schemas/json/IJsonApplication.ts +77 -77
  380. package/src/schemas/json/IJsonSchemaCollection.ts +212 -195
  381. package/src/schemas/json/IJsonSchemaUnit.ts +263 -250
  382. package/src/schemas/metadata/IMetadataTypeTag.ts +14 -16
  383. package/src/schemas/metadata/Metadata.ts +669 -687
  384. package/src/schemas/metadata/MetadataAliasType.ts +57 -63
  385. package/src/schemas/metadata/MetadataApplication.ts +40 -44
  386. package/src/schemas/metadata/MetadataArray.ts +47 -49
  387. package/src/schemas/metadata/MetadataArrayType.ts +51 -57
  388. package/src/schemas/metadata/MetadataAtomic.ts +85 -87
  389. package/src/schemas/metadata/MetadataEscaped.ts +45 -51
  390. package/src/schemas/metadata/MetadataFunction.ts +45 -49
  391. package/src/schemas/metadata/MetadataObject.ts +46 -48
  392. package/src/schemas/metadata/MetadataObjectType.ts +137 -149
  393. package/src/schemas/metadata/MetadataParameter.ts +52 -54
  394. package/src/schemas/metadata/MetadataProperty.ts +53 -59
  395. package/src/schemas/metadata/MetadataTemplate.ts +78 -80
  396. package/src/schemas/metadata/MetadataTuple.ts +28 -32
  397. package/src/schemas/metadata/MetadataTupleType.ts +61 -67
  398. package/src/tags/Constant.ts +47 -47
  399. package/src/tags/ContentMediaType.ts +27 -27
  400. package/src/tags/Default.ts +52 -52
  401. package/src/tags/Example.ts +56 -56
  402. package/src/tags/Examples.ts +56 -56
  403. package/src/tags/ExclusiveMaximum.ts +44 -41
  404. package/src/tags/ExclusiveMinimum.ts +44 -41
  405. package/src/tags/Format.ts +78 -74
  406. package/src/tags/JsonSchemaPlugin.ts +36 -34
  407. package/src/tags/MaxItems.ts +31 -31
  408. package/src/tags/MaxLength.ts +25 -24
  409. package/src/tags/Maximum.ts +39 -37
  410. package/src/tags/MinItems.ts +31 -31
  411. package/src/tags/MinLength.ts +25 -24
  412. package/src/tags/Minimum.ts +39 -37
  413. package/src/tags/MultipleOf.ts +42 -39
  414. package/src/tags/Pattern.ts +49 -46
  415. package/src/tags/Sequence.ts +37 -35
  416. package/src/tags/TagBase.ts +102 -109
  417. package/src/tags/Type.ts +64 -63
  418. package/src/tags/UniqueItems.ts +34 -33
  419. package/src/tags/internal/FormatCheatSheet.ts +71 -73
  420. package/src/transformers/ITransformOptions.ts +70 -62
  421. package/src/transformers/ImportTransformer.ts +253 -258
  422. package/src/transformers/NoTransformConfigurationError.ts +16 -18
  423. package/src/transformers/features/llm/LlmApplicationTransformer.ts +224 -226
  424. package/src/typings/Equal.ts +18 -18
package/src/misc.ts CHANGED
@@ -1,651 +1,594 @@
1
- /* ===========================================================
2
- MISCELLANEOUS
3
- - LITERALS
4
- - CLONE
5
- - PRUNE
6
- - FACTORY FUNCTIONS
7
- ==============================================================
8
- LITERALS
9
- ----------------------------------------------------------- */
10
- import { NoTransformConfigurationError } from "./transformers/NoTransformConfigurationError";
11
-
12
- import { Atomic } from "./typings/Atomic";
13
-
14
- import { IValidation } from "./IValidation";
15
- import { Resolved } from "./Resolved";
16
- import { TypeGuardError } from "./TypeGuardError";
17
-
18
- /**
19
- * > You must configure the generic argument `T`.
20
- *
21
- * Union literal type to array.
22
- *
23
- * Converts a union literal type to an array of its members.
24
- *
25
- * ```typescript
26
- * literals<"A" | "B" | 1>; // ["A", "B", 1]
27
- * ```
28
- *
29
- * @template T Union literal type
30
- * @return Array of union literal type's members
31
- *
32
- * @author Jeongho Nam - https://github.com/samchon
33
- */
34
- export function literals(): never;
35
-
36
- /**
37
- * Union literal type to array.
38
- *
39
- * Converts a union literal type to an array of its members.
40
- *
41
- * ```typescript
42
- * literals<"A" | "B" | 1>; // ["A", "B", 1]
43
- * ```
44
- *
45
- * @template T Union literal type
46
- * @return Array of union literal type's members
47
- *
48
- * @author Jeongho Nam - https://github.com/samchon
49
- */
50
- export function literals<T extends Atomic.Type | null>(): T[];
51
-
52
- /**
53
- * @internal
54
- */
55
- export function literals(): never {
56
- NoTransformConfigurationError("misc.literals");
57
- }
58
-
59
- /* -----------------------------------------------------------
60
- CLONE
61
- ----------------------------------------------------------- */
62
- /**
63
- * Clone data.
64
- *
65
- * Clones an instance following type `T`. If the target *input* value or its member
66
- * variable contains a class instance having methods, those methods would not be
67
- * cloned.
68
- *
69
- * For reference, this `typia.misc.clone()` function does not validate the input value
70
- * type. It just believes that the input value is following the type `T`. Therefore,
71
- * if you can't ensure the input value type, it would be better to call
72
- * {@link assertClone} function instead.
73
- *
74
- * @template T Type of the input value
75
- * @param input A value to be cloned
76
- * @return Cloned data
77
- *
78
- * @author Jeongho Nam - https://github.com/samchon
79
- */
80
- export function clone<T>(input: T): Resolved<T>;
81
-
82
- /**
83
- * @internal
84
- */
85
- export function clone(): never {
86
- NoTransformConfigurationError("misc.clone");
87
- }
88
-
89
- /**
90
- * Clone data with type assertion.
91
- *
92
- * Clones an instance following type `T`, with type assertion. If the target `input`
93
- * value or its member variable contains a class instance having methods, those
94
- * methods would not be cloned.
95
- *
96
- * In such reason, when `input` value is not matched with the type `T`, it throws an
97
- * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
98
- * there's no problem on the `input` value, cloned data would be returned.
99
- *
100
- * @template T Type of the input value
101
- * @param input A value to be cloned
102
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
103
- * @return Cloned data
104
- *
105
- * @author Jeongho Nam - https://github.com/samchon
106
- */
107
- export function assertClone<T>(
108
- input: T,
109
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
110
- ): Resolved<T>;
111
-
112
- /**
113
- * Clone data with type assertion.
114
- *
115
- * Clones an instance following type `T`, with type assertion. If the target `input`
116
- * value or its member variable contains a class instance having methods, those
117
- * methods would not be cloned.
118
- *
119
- * In such reason, when `input` value is not matched with the type `T`, it throws an
120
- * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
121
- * there's no problem on the `input` value, cloned data would be returned.
122
- *
123
- * @template T Type of the input value
124
- * @param input A value to be cloned
125
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
126
- * @return Cloned data
127
- *
128
- * @author Jeongho Nam - https://github.com/samchon
129
- */
130
- export function assertClone<T>(
131
- input: unknown,
132
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
133
- ): Resolved<T>;
134
-
135
- /**
136
- * @internal
137
- */
138
- export function assertClone(): never {
139
- NoTransformConfigurationError("misc.assertClone");
140
- }
141
-
142
- /**
143
- * Clone data with type checking.
144
- *
145
- * Clones an instance following type `T`, with type checking. If the target `input`
146
- * value or its member variable contains a class instance having methods, those
147
- * methods would not be cloned.
148
- *
149
- * In such reason, when `input` value is not matched with the type `T`, it returns
150
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
151
- * data would be returned.
152
- *
153
- * @template T Type of the input value
154
- * @param input A value to be cloned
155
- * @return Cloned data when exact type, otherwise null
156
- *
157
- * @author Jeongho Nam - https://github.com/samchon
158
- */
159
- export function isClone<T>(input: T): Resolved<T> | null;
160
-
161
- /**
162
- * Clone data with type checking.
163
- *
164
- * Clones an instance following type `T`, with type checking. If the target `input`
165
- * value or its member variable contains a class instance having methods, those
166
- * methods would not be cloned.
167
- *
168
- * In such reason, when `input` value is not matched with the type `T`, it returns
169
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
170
- * data would be returned.
171
- *
172
- * @template T Type of the input value
173
- * @param input A value to be cloned
174
- * @return Cloned data when exact type, otherwise null
175
- *
176
- * @author Jeongho Nam - https://github.com/samchon
177
- */
178
- export function isClone<T>(input: unknown): Resolved<T> | null;
179
-
180
- /**
181
- * @internal
182
- */
183
- export function isClone(): never {
184
- NoTransformConfigurationError("misc.isClone");
185
- }
186
-
187
- /**
188
- * Clone data with detailed type validation.
189
- *
190
- * Clones an instance following type `T`, with detailed type validation. If the target
191
- * `input` value or its member variable contains a class instance having methods,
192
- * those methods would not be cloned.
193
- *
194
- * In such reason, when `input` value is not matched with the type `T`, it returns
195
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
196
- * value, cloned data would be stored in `data` property of the output
197
- * {@link IValidation.Success} instance.
198
- *
199
- * @template T Type of the input value
200
- * @param input A value to be cloned
201
- * @returns Validation result with cloned value
202
- */
203
- export function validateClone<T>(input: T): IValidation<Resolved<T>>;
204
-
205
- /**
206
- * Clone data with detailed type validation.
207
- *
208
- * Clones an instance following type `T`, with detailed type validation. If the target
209
- * `input` value or its member variable contains a class instance having methods,
210
- * those methods would not be cloned.
211
- *
212
- * In such reason, when `input` value is not matched with the type `T`, it returns
213
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
214
- * value, cloned data would be stored in `data` property of the output
215
- * {@link IValidation.Success} instance.
216
- *
217
- * @template T Type of the input value
218
- * @param input A value to be cloned
219
- * @returns Validation result with cloned value
220
- */
221
- export function validateClone<T>(input: unknown): IValidation<Resolved<T>>;
222
-
223
- /**
224
- * @internal
225
- */
226
- export function validateClone(): never {
227
- NoTransformConfigurationError("misc.validateClone");
228
- }
229
-
230
- /* -----------------------------------------------------------
231
- PRUNE
232
- ----------------------------------------------------------- */
233
- /**
234
- * Prune, erase superfluous properties.
235
- *
236
- * Remove all superfluous properties from the `input` object, even including nested
237
- * objects. Note that, as all superfluous properties would be deleted, you never can
238
- * read those superfluous properties after calling this `prune()` function.
239
- *
240
- * For reference, this `typia.misc.prune()` function does not validate the input value
241
- * type. It just believes that the input value is following the type `T`. Therefore,
242
- * if you can't ensure the input value type, it would better to call one of below
243
- * functions instead.
244
- *
245
- * - {@link assertPrune}
246
- * - {@link isPrune}
247
- * - {@link validatePrune}
248
- *
249
- * @template T Type of the input value
250
- * @param input Target instance to prune
251
- *
252
- * @author Jeongho Nam - https://github.com/samchon
253
- */
254
- export function prune<T extends object>(input: T): void;
255
-
256
- /**
257
- * @internal
258
- */
259
- export function prune(): never {
260
- NoTransformConfigurationError("misc.prune");
261
- }
262
-
263
- /**
264
- * Prune, erase superfluous properties, with type assertion.
265
- *
266
- * `typia.misc.assertPrune()` is a combination function of {@link assert} and
267
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
268
- * object including nested objects, with type assertion.
269
- *
270
- * In such reason, when `input` value is not matched with the type `T`, it throws an
271
- * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
272
- * there's no problem on the `input` value, its all superfluous properties would be
273
- * removed, including nested objects.
274
- *
275
- * @template T Type of the input value
276
- * @param input Target instance to assert and prune
277
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
278
- *
279
- * @author Jeongho Nam - https://github.com/samchon
280
- */
281
- export function assertPrune<T>(
282
- input: T,
283
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
284
- ): T;
285
-
286
- /**
287
- * Prune, erase superfluous properties, with type assertion.
288
- *
289
- * `typia.misc.assertPrune()` is a combination function of {@link assert} and
290
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
291
- * object including nested objects, with type assertion.
292
- *
293
- * In such reason, when `input` value is not matched with the type `T`, it throws an
294
- * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise, there's
295
- * no problem on the `input` value, its all superfluous properties would be removed,
296
- * including nested objects.
297
- *
298
- * @template T Type of the input value
299
- * @param input Target instance to assert and prune
300
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
301
- *
302
- * @author Jeongho Nam - https://github.com/samchon
303
- */
304
- export function assertPrune<T>(
305
- input: unknown,
306
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
307
- ): T;
308
-
309
- /**
310
- * @internal
311
- */
312
- export function assertPrune(): unknown {
313
- NoTransformConfigurationError("misc.assertPrune");
314
- }
315
-
316
- /**
317
- * Prune, erase superfluous properties, with type checking.
318
- *
319
- * `typia.misc.isPrune()` is a combination function of {@link is} and
320
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
321
- * object including nested objects, with type checking.
322
- *
323
- * In such reason, when `input` value is not matched with the type `T`, it returns
324
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
325
- * `true` after removing all superfluous properties, including nested objects.
326
- *
327
- * @template T Type of the input value
328
- * @param input Target instance to check and prune
329
- * @returns Whether the parametric value is following the type `T` or not
330
- *
331
- * @author Jeongho Nam - https://github.com/samchon
332
- */
333
- export function isPrune<T>(input: T): input is T;
334
-
335
- /**
336
- * Prune, erase superfluous properties, with type checking.
337
- *
338
- * `typia.misc.isPrune()` is a combination function of {@link is} and
339
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
340
- * object including nested objects, with type checking.
341
- *
342
- * In such reason, when `input` value is not matched with the type `T`, it returns
343
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
344
- * `true` after removing all superfluous properties, including nested objects.
345
- *
346
- * @template T Type of the input value
347
- * @param input Target instance to check and prune
348
- * @returns Whether the parametric value is following the type `T` or not
349
- *
350
- * @author Jeongho Nam - https://github.com/samchon
351
- */
352
- export function isPrune<T>(input: unknown): input is T;
353
-
354
- /**
355
- * @internal
356
- */
357
- export function isPrune(): never {
358
- NoTransformConfigurationError("misc.isPrune");
359
- }
360
-
361
- /**
362
- * Prune, erase superfluous properties, with type validation.
363
- *
364
- * `typia.misc.validatePrune()` is a combination function of {@link validate} and
365
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
366
- * object including nested objects, with type validation.
367
- *
368
- * In such reason, when `input` value is not matched with the type `T`, it returns
369
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
370
- * no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
371
- * removing all superfluous properties, including nested objects.
372
- *
373
- * @template T Type of the input value
374
- * @param input Target instance to validate and prune
375
- * @returns Validation result
376
- *
377
- * @author Jeongho Nam - https://github.com/samchon
378
- */
379
- export function validatePrune<T>(input: T): IValidation<T>;
380
-
381
- /**
382
- * Prune, erase superfluous properties, with type validation.
383
- *
384
- * `typia.misc.validatePrune()` is a combination function of {@link validate} and
385
- * {@link prune}. Therefore, it removes all superfluous properties from the `input`
386
- * object including nested objects, with type validation.
387
- *
388
- * In such reason, when `input` value is not matched with the type `T`, it returns
389
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
390
- * no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
391
- * removing all superfluous properties, including nested objects.
392
- *
393
- * @template T Type of the input value
394
- * @param input Target instance to validate and prune
395
- * @returns Validation result
396
- *
397
- * @author Jeongho Nam - https://github.com/samchon
398
- */
399
- export function validatePrune<T>(input: unknown): IValidation<T>;
400
-
401
- /**
402
- * @internal
403
- */
404
- export function validatePrune<T>(): IValidation<T> {
405
- NoTransformConfigurationError("misc.validatePrune");
406
- }
407
-
408
- /* -----------------------------------------------------------
409
- FACTORY FUNCTIONS
410
- ----------------------------------------------------------- */
411
- /**
412
- * Creates a reusable {@link clone} function.
413
- *
414
- * @danger You must configure the generic argument `T`
415
- * @returns Nothing until you configure the generic argument `T`
416
- * @throws compile error
417
- *
418
- * @author Jeongho Nam - https://github.com/samchon
419
- */
420
- export function createClone(): never;
421
-
422
- /**
423
- * Creates a reusable {@link clone} function.
424
- *
425
- * @template T Type of the input value
426
- * @returns A reusable `clone` function
427
- *
428
- * @author Jeongho Nam - https://github.com/samchon
429
- */
430
- export function createClone<T>(): (input: T) => Resolved<T>;
431
-
432
- /**
433
- * @internal
434
- */
435
- export function createClone(): never {
436
- NoTransformConfigurationError("misc.createClone");
437
- }
438
-
439
- /**
440
- * Creates a reusable {@link assertClone} function.
441
- *
442
- * @danger You must configure the generic argument `T`
443
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
444
- * @returns Nothing until you configure the generic argument `T`
445
- * @throws compile error
446
- *
447
- * @author Jeongho Nam - https://github.com/samchon
448
- */
449
- export function createAssertClone(
450
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
451
- ): never;
452
-
453
- /**
454
- * Creates a reusable {@link assertClone} function.
455
- *
456
- * @template T Type of the input value
457
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
458
- * @returns A reusable `clone` function
459
- *
460
- * @author Jeongho Nam - https://github.com/samchon
461
- */
462
- export function createAssertClone<T>(
463
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
464
- ): (input: unknown) => Resolved<T>;
465
-
466
- /**
467
- * @internal
468
- */
469
- export function createAssertClone(): never {
470
- NoTransformConfigurationError("misc.createAssertClone");
471
- }
472
-
473
- /**
474
- * Creates a reusable {@link isClone} function.
475
- *
476
- * @danger You must configure the generic argument `T`
477
- * @returns Nothing until you configure the generic argument `T`
478
- * @throws compile error
479
- *
480
- * @author Jeongho Nam - https://github.com/samchon
481
- */
482
- export function createIsClone(): never;
483
-
484
- /**
485
- * Creates a reusable {@link isClone} function.
486
- *
487
- * @template T Type of the input value
488
- * @returns A reusable `clone` function
489
- *
490
- * @author Jeongho Nam - https://github.com/samchon
491
- */
492
- export function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
493
-
494
- /**
495
- * @internal
496
- */
497
- export function createIsClone(): never {
498
- NoTransformConfigurationError("misc.createIsClone");
499
- }
500
-
501
- /**
502
- * Creates a reusable {@link validateClone} function.
503
- *
504
- * @danger You must configure the generic argument `T`
505
- * @returns Nothing until you configure the generic argument `T`
506
- * @throws compile error
507
- *
508
- * @author Jeongho Nam - https://github.com/samchon
509
- */
510
- export function createValidateClone(): never;
511
-
512
- /**
513
- * Creates a reusable {@link validateClone} function.
514
- *
515
- * @template T Type of the input value
516
- * @returns A reusable `clone` function
517
- *
518
- * @author Jeongho Nam - https://github.com/samchon
519
- */
520
- export function createValidateClone<T>(): (
521
- input: unknown,
522
- ) => IValidation<Resolved<T>>;
523
-
524
- /**
525
- * @internal
526
- */
527
- export function createValidateClone(): never {
528
- NoTransformConfigurationError("misc.createValidateClone");
529
- }
530
-
531
- /**
532
- * Creates a reusable {@link prune} function.
533
- *
534
- * @danger You must configure the generic argument `T`
535
- * @returns Nothing until you configure the generic argument `T`
536
- * @throws compile error
537
- *
538
- * @author Jeongho Nam - https://github.com/samchon
539
- */
540
- export function createPrune(): never;
541
-
542
- /**
543
- * Creates a reusable {@link prune} function.
544
- *
545
- * @template T Type of the input value
546
- * @returns A reusable `prune` function
547
- *
548
- * @author Jeongho Nam - https://github.com/samchon
549
- */
550
- export function createPrune<T extends object>(): (input: T) => void;
551
-
552
- /**
553
- * @internal
554
- */
555
- export function createPrune<T extends object>(): (input: T) => void {
556
- NoTransformConfigurationError("misc.createPrune");
557
- }
558
-
559
- /**
560
- * Creates a reusable {@link assertPrune} function.
561
- *
562
- * @danger You must configure the generic argument `T`
563
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
564
- * @returns Nothing until you configure the generic argument `T`
565
- * @throws compile error
566
- *
567
- * @author Jeongho Nam - https://github.com/samchon
568
- */
569
- export function createAssertPrune(
570
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
571
- ): never;
572
-
573
- /**
574
- * Creates a reusable {@link assertPrune} function.
575
- *
576
- * @template T Type of the input value
577
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
578
- * @returns A reusable `isPrune` function
579
- *
580
- * @author Jeongho Nam - https://github.com/samchon
581
- */
582
- export function createAssertPrune<T extends object>(
583
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
584
- ): (input: T) => T;
585
-
586
- /**
587
- * @internal
588
- */
589
- export function createAssertPrune<T extends object>(): (input: T) => T {
590
- NoTransformConfigurationError("misc.createAssertPrune");
591
- }
592
-
593
- /**
594
- * Creates a reusable {@link isPrune} function.
595
- *
596
- * @danger You must configure the generic argument `T`
597
- * @returns Nothing until you configure the generic argument `T`
598
- * @throws compile error
599
- *
600
- * @author Jeongho Nam - https://github.com/samchon
601
- */
602
- export function createIsPrune(): never;
603
-
604
- /**
605
- * Creates a reusable {@link isPrune} function.
606
- *
607
- * @template T Type of the input value
608
- * @returns A reusable `isPrune` function
609
- *
610
- * @author Jeongho Nam - https://github.com/samchon
611
- */
612
- export function createIsPrune<T extends object>(): (input: T) => input is T;
613
-
614
- /**
615
- * @internal
616
- */
617
- export function createIsPrune<T extends object>(): (input: T) => input is T {
618
- NoTransformConfigurationError("misc.createIsPrune");
619
- }
620
-
621
- /**
622
- * Creates a reusable {@link validatePrune} function.
623
- *
624
- * @danger You must configure the generic argument `T`
625
- * @returns Nothing until you configure the generic argument `T`
626
- * @throws compile error
627
- *
628
- * @author Jeongho Nam - https://github.com/samchon
629
- */
630
- export function createValidatePrune(): never;
631
-
632
- /**
633
- * Creates a reusable {@link validatePrune} function.
634
- *
635
- * @template T Type of the input value
636
- * @returns A reusable `validatePrune` function
637
- *
638
- * @author Jeongho Nam - https://github.com/samchon
639
- */
640
- export function createValidatePrune<T extends object>(): (
641
- input: T,
642
- ) => IValidation<T>;
643
-
644
- /**
645
- * @internal
646
- */
647
- export function createValidatePrune<T extends object>(): (
648
- input: T,
649
- ) => IValidation<T> {
650
- NoTransformConfigurationError("misc.createValidatePrune");
651
- }
1
+ /* ===========================================================
2
+ MISCELLANEOUS
3
+ - LITERALS
4
+ - CLONE
5
+ - PRUNE
6
+ - FACTORY FUNCTIONS
7
+ ==============================================================
8
+ LITERALS
9
+ ----------------------------------------------------------- */
10
+ import { NoTransformConfigurationError } from "./transformers/NoTransformConfigurationError";
11
+
12
+ import { Atomic } from "./typings/Atomic";
13
+
14
+ import { IValidation } from "./IValidation";
15
+ import { Resolved } from "./Resolved";
16
+ import { TypeGuardError } from "./TypeGuardError";
17
+
18
+ /**
19
+ * > You must configure the generic argument `T`.
20
+ *
21
+ * Union literal type to array.
22
+ *
23
+ * Converts a union literal type to an array of its members.
24
+ *
25
+ * ```typescript
26
+ * literals<"A" | "B" | 1>; // ["A", "B", 1]
27
+ * ```
28
+ *
29
+ * @author Jeongho Nam - https://github.com/samchon
30
+ * @template T Union literal type
31
+ * @returns Array of union literal type's members
32
+ */
33
+ export function literals(): never;
34
+
35
+ /**
36
+ * Union literal type to array.
37
+ *
38
+ * Converts a union literal type to an array of its members.
39
+ *
40
+ * ```typescript
41
+ * literals<"A" | "B" | 1>; // ["A", "B", 1]
42
+ * ```
43
+ *
44
+ * @author Jeongho Nam - https://github.com/samchon
45
+ * @template T Union literal type
46
+ * @returns Array of union literal type's members
47
+ */
48
+ export function literals<T extends Atomic.Type | null>(): T[];
49
+
50
+ /** @internal */
51
+ export function literals(): never {
52
+ NoTransformConfigurationError("misc.literals");
53
+ }
54
+
55
+ /* -----------------------------------------------------------
56
+ CLONE
57
+ ----------------------------------------------------------- */
58
+ /**
59
+ * Clone data.
60
+ *
61
+ * Clones an instance following type `T`. If the target _input_ value or its
62
+ * member variable contains a class instance having methods, those methods would
63
+ * not be cloned.
64
+ *
65
+ * For reference, this `typia.misc.clone()` function does not validate the input
66
+ * value type. It just believes that the input value is following the type `T`.
67
+ * Therefore, if you can't ensure the input value type, it would be better to
68
+ * call {@link assertClone} function instead.
69
+ *
70
+ * @author Jeongho Nam - https://github.com/samchon
71
+ * @template T Type of the input value
72
+ * @param input A value to be cloned
73
+ * @returns Cloned data
74
+ */
75
+ export function clone<T>(input: T): Resolved<T>;
76
+
77
+ /** @internal */
78
+ export function clone(): never {
79
+ NoTransformConfigurationError("misc.clone");
80
+ }
81
+
82
+ /**
83
+ * Clone data with type assertion.
84
+ *
85
+ * Clones an instance following type `T`, with type assertion. If the target
86
+ * `input` value or its member variable contains a class instance having
87
+ * methods, those methods would not be cloned.
88
+ *
89
+ * In such reason, when `input` value is not matched with the type `T`, it
90
+ * throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
91
+ * Otherwise, there's no problem on the `input` value, cloned data would be
92
+ * returned.
93
+ *
94
+ * @author Jeongho Nam - https://github.com/samchon
95
+ * @template T Type of the input value
96
+ * @param input A value to be cloned
97
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
98
+ * @returns Cloned data
99
+ */
100
+ export function assertClone<T>(
101
+ input: T,
102
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
103
+ ): Resolved<T>;
104
+
105
+ /**
106
+ * Clone data with type assertion.
107
+ *
108
+ * Clones an instance following type `T`, with type assertion. If the target
109
+ * `input` value or its member variable contains a class instance having
110
+ * methods, those methods would not be cloned.
111
+ *
112
+ * In such reason, when `input` value is not matched with the type `T`, it
113
+ * throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
114
+ * Otherwise, there's no problem on the `input` value, cloned data would be
115
+ * returned.
116
+ *
117
+ * @author Jeongho Nam - https://github.com/samchon
118
+ * @template T Type of the input value
119
+ * @param input A value to be cloned
120
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
121
+ * @returns Cloned data
122
+ */
123
+ export function assertClone<T>(
124
+ input: unknown,
125
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
126
+ ): Resolved<T>;
127
+
128
+ /** @internal */
129
+ export function assertClone(): never {
130
+ NoTransformConfigurationError("misc.assertClone");
131
+ }
132
+
133
+ /**
134
+ * Clone data with type checking.
135
+ *
136
+ * Clones an instance following type `T`, with type checking. If the target
137
+ * `input` value or its member variable contains a class instance having
138
+ * methods, those methods would not be cloned.
139
+ *
140
+ * In such reason, when `input` value is not matched with the type `T`, it
141
+ * returns `null` value instead. Otherwise, there's no problem on the `input`
142
+ * value, cloned data would be returned.
143
+ *
144
+ * @author Jeongho Nam - https://github.com/samchon
145
+ * @template T Type of the input value
146
+ * @param input A value to be cloned
147
+ * @returns Cloned data when exact type, otherwise null
148
+ */
149
+ export function isClone<T>(input: T): Resolved<T> | null;
150
+
151
+ /**
152
+ * Clone data with type checking.
153
+ *
154
+ * Clones an instance following type `T`, with type checking. If the target
155
+ * `input` value or its member variable contains a class instance having
156
+ * methods, those methods would not be cloned.
157
+ *
158
+ * In such reason, when `input` value is not matched with the type `T`, it
159
+ * returns `null` value instead. Otherwise, there's no problem on the `input`
160
+ * value, cloned data would be returned.
161
+ *
162
+ * @author Jeongho Nam - https://github.com/samchon
163
+ * @template T Type of the input value
164
+ * @param input A value to be cloned
165
+ * @returns Cloned data when exact type, otherwise null
166
+ */
167
+ export function isClone<T>(input: unknown): Resolved<T> | null;
168
+
169
+ /** @internal */
170
+ export function isClone(): never {
171
+ NoTransformConfigurationError("misc.isClone");
172
+ }
173
+
174
+ /**
175
+ * Clone data with detailed type validation.
176
+ *
177
+ * Clones an instance following type `T`, with detailed type validation. If the
178
+ * target `input` value or its member variable contains a class instance having
179
+ * methods, those methods would not be cloned.
180
+ *
181
+ * In such reason, when `input` value is not matched with the type `T`, it
182
+ * returns {@link IValidation.Failure} value. Otherwise, there's no problem on
183
+ * the `input` value, cloned data would be stored in `data` property of the
184
+ * output {@link IValidation.Success} instance.
185
+ *
186
+ * @template T Type of the input value
187
+ * @param input A value to be cloned
188
+ * @returns Validation result with cloned value
189
+ */
190
+ export function validateClone<T>(input: T): IValidation<Resolved<T>>;
191
+
192
+ /**
193
+ * Clone data with detailed type validation.
194
+ *
195
+ * Clones an instance following type `T`, with detailed type validation. If the
196
+ * target `input` value or its member variable contains a class instance having
197
+ * methods, those methods would not be cloned.
198
+ *
199
+ * In such reason, when `input` value is not matched with the type `T`, it
200
+ * returns {@link IValidation.Failure} value. Otherwise, there's no problem on
201
+ * the `input` value, cloned data would be stored in `data` property of the
202
+ * output {@link IValidation.Success} instance.
203
+ *
204
+ * @template T Type of the input value
205
+ * @param input A value to be cloned
206
+ * @returns Validation result with cloned value
207
+ */
208
+ export function validateClone<T>(input: unknown): IValidation<Resolved<T>>;
209
+
210
+ /** @internal */
211
+ export function validateClone(): never {
212
+ NoTransformConfigurationError("misc.validateClone");
213
+ }
214
+
215
+ /* -----------------------------------------------------------
216
+ PRUNE
217
+ ----------------------------------------------------------- */
218
+ /**
219
+ * Prune, erase superfluous properties.
220
+ *
221
+ * Remove all superfluous properties from the `input` object, even including
222
+ * nested objects. Note that, as all superfluous properties would be deleted,
223
+ * you never can read those superfluous properties after calling this `prune()`
224
+ * function.
225
+ *
226
+ * For reference, this `typia.misc.prune()` function does not validate the input
227
+ * value type. It just believes that the input value is following the type `T`.
228
+ * Therefore, if you can't ensure the input value type, it would better to call
229
+ * one of below functions instead.
230
+ *
231
+ * - {@link assertPrune}
232
+ * - {@link isPrune}
233
+ * - {@link validatePrune}
234
+ *
235
+ * @author Jeongho Nam - https://github.com/samchon
236
+ * @template T Type of the input value
237
+ * @param input Target instance to prune
238
+ */
239
+ export function prune<T extends object>(input: T): void;
240
+
241
+ /** @internal */
242
+ export function prune(): never {
243
+ NoTransformConfigurationError("misc.prune");
244
+ }
245
+
246
+ /**
247
+ * Prune, erase superfluous properties, with type assertion.
248
+ *
249
+ * `typia.misc.assertPrune()` is a combination function of {@link assert} and
250
+ * {@link prune}. Therefore, it removes all superfluous properties from the
251
+ * `input` object including nested objects, with type assertion.
252
+ *
253
+ * In such reason, when `input` value is not matched with the type `T`, it
254
+ * throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
255
+ * Otherwise, there's no problem on the `input` value, its all superfluous
256
+ * properties would be removed, including nested objects.
257
+ *
258
+ * @author Jeongho Nam - https://github.com/samchon
259
+ * @template T Type of the input value
260
+ * @param input Target instance to assert and prune
261
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
262
+ */
263
+ export function assertPrune<T>(
264
+ input: T,
265
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
266
+ ): T;
267
+
268
+ /**
269
+ * Prune, erase superfluous properties, with type assertion.
270
+ *
271
+ * `typia.misc.assertPrune()` is a combination function of {@link assert} and
272
+ * {@link prune}. Therefore, it removes all superfluous properties from the
273
+ * `input` object including nested objects, with type assertion.
274
+ *
275
+ * In such reason, when `input` value is not matched with the type `T`, it
276
+ * throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
277
+ * Otherwise, there's no problem on the `input` value, its all superfluous
278
+ * properties would be removed, including nested objects.
279
+ *
280
+ * @author Jeongho Nam - https://github.com/samchon
281
+ * @template T Type of the input value
282
+ * @param input Target instance to assert and prune
283
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
284
+ */
285
+ export function assertPrune<T>(
286
+ input: unknown,
287
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
288
+ ): T;
289
+
290
+ /** @internal */
291
+ export function assertPrune(): unknown {
292
+ NoTransformConfigurationError("misc.assertPrune");
293
+ }
294
+
295
+ /**
296
+ * Prune, erase superfluous properties, with type checking.
297
+ *
298
+ * `typia.misc.isPrune()` is a combination function of {@link is} and
299
+ * {@link prune}. Therefore, it removes all superfluous properties from the
300
+ * `input` object including nested objects, with type checking.
301
+ *
302
+ * In such reason, when `input` value is not matched with the type `T`, it
303
+ * returns `false` value. Otherwise, there's no problem on the `input` value, it
304
+ * returns `true` after removing all superfluous properties, including nested
305
+ * objects.
306
+ *
307
+ * @author Jeongho Nam - https://github.com/samchon
308
+ * @template T Type of the input value
309
+ * @param input Target instance to check and prune
310
+ * @returns Whether the parametric value is following the type `T` or not
311
+ */
312
+ export function isPrune<T>(input: T): input is T;
313
+
314
+ /**
315
+ * Prune, erase superfluous properties, with type checking.
316
+ *
317
+ * `typia.misc.isPrune()` is a combination function of {@link is} and
318
+ * {@link prune}. Therefore, it removes all superfluous properties from the
319
+ * `input` object including nested objects, with type checking.
320
+ *
321
+ * In such reason, when `input` value is not matched with the type `T`, it
322
+ * returns `false` value. Otherwise, there's no problem on the `input` value, it
323
+ * returns `true` after removing all superfluous properties, including nested
324
+ * objects.
325
+ *
326
+ * @author Jeongho Nam - https://github.com/samchon
327
+ * @template T Type of the input value
328
+ * @param input Target instance to check and prune
329
+ * @returns Whether the parametric value is following the type `T` or not
330
+ */
331
+ export function isPrune<T>(input: unknown): input is T;
332
+
333
+ /** @internal */
334
+ export function isPrune(): never {
335
+ NoTransformConfigurationError("misc.isPrune");
336
+ }
337
+
338
+ /**
339
+ * Prune, erase superfluous properties, with type validation.
340
+ *
341
+ * `typia.misc.validatePrune()` is a combination function of {@link validate} and
342
+ * {@link prune}. Therefore, it removes all superfluous properties from the
343
+ * `input` object including nested objects, with type validation.
344
+ *
345
+ * In such reason, when `input` value is not matched with the type `T`, it
346
+ * returns {@link IValidation.IFailure} value with detailed error reasons.
347
+ * Otherwise, there's no problem on the `input` value, it returns
348
+ * {@link IValidation.ISuccess} value after removing all superfluous properties,
349
+ * including nested objects.
350
+ *
351
+ * @author Jeongho Nam - https://github.com/samchon
352
+ * @template T Type of the input value
353
+ * @param input Target instance to validate and prune
354
+ * @returns Validation result
355
+ */
356
+ export function validatePrune<T>(input: T): IValidation<T>;
357
+
358
+ /**
359
+ * Prune, erase superfluous properties, with type validation.
360
+ *
361
+ * `typia.misc.validatePrune()` is a combination function of {@link validate} and
362
+ * {@link prune}. Therefore, it removes all superfluous properties from the
363
+ * `input` object including nested objects, with type validation.
364
+ *
365
+ * In such reason, when `input` value is not matched with the type `T`, it
366
+ * returns {@link IValidation.IFailure} value with detailed error reasons.
367
+ * Otherwise, there's no problem on the `input` value, it returns
368
+ * {@link IValidation.ISuccess} value after removing all superfluous properties,
369
+ * including nested objects.
370
+ *
371
+ * @author Jeongho Nam - https://github.com/samchon
372
+ * @template T Type of the input value
373
+ * @param input Target instance to validate and prune
374
+ * @returns Validation result
375
+ */
376
+ export function validatePrune<T>(input: unknown): IValidation<T>;
377
+
378
+ /** @internal */
379
+ export function validatePrune<T>(): IValidation<T> {
380
+ NoTransformConfigurationError("misc.validatePrune");
381
+ }
382
+
383
+ /* -----------------------------------------------------------
384
+ FACTORY FUNCTIONS
385
+ ----------------------------------------------------------- */
386
+ /**
387
+ * Creates a reusable {@link clone} function.
388
+ *
389
+ * @author Jeongho Nam - https://github.com/samchon
390
+ * @returns Nothing until you configure the generic argument `T`
391
+ * @throws Compile error
392
+ * @danger You must configure the generic argument `T`
393
+ */
394
+ export function createClone(): never;
395
+
396
+ /**
397
+ * Creates a reusable {@link clone} function.
398
+ *
399
+ * @author Jeongho Nam - https://github.com/samchon
400
+ * @template T Type of the input value
401
+ * @returns A reusable `clone` function
402
+ */
403
+ export function createClone<T>(): (input: T) => Resolved<T>;
404
+
405
+ /** @internal */
406
+ export function createClone(): never {
407
+ NoTransformConfigurationError("misc.createClone");
408
+ }
409
+
410
+ /**
411
+ * Creates a reusable {@link assertClone} function.
412
+ *
413
+ * @author Jeongho Nam - https://github.com/samchon
414
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
415
+ * @returns Nothing until you configure the generic argument `T`
416
+ * @throws Compile error
417
+ * @danger You must configure the generic argument `T`
418
+ */
419
+ export function createAssertClone(
420
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
421
+ ): never;
422
+
423
+ /**
424
+ * Creates a reusable {@link assertClone} function.
425
+ *
426
+ * @author Jeongho Nam - https://github.com/samchon
427
+ * @template T Type of the input value
428
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
429
+ * @returns A reusable `clone` function
430
+ */
431
+ export function createAssertClone<T>(
432
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
433
+ ): (input: unknown) => Resolved<T>;
434
+
435
+ /** @internal */
436
+ export function createAssertClone(): never {
437
+ NoTransformConfigurationError("misc.createAssertClone");
438
+ }
439
+
440
+ /**
441
+ * Creates a reusable {@link isClone} function.
442
+ *
443
+ * @author Jeongho Nam - https://github.com/samchon
444
+ * @returns Nothing until you configure the generic argument `T`
445
+ * @throws Compile error
446
+ * @danger You must configure the generic argument `T`
447
+ */
448
+ export function createIsClone(): never;
449
+
450
+ /**
451
+ * Creates a reusable {@link isClone} function.
452
+ *
453
+ * @author Jeongho Nam - https://github.com/samchon
454
+ * @template T Type of the input value
455
+ * @returns A reusable `clone` function
456
+ */
457
+ export function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
458
+
459
+ /** @internal */
460
+ export function createIsClone(): never {
461
+ NoTransformConfigurationError("misc.createIsClone");
462
+ }
463
+
464
+ /**
465
+ * Creates a reusable {@link validateClone} function.
466
+ *
467
+ * @author Jeongho Nam - https://github.com/samchon
468
+ * @returns Nothing until you configure the generic argument `T`
469
+ * @throws Compile error
470
+ * @danger You must configure the generic argument `T`
471
+ */
472
+ export function createValidateClone(): never;
473
+
474
+ /**
475
+ * Creates a reusable {@link validateClone} function.
476
+ *
477
+ * @author Jeongho Nam - https://github.com/samchon
478
+ * @template T Type of the input value
479
+ * @returns A reusable `clone` function
480
+ */
481
+ export function createValidateClone<T>(): (
482
+ input: unknown,
483
+ ) => IValidation<Resolved<T>>;
484
+
485
+ /** @internal */
486
+ export function createValidateClone(): never {
487
+ NoTransformConfigurationError("misc.createValidateClone");
488
+ }
489
+
490
+ /**
491
+ * Creates a reusable {@link prune} function.
492
+ *
493
+ * @author Jeongho Nam - https://github.com/samchon
494
+ * @returns Nothing until you configure the generic argument `T`
495
+ * @throws Compile error
496
+ * @danger You must configure the generic argument `T`
497
+ */
498
+ export function createPrune(): never;
499
+
500
+ /**
501
+ * Creates a reusable {@link prune} function.
502
+ *
503
+ * @author Jeongho Nam - https://github.com/samchon
504
+ * @template T Type of the input value
505
+ * @returns A reusable `prune` function
506
+ */
507
+ export function createPrune<T extends object>(): (input: T) => void;
508
+
509
+ /** @internal */
510
+ export function createPrune<T extends object>(): (input: T) => void {
511
+ NoTransformConfigurationError("misc.createPrune");
512
+ }
513
+
514
+ /**
515
+ * Creates a reusable {@link assertPrune} function.
516
+ *
517
+ * @author Jeongho Nam - https://github.com/samchon
518
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
519
+ * @returns Nothing until you configure the generic argument `T`
520
+ * @throws Compile error
521
+ * @danger You must configure the generic argument `T`
522
+ */
523
+ export function createAssertPrune(
524
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
525
+ ): never;
526
+
527
+ /**
528
+ * Creates a reusable {@link assertPrune} function.
529
+ *
530
+ * @author Jeongho Nam - https://github.com/samchon
531
+ * @template T Type of the input value
532
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
533
+ * @returns A reusable `isPrune` function
534
+ */
535
+ export function createAssertPrune<T extends object>(
536
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
537
+ ): (input: T) => T;
538
+
539
+ /** @internal */
540
+ export function createAssertPrune<T extends object>(): (input: T) => T {
541
+ NoTransformConfigurationError("misc.createAssertPrune");
542
+ }
543
+
544
+ /**
545
+ * Creates a reusable {@link isPrune} function.
546
+ *
547
+ * @author Jeongho Nam - https://github.com/samchon
548
+ * @returns Nothing until you configure the generic argument `T`
549
+ * @throws Compile error
550
+ * @danger You must configure the generic argument `T`
551
+ */
552
+ export function createIsPrune(): never;
553
+
554
+ /**
555
+ * Creates a reusable {@link isPrune} function.
556
+ *
557
+ * @author Jeongho Nam - https://github.com/samchon
558
+ * @template T Type of the input value
559
+ * @returns A reusable `isPrune` function
560
+ */
561
+ export function createIsPrune<T extends object>(): (input: T) => input is T;
562
+
563
+ /** @internal */
564
+ export function createIsPrune<T extends object>(): (input: T) => input is T {
565
+ NoTransformConfigurationError("misc.createIsPrune");
566
+ }
567
+
568
+ /**
569
+ * Creates a reusable {@link validatePrune} function.
570
+ *
571
+ * @author Jeongho Nam - https://github.com/samchon
572
+ * @returns Nothing until you configure the generic argument `T`
573
+ * @throws Compile error
574
+ * @danger You must configure the generic argument `T`
575
+ */
576
+ export function createValidatePrune(): never;
577
+
578
+ /**
579
+ * Creates a reusable {@link validatePrune} function.
580
+ *
581
+ * @author Jeongho Nam - https://github.com/samchon
582
+ * @template T Type of the input value
583
+ * @returns A reusable `validatePrune` function
584
+ */
585
+ export function createValidatePrune<T extends object>(): (
586
+ input: T,
587
+ ) => IValidation<T>;
588
+
589
+ /** @internal */
590
+ export function createValidatePrune<T extends object>(): (
591
+ input: T,
592
+ ) => IValidation<T> {
593
+ NoTransformConfigurationError("misc.createValidatePrune");
594
+ }