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