typia 5.3.11 → 5.3.12-dev.20240119

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 (708) hide show
  1. package/lib/TypeGuardError.js +4 -1
  2. package/lib/TypeGuardError.js.map +1 -1
  3. package/lib/executable/TypiaGenerateWizard.js +24 -23
  4. package/lib/executable/TypiaGenerateWizard.js.map +1 -1
  5. package/lib/executable/TypiaPatchWizard.js +9 -9
  6. package/lib/executable/TypiaPatchWizard.js.map +1 -1
  7. package/lib/executable/TypiaSetupWizard.js +29 -20
  8. package/lib/executable/TypiaSetupWizard.js.map +1 -1
  9. package/lib/executable/setup/ArgumentParser.js +5 -5
  10. package/lib/executable/setup/ArgumentParser.js.map +1 -1
  11. package/lib/executable/setup/PackageManager.js +8 -8
  12. package/lib/executable/setup/PackageManager.js.map +1 -1
  13. package/lib/executable/setup/PluginConfigurator.js +5 -4
  14. package/lib/executable/setup/PluginConfigurator.js.map +1 -1
  15. package/lib/executable/typia.js +21 -21
  16. package/lib/executable/typia.js.map +1 -1
  17. package/lib/factories/CommentFactory.js +2 -0
  18. package/lib/factories/CommentFactory.js.map +1 -1
  19. package/lib/factories/IdentifierFactory.js +2 -0
  20. package/lib/factories/IdentifierFactory.js.map +1 -1
  21. package/lib/factories/LiteralFactory.js +1 -0
  22. package/lib/factories/LiteralFactory.js.map +1 -1
  23. package/lib/factories/MetadataCollection.js +19 -1
  24. package/lib/factories/MetadataCollection.js.map +1 -1
  25. package/lib/factories/MetadataCommentTagFactory.js +19 -0
  26. package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
  27. package/lib/factories/MetadataFactory.js +3 -0
  28. package/lib/factories/MetadataFactory.js.map +1 -1
  29. package/lib/factories/MetadataTypeTagFactory.js +25 -3
  30. package/lib/factories/MetadataTypeTagFactory.js.map +1 -1
  31. package/lib/factories/ProtobufFactory.js +39 -0
  32. package/lib/factories/ProtobufFactory.js.map +1 -1
  33. package/lib/factories/TypeFactory.js +9 -0
  34. package/lib/factories/TypeFactory.js.map +1 -1
  35. package/lib/factories/internal/metadata/emend_metadata_atomics.js +3 -0
  36. package/lib/factories/internal/metadata/emend_metadata_atomics.js.map +1 -1
  37. package/lib/factories/internal/metadata/emplace_metadata_alias.js +2 -0
  38. package/lib/factories/internal/metadata/emplace_metadata_alias.js.map +1 -1
  39. package/lib/factories/internal/metadata/emplace_metadata_array_type.js +2 -0
  40. package/lib/factories/internal/metadata/emplace_metadata_array_type.js.map +1 -1
  41. package/lib/factories/internal/metadata/emplace_metadata_object.js +15 -0
  42. package/lib/factories/internal/metadata/emplace_metadata_object.js.map +1 -1
  43. package/lib/factories/internal/metadata/emplace_metadata_tuple.js +4 -0
  44. package/lib/factories/internal/metadata/emplace_metadata_tuple.js.map +1 -1
  45. package/lib/factories/internal/metadata/explore_metadata.js +2 -0
  46. package/lib/factories/internal/metadata/explore_metadata.js.map +1 -1
  47. package/lib/factories/internal/metadata/iterate_metadata.js +2 -0
  48. package/lib/factories/internal/metadata/iterate_metadata.js.map +1 -1
  49. package/lib/factories/internal/metadata/iterate_metadata_alias.js +1 -0
  50. package/lib/factories/internal/metadata/iterate_metadata_alias.js.map +1 -1
  51. package/lib/factories/internal/metadata/iterate_metadata_atomic.js +2 -0
  52. package/lib/factories/internal/metadata/iterate_metadata_atomic.js.map +1 -1
  53. package/lib/factories/internal/metadata/iterate_metadata_intersection.js +7 -0
  54. package/lib/factories/internal/metadata/iterate_metadata_intersection.js.map +1 -1
  55. package/lib/factories/internal/metadata/iterate_metadata_object.js +10 -0
  56. package/lib/factories/internal/metadata/iterate_metadata_object.js.map +1 -1
  57. package/lib/factories/internal/metadata/iterate_metadata_sort.js +3 -0
  58. package/lib/factories/internal/metadata/iterate_metadata_sort.js.map +1 -1
  59. package/lib/factories/internal/metadata/iterate_metadata_template.js +2 -0
  60. package/lib/factories/internal/metadata/iterate_metadata_template.js.map +1 -1
  61. package/lib/functional/$HeadersReader/$HeadersReader.d.ts +4 -0
  62. package/lib/functional/$HeadersReader/$HeadersReader.js +36 -0
  63. package/lib/functional/$HeadersReader/$HeadersReader.js.map +1 -0
  64. package/lib/functional/$HeadersReader/index.d.ts +1 -0
  65. package/lib/functional/$HeadersReader/index.js +28 -0
  66. package/lib/functional/$HeadersReader/index.js.map +1 -0
  67. package/lib/functional/$ParameterReader/$ParameterReader.d.ts +4 -0
  68. package/lib/functional/$ParameterReader/$ParameterReader.js +36 -0
  69. package/lib/functional/$ParameterReader/$ParameterReader.js.map +1 -0
  70. package/lib/functional/$ParameterReader/index.d.ts +1 -0
  71. package/lib/functional/$ParameterReader/index.js +28 -0
  72. package/lib/functional/$ParameterReader/index.js.map +1 -0
  73. package/lib/functional/$ProtobufReader.js +13 -11
  74. package/lib/functional/$ProtobufReader.js.map +1 -1
  75. package/lib/functional/$ProtobufSizer.js +28 -13
  76. package/lib/functional/$ProtobufSizer.js.map +1 -1
  77. package/lib/functional/$ProtobufWriter.js +11 -9
  78. package/lib/functional/$ProtobufWriter.js.map +1 -1
  79. package/lib/functional/$QueryReader/$QueryReader.d.ts +6 -0
  80. package/lib/functional/$QueryReader/$QueryReader.js +55 -0
  81. package/lib/functional/$QueryReader/$QueryReader.js.map +1 -0
  82. package/lib/functional/$QueryReader/index.d.ts +1 -0
  83. package/lib/functional/$QueryReader/index.js +28 -0
  84. package/lib/functional/$QueryReader/index.js.map +1 -0
  85. package/lib/functional/$dictionary.js +3 -0
  86. package/lib/functional/$dictionary.js.map +1 -1
  87. package/lib/functional/$guard.js +20 -0
  88. package/lib/functional/$guard.js.map +1 -1
  89. package/lib/functional/$string.js +18 -2
  90. package/lib/functional/$string.js.map +1 -1
  91. package/lib/functional/$tail.js +3 -0
  92. package/lib/functional/$tail.js.map +1 -1
  93. package/lib/functional/$throws.d.ts +2 -0
  94. package/lib/functional/$throws.js +22 -0
  95. package/lib/functional/$throws.js.map +1 -0
  96. package/lib/functional/$varint.js +2 -1
  97. package/lib/functional/$varint.js.map +1 -1
  98. package/lib/functional/$zigzag.js +2 -0
  99. package/lib/functional/$zigzag.js.map +1 -1
  100. package/lib/functional/Namespace/http.d.ts +6 -0
  101. package/lib/functional/Namespace/http.js +13 -0
  102. package/lib/functional/Namespace/http.js.map +1 -0
  103. package/lib/functional/Namespace/index.d.ts +29 -0
  104. package/lib/functional/Namespace/index.js +84 -0
  105. package/lib/functional/Namespace/index.js.map +1 -0
  106. package/lib/functional/Namespace/json.d.ts +9 -0
  107. package/lib/functional/Namespace/json.js +23 -0
  108. package/lib/functional/Namespace/json.js.map +1 -0
  109. package/lib/functional/Namespace/misc.d.ts +11 -0
  110. package/lib/functional/Namespace/misc.js +22 -0
  111. package/lib/functional/Namespace/misc.js.map +1 -0
  112. package/lib/functional/Namespace/notations.d.ts +18 -0
  113. package/lib/functional/Namespace/notations.js +26 -0
  114. package/lib/functional/Namespace/notations.js.map +1 -0
  115. package/lib/functional/Namespace/protobuf.d.ts +17 -0
  116. package/lib/functional/Namespace/protobuf.js +25 -0
  117. package/lib/functional/Namespace/protobuf.js.map +1 -0
  118. package/lib/functional/is.js +14 -0
  119. package/lib/functional/is.js.map +1 -0
  120. package/lib/http.d.ts +72 -36
  121. package/lib/http.js +148 -51
  122. package/lib/http.js.map +1 -1
  123. package/lib/json.d.ts +55 -27
  124. package/lib/json.js +109 -32
  125. package/lib/json.js.map +1 -1
  126. package/lib/misc.d.ts +62 -30
  127. package/lib/misc.js +133 -39
  128. package/lib/misc.js.map +1 -1
  129. package/lib/module.d.ts +72 -36
  130. package/lib/module.js +100 -37
  131. package/lib/module.js.map +1 -1
  132. package/lib/notations.d.ts +93 -45
  133. package/lib/notations.js +188 -67
  134. package/lib/notations.js.map +1 -1
  135. package/lib/programmers/AssertProgrammer.js +25 -0
  136. package/lib/programmers/AssertProgrammer.js.map +1 -1
  137. package/lib/programmers/CheckerProgrammer.js +35 -0
  138. package/lib/programmers/CheckerProgrammer.js.map +1 -1
  139. package/lib/programmers/FeatureProgrammer.js +11 -0
  140. package/lib/programmers/FeatureProgrammer.js.map +1 -1
  141. package/lib/programmers/IsProgrammer.js +9 -0
  142. package/lib/programmers/IsProgrammer.js.map +1 -1
  143. package/lib/programmers/RandomProgrammer.js +13 -0
  144. package/lib/programmers/RandomProgrammer.js.map +1 -1
  145. package/lib/programmers/TypiaProgrammer.js +37 -36
  146. package/lib/programmers/TypiaProgrammer.js.map +1 -1
  147. package/lib/programmers/helpers/FunctionImporeter.js +1 -1
  148. package/lib/programmers/helpers/PruneJoiner.js +1 -0
  149. package/lib/programmers/helpers/PruneJoiner.js.map +1 -1
  150. package/lib/programmers/helpers/RandomJoiner.js +2 -0
  151. package/lib/programmers/helpers/RandomJoiner.js.map +1 -1
  152. package/lib/programmers/helpers/RandomRanger.js +8 -0
  153. package/lib/programmers/helpers/RandomRanger.js.map +1 -1
  154. package/lib/programmers/helpers/StringifyJoinder.js +4 -0
  155. package/lib/programmers/helpers/StringifyJoinder.js.map +1 -1
  156. package/lib/programmers/helpers/UnionExplorer.js +10 -0
  157. package/lib/programmers/helpers/UnionExplorer.js.map +1 -1
  158. package/lib/programmers/helpers/UnionPredicator.js +5 -0
  159. package/lib/programmers/helpers/UnionPredicator.js.map +1 -1
  160. package/lib/programmers/http/HttpHeadersProgrammer.js +19 -0
  161. package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
  162. package/lib/programmers/http/HttpQueryProgrammer.js +13 -0
  163. package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
  164. package/lib/programmers/internal/application_alias.js +2 -0
  165. package/lib/programmers/internal/application_alias.js.map +1 -1
  166. package/lib/programmers/internal/application_array.js +5 -0
  167. package/lib/programmers/internal/application_array.js.map +1 -1
  168. package/lib/programmers/internal/application_boolean.js +3 -0
  169. package/lib/programmers/internal/application_boolean.js.map +1 -1
  170. package/lib/programmers/internal/application_constant.js +3 -0
  171. package/lib/programmers/internal/application_constant.js.map +1 -1
  172. package/lib/programmers/internal/application_default.js +3 -0
  173. package/lib/programmers/internal/application_default.js.map +1 -1
  174. package/lib/programmers/internal/application_default_string.js +5 -0
  175. package/lib/programmers/internal/application_default_string.js.map +1 -1
  176. package/lib/programmers/internal/application_native.js +3 -0
  177. package/lib/programmers/internal/application_native.js.map +1 -1
  178. package/lib/programmers/internal/application_number.js +5 -0
  179. package/lib/programmers/internal/application_number.js.map +1 -1
  180. package/lib/programmers/internal/application_object.js +16 -3
  181. package/lib/programmers/internal/application_object.js.map +1 -1
  182. package/lib/programmers/internal/application_schema.js +17 -0
  183. package/lib/programmers/internal/application_schema.js.map +1 -1
  184. package/lib/programmers/internal/application_string.js +5 -0
  185. package/lib/programmers/internal/application_string.js.map +1 -1
  186. package/lib/programmers/internal/application_templates.js +6 -0
  187. package/lib/programmers/internal/application_templates.js.map +1 -1
  188. package/lib/programmers/internal/application_tuple.js +3 -0
  189. package/lib/programmers/internal/application_tuple.js.map +1 -1
  190. package/lib/programmers/internal/check_array_length.js +3 -0
  191. package/lib/programmers/internal/check_array_length.js.map +1 -1
  192. package/lib/programmers/internal/check_bigint.js +6 -0
  193. package/lib/programmers/internal/check_bigint.js.map +1 -1
  194. package/lib/programmers/internal/check_dynamic_key.js +6 -0
  195. package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
  196. package/lib/programmers/internal/check_dynamic_properties.js +13 -0
  197. package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
  198. package/lib/programmers/internal/check_everything.js +3 -0
  199. package/lib/programmers/internal/check_everything.js.map +1 -1
  200. package/lib/programmers/internal/check_native.js +3 -0
  201. package/lib/programmers/internal/check_native.js.map +1 -1
  202. package/lib/programmers/internal/check_number.js +6 -0
  203. package/lib/programmers/internal/check_number.js.map +1 -1
  204. package/lib/programmers/internal/check_object.js +9 -0
  205. package/lib/programmers/internal/check_object.js.map +1 -1
  206. package/lib/programmers/internal/check_string.js +6 -0
  207. package/lib/programmers/internal/check_string.js.map +1 -1
  208. package/lib/programmers/internal/check_template.js +6 -0
  209. package/lib/programmers/internal/check_template.js.map +1 -1
  210. package/lib/programmers/internal/check_union_array_like.js +4 -0
  211. package/lib/programmers/internal/check_union_array_like.js.map +1 -1
  212. package/lib/programmers/internal/decode_union_object.js +3 -0
  213. package/lib/programmers/internal/decode_union_object.js.map +1 -1
  214. package/lib/programmers/internal/feature_object_entries.js +3 -0
  215. package/lib/programmers/internal/feature_object_entries.js.map +1 -1
  216. package/lib/programmers/internal/metadata_to_pattern.js +3 -0
  217. package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
  218. package/lib/programmers/internal/prune_object_properties.js +3 -0
  219. package/lib/programmers/internal/prune_object_properties.js.map +1 -1
  220. package/lib/programmers/internal/random_custom.js +3 -0
  221. package/lib/programmers/internal/random_custom.js.map +1 -1
  222. package/lib/programmers/internal/stringify_dynamic_properties.js +11 -0
  223. package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
  224. package/lib/programmers/internal/stringify_native.js +3 -0
  225. package/lib/programmers/internal/stringify_native.js.map +1 -1
  226. package/lib/programmers/internal/stringify_regular_properties.js +7 -0
  227. package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
  228. package/lib/programmers/internal/template_to_pattern.js +3 -0
  229. package/lib/programmers/internal/template_to_pattern.js.map +1 -1
  230. package/lib/programmers/json/JsonApplicationProgrammer.js +3 -0
  231. package/lib/programmers/json/JsonApplicationProgrammer.js.map +1 -1
  232. package/lib/programmers/json/JsonStringifyProgrammer.js +36 -0
  233. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
  234. package/lib/programmers/misc/MiscCloneProgrammer.js +22 -0
  235. package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
  236. package/lib/programmers/misc/MiscPruneProgrammer.js +20 -0
  237. package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
  238. package/lib/programmers/notations/NotationGeneralProgrammer.js +22 -0
  239. package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
  240. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +3 -0
  241. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
  242. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +33 -15
  243. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
  244. package/lib/programmers/protobuf/ProtobufMessageProgrammer.js +6 -0
  245. package/lib/programmers/protobuf/ProtobufMessageProgrammer.js.map +1 -1
  246. package/lib/protobuf.d.ts +63 -31
  247. package/lib/protobuf.js +136 -45
  248. package/lib/protobuf.js.map +1 -1
  249. package/lib/reflect.d.ts +4 -2
  250. package/lib/reflect.js +8 -4
  251. package/lib/reflect.js.map +1 -1
  252. package/lib/schemas/metadata/Metadata.js +64 -2
  253. package/lib/schemas/metadata/Metadata.js.map +1 -1
  254. package/lib/schemas/metadata/MetadataAlias.js +13 -1
  255. package/lib/schemas/metadata/MetadataAlias.js.map +1 -1
  256. package/lib/schemas/metadata/MetadataApplication.js +7 -1
  257. package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
  258. package/lib/schemas/metadata/MetadataArray.js +4 -1
  259. package/lib/schemas/metadata/MetadataArray.js.map +1 -1
  260. package/lib/schemas/metadata/MetadataArrayType.js +10 -1
  261. package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
  262. package/lib/schemas/metadata/MetadataAtomic.js +4 -1
  263. package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
  264. package/lib/schemas/metadata/MetadataComponents.js +4 -1
  265. package/lib/schemas/metadata/MetadataComponents.js.map +1 -1
  266. package/lib/schemas/metadata/MetadataConstant.js +1 -1
  267. package/lib/schemas/metadata/MetadataEscaped.js +10 -1
  268. package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
  269. package/lib/schemas/metadata/MetadataObject.js +29 -3
  270. package/lib/schemas/metadata/MetadataObject.js.map +1 -1
  271. package/lib/schemas/metadata/MetadataProperty.js +13 -1
  272. package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
  273. package/lib/schemas/metadata/MetadataTuple.js +7 -1
  274. package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
  275. package/lib/schemas/metadata/MetadataTupleType.js +7 -1
  276. package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
  277. package/lib/transformers/CallExpressionTransformer.js +34 -0
  278. package/lib/transformers/CallExpressionTransformer.js.map +1 -1
  279. package/lib/transformers/FileTransformer.js +2 -0
  280. package/lib/transformers/FileTransformer.js.map +1 -1
  281. package/lib/transformers/TransformerError.js +2 -1
  282. package/lib/transformers/TransformerError.js.map +1 -1
  283. package/lib/transformers/features/CreateRandomTransformer.js +3 -0
  284. package/lib/transformers/features/CreateRandomTransformer.js.map +1 -1
  285. package/lib/transformers/features/RandomTransformer.js +3 -0
  286. package/lib/transformers/features/RandomTransformer.js.map +1 -1
  287. package/lib/transformers/features/json/JsonApplicationTransformer.js +14 -0
  288. package/lib/transformers/features/json/JsonApplicationTransformer.js.map +1 -1
  289. package/lib/transformers/features/misc/MiscLiteralsTransformer.js +3 -0
  290. package/lib/transformers/features/misc/MiscLiteralsTransformer.js.map +1 -1
  291. package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js +3 -0
  292. package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js.map +1 -1
  293. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js +4 -0
  294. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js.map +1 -1
  295. package/lib/transformers/internal/GenericTransformer.js +6 -0
  296. package/lib/transformers/internal/GenericTransformer.js.map +1 -1
  297. package/lib/utils/NamingConvention/NamingConvention.d.ts +3 -0
  298. package/lib/utils/NamingConvention/NamingConvention.js +108 -0
  299. package/lib/utils/NamingConvention/NamingConvention.js.map +1 -0
  300. package/lib/utils/NamingConvention/index.d.ts +1 -0
  301. package/lib/utils/NamingConvention/index.js +28 -0
  302. package/lib/utils/NamingConvention/index.js.map +1 -0
  303. package/lib/utils/PatternUtil.js +3 -3
  304. package/lib/utils/PatternUtil.js.map +1 -1
  305. package/lib/utils/RandomGenerator/RandomGenerator.d.ts +16 -0
  306. package/lib/utils/RandomGenerator/RandomGenerator.js +83 -0
  307. package/lib/utils/RandomGenerator/RandomGenerator.js.map +1 -0
  308. package/lib/utils/RandomGenerator/index.d.ts +1 -0
  309. package/lib/utils/RandomGenerator/index.js +28 -0
  310. package/lib/utils/RandomGenerator/index.js.map +1 -0
  311. package/lib/utils/Singleton.js +1 -1
  312. package/lib/utils/StringUtil/StringUtil.d.ts +1 -0
  313. package/lib/utils/StringUtil/StringUtil.js +8 -0
  314. package/lib/utils/StringUtil/StringUtil.js.map +1 -0
  315. package/lib/utils/StringUtil/index.d.ts +1 -0
  316. package/lib/utils/StringUtil/index.js +28 -0
  317. package/lib/utils/StringUtil/index.js.map +1 -0
  318. package/package.json +2 -2
  319. package/src/AssertionGuard.ts +1 -1
  320. package/src/CamelCase.ts +114 -114
  321. package/src/IRandomGenerator.ts +35 -35
  322. package/src/IValidation.ts +21 -21
  323. package/src/PascalCase.ts +114 -114
  324. package/src/Primitive.ts +135 -135
  325. package/src/Resolved.ts +116 -116
  326. package/src/SnakeCase.ts +156 -156
  327. package/src/TypeGuardError.ts +36 -36
  328. package/src/executable/TypiaGenerateWizard.ts +83 -83
  329. package/src/executable/TypiaPatchWizard.ts +42 -42
  330. package/src/executable/TypiaSetupWizard.ts +151 -151
  331. package/src/executable/setup/ArgumentParser.ts +43 -43
  332. package/src/executable/setup/CommandExecutor.ts +8 -8
  333. package/src/executable/setup/FileRetriever.ts +22 -22
  334. package/src/executable/setup/PackageManager.ts +71 -71
  335. package/src/executable/setup/PluginConfigurator.ts +69 -69
  336. package/src/executable/typia.ts +55 -55
  337. package/src/factories/CommentFactory.ts +79 -79
  338. package/src/factories/ExpressionFactory.ts +150 -150
  339. package/src/factories/IdentifierFactory.ts +70 -70
  340. package/src/factories/JsonMetadataFactory.ts +53 -53
  341. package/src/factories/LiteralFactory.ts +47 -47
  342. package/src/factories/MetadataCollection.ts +260 -260
  343. package/src/factories/MetadataCommentTagFactory.ts +601 -601
  344. package/src/factories/MetadataFactory.ts +267 -267
  345. package/src/factories/MetadataTypeTagFactory.ts +313 -313
  346. package/src/factories/NumericRangeFactory.ts +72 -72
  347. package/src/factories/ProtobufFactory.ts +259 -259
  348. package/src/factories/StatementFactory.ts +72 -72
  349. package/src/factories/TemplateFactory.ts +56 -56
  350. package/src/factories/TypeFactory.ts +118 -118
  351. package/src/factories/ValueFactory.ts +12 -12
  352. package/src/factories/internal/metadata/MetadataHelper.ts +15 -15
  353. package/src/factories/internal/metadata/emend_metadata_atomics.ts +37 -37
  354. package/src/factories/internal/metadata/emplace_metadata_alias.ts +41 -41
  355. package/src/factories/internal/metadata/emplace_metadata_array_type.ts +38 -38
  356. package/src/factories/internal/metadata/emplace_metadata_object.ts +175 -175
  357. package/src/factories/internal/metadata/emplace_metadata_tuple.ts +57 -57
  358. package/src/factories/internal/metadata/explore_metadata.ts +28 -28
  359. package/src/factories/internal/metadata/iterate_metadata.ts +94 -94
  360. package/src/factories/internal/metadata/iterate_metadata_alias.ts +34 -34
  361. package/src/factories/internal/metadata/iterate_metadata_array.ts +37 -37
  362. package/src/factories/internal/metadata/iterate_metadata_atomic.ts +62 -62
  363. package/src/factories/internal/metadata/iterate_metadata_coalesce.ts +33 -33
  364. package/src/factories/internal/metadata/iterate_metadata_collection.ts +131 -131
  365. package/src/factories/internal/metadata/iterate_metadata_comment_tags.ts +26 -26
  366. package/src/factories/internal/metadata/iterate_metadata_constant.ts +48 -48
  367. package/src/factories/internal/metadata/iterate_metadata_intersection.ts +230 -230
  368. package/src/factories/internal/metadata/iterate_metadata_map.ts +50 -50
  369. package/src/factories/internal/metadata/iterate_metadata_native.ts +208 -208
  370. package/src/factories/internal/metadata/iterate_metadata_object.ts +43 -43
  371. package/src/factories/internal/metadata/iterate_metadata_resolve.ts +52 -52
  372. package/src/factories/internal/metadata/iterate_metadata_set.ts +41 -41
  373. package/src/factories/internal/metadata/iterate_metadata_sort.ts +61 -61
  374. package/src/factories/internal/metadata/iterate_metadata_template.ts +44 -44
  375. package/src/factories/internal/metadata/iterate_metadata_tuple.ts +37 -37
  376. package/src/factories/internal/metadata/iterate_metadata_union.ts +27 -27
  377. package/src/functional/$HeadersReader/$HeadersReader.ts +26 -0
  378. package/src/functional/$HeadersReader/index.ts +1 -0
  379. package/src/functional/$ParameterReader/$ParameterReader.ts +29 -0
  380. package/src/functional/$ParameterReader/index.ts +1 -0
  381. package/src/functional/$ProtobufReader.ts +195 -195
  382. package/src/functional/$ProtobufSizer.ts +147 -147
  383. package/src/functional/$ProtobufWriter.ts +150 -150
  384. package/src/functional/$QueryReader/$QueryReader.ts +46 -0
  385. package/src/functional/$QueryReader/index.ts +1 -0
  386. package/src/functional/$any.ts +4 -4
  387. package/src/functional/$clone.ts +4 -4
  388. package/src/functional/$convention.ts +37 -37
  389. package/src/functional/$dictionary.ts +22 -22
  390. package/src/functional/$every.ts +11 -11
  391. package/src/functional/$guard.ts +35 -35
  392. package/src/functional/$is_between.ts +2 -2
  393. package/src/functional/$join.ts +46 -46
  394. package/src/functional/$number.ts +12 -12
  395. package/src/functional/$report.ts +13 -13
  396. package/src/functional/$rest.ts +3 -3
  397. package/src/functional/$stoll.ts +8 -8
  398. package/src/functional/$string.ts +50 -50
  399. package/src/functional/$strlen.ts +7 -7
  400. package/src/functional/$tail.ts +5 -5
  401. package/src/functional/$throws.ts +10 -0
  402. package/src/functional/$varint.ts +130 -130
  403. package/src/functional/$zigzag.ts +39 -39
  404. package/src/functional/IProtobufWriter.ts +18 -18
  405. package/src/functional/Namespace/http.ts +7 -0
  406. package/src/functional/Namespace/index.ts +75 -0
  407. package/src/functional/Namespace/json.ts +15 -0
  408. package/src/functional/Namespace/misc.ts +14 -0
  409. package/src/functional/Namespace/notations.ts +23 -0
  410. package/src/functional/Namespace/protobuf.ts +20 -0
  411. package/src/functional/is.ts +10 -0
  412. package/src/http.ts +1267 -1149
  413. package/src/index.ts +4 -4
  414. package/src/json.ts +724 -657
  415. package/src/misc.ts +726 -651
  416. package/src/module.ts +965 -897
  417. package/src/notations.ts +977 -855
  418. package/src/programmers/AssertProgrammer.ts +293 -293
  419. package/src/programmers/CheckerProgrammer.ts +1025 -1025
  420. package/src/programmers/FeatureProgrammer.ts +460 -460
  421. package/src/programmers/IsProgrammer.ts +232 -232
  422. package/src/programmers/RandomProgrammer.ts +825 -825
  423. package/src/programmers/TypiaProgrammer.ts +167 -167
  424. package/src/programmers/ValidateProgrammer.ts +307 -307
  425. package/src/programmers/helpers/AtomicPredicator.ts +25 -25
  426. package/src/programmers/helpers/CloneJoiner.ts +130 -130
  427. package/src/programmers/helpers/FunctionImporeter.ts +87 -87
  428. package/src/programmers/helpers/HttpMetadataUtil.ts +21 -21
  429. package/src/programmers/helpers/ICheckEntry.ts +13 -13
  430. package/src/programmers/helpers/IExpressionEntry.ts +12 -12
  431. package/src/programmers/helpers/NotationJoiner.ts +132 -132
  432. package/src/programmers/helpers/OptionPredicator.ts +15 -15
  433. package/src/programmers/helpers/ProtobufUtil.ts +125 -125
  434. package/src/programmers/helpers/ProtobufWire.ts +34 -34
  435. package/src/programmers/helpers/PruneJoiner.ts +141 -141
  436. package/src/programmers/helpers/RandomJoiner.ts +140 -140
  437. package/src/programmers/helpers/RandomRanger.ts +171 -171
  438. package/src/programmers/helpers/StringifyJoinder.ts +105 -105
  439. package/src/programmers/helpers/StringifyPredicator.ts +12 -12
  440. package/src/programmers/helpers/UnionExplorer.ts +269 -269
  441. package/src/programmers/helpers/UnionPredicator.ts +77 -77
  442. package/src/programmers/helpers/disable_function_importer_declare.ts +32 -32
  443. package/src/programmers/http/HttpAssertHeadersProgrammer.ts +77 -77
  444. package/src/programmers/http/HttpAssertQueryProgrammer.ts +75 -75
  445. package/src/programmers/http/HttpHeadersProgrammer.ts +314 -314
  446. package/src/programmers/http/HttpIsHeadersProgrammer.ts +84 -84
  447. package/src/programmers/http/HttpIsQueryProgrammer.ts +82 -82
  448. package/src/programmers/http/HttpParameterProgrammer.ts +97 -97
  449. package/src/programmers/http/HttpQueryProgrammer.ts +252 -252
  450. package/src/programmers/http/HttpValidateHeadersProgrammer.ts +77 -77
  451. package/src/programmers/http/HttpValidateQueryProgrammer.ts +75 -75
  452. package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +1 -1
  453. package/src/programmers/internal/application_alias.ts +74 -74
  454. package/src/programmers/internal/application_array.ts +59 -59
  455. package/src/programmers/internal/application_boolean.ts +35 -35
  456. package/src/programmers/internal/application_constant.ts +25 -25
  457. package/src/programmers/internal/application_default.ts +17 -17
  458. package/src/programmers/internal/application_default_string.ts +33 -33
  459. package/src/programmers/internal/application_escaped.ts +52 -52
  460. package/src/programmers/internal/application_native.ts +34 -34
  461. package/src/programmers/internal/application_number.ts +97 -97
  462. package/src/programmers/internal/application_object.ts +183 -183
  463. package/src/programmers/internal/application_schema.ts +165 -165
  464. package/src/programmers/internal/application_string.ts +61 -61
  465. package/src/programmers/internal/application_templates.ts +24 -24
  466. package/src/programmers/internal/application_tuple.ts +54 -54
  467. package/src/programmers/internal/check_array_length.ts +45 -45
  468. package/src/programmers/internal/check_bigint.ts +49 -49
  469. package/src/programmers/internal/check_dynamic_key.ts +175 -175
  470. package/src/programmers/internal/check_dynamic_properties.ts +198 -198
  471. package/src/programmers/internal/check_everything.ts +23 -23
  472. package/src/programmers/internal/check_native.ts +21 -21
  473. package/src/programmers/internal/check_number.ts +106 -106
  474. package/src/programmers/internal/check_object.ts +60 -60
  475. package/src/programmers/internal/check_string.ts +48 -48
  476. package/src/programmers/internal/check_template.ts +61 -61
  477. package/src/programmers/internal/check_union_array_like.ts +307 -307
  478. package/src/programmers/internal/decode_union_object.ts +78 -78
  479. package/src/programmers/internal/feature_object_entries.ts +58 -58
  480. package/src/programmers/internal/metadata_to_pattern.ts +33 -33
  481. package/src/programmers/internal/prune_object_properties.ts +60 -60
  482. package/src/programmers/internal/random_custom.ts +37 -37
  483. package/src/programmers/internal/stringify_dynamic_properties.ts +157 -157
  484. package/src/programmers/internal/stringify_native.ts +7 -7
  485. package/src/programmers/internal/stringify_regular_properties.ts +81 -81
  486. package/src/programmers/internal/template_to_pattern.ts +15 -15
  487. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +20 -20
  488. package/src/programmers/json/JsonApplicationProgrammer.ts +49 -49
  489. package/src/programmers/json/JsonAssertParseProgrammer.ts +67 -67
  490. package/src/programmers/json/JsonAssertStringifyProgrammer.ts +61 -61
  491. package/src/programmers/json/JsonIsParseProgrammer.ts +73 -73
  492. package/src/programmers/json/JsonIsStringifyProgrammer.ts +75 -75
  493. package/src/programmers/json/JsonStringifyProgrammer.ts +893 -893
  494. package/src/programmers/json/JsonValidateParseProgrammer.ts +64 -64
  495. package/src/programmers/json/JsonValidateStringifyProgrammer.ts +83 -83
  496. package/src/programmers/misc/MiscAssertCloneProgrammer.ts +63 -63
  497. package/src/programmers/misc/MiscAssertPruneProgrammer.ts +60 -60
  498. package/src/programmers/misc/MiscCloneProgrammer.ts +713 -713
  499. package/src/programmers/misc/MiscIsCloneProgrammer.ts +70 -70
  500. package/src/programmers/misc/MiscIsPruneProgrammer.ts +66 -66
  501. package/src/programmers/misc/MiscLiteralsProgrammer.ts +72 -72
  502. package/src/programmers/misc/MiscPruneProgrammer.ts +523 -523
  503. package/src/programmers/misc/MiscValidateCloneProgrammer.ts +80 -80
  504. package/src/programmers/misc/MiscValidatePruneProgrammer.ts +73 -73
  505. package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +64 -64
  506. package/src/programmers/notations/NotationGeneralProgrammer.ts +647 -647
  507. package/src/programmers/notations/NotationIsGeneralProgrammer.ts +71 -71
  508. package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +81 -81
  509. package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +75 -75
  510. package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +61 -61
  511. package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +607 -607
  512. package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +819 -819
  513. package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +82 -82
  514. package/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +75 -75
  515. package/src/programmers/protobuf/ProtobufMessageProgrammer.ts +160 -160
  516. package/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +75 -75
  517. package/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +83 -83
  518. package/src/protobuf.ts +970 -887
  519. package/src/reflect.ts +57 -58
  520. package/src/schemas/json/IJsonApplication.ts +9 -9
  521. package/src/schemas/json/IJsonComponents.ts +19 -19
  522. package/src/schemas/json/IJsonSchema.ts +122 -122
  523. package/src/schemas/metadata/IJsDocTagInfo.ts +10 -10
  524. package/src/schemas/metadata/IMetadata.ts +34 -34
  525. package/src/schemas/metadata/IMetadataAlias.ts +12 -12
  526. package/src/schemas/metadata/IMetadataApplication.ts +7 -7
  527. package/src/schemas/metadata/IMetadataArray.ts +7 -7
  528. package/src/schemas/metadata/IMetadataArrayType.ts +10 -10
  529. package/src/schemas/metadata/IMetadataAtomic.ts +6 -6
  530. package/src/schemas/metadata/IMetadataComponents.ts +11 -11
  531. package/src/schemas/metadata/IMetadataConstant.ts +23 -23
  532. package/src/schemas/metadata/IMetadataDictionary.ts +11 -11
  533. package/src/schemas/metadata/IMetadataEntry.ts +6 -6
  534. package/src/schemas/metadata/IMetadataEscaped.ts +6 -6
  535. package/src/schemas/metadata/IMetadataObject.ts +13 -18
  536. package/src/schemas/metadata/IMetadataProperty.ts +9 -9
  537. package/src/schemas/metadata/IMetadataTuple.ts +7 -7
  538. package/src/schemas/metadata/IMetadataTupleType.ts +10 -10
  539. package/src/schemas/metadata/IMetadataTypeTag.ts +15 -15
  540. package/src/schemas/metadata/Metadata.ts +612 -612
  541. package/src/schemas/metadata/MetadataAlias.ts +61 -61
  542. package/src/schemas/metadata/MetadataApplication.ts +44 -44
  543. package/src/schemas/metadata/MetadataArray.ts +49 -49
  544. package/src/schemas/metadata/MetadataArrayType.ts +57 -57
  545. package/src/schemas/metadata/MetadataAtomic.ts +84 -84
  546. package/src/schemas/metadata/MetadataComponents.ts +98 -98
  547. package/src/schemas/metadata/MetadataConstant.ts +46 -46
  548. package/src/schemas/metadata/MetadataEscaped.ts +51 -51
  549. package/src/schemas/metadata/MetadataObject.ts +154 -155
  550. package/src/schemas/metadata/MetadataProperty.ts +56 -56
  551. package/src/schemas/metadata/MetadataTuple.ts +32 -32
  552. package/src/schemas/metadata/MetadataTupleType.ts +67 -67
  553. package/src/tags/Default.ts +15 -15
  554. package/src/tags/ExclusiveMaximum.ts +13 -13
  555. package/src/tags/ExclusiveMinimum.ts +13 -13
  556. package/src/tags/Format.ts +30 -30
  557. package/src/tags/MaxItems.ts +9 -9
  558. package/src/tags/MaxLength.ts +9 -9
  559. package/src/tags/Maximum.ts +13 -13
  560. package/src/tags/MinItems.ts +9 -9
  561. package/src/tags/MinLength.ts +9 -9
  562. package/src/tags/Minimum.ts +13 -13
  563. package/src/tags/MultipleOf.ts +15 -15
  564. package/src/tags/Pattern.ts +9 -9
  565. package/src/tags/TagBase.ts +68 -68
  566. package/src/tags/Type.ts +27 -27
  567. package/src/tags/index.ts +14 -14
  568. package/src/transform.ts +35 -35
  569. package/src/transformers/CallExpressionTransformer.ts +351 -351
  570. package/src/transformers/FileTransformer.ts +91 -91
  571. package/src/transformers/IProject.ts +15 -15
  572. package/src/transformers/ITransformOptions.ts +62 -62
  573. package/src/transformers/ImportTransformer.ts +66 -66
  574. package/src/transformers/NodeTransformer.ts +13 -13
  575. package/src/transformers/TransformerError.ts +55 -55
  576. package/src/transformers/features/AssertTransformer.ts +16 -16
  577. package/src/transformers/features/CreateAssertTransformer.ts +16 -16
  578. package/src/transformers/features/CreateIsTransformer.ts +10 -10
  579. package/src/transformers/features/CreateRandomTransformer.ts +40 -40
  580. package/src/transformers/features/CreateValidateTransformer.ts +13 -13
  581. package/src/transformers/features/IsTransformer.ts +10 -10
  582. package/src/transformers/features/RandomTransformer.ts +44 -44
  583. package/src/transformers/features/ValidateTransformer.ts +11 -11
  584. package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +11 -11
  585. package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +9 -9
  586. package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +9 -9
  587. package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +9 -9
  588. package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +9 -9
  589. package/src/transformers/features/http/CreateHttpParameterTransformer.ts +9 -9
  590. package/src/transformers/features/http/CreateHttpQueryTransformer.ts +9 -9
  591. package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +12 -12
  592. package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +11 -11
  593. package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +9 -9
  594. package/src/transformers/features/http/HttpAssertQueryTransformer.ts +9 -9
  595. package/src/transformers/features/http/HttpHeadersTransformer.ts +9 -9
  596. package/src/transformers/features/http/HttpIsHeadersTransformer.ts +9 -9
  597. package/src/transformers/features/http/HttpIsQueryTransformer.ts +9 -9
  598. package/src/transformers/features/http/HttpParameterTransformer.ts +9 -9
  599. package/src/transformers/features/http/HttpQueryTransformer.ts +9 -9
  600. package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +10 -10
  601. package/src/transformers/features/http/HttpValidateQueryTransformer.ts +9 -9
  602. package/src/transformers/features/json/JsonApplicationTransformer.ts +134 -134
  603. package/src/transformers/features/json/JsonAssertParseTransformer.ts +9 -9
  604. package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +10 -10
  605. package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +9 -9
  606. package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +12 -12
  607. package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +9 -9
  608. package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +9 -9
  609. package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +9 -9
  610. package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +11 -11
  611. package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +12 -12
  612. package/src/transformers/features/json/JsonIsParseTransformer.ts +9 -9
  613. package/src/transformers/features/json/JsonIsStringifyTransformer.ts +9 -9
  614. package/src/transformers/features/json/JsonStringifyTransformer.ts +9 -9
  615. package/src/transformers/features/json/JsonValidateParseTransformer.ts +9 -9
  616. package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +10 -10
  617. package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +9 -9
  618. package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +9 -9
  619. package/src/transformers/features/misc/MiscCloneTransformer.ts +9 -9
  620. package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +9 -9
  621. package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +9 -9
  622. package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +9 -9
  623. package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +9 -9
  624. package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +9 -9
  625. package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +9 -9
  626. package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +11 -11
  627. package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +11 -11
  628. package/src/transformers/features/misc/MiscIsCloneTransformer.ts +9 -9
  629. package/src/transformers/features/misc/MiscIsPruneTransformer.ts +9 -9
  630. package/src/transformers/features/misc/MiscLiteralsTransformer.ts +32 -32
  631. package/src/transformers/features/misc/MiscPruneTransformer.ts +9 -9
  632. package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +9 -9
  633. package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +9 -9
  634. package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +15 -15
  635. package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +15 -15
  636. package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +15 -15
  637. package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +15 -15
  638. package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +15 -15
  639. package/src/transformers/features/notations/NotationGeneralTransformer.ts +11 -11
  640. package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +15 -15
  641. package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +15 -15
  642. package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +10 -10
  643. package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +10 -10
  644. package/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +12 -12
  645. package/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +12 -12
  646. package/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +9 -9
  647. package/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +9 -9
  648. package/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +9 -9
  649. package/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +9 -9
  650. package/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +12 -12
  651. package/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +12 -12
  652. package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +9 -9
  653. package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +9 -9
  654. package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +9 -9
  655. package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +9 -9
  656. package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +33 -33
  657. package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +10 -10
  658. package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +10 -10
  659. package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +63 -63
  660. package/src/transformers/internal/GenericTransformer.ts +96 -96
  661. package/src/typings/Atomic.ts +13 -13
  662. package/src/typings/ClassProperties.ts +5 -5
  663. package/src/typings/Customizable.ts +5 -5
  664. package/src/typings/OmitNever.ts +3 -3
  665. package/src/typings/ProtobufAtomic.ts +19 -19
  666. package/src/typings/SpecialFields.ts +3 -3
  667. package/src/typings/ValidationPipe.ts +9 -9
  668. package/src/typings/Writable.ts +11 -11
  669. package/src/utils/ArrayUtil.ts +43 -43
  670. package/src/utils/Escaper.ts +46 -46
  671. package/src/utils/MapUtil.ts +12 -12
  672. package/src/utils/NameEncoder.ts +32 -32
  673. package/src/utils/NamingConvention/NamingConvention.ts +77 -0
  674. package/src/utils/NamingConvention/index.ts +1 -0
  675. package/src/utils/PatternUtil.ts +29 -29
  676. package/src/utils/RandomGenerator/RandomGenerator.ts +74 -0
  677. package/src/utils/RandomGenerator/index.ts +1 -0
  678. package/src/utils/Singleton.ts +16 -16
  679. package/src/utils/StringUtil/StringUtil.ts +2 -0
  680. package/src/utils/StringUtil/index.ts +1 -0
  681. package/lib/functional/$HeadersReader.d.ts +0 -6
  682. package/lib/functional/$HeadersReader.js +0 -35
  683. package/lib/functional/$HeadersReader.js.map +0 -1
  684. package/lib/functional/$ParameterReader.d.ts +0 -6
  685. package/lib/functional/$ParameterReader.js +0 -35
  686. package/lib/functional/$ParameterReader.js.map +0 -1
  687. package/lib/functional/$QueryReader.d.ts +0 -8
  688. package/lib/functional/$QueryReader.js +0 -60
  689. package/lib/functional/$QueryReader.js.map +0 -1
  690. package/lib/functional/Namespace.js +0 -104
  691. package/lib/functional/Namespace.js.map +0 -1
  692. package/lib/utils/NamingConvention.d.ts +0 -5
  693. package/lib/utils/NamingConvention.js +0 -115
  694. package/lib/utils/NamingConvention.js.map +0 -1
  695. package/lib/utils/RandomGenerator.d.ts +0 -1
  696. package/lib/utils/RandomGenerator.js +0 -66
  697. package/lib/utils/RandomGenerator.js.map +0 -1
  698. package/lib/utils/StringUtil.d.ts +0 -3
  699. package/lib/utils/StringUtil.js +0 -10
  700. package/lib/utils/StringUtil.js.map +0 -1
  701. package/src/functional/$HeadersReader.ts +0 -28
  702. package/src/functional/$ParameterReader.ts +0 -31
  703. package/src/functional/$QueryReader.ts +0 -56
  704. package/src/functional/Namespace.ts +0 -167
  705. package/src/utils/NamingConvention.ts +0 -87
  706. package/src/utils/RandomGenerator.ts +0 -83
  707. package/src/utils/StringUtil.ts +0 -4
  708. /package/lib/functional/{Namespace.d.ts → is.d.ts} +0 -0
package/src/misc.ts CHANGED
@@ -1,651 +1,726 @@
1
- /* ===========================================================
2
- MISCELLAENOUS
3
- - LITERALS
4
- - CLONE
5
- - PRUNE
6
- - FACTORY FUNCTIONS
7
- ==============================================================
8
- LITERALS
9
- ----------------------------------------------------------- */
10
- import { Namespace } from "./functional/Namespace";
11
-
12
- import { Atomic } from "./typings/Atomic";
13
-
14
- import { IValidation } from "./IValidation";
15
- import { Resolved } from "./Resolved";
16
-
17
- /**
18
- * > You must configure the generic argument `T`.
19
- *
20
- * Union literal type to array.
21
- *
22
- * Converts a union literal type to an array of its members.
23
- *
24
- * ```typescript
25
- * literals<"A" | "B" | 1>; // ["A", "B", 1]
26
- * ```
27
- *
28
- * @template T Union literal type
29
- * @return Array of union literal type's members
30
- *
31
- * @author Jeongho Nam - https://github.com/samchon
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
- * @template T Union literal type
45
- * @return Array of union literal type's members
46
- *
47
- * @author Jeongho Nam - https://github.com/samchon
48
- */
49
- export function literals<T extends Atomic.Type | null>(): T[];
50
-
51
- /**
52
- * @internal
53
- */
54
- export function literals(): never {
55
- halt("literals");
56
- }
57
-
58
- /* -----------------------------------------------------------
59
- CLONE
60
- ----------------------------------------------------------- */
61
- /**
62
- * Clone a data.
63
- *
64
- * Clones an instance following type `T`. If the target *input* value or its member
65
- * variable contains a class instance having methods, those methods would not be
66
- * cloned.
67
- *
68
- * For reference, this `typia.misc.clone()` function does not validate the input value
69
- * type. It just believes that the input value is following the type `T`. Therefore,
70
- * if you can't ensure the input value type, it would be better to call
71
- * {@link assertClone} function instead.
72
- *
73
- * @template T Type of the input value
74
- * @param input A value to be cloned
75
- * @return Cloned data
76
- *
77
- * @author Jeongho Nam - https://github.com/samchon
78
- */
79
- export function clone<T>(input: T): Resolved<T>;
80
-
81
- /**
82
- * @internal
83
- */
84
- export function clone(): never {
85
- halt("clone");
86
- }
87
- Object.assign(clone, Namespace.misc.clone("clone"));
88
-
89
- /**
90
- * Clone a 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}. Otherwise, there's no problem on the `input` value, cloned
98
- * data would be returned.
99
- *
100
- * @template T Type of the input value
101
- * @param input A value to be cloned
102
- * @return Cloned data
103
- *
104
- * @author Jeongho Nam - https://github.com/samchon
105
- */
106
- export function assertClone<T>(input: T): Resolved<T>;
107
-
108
- /**
109
- * Clone a data with type assertion.
110
- *
111
- * Clones an instance following type `T`, with type assertion. If the target `input`
112
- * value or its member variable contains a class instance having methods, those
113
- * methods would not be cloned.
114
- *
115
- * In such reason, when `input` value is not matched with the type `T`, it throws an
116
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
117
- * data would be returned.
118
- *
119
- * @template T Type of the input value
120
- * @param input A value to be cloned
121
- * @return Cloned data
122
- *
123
- * @author Jeongho Nam - https://github.com/samchon
124
- */
125
- export function assertClone<T>(input: unknown): Resolved<T>;
126
-
127
- /**
128
- * @internal
129
- */
130
- export function assertClone(): never {
131
- halt("assertClone");
132
- }
133
- Object.assign(assertClone, Namespace.assert("misc.assertClone"));
134
- Object.assign(assertClone, Namespace.misc.clone("assertClone"));
135
-
136
- /**
137
- * Clone a data with type checking.
138
- *
139
- * Clones an instance following type `T`, with type checking. If the target `input`
140
- * value or its member variable contains a class instance having methods, those
141
- * methods would not be cloned.
142
- *
143
- * In such reason, when `input` value is not matched with the type `T`, it returns
144
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
145
- * data would be returned.
146
- *
147
- * @template T Type of the input value
148
- * @param input A value to be cloned
149
- * @return Cloned data when exact type, otherwise null
150
- *
151
- * @author Jeongho Nam - https://github.com/samchon
152
- */
153
- export function isClone<T>(input: T): Resolved<T> | null;
154
-
155
- /**
156
- * Clone a data with type checking.
157
- *
158
- * Clones an instance following type `T`, with type checking. If the target `input`
159
- * value or its member variable contains a class instance having methods, those
160
- * methods would not be cloned.
161
- *
162
- * In such reason, when `input` value is not matched with the type `T`, it returns
163
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
164
- * data would be returned.
165
- *
166
- * @template T Type of the input value
167
- * @param input A value to be cloned
168
- * @return Cloned data when exact type, otherwise null
169
- *
170
- * @author Jeongho Nam - https://github.com/samchon
171
- */
172
- export function isClone<T>(input: unknown): Resolved<T> | null;
173
-
174
- /**
175
- * @internal
176
- */
177
- export function isClone(): never {
178
- halt("isClone");
179
- }
180
- Object.assign(isClone, Namespace.is());
181
- Object.assign(isClone, Namespace.misc.clone("isClone"));
182
-
183
- /**
184
- * Clone a data with detailed type validation.
185
- *
186
- * Clones an instance following type `T`, with detailed type validation. If the target
187
- * `input` value or its member variable contains a class instance having methods,
188
- * those methods would not be cloned.
189
- *
190
- * In such reason, when `input` value is not matched with the type `T`, it returns
191
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
192
- * value, cloned data would be stored in `data` property of the output
193
- * {@link IValidation.Success} instance.
194
- *
195
- * @template T Type of the input value
196
- * @param input A value to be cloned
197
- * @returns Validation result with cloned value
198
- */
199
- export function validateClone<T>(input: T): IValidation<Resolved<T>>;
200
-
201
- /**
202
- * Clone a data with detailed type validation.
203
- *
204
- * Clones an instance following type `T`, with detailed type validation. If the target
205
- * `input` value or its member variable contains a class instance having methods,
206
- * those methods would not be cloned.
207
- *
208
- * In such reason, when `input` value is not matched with the type `T`, it returns
209
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
210
- * value, cloned data would be stored in `data` property of the output
211
- * {@link IValidation.Success} instance.
212
- *
213
- * @template T Type of the input value
214
- * @param input A value to be cloned
215
- * @returns Validation result with cloned value
216
- */
217
- export function validateClone<T>(input: unknown): IValidation<Resolved<T>>;
218
-
219
- /**
220
- * @internal
221
- */
222
- export function validateClone(): never {
223
- halt("validateClone");
224
- }
225
- Object.assign(validateClone, Namespace.validate());
226
- Object.assign(validateClone, Namespace.misc.clone("validateClone"));
227
-
228
- /* -----------------------------------------------------------
229
- PRUNE
230
- ----------------------------------------------------------- */
231
- /**
232
- * Prune, erase superfluous properties.
233
- *
234
- * Remove every superfluous properties from the `input` object, even including nested
235
- * objects. Note that, as every superfluous properties would be deleted, you never can
236
- * read those superfluous properties after calling this `prune()` function.
237
- *
238
- * For reference, this `typia.misc.prune()` function does not validate the input value
239
- * type. It just believes that the input value is following the type `T`. Therefore,
240
- * if you can't ensure the input value type, it would better to call one of below
241
- * functions instead.
242
- *
243
- * - {@link assertPrune}
244
- * - {@link isPrune}
245
- * - {@link validatePrune}
246
- *
247
- * @template T Type of the input value
248
- * @param input Target instance to prune
249
- *
250
- * @author Jeongho Nam - https://github.com/samchon
251
- */
252
- export function prune<T extends object>(input: T): void;
253
-
254
- /**
255
- * @internal
256
- */
257
- export function prune(): never {
258
- halt("prune");
259
- }
260
- Object.assign(prune, Namespace.misc.prune("prune"));
261
-
262
- /**
263
- * Prune, erase superfluous properties, with type assertion.
264
- *
265
- * `typia.misc.assertPrune()` is a combination function of {@link assert} and
266
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
267
- * object including nested objects, with type assertion.
268
- *
269
- * In such reason, when `input` value is not matched with the type `T`, it throws an
270
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
271
- * every superfluous properties would be removed, including nested objects.
272
- *
273
- * @template T Type of the input value
274
- * @param input Target instance to assert and prune
275
- *
276
- * @author Jeongho Nam - https://github.com/samchon
277
- */
278
- export function assertPrune<T>(input: T): T;
279
-
280
- /**
281
- * Prune, erase superfluous properties, with type assertion.
282
- *
283
- * `typia.misc.assertPrune()` is a combination function of {@link assert} and
284
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
285
- * object including nested objects, with type assertion.
286
- *
287
- * In such reason, when `input` value is not matched with the type `T`, it throws an
288
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
289
- * every superfluous properties would be removed, including nested objects.
290
- *
291
- * @template T Type of the input value
292
- * @param input Target instance to assert and prune
293
- *
294
- * @author Jeongho Nam - https://github.com/samchon
295
- */
296
- export function assertPrune<T>(input: unknown): T;
297
-
298
- /**
299
- * @internal
300
- */
301
- export function assertPrune(): unknown {
302
- halt("assertPrune");
303
- }
304
- Object.assign(assertPrune, Namespace.assert("misc.assertPrune"));
305
- Object.assign(assertPrune, Namespace.misc.prune("assertPrune"));
306
-
307
- /**
308
- * Prune, erase superfluous properties, with type checking.
309
- *
310
- * `typia.misc.assertPrune()` is a combination function of {@link is} and
311
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
312
- * object including nested objects, with type checking.
313
- *
314
- * In such reason, when `input` value is not matched with the type `T`, it returns
315
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
316
- * `true` after removing every superfluous properties, including nested objects.
317
- *
318
- * @template T Type of the input value
319
- * @param input Target instance to check and prune
320
- * @returns Whether the parametric value is following the type `T` or not
321
- *
322
- * @author Jeongho Nam - https://github.com/samchon
323
- */
324
- export function isPrune<T>(input: T): input is T;
325
-
326
- /**
327
- * Prune, erase superfluous properties, with type checking.
328
- *
329
- * `typia.misc.assertPrune()` is a combination function of {@link is} and
330
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
331
- * object including nested objects, with type checking.
332
- *
333
- * In such reason, when `input` value is not matched with the type `T`, it returns
334
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
335
- * `true` after removing every superfluous properties, including nested objects.
336
- *
337
- * @template T Type of the input value
338
- * @param input Target instance to check and prune
339
- * @returns Whether the parametric value is following the type `T` or not
340
- *
341
- * @author Jeongho Nam - https://github.com/samchon
342
- */
343
- export function isPrune<T>(input: unknown): input is T;
344
-
345
- /**
346
- * @internal
347
- */
348
- export function isPrune(): never {
349
- halt("isPrune");
350
- }
351
- Object.assign(isPrune, Namespace.is());
352
- Object.assign(isPrune, Namespace.misc.prune("isPrune"));
353
-
354
- /**
355
- * Prune, erase superfluous properties, with type validation.
356
- *
357
- * `typia.misc.validatePrune()` is a combination function of {@link validate} and
358
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
359
- * object including nested objects, with type validation.
360
- *
361
- * In such reason, when `input` value is not matched with the type `T`, it returns
362
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
363
- * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
364
- * removing every superfluous properties, including nested objects.
365
- *
366
- * @template T Type of the input value
367
- * @param input Target instance to validate and prune
368
- * @returns Validation result
369
- *
370
- * @author Jeongho Nam - https://github.com/samchon
371
- */
372
- export function validatePrune<T>(input: T): IValidation<T>;
373
-
374
- /**
375
- * Prune, erase superfluous properties, with type validation.
376
- *
377
- * `typia.misc.validatePrune()` is a combination function of {@link validate} and
378
- * {@link prune}. Therefore, it removes every superfluous properties from the `input`
379
- * object including nested objects, with type validation.
380
- *
381
- * In such reason, when `input` value is not matched with the type `T`, it returns
382
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
383
- * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
384
- * removing every superfluous properties, including nested objects.
385
- *
386
- * @template T Type of the input value
387
- * @param input Target instance to validate and prune
388
- * @returns Validation result
389
- *
390
- * @author Jeongho Nam - https://github.com/samchon
391
- */
392
- export function validatePrune<T>(input: unknown): IValidation<T>;
393
-
394
- /**
395
- * @internal
396
- */
397
- export function validatePrune<T>(): IValidation<T> {
398
- halt("validatePrune");
399
- }
400
- Object.assign(validatePrune, Namespace.misc.prune("validatePrune"));
401
- Object.assign(validatePrune, Namespace.validate());
402
-
403
- /* -----------------------------------------------------------
404
- FACTORY FUNCTIONS
405
- ----------------------------------------------------------- */
406
- /**
407
- * Creates a reusable {@link clone} function.
408
- *
409
- * @danger You must configure the generic argument `T`
410
- * @returns Nothing until you configure the generic argument `T`
411
- * @throws compile error
412
- *
413
- * @author Jeongho Nam - https://github.com/samchon
414
- */
415
- export function createClone(): never;
416
-
417
- /**
418
- * Creates a resuable {@link clone} function.
419
- *
420
- * @template T Type of the input value
421
- * @returns A reusable `clone` function
422
- *
423
- * @author Jeongho Nam - https://github.com/samchon
424
- */
425
- export function createClone<T>(): (input: T) => Resolved<T>;
426
-
427
- /**
428
- * @internal
429
- */
430
- export function createClone(): never {
431
- halt("createClone");
432
- }
433
- Object.assign(createClone, clone);
434
-
435
- /**
436
- * Creates a reusable {@link assertClone} function.
437
- *
438
- * @danger You must configure the generic argument `T`
439
- * @returns Nothing until you configure the generic argument `T`
440
- * @throws compile error
441
- *
442
- * @author Jeongho Nam - https://github.com/samchon
443
- */
444
- export function createAssertClone(): never;
445
-
446
- /**
447
- * Creates a resuable {@link assertClone} function.
448
- *
449
- * @template T Type of the input value
450
- * @returns A reusable `clone` function
451
- *
452
- * @author Jeongho Nam - https://github.com/samchon
453
- */
454
- export function createAssertClone<T>(): (input: unknown) => Resolved<T>;
455
-
456
- /**
457
- * @internal
458
- */
459
- export function createAssertClone(): never {
460
- halt("createAssertClone");
461
- }
462
- Object.assign(createAssertClone, assertClone);
463
-
464
- /**
465
- * Creates a reusable {@link isClone} function.
466
- *
467
- * @danger You must configure the generic argument `T`
468
- * @returns Nothing until you configure the generic argument `T`
469
- * @throws compile error
470
- *
471
- * @author Jeongho Nam - https://github.com/samchon
472
- */
473
- export function createIsClone(): never;
474
-
475
- /**
476
- * Creates a resuable {@link isClone} function.
477
- *
478
- * @template T Type of the input value
479
- * @returns A reusable `clone` function
480
- *
481
- * @author Jeongho Nam - https://github.com/samchon
482
- */
483
- export function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
484
-
485
- /**
486
- * @internal
487
- */
488
- export function createIsClone(): never {
489
- halt("createIsClone");
490
- }
491
- Object.assign(createIsClone, isClone);
492
-
493
- /**
494
- * Creates a reusable {@link validateClone} function.
495
- *
496
- * @danger You must configure the generic argument `T`
497
- * @returns Nothing until you configure the generic argument `T`
498
- * @throws compile error
499
- *
500
- * @author Jeongho Nam - https://github.com/samchon
501
- */
502
- export function createValidateClone(): never;
503
-
504
- /**
505
- * Creates a resuable {@link validateClone} function.
506
- *
507
- * @template T Type of the input value
508
- * @returns A reusable `clone` function
509
- *
510
- * @author Jeongho Nam - https://github.com/samchon
511
- */
512
- export function createValidateClone<T>(): (
513
- input: unknown,
514
- ) => IValidation<Resolved<T>>;
515
-
516
- /**
517
- * @internal
518
- */
519
- export function createValidateClone(): never {
520
- halt("createValidateClone");
521
- }
522
- Object.assign(createValidateClone, validateClone);
523
-
524
- /**
525
- * Creates a reusable {@link prune} function.
526
- *
527
- * @danger You must configure the generic argument `T`
528
- * @returns Nothing until you configure the generic argument `T`
529
- * @throws compile error
530
- *
531
- * @author Jeongho Nam - https://github.com/samchon
532
- */
533
- export function createPrune(): never;
534
-
535
- /**
536
- * Creates a resuable {@link prune} function.
537
- *
538
- * @template T Type of the input value
539
- * @returns A reusable `prune` function
540
- *
541
- * @author Jeongho Nam - https://github.com/samchon
542
- */
543
- export function createPrune<T extends object>(): (input: T) => void;
544
-
545
- /**
546
- * @internal
547
- */
548
- export function createPrune<T extends object>(): (input: T) => void {
549
- halt("createPrune");
550
- }
551
- Object.assign(createPrune, prune);
552
-
553
- /**
554
- * Creates a reusable {@link assertPrune} function.
555
- *
556
- * @danger You must configure the generic argument `T`
557
- * @returns Nothing until you configure the generic argument `T`
558
- * @throws compile error
559
- *
560
- * @author Jeongho Nam - https://github.com/samchon
561
- */
562
- export function createAssertPrune(): never;
563
-
564
- /**
565
- * Creates a resuable {@link assertPrune} function.
566
- *
567
- * @template T Type of the input value
568
- * @returns A reusable `isPrune` function
569
- *
570
- * @author Jeongho Nam - https://github.com/samchon
571
- */
572
- export function createAssertPrune<T extends object>(): (input: T) => T;
573
-
574
- /**
575
- * @internal
576
- */
577
- export function createAssertPrune<T extends object>(): (input: T) => T {
578
- halt("createAssertPrune");
579
- }
580
- Object.assign(createAssertPrune, assertPrune);
581
-
582
- /**
583
- * Creates a reusable {@link isPrune} function.
584
- *
585
- * @danger You must configure the generic argument `T`
586
- * @returns Nothing until you configure the generic argument `T`
587
- * @throws compile error
588
- *
589
- * @author Jeongho Nam - https://github.com/samchon
590
- */
591
- export function createIsPrune(): never;
592
-
593
- /**
594
- * Creates a resuable {@link isPrune} function.
595
- *
596
- * @template T Type of the input value
597
- * @returns A reusable `isPrune` function
598
- *
599
- * @author Jeongho Nam - https://github.com/samchon
600
- */
601
- export function createIsPrune<T extends object>(): (input: T) => input is T;
602
-
603
- /**
604
- * @internal
605
- */
606
- export function createIsPrune<T extends object>(): (input: T) => input is T {
607
- halt("createIsPrune");
608
- }
609
- Object.assign(createIsPrune, isPrune);
610
-
611
- /**
612
- * Creates a reusable {@link validatePrune} function.
613
- *
614
- * @danger You must configure the generic argument `T`
615
- * @returns Nothing until you configure the generic argument `T`
616
- * @throws compile error
617
- *
618
- * @author Jeongho Nam - https://github.com/samchon
619
- */
620
- export function createValidatePrune(): never;
621
-
622
- /**
623
- * Creates a resuable {@link validatePrune} function.
624
- *
625
- * @template T Type of the input value
626
- * @returns A reusable `validatePrune` function
627
- *
628
- * @author Jeongho Nam - https://github.com/samchon
629
- */
630
- export function createValidatePrune<T extends object>(): (
631
- input: T,
632
- ) => IValidation<T>;
633
-
634
- /**
635
- * @internal
636
- */
637
- export function createValidatePrune<T extends object>(): (
638
- input: T,
639
- ) => IValidation<T> {
640
- halt("createValidatePrune");
641
- }
642
- Object.assign(createValidatePrune, validatePrune);
643
-
644
- /**
645
- * @internal
646
- */
647
- function halt(name: string): never {
648
- throw new Error(
649
- `Error on typia.misc.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
650
- );
651
- }
1
+ /* ===========================================================
2
+ MISCELLAENOUS
3
+ - LITERALS
4
+ - CLONE
5
+ - PRUNE
6
+ - FACTORY FUNCTIONS
7
+ ==============================================================
8
+ LITERALS
9
+ ----------------------------------------------------------- */
10
+ import * as Namespace from "./functional/Namespace";
11
+
12
+ import { Atomic } from "./typings/Atomic";
13
+
14
+ import { IValidation } from "./IValidation";
15
+ import { Resolved } from "./Resolved";
16
+
17
+ /**
18
+ * > You must configure the generic argument `T`.
19
+ *
20
+ * Union literal type to array.
21
+ *
22
+ * Converts a union literal type to an array of its members.
23
+ *
24
+ * ```typescript
25
+ * literals<"A" | "B" | 1>; // ["A", "B", 1]
26
+ * ```
27
+ *
28
+ * @template T Union literal type
29
+ * @return Array of union literal type's members
30
+ *
31
+ * @author Jeongho Nam - https://github.com/samchon
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
+ * @template T Union literal type
45
+ * @return Array of union literal type's members
46
+ *
47
+ * @author Jeongho Nam - https://github.com/samchon
48
+ */
49
+ export function literals<T extends Atomic.Type | null>(): T[];
50
+
51
+ /**
52
+ * @internal
53
+ */
54
+ export function literals(): never {
55
+ halt("literals");
56
+ }
57
+
58
+ /* -----------------------------------------------------------
59
+ CLONE
60
+ ----------------------------------------------------------- */
61
+ /**
62
+ * Clone a data.
63
+ *
64
+ * Clones an instance following type `T`. If the target *input* value or its member
65
+ * variable contains a class instance having methods, those methods would not be
66
+ * cloned.
67
+ *
68
+ * For reference, this `typia.misc.clone()` function does not validate the input value
69
+ * type. It just believes that the input value is following the type `T`. Therefore,
70
+ * if you can't ensure the input value type, it would be better to call
71
+ * {@link assertClone} function instead.
72
+ *
73
+ * @template T Type of the input value
74
+ * @param input A value to be cloned
75
+ * @return Cloned data
76
+ *
77
+ * @author Jeongho Nam - https://github.com/samchon
78
+ */
79
+ function clone<T>(input: T): Resolved<T>;
80
+
81
+ /**
82
+ * @internal
83
+ */
84
+ function clone(): never {
85
+ halt("clone");
86
+ }
87
+ const clonePure = /** @__PURE__ */ Object.assign<typeof clone, {}>(
88
+ clone,
89
+ /** @__PURE__ */ Namespace.misc.clone("clone"),
90
+ );
91
+ export { clonePure as clone };
92
+
93
+ /**
94
+ * Clone a data with type assertion.
95
+ *
96
+ * Clones an instance following type `T`, with type assertion. If the target `input`
97
+ * value or its member variable contains a class instance having methods, those
98
+ * methods would not be cloned.
99
+ *
100
+ * In such reason, when `input` value is not matched with the type `T`, it throws an
101
+ * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
102
+ * data would be returned.
103
+ *
104
+ * @template T Type of the input value
105
+ * @param input A value to be cloned
106
+ * @return Cloned data
107
+ *
108
+ * @author Jeongho Nam - https://github.com/samchon
109
+ */
110
+ function assertClone<T>(input: T): Resolved<T>;
111
+
112
+ /**
113
+ * Clone a 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}. Otherwise, there's no problem on the `input` value, cloned
121
+ * data would be returned.
122
+ *
123
+ * @template T Type of the input value
124
+ * @param input A value to be cloned
125
+ * @return Cloned data
126
+ *
127
+ * @author Jeongho Nam - https://github.com/samchon
128
+ */
129
+ function assertClone<T>(input: unknown): Resolved<T>;
130
+
131
+ /**
132
+ * @internal
133
+ */
134
+ function assertClone(): never {
135
+ halt("assertClone");
136
+ }
137
+ const assertClonePure = /** @__PURE__ */ Object.assign<
138
+ typeof assertClone,
139
+ {},
140
+ {}
141
+ >(
142
+ assertClone,
143
+ /** @__PURE__ */ Namespace.assert("misc.assertClone"),
144
+ /** @__PURE__ */ Namespace.misc.clone("assertClone"),
145
+ );
146
+ export { assertClonePure as assertClone };
147
+
148
+ /**
149
+ * Clone a data with type checking.
150
+ *
151
+ * Clones an instance following type `T`, with type checking. If the target `input`
152
+ * value or its member variable contains a class instance having methods, those
153
+ * methods would not be cloned.
154
+ *
155
+ * In such reason, when `input` value is not matched with the type `T`, it returns
156
+ * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
157
+ * data would be returned.
158
+ *
159
+ * @template T Type of the input value
160
+ * @param input A value to be cloned
161
+ * @return Cloned data when exact type, otherwise null
162
+ *
163
+ * @author Jeongho Nam - https://github.com/samchon
164
+ */
165
+ function isClone<T>(input: T): Resolved<T> | null;
166
+
167
+ /**
168
+ * Clone a data with type checking.
169
+ *
170
+ * Clones an instance following type `T`, with type checking. If the target `input`
171
+ * value or its member variable contains a class instance having methods, those
172
+ * methods would not be cloned.
173
+ *
174
+ * In such reason, when `input` value is not matched with the type `T`, it returns
175
+ * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
176
+ * data would be returned.
177
+ *
178
+ * @template T Type of the input value
179
+ * @param input A value to be cloned
180
+ * @return Cloned data when exact type, otherwise null
181
+ *
182
+ * @author Jeongho Nam - https://github.com/samchon
183
+ */
184
+ function isClone<T>(input: unknown): Resolved<T> | null;
185
+
186
+ /**
187
+ * @internal
188
+ */
189
+ function isClone(): never {
190
+ halt("isClone");
191
+ }
192
+ const isClonePure = /** @__PURE__ */ Object.assign<typeof isClone, {}, {}>(
193
+ isClone,
194
+ /** @__PURE__ */ Namespace.is(),
195
+ /** @__PURE__ */ Namespace.misc.clone("isClone"),
196
+ );
197
+ export { isClonePure as isClone };
198
+
199
+ /**
200
+ * Clone a data with detailed type validation.
201
+ *
202
+ * Clones an instance following type `T`, with detailed type validation. If the target
203
+ * `input` value or its member variable contains a class instance having methods,
204
+ * those methods would not be cloned.
205
+ *
206
+ * In such reason, when `input` value is not matched with the type `T`, it returns
207
+ * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
208
+ * value, cloned data would be stored in `data` property of the output
209
+ * {@link IValidation.Success} instance.
210
+ *
211
+ * @template T Type of the input value
212
+ * @param input A value to be cloned
213
+ * @returns Validation result with cloned value
214
+ */
215
+ function validateClone<T>(input: T): IValidation<Resolved<T>>;
216
+
217
+ /**
218
+ * Clone a data with detailed type validation.
219
+ *
220
+ * Clones an instance following type `T`, with detailed type validation. If the target
221
+ * `input` value or its member variable contains a class instance having methods,
222
+ * those methods would not be cloned.
223
+ *
224
+ * In such reason, when `input` value is not matched with the type `T`, it returns
225
+ * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
226
+ * value, cloned data would be stored in `data` property of the output
227
+ * {@link IValidation.Success} instance.
228
+ *
229
+ * @template T Type of the input value
230
+ * @param input A value to be cloned
231
+ * @returns Validation result with cloned value
232
+ */
233
+ function validateClone<T>(input: unknown): IValidation<Resolved<T>>;
234
+
235
+ /**
236
+ * @internal
237
+ */
238
+ function validateClone(): never {
239
+ halt("validateClone");
240
+ }
241
+ const validateClonePure = /** @__PURE__ */ Object.assign<
242
+ typeof validateClone,
243
+ {},
244
+ {}
245
+ >(
246
+ validateClone,
247
+ /** @__PURE__ */ Namespace.validate(),
248
+ /** @__PURE__ */ Namespace.misc.clone("validateClone"),
249
+ );
250
+ export { validateClonePure as validateClone };
251
+
252
+ /* -----------------------------------------------------------
253
+ PRUNE
254
+ ----------------------------------------------------------- */
255
+ /**
256
+ * Prune, erase superfluous properties.
257
+ *
258
+ * Remove every superfluous properties from the `input` object, even including nested
259
+ * objects. Note that, as every superfluous properties would be deleted, you never can
260
+ * read those superfluous properties after calling this `prune()` function.
261
+ *
262
+ * For reference, this `typia.misc.prune()` function does not validate the input value
263
+ * type. It just believes that the input value is following the type `T`. Therefore,
264
+ * if you can't ensure the input value type, it would better to call one of below
265
+ * functions instead.
266
+ *
267
+ * - {@link assertPrune}
268
+ * - {@link isPrune}
269
+ * - {@link validatePrune}
270
+ *
271
+ * @template T Type of the input value
272
+ * @param input Target instance to prune
273
+ *
274
+ * @author Jeongho Nam - https://github.com/samchon
275
+ */
276
+ function prune<T extends object>(input: T): void;
277
+
278
+ /**
279
+ * @internal
280
+ */
281
+ function prune(): never {
282
+ halt("prune");
283
+ }
284
+ const prunePure = /** @__PURE__ */ Object.assign<typeof prune, {}>(
285
+ prune,
286
+ /** @__PURE__ */ Namespace.misc.prune("prune"),
287
+ );
288
+ export { prunePure as prune };
289
+
290
+ /**
291
+ * Prune, erase superfluous properties, with type assertion.
292
+ *
293
+ * `typia.misc.assertPrune()` is a combination function of {@link assert} and
294
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
295
+ * object including nested objects, with type assertion.
296
+ *
297
+ * In such reason, when `input` value is not matched with the type `T`, it throws an
298
+ * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
299
+ * every superfluous properties would be removed, including nested objects.
300
+ *
301
+ * @template T Type of the input value
302
+ * @param input Target instance to assert and prune
303
+ *
304
+ * @author Jeongho Nam - https://github.com/samchon
305
+ */
306
+ function assertPrune<T>(input: T): T;
307
+
308
+ /**
309
+ * Prune, erase superfluous properties, with type assertion.
310
+ *
311
+ * `typia.misc.assertPrune()` is a combination function of {@link assert} and
312
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
313
+ * object including nested objects, with type assertion.
314
+ *
315
+ * In such reason, when `input` value is not matched with the type `T`, it throws an
316
+ * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
317
+ * every superfluous properties would be removed, including nested objects.
318
+ *
319
+ * @template T Type of the input value
320
+ * @param input Target instance to assert and prune
321
+ *
322
+ * @author Jeongho Nam - https://github.com/samchon
323
+ */
324
+ function assertPrune<T>(input: unknown): T;
325
+
326
+ /**
327
+ * @internal
328
+ */
329
+ function assertPrune(): unknown {
330
+ halt("assertPrune");
331
+ }
332
+ const assertPrunePure = /** @__PURE__ */ Object.assign<
333
+ typeof assertPrune,
334
+ {},
335
+ {}
336
+ >(
337
+ assertPrune,
338
+ /** @__PURE__ */ Namespace.assert("misc.assertPrune"),
339
+ /** @__PURE__ */ Namespace.misc.prune("assertPrune"),
340
+ );
341
+ export { assertPrunePure as assertPrune };
342
+
343
+ /**
344
+ * Prune, erase superfluous properties, with type checking.
345
+ *
346
+ * `typia.misc.assertPrune()` is a combination function of {@link is} and
347
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
348
+ * object including nested objects, with type checking.
349
+ *
350
+ * In such reason, when `input` value is not matched with the type `T`, it returns
351
+ * `false` value. Otherwise, there's no problem on the `input` value, it returns
352
+ * `true` after removing every superfluous properties, including nested objects.
353
+ *
354
+ * @template T Type of the input value
355
+ * @param input Target instance to check and prune
356
+ * @returns Whether the parametric value is following the type `T` or not
357
+ *
358
+ * @author Jeongho Nam - https://github.com/samchon
359
+ */
360
+ function isPrune<T>(input: T): input is T;
361
+
362
+ /**
363
+ * Prune, erase superfluous properties, with type checking.
364
+ *
365
+ * `typia.misc.assertPrune()` is a combination function of {@link is} and
366
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
367
+ * object including nested objects, with type checking.
368
+ *
369
+ * In such reason, when `input` value is not matched with the type `T`, it returns
370
+ * `false` value. Otherwise, there's no problem on the `input` value, it returns
371
+ * `true` after removing every superfluous properties, including nested objects.
372
+ *
373
+ * @template T Type of the input value
374
+ * @param input Target instance to check and prune
375
+ * @returns Whether the parametric value is following the type `T` or not
376
+ *
377
+ * @author Jeongho Nam - https://github.com/samchon
378
+ */
379
+ function isPrune<T>(input: unknown): input is T;
380
+
381
+ /**
382
+ * @internal
383
+ */
384
+ function isPrune(): never {
385
+ halt("isPrune");
386
+ }
387
+ const isPrunePure = /** @__PURE__ */ Object.assign<typeof isPrune, {}, {}>(
388
+ isPrune,
389
+ /** @__PURE__ */ Namespace.is(),
390
+ /** @__PURE__ */ Namespace.misc.prune("isPrune"),
391
+ );
392
+ export { isPrunePure as isPrune };
393
+
394
+ /**
395
+ * Prune, erase superfluous properties, with type validation.
396
+ *
397
+ * `typia.misc.validatePrune()` is a combination function of {@link validate} and
398
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
399
+ * object including nested objects, with type validation.
400
+ *
401
+ * In such reason, when `input` value is not matched with the type `T`, it returns
402
+ * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
403
+ * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
404
+ * removing every superfluous properties, including nested objects.
405
+ *
406
+ * @template T Type of the input value
407
+ * @param input Target instance to validate and prune
408
+ * @returns Validation result
409
+ *
410
+ * @author Jeongho Nam - https://github.com/samchon
411
+ */
412
+ function validatePrune<T>(input: T): IValidation<T>;
413
+
414
+ /**
415
+ * Prune, erase superfluous properties, with type validation.
416
+ *
417
+ * `typia.misc.validatePrune()` is a combination function of {@link validate} and
418
+ * {@link prune}. Therefore, it removes every superfluous properties from the `input`
419
+ * object including nested objects, with type validation.
420
+ *
421
+ * In such reason, when `input` value is not matched with the type `T`, it returns
422
+ * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
423
+ * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
424
+ * removing every superfluous properties, including nested objects.
425
+ *
426
+ * @template T Type of the input value
427
+ * @param input Target instance to validate and prune
428
+ * @returns Validation result
429
+ *
430
+ * @author Jeongho Nam - https://github.com/samchon
431
+ */
432
+ function validatePrune<T>(input: unknown): IValidation<T>;
433
+
434
+ /**
435
+ * @internal
436
+ */
437
+ function validatePrune<T>(): IValidation<T> {
438
+ halt("validatePrune");
439
+ }
440
+
441
+ const validatePrunePure = /** @__PURE__ */ Object.assign<
442
+ typeof validatePrune,
443
+ {},
444
+ {}
445
+ >(
446
+ validatePrune,
447
+ /** @__PURE__ */ Namespace.misc.prune("validatePrune"),
448
+ /** @__PURE__ */ Namespace.validate(),
449
+ );
450
+ export { validatePrunePure as validatePrune };
451
+
452
+ /* -----------------------------------------------------------
453
+ FACTORY FUNCTIONS
454
+ ----------------------------------------------------------- */
455
+ /**
456
+ * Creates a reusable {@link clone} function.
457
+ *
458
+ * @danger You must configure the generic argument `T`
459
+ * @returns Nothing until you configure the generic argument `T`
460
+ * @throws compile error
461
+ *
462
+ * @author Jeongho Nam - https://github.com/samchon
463
+ */
464
+ function createClone(): never;
465
+
466
+ /**
467
+ * Creates a resuable {@link clone} function.
468
+ *
469
+ * @template T Type of the input value
470
+ * @returns A reusable `clone` function
471
+ *
472
+ * @author Jeongho Nam - https://github.com/samchon
473
+ */
474
+ function createClone<T>(): (input: T) => Resolved<T>;
475
+
476
+ /**
477
+ * @internal
478
+ */
479
+ function createClone(): never {
480
+ halt("createClone");
481
+ }
482
+ const createClonePure = /** @__PURE__ */ Object.assign<typeof createClone, {}>(
483
+ createClone,
484
+ clone,
485
+ );
486
+ export { createClonePure as createClone };
487
+
488
+ /**
489
+ * Creates a reusable {@link assertClone} function.
490
+ *
491
+ * @danger You must configure the generic argument `T`
492
+ * @returns Nothing until you configure the generic argument `T`
493
+ * @throws compile error
494
+ *
495
+ * @author Jeongho Nam - https://github.com/samchon
496
+ */
497
+ function createAssertClone(): never;
498
+
499
+ /**
500
+ * Creates a resuable {@link assertClone} function.
501
+ *
502
+ * @template T Type of the input value
503
+ * @returns A reusable `clone` function
504
+ *
505
+ * @author Jeongho Nam - https://github.com/samchon
506
+ */
507
+ function createAssertClone<T>(): (input: unknown) => Resolved<T>;
508
+
509
+ /**
510
+ * @internal
511
+ */
512
+ function createAssertClone(): never {
513
+ halt("createAssertClone");
514
+ }
515
+ const createAssertClonePure = /** @__PURE__ */ Object.assign<
516
+ typeof createAssertClone,
517
+ {}
518
+ >(createAssertClone, assertClone);
519
+ export { createAssertClonePure as createAssertClone };
520
+
521
+ /**
522
+ * Creates a reusable {@link isClone} function.
523
+ *
524
+ * @danger You must configure the generic argument `T`
525
+ * @returns Nothing until you configure the generic argument `T`
526
+ * @throws compile error
527
+ *
528
+ * @author Jeongho Nam - https://github.com/samchon
529
+ */
530
+ function createIsClone(): never;
531
+
532
+ /**
533
+ * Creates a resuable {@link isClone} function.
534
+ *
535
+ * @template T Type of the input value
536
+ * @returns A reusable `clone` function
537
+ *
538
+ * @author Jeongho Nam - https://github.com/samchon
539
+ */
540
+ function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
541
+
542
+ /**
543
+ * @internal
544
+ */
545
+ function createIsClone(): never {
546
+ halt("createIsClone");
547
+ }
548
+ const createIsClonePure = /** @__PURE__ */ Object.assign<
549
+ typeof createIsClone,
550
+ {}
551
+ >(createIsClone, isClone);
552
+ export { createIsClonePure as createIsClone };
553
+
554
+ /**
555
+ * Creates a reusable {@link validateClone} function.
556
+ *
557
+ * @danger You must configure the generic argument `T`
558
+ * @returns Nothing until you configure the generic argument `T`
559
+ * @throws compile error
560
+ *
561
+ * @author Jeongho Nam - https://github.com/samchon
562
+ */
563
+ function createValidateClone(): never;
564
+
565
+ /**
566
+ * Creates a resuable {@link validateClone} function.
567
+ *
568
+ * @template T Type of the input value
569
+ * @returns A reusable `clone` function
570
+ *
571
+ * @author Jeongho Nam - https://github.com/samchon
572
+ */
573
+ function createValidateClone<T>(): (input: unknown) => IValidation<Resolved<T>>;
574
+
575
+ /**
576
+ * @internal
577
+ */
578
+ function createValidateClone(): never {
579
+ halt("createValidateClone");
580
+ }
581
+ const createValidateClonePure = /** @__PURE__ */ Object.assign<
582
+ typeof createValidateClone,
583
+ {}
584
+ >(createValidateClone, validateClone);
585
+ export { createValidateClonePure as createValidateClone };
586
+
587
+ /**
588
+ * Creates a reusable {@link prune} function.
589
+ *
590
+ * @danger You must configure the generic argument `T`
591
+ * @returns Nothing until you configure the generic argument `T`
592
+ * @throws compile error
593
+ *
594
+ * @author Jeongho Nam - https://github.com/samchon
595
+ */
596
+ function createPrune(): never;
597
+
598
+ /**
599
+ * Creates a resuable {@link prune} function.
600
+ *
601
+ * @template T Type of the input value
602
+ * @returns A reusable `prune` function
603
+ *
604
+ * @author Jeongho Nam - https://github.com/samchon
605
+ */
606
+ function createPrune<T extends object>(): (input: T) => void;
607
+
608
+ /**
609
+ * @internal
610
+ */
611
+ function createPrune<T extends object>(): (input: T) => void {
612
+ halt("createPrune");
613
+ }
614
+ const createPrunePure = /** @__PURE__ */ Object.assign<typeof createPrune, {}>(
615
+ createPrune,
616
+ prune,
617
+ );
618
+ export { createPrunePure as createPrune };
619
+
620
+ /**
621
+ * Creates a reusable {@link assertPrune} function.
622
+ *
623
+ * @danger You must configure the generic argument `T`
624
+ * @returns Nothing until you configure the generic argument `T`
625
+ * @throws compile error
626
+ *
627
+ * @author Jeongho Nam - https://github.com/samchon
628
+ */
629
+ function createAssertPrune(): never;
630
+
631
+ /**
632
+ * Creates a resuable {@link assertPrune} function.
633
+ *
634
+ * @template T Type of the input value
635
+ * @returns A reusable `isPrune` function
636
+ *
637
+ * @author Jeongho Nam - https://github.com/samchon
638
+ */
639
+ function createAssertPrune<T extends object>(): (input: T) => T;
640
+
641
+ /**
642
+ * @internal
643
+ */
644
+ function createAssertPrune<T extends object>(): (input: T) => T {
645
+ halt("createAssertPrune");
646
+ }
647
+ const createAssertPrunePure = /** @__PURE__ */ Object.assign<
648
+ typeof createAssertPrune,
649
+ {}
650
+ >(createAssertPrune, assertPrune);
651
+ export { createAssertPrunePure as createAssertPrune };
652
+
653
+ /**
654
+ * Creates a reusable {@link isPrune} function.
655
+ *
656
+ * @danger You must configure the generic argument `T`
657
+ * @returns Nothing until you configure the generic argument `T`
658
+ * @throws compile error
659
+ *
660
+ * @author Jeongho Nam - https://github.com/samchon
661
+ */
662
+ function createIsPrune(): never;
663
+
664
+ /**
665
+ * Creates a resuable {@link isPrune} function.
666
+ *
667
+ * @template T Type of the input value
668
+ * @returns A reusable `isPrune` function
669
+ *
670
+ * @author Jeongho Nam - https://github.com/samchon
671
+ */
672
+ function createIsPrune<T extends object>(): (input: T) => input is T;
673
+
674
+ /**
675
+ * @internal
676
+ */
677
+ function createIsPrune<T extends object>(): (input: T) => input is T {
678
+ halt("createIsPrune");
679
+ }
680
+ const createIsPrunePure = /** @__PURE__ */ Object.assign<
681
+ typeof createIsPrune,
682
+ {}
683
+ >(createIsPrune, isPrune);
684
+ export { createIsPrunePure as createIsPrune };
685
+
686
+ /**
687
+ * Creates a reusable {@link validatePrune} function.
688
+ *
689
+ * @danger You must configure the generic argument `T`
690
+ * @returns Nothing until you configure the generic argument `T`
691
+ * @throws compile error
692
+ *
693
+ * @author Jeongho Nam - https://github.com/samchon
694
+ */
695
+ function createValidatePrune(): never;
696
+
697
+ /**
698
+ * Creates a resuable {@link validatePrune} function.
699
+ *
700
+ * @template T Type of the input value
701
+ * @returns A reusable `validatePrune` function
702
+ *
703
+ * @author Jeongho Nam - https://github.com/samchon
704
+ */
705
+ function createValidatePrune<T extends object>(): (input: T) => IValidation<T>;
706
+
707
+ /**
708
+ * @internal
709
+ */
710
+ function createValidatePrune<T extends object>(): (input: T) => IValidation<T> {
711
+ halt("createValidatePrune");
712
+ }
713
+ const createValidatePrunePure = /** @__PURE__ */ Object.assign<
714
+ typeof createValidatePrune,
715
+ {}
716
+ >(createValidatePrune, validatePrune);
717
+ export { createValidatePrunePure as createValidatePrune };
718
+
719
+ /**
720
+ * @internal
721
+ */
722
+ function halt(name: string): never {
723
+ throw new Error(
724
+ `Error on typia.misc.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
725
+ );
726
+ }