typia 5.5.8 → 5.5.9

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 (358) hide show
  1. package/lib/tags/ContentMediaType.d.ts +9 -0
  2. package/lib/tags/ContentMediaType.js +3 -0
  3. package/lib/tags/ContentMediaType.js.map +1 -0
  4. package/lib/tags/JsonSchemaPlugin.d.ts +7 -0
  5. package/lib/tags/JsonSchemaPlugin.js +3 -0
  6. package/lib/tags/JsonSchemaPlugin.js.map +1 -0
  7. package/lib/tags/index.d.ts +2 -0
  8. package/lib/tags/index.js +2 -0
  9. package/lib/tags/index.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/AssertionGuard.ts +1 -1
  12. package/src/IRandomGenerator.ts +62 -62
  13. package/src/IValidation.ts +21 -21
  14. package/src/TypeGuardError.ts +36 -36
  15. package/src/executable/TypiaGenerateWizard.ts +83 -83
  16. package/src/executable/TypiaPatchWizard.ts +42 -42
  17. package/src/executable/setup/ArgumentParser.ts +43 -43
  18. package/src/executable/setup/CommandExecutor.ts +8 -8
  19. package/src/executable/setup/FileRetriever.ts +22 -22
  20. package/src/executable/setup/PackageManager.ts +71 -71
  21. package/src/executable/setup/PluginConfigurator.ts +69 -69
  22. package/src/executable/typia.ts +55 -55
  23. package/src/factories/CommentFactory.ts +79 -79
  24. package/src/factories/ExpressionFactory.ts +150 -150
  25. package/src/factories/IdentifierFactory.ts +70 -70
  26. package/src/factories/JsonMetadataFactory.ts +53 -53
  27. package/src/factories/LiteralFactory.ts +47 -47
  28. package/src/factories/MetadataCollection.ts +260 -260
  29. package/src/factories/MetadataCommentTagFactory.ts +516 -516
  30. package/src/factories/MetadataFactory.ts +267 -267
  31. package/src/factories/MetadataTypeTagFactory.ts +332 -332
  32. package/src/factories/MetadataTypeTagSchemaFactory.ts +58 -58
  33. package/src/factories/NumericRangeFactory.ts +72 -72
  34. package/src/factories/ProtobufFactory.ts +267 -267
  35. package/src/factories/StatementFactory.ts +72 -72
  36. package/src/factories/TemplateFactory.ts +56 -56
  37. package/src/factories/ValueFactory.ts +12 -12
  38. package/src/factories/internal/metadata/MetadataHelper.ts +15 -15
  39. package/src/factories/internal/metadata/emend_metadata_atomics.ts +46 -46
  40. package/src/factories/internal/metadata/emplace_metadata_alias.ts +41 -41
  41. package/src/factories/internal/metadata/emplace_metadata_array_type.ts +38 -38
  42. package/src/factories/internal/metadata/emplace_metadata_object.ts +176 -176
  43. package/src/factories/internal/metadata/emplace_metadata_tuple.ts +57 -57
  44. package/src/factories/internal/metadata/explore_metadata.ts +28 -28
  45. package/src/factories/internal/metadata/iterate_metadata_alias.ts +34 -34
  46. package/src/factories/internal/metadata/iterate_metadata_array.ts +70 -70
  47. package/src/factories/internal/metadata/iterate_metadata_atomic.ts +62 -62
  48. package/src/factories/internal/metadata/iterate_metadata_coalesce.ts +33 -33
  49. package/src/factories/internal/metadata/iterate_metadata_collection.ts +131 -131
  50. package/src/factories/internal/metadata/iterate_metadata_comment_tags.ts +26 -26
  51. package/src/factories/internal/metadata/iterate_metadata_constant.ts +48 -48
  52. package/src/factories/internal/metadata/iterate_metadata_escape.ts +52 -52
  53. package/src/factories/internal/metadata/iterate_metadata_map.ts +50 -50
  54. package/src/factories/internal/metadata/iterate_metadata_native.ts +209 -209
  55. package/src/factories/internal/metadata/iterate_metadata_object.ts +33 -33
  56. package/src/factories/internal/metadata/iterate_metadata_set.ts +41 -41
  57. package/src/factories/internal/metadata/iterate_metadata_template.ts +44 -44
  58. package/src/factories/internal/metadata/iterate_metadata_tuple.ts +37 -37
  59. package/src/factories/internal/metadata/iterate_metadata_union.ts +27 -27
  60. package/src/functional/$FormDataReader/index.ts +1 -1
  61. package/src/functional/$HeadersReader/index.ts +1 -1
  62. package/src/functional/$ParameterReader/index.ts +1 -1
  63. package/src/functional/$ProtobufReader.ts +195 -195
  64. package/src/functional/$ProtobufWriter.ts +150 -150
  65. package/src/functional/$QueryReader/index.ts +1 -1
  66. package/src/functional/$any.ts +4 -4
  67. package/src/functional/$clone.ts +4 -4
  68. package/src/functional/$convention.ts +37 -37
  69. package/src/functional/$dictionary.ts +22 -22
  70. package/src/functional/$every.ts +11 -11
  71. package/src/functional/$guard.ts +21 -21
  72. package/src/functional/$is_between.ts +2 -2
  73. package/src/functional/$join.ts +46 -46
  74. package/src/functional/$number.ts +12 -12
  75. package/src/functional/$report.ts +13 -13
  76. package/src/functional/$rest.ts +3 -3
  77. package/src/functional/$stoll.ts +8 -8
  78. package/src/functional/$string.ts +43 -43
  79. package/src/functional/$strlen.ts +7 -7
  80. package/src/functional/$tail.ts +5 -5
  81. package/src/functional/$throws.ts +10 -10
  82. package/src/functional/$varint.ts +130 -130
  83. package/src/functional/$zigzag.ts +39 -39
  84. package/src/functional/IProtobufWriter.ts +18 -18
  85. package/src/functional/Namespace/functional.ts +5 -5
  86. package/src/functional/Namespace/http.ts +9 -9
  87. package/src/functional/Namespace/index.ts +76 -76
  88. package/src/functional/Namespace/json.ts +15 -15
  89. package/src/functional/Namespace/misc.ts +14 -14
  90. package/src/functional/Namespace/notations.ts +23 -23
  91. package/src/functional/Namespace/protobuf.ts +20 -20
  92. package/src/functional/is.ts +10 -10
  93. package/src/functional.ts +872 -872
  94. package/src/http.ts +1266 -1266
  95. package/src/index.ts +4 -4
  96. package/src/json.ts +754 -754
  97. package/src/misc.ts +757 -757
  98. package/src/module.ts +1024 -1024
  99. package/src/notations.ts +1020 -1020
  100. package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +130 -130
  101. package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +81 -81
  102. package/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +77 -77
  103. package/src/programmers/functional/FunctionalIsFunctionProgrammer.ts +61 -61
  104. package/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +113 -113
  105. package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +203 -203
  106. package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +107 -107
  107. package/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts +32 -32
  108. package/src/programmers/helpers/AtomicPredicator.ts +24 -24
  109. package/src/programmers/helpers/CloneJoiner.ts +130 -130
  110. package/src/programmers/helpers/FunctionImporeter.ts +1 -1
  111. package/src/programmers/helpers/FunctionImporter.ts +87 -87
  112. package/src/programmers/helpers/HttpMetadataUtil.ts +21 -21
  113. package/src/programmers/helpers/ICheckEntry.ts +13 -13
  114. package/src/programmers/helpers/IExpressionEntry.ts +12 -12
  115. package/src/programmers/helpers/NotationJoiner.ts +132 -132
  116. package/src/programmers/helpers/OptionPredicator.ts +15 -15
  117. package/src/programmers/helpers/ProtobufUtil.ts +125 -125
  118. package/src/programmers/helpers/ProtobufWire.ts +34 -34
  119. package/src/programmers/helpers/PruneJoiner.ts +141 -141
  120. package/src/programmers/helpers/RandomJoiner.ts +140 -140
  121. package/src/programmers/helpers/RandomRanger.ts +171 -171
  122. package/src/programmers/helpers/StringifyJoinder.ts +105 -105
  123. package/src/programmers/helpers/StringifyPredicator.ts +12 -12
  124. package/src/programmers/helpers/UnionExplorer.ts +269 -269
  125. package/src/programmers/helpers/UnionPredicator.ts +77 -77
  126. package/src/programmers/http/HttpAssertFormDataProgrammer.ts +87 -87
  127. package/src/programmers/http/HttpAssertHeadersProgrammer.ts +89 -89
  128. package/src/programmers/http/HttpAssertQueryProgrammer.ts +87 -87
  129. package/src/programmers/http/HttpIsFormDataProgrammer.ts +90 -90
  130. package/src/programmers/http/HttpIsHeadersProgrammer.ts +92 -92
  131. package/src/programmers/http/HttpIsQueryProgrammer.ts +90 -90
  132. package/src/programmers/http/HttpParameterProgrammer.ts +97 -97
  133. package/src/programmers/http/HttpValidateFormDataProgrammer.ts +75 -75
  134. package/src/programmers/http/HttpValidateHeadersProgrammer.ts +77 -77
  135. package/src/programmers/http/HttpValidateQueryProgrammer.ts +75 -75
  136. package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +1 -1
  137. package/src/programmers/internal/application_alias.ts +74 -74
  138. package/src/programmers/internal/application_array.ts +63 -63
  139. package/src/programmers/internal/application_boolean.ts +44 -44
  140. package/src/programmers/internal/application_default.ts +17 -17
  141. package/src/programmers/internal/application_default_string.ts +33 -33
  142. package/src/programmers/internal/application_native.ts +40 -40
  143. package/src/programmers/internal/application_number.ts +98 -98
  144. package/src/programmers/internal/application_schema.ts +165 -165
  145. package/src/programmers/internal/application_string.ts +65 -65
  146. package/src/programmers/internal/application_templates.ts +24 -24
  147. package/src/programmers/internal/application_tuple.ts +54 -54
  148. package/src/programmers/internal/check_array_length.ts +45 -45
  149. package/src/programmers/internal/check_bigint.ts +49 -49
  150. package/src/programmers/internal/check_dynamic_properties.ts +211 -211
  151. package/src/programmers/internal/check_everything.ts +23 -23
  152. package/src/programmers/internal/check_native.ts +21 -21
  153. package/src/programmers/internal/check_string.ts +48 -48
  154. package/src/programmers/internal/check_template.ts +61 -61
  155. package/src/programmers/internal/check_union_array_like.ts +307 -307
  156. package/src/programmers/internal/decode_union_object.ts +99 -99
  157. package/src/programmers/internal/metadata_to_pattern.ts +33 -33
  158. package/src/programmers/internal/prune_object_properties.ts +60 -60
  159. package/src/programmers/internal/random_custom.ts +37 -37
  160. package/src/programmers/internal/stringify_dynamic_properties.ts +157 -157
  161. package/src/programmers/internal/stringify_native.ts +7 -7
  162. package/src/programmers/internal/stringify_regular_properties.ts +81 -81
  163. package/src/programmers/internal/template_to_pattern.ts +15 -15
  164. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +20 -20
  165. package/src/programmers/json/JsonAssertParseProgrammer.ts +81 -81
  166. package/src/programmers/json/JsonAssertStringifyProgrammer.ts +67 -67
  167. package/src/programmers/json/JsonIsParseProgrammer.ts +81 -81
  168. package/src/programmers/json/JsonIsStringifyProgrammer.ts +75 -75
  169. package/src/programmers/json/JsonValidateParseProgrammer.ts +64 -64
  170. package/src/programmers/json/JsonValidateStringifyProgrammer.ts +83 -83
  171. package/src/programmers/misc/MiscAssertCloneProgrammer.ts +77 -77
  172. package/src/programmers/misc/MiscAssertPruneProgrammer.ts +66 -66
  173. package/src/programmers/misc/MiscIsCloneProgrammer.ts +78 -78
  174. package/src/programmers/misc/MiscIsPruneProgrammer.ts +66 -66
  175. package/src/programmers/misc/MiscPruneProgrammer.ts +523 -523
  176. package/src/programmers/misc/MiscValidateCloneProgrammer.ts +80 -80
  177. package/src/programmers/misc/MiscValidatePruneProgrammer.ts +73 -73
  178. package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +70 -70
  179. package/src/programmers/notations/NotationGeneralProgrammer.ts +647 -647
  180. package/src/programmers/notations/NotationIsGeneralProgrammer.ts +71 -71
  181. package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +81 -81
  182. package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +87 -87
  183. package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +67 -67
  184. package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +90 -90
  185. package/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +75 -75
  186. package/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +75 -75
  187. package/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +83 -83
  188. package/src/protobuf.ts +999 -999
  189. package/src/reflect.ts +57 -57
  190. package/src/schemas/json/IJsonApplication.ts +9 -9
  191. package/src/schemas/json/IJsonComponents.ts +19 -19
  192. package/src/schemas/json/IJsonSchema.ts +147 -147
  193. package/src/schemas/metadata/IJsDocTagInfo.ts +10 -10
  194. package/src/schemas/metadata/IMetadata.ts +34 -34
  195. package/src/schemas/metadata/IMetadataAlias.ts +12 -12
  196. package/src/schemas/metadata/IMetadataApplication.ts +7 -7
  197. package/src/schemas/metadata/IMetadataArray.ts +7 -7
  198. package/src/schemas/metadata/IMetadataArrayType.ts +10 -10
  199. package/src/schemas/metadata/IMetadataAtomic.ts +6 -6
  200. package/src/schemas/metadata/IMetadataComponents.ts +11 -11
  201. package/src/schemas/metadata/IMetadataConstant.ts +23 -23
  202. package/src/schemas/metadata/IMetadataDictionary.ts +11 -11
  203. package/src/schemas/metadata/IMetadataEntry.ts +6 -6
  204. package/src/schemas/metadata/IMetadataEscaped.ts +6 -6
  205. package/src/schemas/metadata/IMetadataObject.ts +13 -13
  206. package/src/schemas/metadata/IMetadataProperty.ts +9 -9
  207. package/src/schemas/metadata/IMetadataTuple.ts +7 -7
  208. package/src/schemas/metadata/IMetadataTupleType.ts +10 -10
  209. package/src/schemas/metadata/IMetadataTypeTag.ts +16 -16
  210. package/src/schemas/metadata/Metadata.ts +631 -631
  211. package/src/schemas/metadata/MetadataAlias.ts +61 -61
  212. package/src/schemas/metadata/MetadataApplication.ts +44 -44
  213. package/src/schemas/metadata/MetadataArray.ts +49 -49
  214. package/src/schemas/metadata/MetadataArrayType.ts +57 -57
  215. package/src/schemas/metadata/MetadataAtomic.ts +85 -85
  216. package/src/schemas/metadata/MetadataComponents.ts +98 -98
  217. package/src/schemas/metadata/MetadataConstant.ts +46 -46
  218. package/src/schemas/metadata/MetadataEscaped.ts +51 -51
  219. package/src/schemas/metadata/MetadataObject.ts +154 -154
  220. package/src/schemas/metadata/MetadataProperty.ts +56 -56
  221. package/src/schemas/metadata/MetadataTuple.ts +32 -32
  222. package/src/schemas/metadata/MetadataTupleType.ts +67 -67
  223. package/src/tags/ContentMediaType.ts +10 -0
  224. package/src/tags/Default.ts +18 -18
  225. package/src/tags/ExclusiveMaximum.ts +19 -19
  226. package/src/tags/ExclusiveMinimum.ts +19 -19
  227. package/src/tags/Format.ts +16 -16
  228. package/src/tags/JsonSchemaPlugin.ts +8 -0
  229. package/src/tags/MaxItems.ts +12 -12
  230. package/src/tags/MaxLength.ts +12 -12
  231. package/src/tags/Maximum.ts +18 -18
  232. package/src/tags/MinItems.ts +12 -12
  233. package/src/tags/MinLength.ts +12 -12
  234. package/src/tags/Minimum.ts +18 -18
  235. package/src/tags/MultipleOf.ts +20 -20
  236. package/src/tags/Pattern.ts +12 -12
  237. package/src/tags/TagBase.ts +76 -76
  238. package/src/tags/index.ts +16 -14
  239. package/src/tags/internal/FormatCheatSheet.ts +71 -71
  240. package/src/transform.ts +35 -35
  241. package/src/transformers/CallExpressionTransformer.ts +496 -496
  242. package/src/transformers/FileTransformer.ts +91 -91
  243. package/src/transformers/IProject.ts +15 -15
  244. package/src/transformers/ITransformOptions.ts +62 -62
  245. package/src/transformers/ImportTransformer.ts +66 -66
  246. package/src/transformers/NodeTransformer.ts +13 -13
  247. package/src/transformers/TransformerError.ts +55 -55
  248. package/src/transformers/features/CreateIsTransformer.ts +10 -10
  249. package/src/transformers/features/CreateRandomTransformer.ts +40 -40
  250. package/src/transformers/features/CreateValidateTransformer.ts +13 -13
  251. package/src/transformers/features/IsTransformer.ts +10 -10
  252. package/src/transformers/features/RandomTransformer.ts +44 -44
  253. package/src/transformers/features/ValidateTransformer.ts +11 -11
  254. package/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +12 -12
  255. package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +11 -11
  256. package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +9 -9
  257. package/src/transformers/features/http/CreateHttpFormDataTransformer.ts +9 -9
  258. package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +9 -9
  259. package/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +9 -9
  260. package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +9 -9
  261. package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +9 -9
  262. package/src/transformers/features/http/CreateHttpParameterTransformer.ts +9 -9
  263. package/src/transformers/features/http/CreateHttpQueryTransformer.ts +9 -9
  264. package/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +12 -12
  265. package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +12 -12
  266. package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +11 -11
  267. package/src/transformers/features/http/HttpAssertFormDataTransformer.ts +10 -10
  268. package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +9 -9
  269. package/src/transformers/features/http/HttpAssertQueryTransformer.ts +9 -9
  270. package/src/transformers/features/http/HttpFormDataTransformer.ts +9 -9
  271. package/src/transformers/features/http/HttpHeadersTransformer.ts +9 -9
  272. package/src/transformers/features/http/HttpIsFormDataTransformer.ts +9 -9
  273. package/src/transformers/features/http/HttpIsHeadersTransformer.ts +9 -9
  274. package/src/transformers/features/http/HttpIsQueryTransformer.ts +9 -9
  275. package/src/transformers/features/http/HttpParameterTransformer.ts +9 -9
  276. package/src/transformers/features/http/HttpQueryTransformer.ts +9 -9
  277. package/src/transformers/features/http/HttpValidateFormDataTransformer.ts +10 -10
  278. package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +10 -10
  279. package/src/transformers/features/http/HttpValidateQueryTransformer.ts +9 -9
  280. package/src/transformers/features/json/JsonApplicationTransformer.ts +133 -133
  281. package/src/transformers/features/json/JsonAssertParseTransformer.ts +9 -9
  282. package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +10 -10
  283. package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +9 -9
  284. package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +12 -12
  285. package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +9 -9
  286. package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +9 -9
  287. package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +9 -9
  288. package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +11 -11
  289. package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +12 -12
  290. package/src/transformers/features/json/JsonIsParseTransformer.ts +9 -9
  291. package/src/transformers/features/json/JsonIsStringifyTransformer.ts +9 -9
  292. package/src/transformers/features/json/JsonStringifyTransformer.ts +9 -9
  293. package/src/transformers/features/json/JsonValidateParseTransformer.ts +9 -9
  294. package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +10 -10
  295. package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +9 -9
  296. package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +9 -9
  297. package/src/transformers/features/misc/MiscCloneTransformer.ts +9 -9
  298. package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +9 -9
  299. package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +9 -9
  300. package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +9 -9
  301. package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +9 -9
  302. package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +9 -9
  303. package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +9 -9
  304. package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +11 -11
  305. package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +11 -11
  306. package/src/transformers/features/misc/MiscIsCloneTransformer.ts +9 -9
  307. package/src/transformers/features/misc/MiscIsPruneTransformer.ts +9 -9
  308. package/src/transformers/features/misc/MiscLiteralsTransformer.ts +32 -32
  309. package/src/transformers/features/misc/MiscPruneTransformer.ts +9 -9
  310. package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +9 -9
  311. package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +9 -9
  312. package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +15 -15
  313. package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +15 -15
  314. package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +15 -15
  315. package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +15 -15
  316. package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +15 -15
  317. package/src/transformers/features/notations/NotationGeneralTransformer.ts +11 -11
  318. package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +15 -15
  319. package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +15 -15
  320. package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +10 -10
  321. package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +10 -10
  322. package/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +12 -12
  323. package/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +12 -12
  324. package/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +9 -9
  325. package/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +9 -9
  326. package/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +9 -9
  327. package/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +9 -9
  328. package/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +12 -12
  329. package/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +12 -12
  330. package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +9 -9
  331. package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +9 -9
  332. package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +9 -9
  333. package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +9 -9
  334. package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +33 -33
  335. package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +10 -10
  336. package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +10 -10
  337. package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +63 -63
  338. package/src/transformers/internal/GenericTransformer.ts +104 -104
  339. package/src/typings/Atomic.ts +13 -13
  340. package/src/typings/ClassProperties.ts +5 -5
  341. package/src/typings/Customizable.ts +5 -5
  342. package/src/typings/OmitNever.ts +3 -3
  343. package/src/typings/ProtobufAtomic.ts +19 -19
  344. package/src/typings/SpecialFields.ts +3 -3
  345. package/src/typings/ValidationPipe.ts +9 -9
  346. package/src/typings/Writable.ts +11 -11
  347. package/src/utils/ArrayUtil.ts +43 -43
  348. package/src/utils/Escaper.ts +46 -46
  349. package/src/utils/MapUtil.ts +12 -12
  350. package/src/utils/NameEncoder.ts +32 -32
  351. package/src/utils/NamingConvention/NamingConvention.ts +86 -86
  352. package/src/utils/NamingConvention/index.ts +1 -1
  353. package/src/utils/PatternUtil.ts +29 -29
  354. package/src/utils/RandomGenerator/RandomGenerator.ts +105 -105
  355. package/src/utils/RandomGenerator/index.ts +1 -1
  356. package/src/utils/Singleton.ts +16 -16
  357. package/src/utils/StringUtil/StringUtil.ts +7 -7
  358. package/src/utils/StringUtil/index.ts +1 -1
package/src/notations.ts CHANGED
@@ -1,1020 +1,1020 @@
1
- import * as Namespace from "./functional/Namespace";
2
-
3
- import { CamelCase } from "./CamelCase";
4
- import { IValidation } from "./IValidation";
5
- import { PascalCase } from "./PascalCase";
6
- import { SnakeCase } from "./SnakeCase";
7
- import { TypeGuardError } from "./TypeGuardError";
8
-
9
- /* ===========================================================
10
- NOTATIONS (NAMING CONVENTIONS)
11
- - CAMEL CASE
12
- - PASCAL CASE
13
- - SNAKE CASE
14
- - FACTORY FUNCTIONS
15
- ==============================================================
16
- CAMEL CASE
17
- ----------------------------------------------------------- */
18
- /**
19
- * Convert to camel case.
20
- *
21
- * Convert every property names of nested objects to follow the camel case convention.
22
- *
23
- * For reference, this `typia.notations.camel()` function does not validate the input value
24
- * type. It just believes that the input value is following the type `T`. Therefore,
25
- * if you can't ensure the input value type, it would be better to call one of them below:
26
- *
27
- * - {@link assertCamel}
28
- * - {@link isCamel}
29
- * - {@link validateCamel}
30
- *
31
- * @template T Type of the input value
32
- * @param input Target object
33
- * @returns Camel case object
34
- *
35
- * @author Jeongho Nam - https://github.com/samchon
36
- */
37
- function camel<T>(input: T): CamelCase<T>;
38
-
39
- /**
40
- * @internal
41
- */
42
- function camel(): never {
43
- return halt("camel");
44
- }
45
- const camelPure = /** @__PURE__ */ Object.assign<typeof camel, {}>(
46
- camel,
47
- /** @__PURE__ */ Namespace.notations.camel("camel"),
48
- );
49
- export { camelPure as camel };
50
-
51
- /**
52
- * Converts to camel case with type assertion.
53
- *
54
- * Convert every property names of nested objects to follow the camel case convention.
55
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
56
- *
57
- * @template T Type of the input value
58
- * @param input Target object
59
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
60
- * @returns Camel case object
61
- *
62
- * @author Jeongho Nam - https://github.com/samchon
63
- */
64
- function assertCamel<T>(
65
- input: T,
66
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
67
- ): CamelCase<T>;
68
-
69
- /**
70
- * Converts to camel case with type assertion.
71
- *
72
- * Convert every property names of nested objects to follow the camel case convention.
73
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
74
- *
75
- * @template T Type of the input value
76
- * @param input Target object
77
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
78
- * @returns Camel case object
79
- *
80
- * @author Jeongho Nam - https://github.com/samchon
81
- */
82
- function assertCamel<T>(
83
- input: unknown,
84
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
85
- ): CamelCase<T>;
86
-
87
- /**
88
- * @internal
89
- */
90
- function assertCamel(): never {
91
- return halt("assertCamel");
92
- }
93
- const assertCamelPure = /** @__PURE__ */ Object.assign<
94
- typeof assertCamel,
95
- {},
96
- {}
97
- >(
98
- assertCamel,
99
- /** @__PURE__ */ Namespace.notations.camel("assertCamel"),
100
- /** @__PURE__ */ Namespace.assert("notations.assertCamel"),
101
- );
102
- export { assertCamelPure as assertCamel };
103
-
104
- /**
105
- * Converts to camel case with type checking.
106
- *
107
- * Convert every property names of nested objects to follow the camel case convention.
108
- * If the input value does not follow the type `T`, it returns `null` value instead.
109
- *
110
- * @template T Type of the input value
111
- * @param input Target object
112
- * @returns Camel case object when exact type, otherwise null
113
- *
114
- * @author Jeongho Nam - https://github.com/samchon
115
- */
116
- function isCamel<T>(input: T): CamelCase<T> | null;
117
-
118
- /**
119
- * Converts to camel case with type checking.
120
- *
121
- * Convert every property names of nested objects to follow the camel case convention.
122
- * If the input value does not follow the type `T`, it returns `null` value instead.
123
- *
124
- * @template T Type of the input value
125
- * @param input Target object
126
- * @returns Camel case object when exact type, otherwise null
127
- *
128
- * @author Jeongho Nam - https://github.com/samchon
129
- */
130
- function isCamel<T>(input: unknown): CamelCase<T> | null;
131
-
132
- /**
133
- * @internal
134
- */
135
- function isCamel(): never {
136
- return halt("isCamel");
137
- }
138
- const isCamelPure = /** @__PURE__ */ Object.assign<typeof isCamel, {}, {}>(
139
- isCamel,
140
- /** @__PURE__ */ Namespace.notations.camel("isCamel"),
141
- /** @__PURE__ */ Namespace.is(),
142
- );
143
- export { isCamelPure as isCamel };
144
-
145
- /**
146
- * Converts to camel case with type validation.
147
- *
148
- * Convert every property names of nested objects to follow the camel case convention.
149
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
150
- * object. Otherwise, there's no problem on the input value, camel cased converted data
151
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
152
- *
153
- * @template T Type of the input value
154
- * @param input Target object
155
- * @returns Validation result with camel case object
156
- *
157
- * @author Jeongho Nam - https://github.com/samchon
158
- */
159
- function validateCamel<T>(input: T): IValidation<CamelCase<T>>;
160
-
161
- /**
162
- * Converts to camel case with type validation.
163
- *
164
- * Convert every property names of nested objects to follow the camel case convention.
165
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
166
- * object. Otherwise, there's no problem on the input value, camel cased converted data
167
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
168
- *
169
- * @template T Type of the input value
170
- * @param input Target object
171
- * @returns Validation result with camel case object
172
- *
173
- * @author Jeongho Nam - https://github.com/samchon
174
- */
175
- function validateCamel<T>(input: unknown): IValidation<CamelCase<T>>;
176
-
177
- /**
178
- * @internal
179
- */
180
- function validateCamel(): never {
181
- return halt("validateCamel");
182
- }
183
- const validateCamelPure = /** @__PURE__ */ Object.assign<
184
- typeof validateCamel,
185
- {},
186
- {}
187
- >(
188
- validateCamel,
189
- /** @__PURE__ */ Namespace.notations.camel("validateCamel"),
190
- /** @__PURE__ */ Namespace.validate(),
191
- );
192
- export { validateCamelPure as validateCamel };
193
-
194
- /* -----------------------------------------------------------
195
- PASCAL CASE
196
- ----------------------------------------------------------- */
197
- /**
198
- * Convert to pascal case.
199
- *
200
- * Convert every property names of nested objects to follow the pascal case convention.
201
- *
202
- * For reference, this `typia.notations.pascal()` function does not validate the input value
203
- * type. It just believes that the input value is following the type `T`. Therefore,
204
- * if you can't ensure the input value type, it would be better to call one of them below:
205
- *
206
- * - {@link assertPascal}
207
- * - {@link isPascal}
208
- * - {@link validatePascal}
209
- *
210
- * @template T Type of the input value
211
- * @param input Target object
212
- * @returns Pascal case object
213
- *
214
- * @author Jeongho Nam - https://github.com/samchon
215
- */
216
- function pascal<T>(input: T): PascalCase<T>;
217
-
218
- /**
219
- * @internal
220
- */
221
- function pascal(): never {
222
- return halt("pascal");
223
- }
224
- const pascalPure = /** @__PURE__ */ Object.assign<typeof pascal, {}>(
225
- pascal,
226
- /** @__PURE__ */ Namespace.notations.pascal("pascal"),
227
- );
228
- export { pascalPure as pascal };
229
-
230
- /**
231
- * Converts to pascal case with type assertion.
232
- *
233
- * Convert every property names of nested objects to follow the pascal case convention.
234
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
235
- *
236
- * @template T Type of the input value
237
- * @param input Target object
238
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
239
- * @returns Pascal case object
240
- *
241
- * @author Jeongho Nam - https://github.com/samchon
242
- */
243
- function assertPascal<T>(
244
- input: T,
245
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
246
- ): PascalCase<T>;
247
-
248
- /**
249
- * Converts to pascal case with type assertion.
250
- *
251
- * Convert every property names of nested objects to follow the pascal case convention.
252
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
253
- *
254
- * @template T Type of the input value
255
- * @param input Target object
256
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
257
- * @returns Pascal case object
258
- *
259
- * @author Jeongho Nam - https://github.com/samchon
260
- */
261
- function assertPascal<T>(
262
- input: unknown,
263
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
264
- ): PascalCase<T>;
265
-
266
- /**
267
- * @internal
268
- */
269
- function assertPascal(): never {
270
- return halt("assertPascal");
271
- }
272
- const assertPascalPure = /** @__PURE__ */ Object.assign<
273
- typeof assertPascal,
274
- {},
275
- {}
276
- >(
277
- assertPascal,
278
- /** @__PURE__ */ Namespace.notations.pascal("assertPascal"),
279
- /** @__PURE__ */ Namespace.assert("notations.assertPascal"),
280
- );
281
- export { assertPascalPure as assertPascal };
282
-
283
- /**
284
- * Converts to pascal case with type checking.
285
- *
286
- * Convert every property names of nested objects to follow the pascal case convention.
287
- * If the input value does not follow the type `T`, it returns `null` value instead.
288
- *
289
- * @template T Type of the input value
290
- * @param input Target object
291
- * @returns Pascal case object when exact type, otherwise null
292
- *
293
- * @author Jeongho Nam - https://github.com/samchon
294
- */
295
- function isPascal<T>(input: T): PascalCase<T> | null;
296
-
297
- /**
298
- * Converts to pascal case with type checking.
299
- *
300
- * Convert every property names of nested objects to follow the pascal case convention.
301
- * If the input value does not follow the type `T`, it returns `null` value instead.
302
- *
303
- * @template T Type of the input value
304
- * @param input Target object
305
- * @returns Pascal case object when exact type, otherwise null
306
- *
307
- * @author Jeongho Nam - https://github.com/samchon
308
- */
309
- function isPascal<T>(input: unknown): PascalCase<T> | null;
310
-
311
- /**
312
- * @internal
313
- */
314
- function isPascal(): never {
315
- return halt("isPascal");
316
- }
317
- const isPascalPure = /** @__PURE__ */ Object.assign<typeof isPascal, {}, {}>(
318
- isPascal,
319
- /** @__PURE__ */ Namespace.notations.pascal("isPascal"),
320
- /** @__PURE__ */ Namespace.is(),
321
- );
322
- export { isPascalPure as isPascal };
323
-
324
- /**
325
- * Converts to pascal case with type validation.
326
- *
327
- * Convert every property names of nested objects to follow the pascal case convention.
328
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
329
- * object. Otherwise, there's no problem on the input value, pascal cased converted data
330
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
331
- *
332
- * @template T Type of the input value
333
- * @param input Target object
334
- * @returns Validation result with pascal case object
335
- *
336
- * @author Jeongho Nam - https://github.com/samchon
337
- */
338
- function validatePascal<T>(input: T): IValidation<PascalCase<T>>;
339
-
340
- /**
341
- * Converts to pascal case with type validation.
342
- *
343
- * Convert every property names of nested objects to follow the pascal case convention.
344
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
345
- * object. Otherwise, there's no problem on the input value, pascal cased converted data
346
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
347
- *
348
- * @template T Type of the input value
349
- * @param input Target object
350
- * @returns Validation result with pascal case object
351
- *
352
- * @author Jeongho Nam - https://github.com/samchon
353
- */
354
- function validatePascal<T>(input: unknown): IValidation<PascalCase<T>>;
355
-
356
- /**
357
- * @internal
358
- */
359
- function validatePascal(): never {
360
- return halt("validatePascal");
361
- }
362
- const validatePascalPure = /** @__PURE__ */ Object.assign<
363
- typeof validatePascal,
364
- {},
365
- {}
366
- >(
367
- validatePascal,
368
- /** @__PURE__ */ Namespace.notations.pascal("validatePascal"),
369
- /** @__PURE__ */ Namespace.validate(),
370
- );
371
- export { validatePascalPure as validatePascal };
372
-
373
- /* -----------------------------------------------------------
374
- SNAKE CASE
375
- ----------------------------------------------------------- */
376
- /**
377
- * Convert to snake case.
378
- *
379
- * Convert every property names of nested objects to follow the snake case convention.
380
- *
381
- * For reference, this `typia.notations.snake()` function does not validate the input value
382
- * type. It just believes that the input value is following the type `T`. Therefore,
383
- * if you can't ensure the input value type, it would be better to call one of them below:
384
- *
385
- * - {@link assertSnake}
386
- * - {@link isSnake}
387
- * - {@link validateSnake}
388
- *
389
- * @template T Type of the input value
390
- * @param input Target object
391
- * @returns Snake case object
392
- *
393
- * @author Jeongho Nam - https://github.com/samchon
394
- */
395
- function snake<T>(input: T): SnakeCase<T>;
396
-
397
- /**
398
- * @internal
399
- */
400
- function snake(): never {
401
- return halt("snake");
402
- }
403
- const snakePure = /** @__PURE__ */ Object.assign<typeof snake, {}>(
404
- snake,
405
- /** @__PURE__ */ Namespace.notations.snake("snake"),
406
- );
407
- export { snakePure as snake };
408
-
409
- /**
410
- * Converts to snake case with type assertion.
411
- *
412
- * Convert every property names of nested objects to follow the snake case convention.
413
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
414
- *
415
- * @template T Type of the input value
416
- * @param input Target object
417
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
418
- * @returns Snake case object
419
- *
420
- * @author Jeongho Nam - https://github.com/samchon
421
- */
422
- function assertSnake<T>(
423
- input: T,
424
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
425
- ): SnakeCase<T>;
426
-
427
- /**
428
- * Converts to snake case with type assertion.
429
- *
430
- * Convert every property names of nested objects to follow the snake case convention.
431
- * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
432
- *
433
- * @template T Type of the input value
434
- * @param input Target object
435
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
436
- * @returns Snake case object
437
- *
438
- * @author Jeongho Nam - https://github.com/samchon
439
- */
440
- function assertSnake<T>(
441
- input: unknown,
442
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
443
- ): SnakeCase<T>;
444
-
445
- /**
446
- * @internal
447
- */
448
- function assertSnake(): never {
449
- return halt("assertSnake");
450
- }
451
- const assertSnakePure = /** @__PURE__ */ Object.assign<
452
- typeof assertSnake,
453
- {},
454
- {}
455
- >(
456
- assertSnake,
457
- /** @__PURE__ */ Namespace.notations.snake("assertSnake"),
458
- /** @__PURE__ */ Namespace.assert("notations.assertSnake"),
459
- );
460
- export { assertSnakePure as assertSnake };
461
-
462
- /**
463
- * Converts to snake case with type checking.
464
- *
465
- * Convert every property names of nested objects to follow the snake case convention.
466
- * If the input value does not follow the type `T`, it returns `null` value instead.
467
- *
468
- * @template T Type of the input value
469
- * @param input Target object
470
- * @returns Snake case object when exact type, otherwise null
471
- *
472
- * @author Jeongho Nam - https://github.com/samchon
473
- */
474
- function isSnake<T>(input: T): SnakeCase<T> | null;
475
-
476
- /**
477
- * Converts to snake case with type checking.
478
- *
479
- * Convert every property names of nested objects to follow the snake case convention.
480
- * If the input value does not follow the type `T`, it returns `null` value instead.
481
- *
482
- * @template T Type of the input value
483
- * @param input Target object
484
- * @returns Snake case object when exact type, otherwise null
485
- *
486
- * @author Jeongho Nam - https://github.com/samchon
487
- */
488
- function isSnake<T>(input: unknown): SnakeCase<T> | null;
489
-
490
- /**
491
- * @internal
492
- */
493
- function isSnake(): never {
494
- return halt("isSnake");
495
- }
496
- const isSnakePure = /** @__PURE__ */ Object.assign<typeof isSnake, {}, {}>(
497
- isSnake,
498
- /** @__PURE__ */ Namespace.notations.snake("isSnake"),
499
- /** @__PURE__ */ Namespace.is(),
500
- );
501
- export { isSnakePure as isSnake };
502
-
503
- /**
504
- * Converts to snake case with type validation.
505
- *
506
- * Convert every property names of nested objects to follow the snake case convention.
507
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
508
- * object. Otherwise, there's no problem on the input value, snake cased converted data
509
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
510
- *
511
- * @template T Type of the input value
512
- * @param input Target object
513
- * @returns Validation result with snake case object
514
- *
515
- * @author Jeongho Nam - https://github.com/samchon
516
- */
517
- function validateSnake<T>(input: T): IValidation<SnakeCase<T>>;
518
-
519
- /**
520
- * Converts to snake case with type validation.
521
- *
522
- * Convert every property names of nested objects to follow the snake case convention.
523
- * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
524
- * object. Otherwise, there's no problem on the input value, snake cased converted data
525
- * would be stored in the `data` property of the output {@link IValidation.Success} object.
526
- *
527
- * @template T Type of the input value
528
- * @param input Target object
529
- * @returns Validation result with snake case object
530
- *
531
- * @author Jeongho Nam - https://github.com/samchon
532
- */
533
- function validateSnake<T>(input: unknown): IValidation<SnakeCase<T>>;
534
-
535
- /**
536
- * @internal
537
- */
538
- function validateSnake(): never {
539
- return halt("validateSnake");
540
- }
541
- const validateSnakePure = /** @__PURE__ */ Object.assign<
542
- typeof validateSnake,
543
- {},
544
- {}
545
- >(
546
- validateSnake,
547
- /** @__PURE__ */ Namespace.notations.snake("validateSnake"),
548
- /** @__PURE__ */ Namespace.validate(),
549
- );
550
- export { validateSnakePure as validateSnake };
551
- /* -----------------------------------------------------------
552
- FACTORY FUNCTIONS
553
- ----------------------------------------------------------- */
554
- /**
555
- * Creates a reusable {@link camel} function.
556
- *
557
- * @danger You must configure the generic argument `T`
558
- * @returns Nothing until be configure the generic argument `T`
559
- * @throws compile error
560
- *
561
- * @author Jeongho Nam - https://github.com/samchon
562
- */
563
- function createCamel(): never;
564
-
565
- /**
566
- * Creates a reusable {@link camel} function.
567
- *
568
- * @template T Type of the input value
569
- * @returns A reusable `camel` function
570
- *
571
- * @author Jeongho Nam - https://github.com/samchon
572
- */
573
- function createCamel<T>(): (input: T) => CamelCase<T>;
574
-
575
- /**
576
- * @internal
577
- */
578
- function createCamel(): never {
579
- halt("createCamel");
580
- }
581
- const createCamelPure = /** @__PURE__ */ Object.assign<typeof createCamel, {}>(
582
- createCamel,
583
- /** @__PURE__ */ Namespace.notations.camel("createCamel"),
584
- );
585
- export { createCamelPure as createCamel };
586
-
587
- /**
588
- * Creates a reusable {@link assertCamel} function.
589
- *
590
- * @danger You must configure the generic argument `T`
591
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
592
- * @returns Nothing until be configure the generic argument `T`
593
- * @throws compile error
594
- *
595
- * @author Jeongho Nam - https://github.com/samchon
596
- */
597
- function createAssertCamel(
598
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
599
- ): never;
600
-
601
- /**
602
- * Creates a reusable {@link assertCamel} function.
603
- *
604
- * @template T Type of the input value
605
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
606
- * @returns A reusable `assertCamel` function
607
- *
608
- * @author Jeongho Nam - https://github.com/samchon
609
- */
610
- function createAssertCamel<T>(
611
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
612
- ): (input: T) => CamelCase<T>;
613
-
614
- /**
615
- * @internal
616
- */
617
- function createAssertCamel(): never {
618
- halt("createAssertCamel");
619
- }
620
- const createAssertCamelPure = /** @__PURE__ */ Object.assign<
621
- typeof createAssertCamel,
622
- {},
623
- {}
624
- >(
625
- createAssertCamel,
626
- /** @__PURE__ */ Namespace.notations.camel("createAssertCamel"),
627
- /** @__PURE__ */ Namespace.assert("notations.createAssertCamel"),
628
- );
629
- export { createAssertCamelPure as createAssertCamel };
630
-
631
- /**
632
- * Creates a reusable {@link isCamel} function.
633
- *
634
- * @danger You must configure the generic argument `T`
635
- * @returns Nothing until be configure the generic argument `T`
636
- * @throws compile error
637
- *
638
- * @author Jeongho Nam - https://github.com/samchon
639
- */
640
- function createIsCamel(): never;
641
-
642
- /**
643
- * Creates a reusable {@link isCamel} function.
644
- *
645
- * @template T Type of the input value
646
- * @returns A reusable `isCamel` function
647
- *
648
- * @author Jeongho Nam - https://github.com/samchon
649
- */
650
- function createIsCamel<T>(): (input: T) => CamelCase<T> | null;
651
-
652
- /**
653
- * @internal
654
- */
655
- function createIsCamel(): never {
656
- halt("createIsCamel");
657
- }
658
- const createIsCamelPure = /** @__PURE__ */ Object.assign<
659
- typeof createIsCamel,
660
- {},
661
- {}
662
- >(
663
- createIsCamel,
664
- /** @__PURE__ */ Namespace.notations.camel("createIsCamel"),
665
- /** @__PURE__ */ Namespace.is(),
666
- );
667
- export { createIsCamelPure as createIsCamel };
668
-
669
- /**
670
- * Creates a reusable {@link validateCamel} function.
671
- *
672
- * @danger You must configure the generic argument `T`
673
- * @returns Nothing until be configure the generic argument `T`
674
- * @throws compile error
675
- *
676
- * @author Jeongho Nam - https://github.com/samchon
677
- */
678
- function createValidateCamel(): never;
679
-
680
- /**
681
- * Creates a reusable {@link validateCamel} function.
682
- *
683
- * @template T Type of the input value
684
- * @returns A reusable `validateCamel` function
685
- *
686
- * @author Jeongho Nam - https://github.com/samchon
687
- */
688
- function createValidateCamel<T>(): (input: T) => IValidation<CamelCase<T>>;
689
-
690
- /**
691
- * @internal
692
- */
693
- function createValidateCamel(): never {
694
- halt("createValidateCamel");
695
- }
696
- const createValidateCamelPure = /** @__PURE__ */ Object.assign<
697
- typeof createValidateCamel,
698
- {},
699
- {}
700
- >(
701
- createValidateCamel,
702
- /** @__PURE__ */ Namespace.notations.camel("createValidateCamel"),
703
- /** @__PURE__ */ Namespace.validate(),
704
- );
705
- export { createValidateCamelPure as createValidateCamel };
706
-
707
- /**
708
- * Creates a reusable {@link pascal} function.
709
- *
710
- * @danger You must configure the generic argument `T`
711
- * @returns Nothing until be configure the generic argument `T`
712
- * @throws compile error
713
- *
714
- * @author Jeongho Nam - https://github.com/samchon
715
- */
716
- function createPascal(): never;
717
-
718
- /**
719
- * Creates a reusable {@link pascal} function.
720
- *
721
- * @template T Type of the input value
722
- * @returns A reusable `pascal` function
723
- *
724
- * @author Jeongho Nam - https://github.com/samchon
725
- */
726
- function createPascal<T>(): (input: T) => PascalCase<T>;
727
-
728
- /**
729
- * @internal
730
- */
731
- function createPascal(): never {
732
- halt("createPascal");
733
- }
734
- const createPascalPure = /** @__PURE__ */ Object.assign<
735
- typeof createPascal,
736
- {}
737
- >(createPascal, /** @__PURE__ */ Namespace.notations.pascal("createPascal"));
738
- export { createPascalPure as createPascal };
739
-
740
- /**
741
- * Creates a reusable {@link assertPascal} function.
742
- *
743
- * @danger You must configure the generic argument `T`
744
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
745
- * @returns Nothing until be configure the generic argument `T`
746
- * @throws compile error
747
- *
748
- * @author Jeongho Nam - https://github.com/samchon
749
- */
750
- function createAssertPascal(
751
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
752
- ): never;
753
-
754
- /**
755
- * Creates a reusable {@link assertPascal} function.
756
- *
757
- * @template T Type of the input value
758
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
759
- * @returns A reusable `assertPascal` function
760
- *
761
- * @author Jeongho Nam - https://github.com/samchon
762
- */
763
- function createAssertPascal<T>(
764
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
765
- ): (input: T) => PascalCase<T>;
766
-
767
- /**
768
- * @internal
769
- */
770
- function createAssertPascal(): never {
771
- halt("createAssertPascal");
772
- }
773
- const createAssertPascalPure = /** @__PURE__ */ Object.assign<
774
- typeof createAssertPascal,
775
- {},
776
- {}
777
- >(
778
- createAssertPascal,
779
- /** @__PURE__ */ Namespace.notations.pascal("createAssertPascal"),
780
- /** @__PURE__ */ Namespace.assert("notations.createAssertPascal"),
781
- );
782
- export { createAssertPascalPure as createAssertPascal };
783
-
784
- /**
785
- * Creates a reusable {@link isPascal} function.
786
- *
787
- * @danger You must configure the generic argument `T`
788
- * @returns Nothing until be configure the generic argument `T`
789
- * @throws compile error
790
- *
791
- * @author Jeongho Nam - https://github.com/samchon
792
- */
793
- function createIsPascal(): never;
794
-
795
- /**
796
- * Creates a reusable {@link isPascal} function.
797
- *
798
- * @template T Type of the input value
799
- * @returns A reusable `isPascal` function
800
- *
801
- * @author Jeongho Nam - https://github.com/samchon
802
- */
803
- function createIsPascal<T>(): (input: T) => PascalCase<T> | null;
804
-
805
- /**
806
- * @internal
807
- */
808
- function createIsPascal(): never {
809
- halt("createIsPascal");
810
- }
811
- const createIsPascalPure = /** @__PURE__ */ Object.assign<
812
- typeof createIsPascal,
813
- {},
814
- {}
815
- >(
816
- createIsPascal,
817
- /** @__PURE__ */ Namespace.notations.pascal("createIsPascal"),
818
- /** @__PURE__ */ Namespace.is(),
819
- );
820
- export { createIsPascalPure as createIsPascal };
821
-
822
- /**
823
- * Creates a reusable {@link validatePascal} function.
824
- *
825
- * @danger You must configure the generic argument `T`
826
- * @returns Nothing until be configure the generic argument `T`
827
- * @throws compile error
828
- *
829
- * @author Jeongho Nam - https://github.com/samchon
830
- */
831
- function createValidatePascal(): never;
832
-
833
- /**
834
- * Creates a reusable {@link validatePascal} function.
835
- *
836
- * @template T Type of the input value
837
- * @returns A reusable `validatePascal` function
838
- *
839
- * @author Jeongho Nam - https://github.com/samchon
840
- */
841
- function createValidatePascal<T>(): (input: T) => IValidation<PascalCase<T>>;
842
-
843
- /**
844
- * @internal
845
- */
846
- function createValidatePascal(): never {
847
- halt("createValidatePascal");
848
- }
849
- const createValidatePascalPure = /** @__PURE__ */ Object.assign<
850
- typeof createValidatePascal,
851
- {},
852
- {}
853
- >(
854
- createValidatePascal,
855
- /** @__PURE__ */ Namespace.notations.pascal("createValidatePascal"),
856
- /** @__PURE__ */ Namespace.validate(),
857
- );
858
- export { createValidatePascalPure as createValidatePascal };
859
-
860
- /**
861
- * Creates a reusable {@link snake} function.
862
- *
863
- * @danger You must configure the generic argument `T`
864
- * @returns Nothing until be configure the generic argument `T`
865
- * @throws compile error
866
- *
867
- * @author Jeongho Nam - https://github.com/samchon
868
- */
869
- function createSnake(): never;
870
-
871
- /**
872
- * Creates a reusable {@link snake} function.
873
- *
874
- * @template T Type of the input value
875
- * @returns A reusable `snake` function
876
- *
877
- * @author Jeongho Nam - https://github.com/samchon
878
- */
879
- function createSnake<T>(): (input: T) => SnakeCase<T>;
880
-
881
- /**
882
- * @internal
883
- */
884
- function createSnake(): never {
885
- halt("createSnake");
886
- }
887
- const createSnakePure = /** @__PURE__ */ Object.assign<typeof createSnake, {}>(
888
- createSnake,
889
- /** @__PURE__ */ Namespace.notations.snake("createSnake"),
890
- );
891
- export { createSnakePure as createSnake };
892
-
893
- /**
894
- * Creates a reusable {@link assertSnake} function.
895
- *
896
- * @danger You must configure the generic argument `T`
897
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
898
- * @returns Nothing until be configure the generic argument `T`
899
- * @throws compile error
900
- *
901
- * @author Jeongho Nam - https://github.com/samchon
902
- */
903
- function createAssertSnake(
904
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
905
- ): never;
906
-
907
- /**
908
- * Creates a reusable {@link assertSnake} function.
909
- *
910
- * @template T Type of the input value
911
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
912
- * @returns A reusable `assertSnake` function
913
- *
914
- * @author Jeongho Nam - https://github.com/samchon
915
- */
916
- function createAssertSnake<T>(
917
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
918
- ): (input: T) => SnakeCase<T>;
919
-
920
- /**
921
- * @internal
922
- */
923
- function createAssertSnake(): never {
924
- halt("createAssertSnake");
925
- }
926
- const createAssertSnakePure = /** @__PURE__ */ Object.assign<
927
- typeof createAssertSnake,
928
- {},
929
- {}
930
- >(
931
- createAssertSnake,
932
- /** @__PURE__ */ Namespace.notations.snake("createAssertSnake"),
933
- /** @__PURE__ */ Namespace.assert("notations.createAssertSnake"),
934
- );
935
- export { createAssertSnakePure as createAssertSnake };
936
-
937
- /**
938
- * Creates a reusable {@link isSnake} function.
939
- *
940
- * @danger You must configure the generic argument `T`
941
- * @returns Nothing until be configure the generic argument `T`
942
- * @throws compile error
943
- *
944
- * @author Jeongho Nam - https://github.com/samchon
945
- */
946
- function createIsSnake(): never;
947
-
948
- /**
949
- * Creates a reusable {@link isSnake} function.
950
- *
951
- * @template T Type of the input value
952
- * @returns A reusable `isSnake` function
953
- *
954
- * @author Jeongho Nam - https://github.com/samchon
955
- */
956
- function createIsSnake<T>(): (input: T) => SnakeCase<T> | null;
957
-
958
- /**
959
- * @internal
960
- */
961
- function createIsSnake(): never {
962
- halt("createIsSnake");
963
- }
964
- const createIsSnakePure = /** @__PURE__ */ Object.assign<
965
- typeof createIsSnake,
966
- {},
967
- {}
968
- >(
969
- createIsSnake,
970
- /** @__PURE__ */ Namespace.notations.snake("createIsSnake"),
971
- /** @__PURE__ */ Namespace.is(),
972
- );
973
- export { createIsSnakePure as createIsSnake };
974
-
975
- /**
976
- * Creates a reusable {@link validateSnake} function.
977
- *
978
- * @danger You must configure the generic argument `T`
979
- * @returns Nothing until be configure the generic argument `T`
980
- * @throws compile error
981
- *
982
- * @author Jeongho Nam - https://github.com/samchon
983
- */
984
- function createValidateSnake(): never;
985
-
986
- /**
987
- * Creates a reusable {@link validateSnake} function.
988
- *
989
- * @template T Type of the input value
990
- * @returns A reusable `validateSnake` function
991
- *
992
- * @author Jeongho Nam - https://github.com/samchon
993
- */
994
- function createValidateSnake<T>(): (input: T) => IValidation<SnakeCase<T>>;
995
-
996
- /**
997
- * @internal
998
- */
999
- function createValidateSnake(): never {
1000
- halt("createValidateSnake");
1001
- }
1002
- const createValidateSnakePure = /** @__PURE__ */ Object.assign<
1003
- typeof createValidateSnake,
1004
- {},
1005
- {}
1006
- >(
1007
- createValidateSnake,
1008
- /** @__PURE__ */ Namespace.notations.snake("createValidateSnake"),
1009
- /** @__PURE__ */ Namespace.validate(),
1010
- );
1011
- export { createValidateSnakePure as createValidateSnake };
1012
-
1013
- /**
1014
- * @internal
1015
- */
1016
- function halt(name: string): never {
1017
- throw new Error(
1018
- `Error on typia.notations.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
1019
- );
1020
- }
1
+ import * as Namespace from "./functional/Namespace";
2
+
3
+ import { CamelCase } from "./CamelCase";
4
+ import { IValidation } from "./IValidation";
5
+ import { PascalCase } from "./PascalCase";
6
+ import { SnakeCase } from "./SnakeCase";
7
+ import { TypeGuardError } from "./TypeGuardError";
8
+
9
+ /* ===========================================================
10
+ NOTATIONS (NAMING CONVENTIONS)
11
+ - CAMEL CASE
12
+ - PASCAL CASE
13
+ - SNAKE CASE
14
+ - FACTORY FUNCTIONS
15
+ ==============================================================
16
+ CAMEL CASE
17
+ ----------------------------------------------------------- */
18
+ /**
19
+ * Convert to camel case.
20
+ *
21
+ * Convert every property names of nested objects to follow the camel case convention.
22
+ *
23
+ * For reference, this `typia.notations.camel()` function does not validate the input value
24
+ * type. It just believes that the input value is following the type `T`. Therefore,
25
+ * if you can't ensure the input value type, it would be better to call one of them below:
26
+ *
27
+ * - {@link assertCamel}
28
+ * - {@link isCamel}
29
+ * - {@link validateCamel}
30
+ *
31
+ * @template T Type of the input value
32
+ * @param input Target object
33
+ * @returns Camel case object
34
+ *
35
+ * @author Jeongho Nam - https://github.com/samchon
36
+ */
37
+ function camel<T>(input: T): CamelCase<T>;
38
+
39
+ /**
40
+ * @internal
41
+ */
42
+ function camel(): never {
43
+ return halt("camel");
44
+ }
45
+ const camelPure = /** @__PURE__ */ Object.assign<typeof camel, {}>(
46
+ camel,
47
+ /** @__PURE__ */ Namespace.notations.camel("camel"),
48
+ );
49
+ export { camelPure as camel };
50
+
51
+ /**
52
+ * Converts to camel case with type assertion.
53
+ *
54
+ * Convert every property names of nested objects to follow the camel case convention.
55
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
56
+ *
57
+ * @template T Type of the input value
58
+ * @param input Target object
59
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
60
+ * @returns Camel case object
61
+ *
62
+ * @author Jeongho Nam - https://github.com/samchon
63
+ */
64
+ function assertCamel<T>(
65
+ input: T,
66
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
67
+ ): CamelCase<T>;
68
+
69
+ /**
70
+ * Converts to camel case with type assertion.
71
+ *
72
+ * Convert every property names of nested objects to follow the camel case convention.
73
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
74
+ *
75
+ * @template T Type of the input value
76
+ * @param input Target object
77
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
78
+ * @returns Camel case object
79
+ *
80
+ * @author Jeongho Nam - https://github.com/samchon
81
+ */
82
+ function assertCamel<T>(
83
+ input: unknown,
84
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
85
+ ): CamelCase<T>;
86
+
87
+ /**
88
+ * @internal
89
+ */
90
+ function assertCamel(): never {
91
+ return halt("assertCamel");
92
+ }
93
+ const assertCamelPure = /** @__PURE__ */ Object.assign<
94
+ typeof assertCamel,
95
+ {},
96
+ {}
97
+ >(
98
+ assertCamel,
99
+ /** @__PURE__ */ Namespace.notations.camel("assertCamel"),
100
+ /** @__PURE__ */ Namespace.assert("notations.assertCamel"),
101
+ );
102
+ export { assertCamelPure as assertCamel };
103
+
104
+ /**
105
+ * Converts to camel case with type checking.
106
+ *
107
+ * Convert every property names of nested objects to follow the camel case convention.
108
+ * If the input value does not follow the type `T`, it returns `null` value instead.
109
+ *
110
+ * @template T Type of the input value
111
+ * @param input Target object
112
+ * @returns Camel case object when exact type, otherwise null
113
+ *
114
+ * @author Jeongho Nam - https://github.com/samchon
115
+ */
116
+ function isCamel<T>(input: T): CamelCase<T> | null;
117
+
118
+ /**
119
+ * Converts to camel case with type checking.
120
+ *
121
+ * Convert every property names of nested objects to follow the camel case convention.
122
+ * If the input value does not follow the type `T`, it returns `null` value instead.
123
+ *
124
+ * @template T Type of the input value
125
+ * @param input Target object
126
+ * @returns Camel case object when exact type, otherwise null
127
+ *
128
+ * @author Jeongho Nam - https://github.com/samchon
129
+ */
130
+ function isCamel<T>(input: unknown): CamelCase<T> | null;
131
+
132
+ /**
133
+ * @internal
134
+ */
135
+ function isCamel(): never {
136
+ return halt("isCamel");
137
+ }
138
+ const isCamelPure = /** @__PURE__ */ Object.assign<typeof isCamel, {}, {}>(
139
+ isCamel,
140
+ /** @__PURE__ */ Namespace.notations.camel("isCamel"),
141
+ /** @__PURE__ */ Namespace.is(),
142
+ );
143
+ export { isCamelPure as isCamel };
144
+
145
+ /**
146
+ * Converts to camel case with type validation.
147
+ *
148
+ * Convert every property names of nested objects to follow the camel case convention.
149
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
150
+ * object. Otherwise, there's no problem on the input value, camel cased converted data
151
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
152
+ *
153
+ * @template T Type of the input value
154
+ * @param input Target object
155
+ * @returns Validation result with camel case object
156
+ *
157
+ * @author Jeongho Nam - https://github.com/samchon
158
+ */
159
+ function validateCamel<T>(input: T): IValidation<CamelCase<T>>;
160
+
161
+ /**
162
+ * Converts to camel case with type validation.
163
+ *
164
+ * Convert every property names of nested objects to follow the camel case convention.
165
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
166
+ * object. Otherwise, there's no problem on the input value, camel cased converted data
167
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
168
+ *
169
+ * @template T Type of the input value
170
+ * @param input Target object
171
+ * @returns Validation result with camel case object
172
+ *
173
+ * @author Jeongho Nam - https://github.com/samchon
174
+ */
175
+ function validateCamel<T>(input: unknown): IValidation<CamelCase<T>>;
176
+
177
+ /**
178
+ * @internal
179
+ */
180
+ function validateCamel(): never {
181
+ return halt("validateCamel");
182
+ }
183
+ const validateCamelPure = /** @__PURE__ */ Object.assign<
184
+ typeof validateCamel,
185
+ {},
186
+ {}
187
+ >(
188
+ validateCamel,
189
+ /** @__PURE__ */ Namespace.notations.camel("validateCamel"),
190
+ /** @__PURE__ */ Namespace.validate(),
191
+ );
192
+ export { validateCamelPure as validateCamel };
193
+
194
+ /* -----------------------------------------------------------
195
+ PASCAL CASE
196
+ ----------------------------------------------------------- */
197
+ /**
198
+ * Convert to pascal case.
199
+ *
200
+ * Convert every property names of nested objects to follow the pascal case convention.
201
+ *
202
+ * For reference, this `typia.notations.pascal()` function does not validate the input value
203
+ * type. It just believes that the input value is following the type `T`. Therefore,
204
+ * if you can't ensure the input value type, it would be better to call one of them below:
205
+ *
206
+ * - {@link assertPascal}
207
+ * - {@link isPascal}
208
+ * - {@link validatePascal}
209
+ *
210
+ * @template T Type of the input value
211
+ * @param input Target object
212
+ * @returns Pascal case object
213
+ *
214
+ * @author Jeongho Nam - https://github.com/samchon
215
+ */
216
+ function pascal<T>(input: T): PascalCase<T>;
217
+
218
+ /**
219
+ * @internal
220
+ */
221
+ function pascal(): never {
222
+ return halt("pascal");
223
+ }
224
+ const pascalPure = /** @__PURE__ */ Object.assign<typeof pascal, {}>(
225
+ pascal,
226
+ /** @__PURE__ */ Namespace.notations.pascal("pascal"),
227
+ );
228
+ export { pascalPure as pascal };
229
+
230
+ /**
231
+ * Converts to pascal case with type assertion.
232
+ *
233
+ * Convert every property names of nested objects to follow the pascal case convention.
234
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
235
+ *
236
+ * @template T Type of the input value
237
+ * @param input Target object
238
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
239
+ * @returns Pascal case object
240
+ *
241
+ * @author Jeongho Nam - https://github.com/samchon
242
+ */
243
+ function assertPascal<T>(
244
+ input: T,
245
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
246
+ ): PascalCase<T>;
247
+
248
+ /**
249
+ * Converts to pascal case with type assertion.
250
+ *
251
+ * Convert every property names of nested objects to follow the pascal case convention.
252
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
253
+ *
254
+ * @template T Type of the input value
255
+ * @param input Target object
256
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
257
+ * @returns Pascal case object
258
+ *
259
+ * @author Jeongho Nam - https://github.com/samchon
260
+ */
261
+ function assertPascal<T>(
262
+ input: unknown,
263
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
264
+ ): PascalCase<T>;
265
+
266
+ /**
267
+ * @internal
268
+ */
269
+ function assertPascal(): never {
270
+ return halt("assertPascal");
271
+ }
272
+ const assertPascalPure = /** @__PURE__ */ Object.assign<
273
+ typeof assertPascal,
274
+ {},
275
+ {}
276
+ >(
277
+ assertPascal,
278
+ /** @__PURE__ */ Namespace.notations.pascal("assertPascal"),
279
+ /** @__PURE__ */ Namespace.assert("notations.assertPascal"),
280
+ );
281
+ export { assertPascalPure as assertPascal };
282
+
283
+ /**
284
+ * Converts to pascal case with type checking.
285
+ *
286
+ * Convert every property names of nested objects to follow the pascal case convention.
287
+ * If the input value does not follow the type `T`, it returns `null` value instead.
288
+ *
289
+ * @template T Type of the input value
290
+ * @param input Target object
291
+ * @returns Pascal case object when exact type, otherwise null
292
+ *
293
+ * @author Jeongho Nam - https://github.com/samchon
294
+ */
295
+ function isPascal<T>(input: T): PascalCase<T> | null;
296
+
297
+ /**
298
+ * Converts to pascal case with type checking.
299
+ *
300
+ * Convert every property names of nested objects to follow the pascal case convention.
301
+ * If the input value does not follow the type `T`, it returns `null` value instead.
302
+ *
303
+ * @template T Type of the input value
304
+ * @param input Target object
305
+ * @returns Pascal case object when exact type, otherwise null
306
+ *
307
+ * @author Jeongho Nam - https://github.com/samchon
308
+ */
309
+ function isPascal<T>(input: unknown): PascalCase<T> | null;
310
+
311
+ /**
312
+ * @internal
313
+ */
314
+ function isPascal(): never {
315
+ return halt("isPascal");
316
+ }
317
+ const isPascalPure = /** @__PURE__ */ Object.assign<typeof isPascal, {}, {}>(
318
+ isPascal,
319
+ /** @__PURE__ */ Namespace.notations.pascal("isPascal"),
320
+ /** @__PURE__ */ Namespace.is(),
321
+ );
322
+ export { isPascalPure as isPascal };
323
+
324
+ /**
325
+ * Converts to pascal case with type validation.
326
+ *
327
+ * Convert every property names of nested objects to follow the pascal case convention.
328
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
329
+ * object. Otherwise, there's no problem on the input value, pascal cased converted data
330
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
331
+ *
332
+ * @template T Type of the input value
333
+ * @param input Target object
334
+ * @returns Validation result with pascal case object
335
+ *
336
+ * @author Jeongho Nam - https://github.com/samchon
337
+ */
338
+ function validatePascal<T>(input: T): IValidation<PascalCase<T>>;
339
+
340
+ /**
341
+ * Converts to pascal case with type validation.
342
+ *
343
+ * Convert every property names of nested objects to follow the pascal case convention.
344
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
345
+ * object. Otherwise, there's no problem on the input value, pascal cased converted data
346
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
347
+ *
348
+ * @template T Type of the input value
349
+ * @param input Target object
350
+ * @returns Validation result with pascal case object
351
+ *
352
+ * @author Jeongho Nam - https://github.com/samchon
353
+ */
354
+ function validatePascal<T>(input: unknown): IValidation<PascalCase<T>>;
355
+
356
+ /**
357
+ * @internal
358
+ */
359
+ function validatePascal(): never {
360
+ return halt("validatePascal");
361
+ }
362
+ const validatePascalPure = /** @__PURE__ */ Object.assign<
363
+ typeof validatePascal,
364
+ {},
365
+ {}
366
+ >(
367
+ validatePascal,
368
+ /** @__PURE__ */ Namespace.notations.pascal("validatePascal"),
369
+ /** @__PURE__ */ Namespace.validate(),
370
+ );
371
+ export { validatePascalPure as validatePascal };
372
+
373
+ /* -----------------------------------------------------------
374
+ SNAKE CASE
375
+ ----------------------------------------------------------- */
376
+ /**
377
+ * Convert to snake case.
378
+ *
379
+ * Convert every property names of nested objects to follow the snake case convention.
380
+ *
381
+ * For reference, this `typia.notations.snake()` function does not validate the input value
382
+ * type. It just believes that the input value is following the type `T`. Therefore,
383
+ * if you can't ensure the input value type, it would be better to call one of them below:
384
+ *
385
+ * - {@link assertSnake}
386
+ * - {@link isSnake}
387
+ * - {@link validateSnake}
388
+ *
389
+ * @template T Type of the input value
390
+ * @param input Target object
391
+ * @returns Snake case object
392
+ *
393
+ * @author Jeongho Nam - https://github.com/samchon
394
+ */
395
+ function snake<T>(input: T): SnakeCase<T>;
396
+
397
+ /**
398
+ * @internal
399
+ */
400
+ function snake(): never {
401
+ return halt("snake");
402
+ }
403
+ const snakePure = /** @__PURE__ */ Object.assign<typeof snake, {}>(
404
+ snake,
405
+ /** @__PURE__ */ Namespace.notations.snake("snake"),
406
+ );
407
+ export { snakePure as snake };
408
+
409
+ /**
410
+ * Converts to snake case with type assertion.
411
+ *
412
+ * Convert every property names of nested objects to follow the snake case convention.
413
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
414
+ *
415
+ * @template T Type of the input value
416
+ * @param input Target object
417
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
418
+ * @returns Snake case object
419
+ *
420
+ * @author Jeongho Nam - https://github.com/samchon
421
+ */
422
+ function assertSnake<T>(
423
+ input: T,
424
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
425
+ ): SnakeCase<T>;
426
+
427
+ /**
428
+ * Converts to snake case with type assertion.
429
+ *
430
+ * Convert every property names of nested objects to follow the snake case convention.
431
+ * If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
432
+ *
433
+ * @template T Type of the input value
434
+ * @param input Target object
435
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
436
+ * @returns Snake case object
437
+ *
438
+ * @author Jeongho Nam - https://github.com/samchon
439
+ */
440
+ function assertSnake<T>(
441
+ input: unknown,
442
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
443
+ ): SnakeCase<T>;
444
+
445
+ /**
446
+ * @internal
447
+ */
448
+ function assertSnake(): never {
449
+ return halt("assertSnake");
450
+ }
451
+ const assertSnakePure = /** @__PURE__ */ Object.assign<
452
+ typeof assertSnake,
453
+ {},
454
+ {}
455
+ >(
456
+ assertSnake,
457
+ /** @__PURE__ */ Namespace.notations.snake("assertSnake"),
458
+ /** @__PURE__ */ Namespace.assert("notations.assertSnake"),
459
+ );
460
+ export { assertSnakePure as assertSnake };
461
+
462
+ /**
463
+ * Converts to snake case with type checking.
464
+ *
465
+ * Convert every property names of nested objects to follow the snake case convention.
466
+ * If the input value does not follow the type `T`, it returns `null` value instead.
467
+ *
468
+ * @template T Type of the input value
469
+ * @param input Target object
470
+ * @returns Snake case object when exact type, otherwise null
471
+ *
472
+ * @author Jeongho Nam - https://github.com/samchon
473
+ */
474
+ function isSnake<T>(input: T): SnakeCase<T> | null;
475
+
476
+ /**
477
+ * Converts to snake case with type checking.
478
+ *
479
+ * Convert every property names of nested objects to follow the snake case convention.
480
+ * If the input value does not follow the type `T`, it returns `null` value instead.
481
+ *
482
+ * @template T Type of the input value
483
+ * @param input Target object
484
+ * @returns Snake case object when exact type, otherwise null
485
+ *
486
+ * @author Jeongho Nam - https://github.com/samchon
487
+ */
488
+ function isSnake<T>(input: unknown): SnakeCase<T> | null;
489
+
490
+ /**
491
+ * @internal
492
+ */
493
+ function isSnake(): never {
494
+ return halt("isSnake");
495
+ }
496
+ const isSnakePure = /** @__PURE__ */ Object.assign<typeof isSnake, {}, {}>(
497
+ isSnake,
498
+ /** @__PURE__ */ Namespace.notations.snake("isSnake"),
499
+ /** @__PURE__ */ Namespace.is(),
500
+ );
501
+ export { isSnakePure as isSnake };
502
+
503
+ /**
504
+ * Converts to snake case with type validation.
505
+ *
506
+ * Convert every property names of nested objects to follow the snake case convention.
507
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
508
+ * object. Otherwise, there's no problem on the input value, snake cased converted data
509
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
510
+ *
511
+ * @template T Type of the input value
512
+ * @param input Target object
513
+ * @returns Validation result with snake case object
514
+ *
515
+ * @author Jeongho Nam - https://github.com/samchon
516
+ */
517
+ function validateSnake<T>(input: T): IValidation<SnakeCase<T>>;
518
+
519
+ /**
520
+ * Converts to snake case with type validation.
521
+ *
522
+ * Convert every property names of nested objects to follow the snake case convention.
523
+ * If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
524
+ * object. Otherwise, there's no problem on the input value, snake cased converted data
525
+ * would be stored in the `data` property of the output {@link IValidation.Success} object.
526
+ *
527
+ * @template T Type of the input value
528
+ * @param input Target object
529
+ * @returns Validation result with snake case object
530
+ *
531
+ * @author Jeongho Nam - https://github.com/samchon
532
+ */
533
+ function validateSnake<T>(input: unknown): IValidation<SnakeCase<T>>;
534
+
535
+ /**
536
+ * @internal
537
+ */
538
+ function validateSnake(): never {
539
+ return halt("validateSnake");
540
+ }
541
+ const validateSnakePure = /** @__PURE__ */ Object.assign<
542
+ typeof validateSnake,
543
+ {},
544
+ {}
545
+ >(
546
+ validateSnake,
547
+ /** @__PURE__ */ Namespace.notations.snake("validateSnake"),
548
+ /** @__PURE__ */ Namespace.validate(),
549
+ );
550
+ export { validateSnakePure as validateSnake };
551
+ /* -----------------------------------------------------------
552
+ FACTORY FUNCTIONS
553
+ ----------------------------------------------------------- */
554
+ /**
555
+ * Creates a reusable {@link camel} function.
556
+ *
557
+ * @danger You must configure the generic argument `T`
558
+ * @returns Nothing until be configure the generic argument `T`
559
+ * @throws compile error
560
+ *
561
+ * @author Jeongho Nam - https://github.com/samchon
562
+ */
563
+ function createCamel(): never;
564
+
565
+ /**
566
+ * Creates a reusable {@link camel} function.
567
+ *
568
+ * @template T Type of the input value
569
+ * @returns A reusable `camel` function
570
+ *
571
+ * @author Jeongho Nam - https://github.com/samchon
572
+ */
573
+ function createCamel<T>(): (input: T) => CamelCase<T>;
574
+
575
+ /**
576
+ * @internal
577
+ */
578
+ function createCamel(): never {
579
+ halt("createCamel");
580
+ }
581
+ const createCamelPure = /** @__PURE__ */ Object.assign<typeof createCamel, {}>(
582
+ createCamel,
583
+ /** @__PURE__ */ Namespace.notations.camel("createCamel"),
584
+ );
585
+ export { createCamelPure as createCamel };
586
+
587
+ /**
588
+ * Creates a reusable {@link assertCamel} function.
589
+ *
590
+ * @danger You must configure the generic argument `T`
591
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
592
+ * @returns Nothing until be configure the generic argument `T`
593
+ * @throws compile error
594
+ *
595
+ * @author Jeongho Nam - https://github.com/samchon
596
+ */
597
+ function createAssertCamel(
598
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
599
+ ): never;
600
+
601
+ /**
602
+ * Creates a reusable {@link assertCamel} function.
603
+ *
604
+ * @template T Type of the input value
605
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
606
+ * @returns A reusable `assertCamel` function
607
+ *
608
+ * @author Jeongho Nam - https://github.com/samchon
609
+ */
610
+ function createAssertCamel<T>(
611
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
612
+ ): (input: T) => CamelCase<T>;
613
+
614
+ /**
615
+ * @internal
616
+ */
617
+ function createAssertCamel(): never {
618
+ halt("createAssertCamel");
619
+ }
620
+ const createAssertCamelPure = /** @__PURE__ */ Object.assign<
621
+ typeof createAssertCamel,
622
+ {},
623
+ {}
624
+ >(
625
+ createAssertCamel,
626
+ /** @__PURE__ */ Namespace.notations.camel("createAssertCamel"),
627
+ /** @__PURE__ */ Namespace.assert("notations.createAssertCamel"),
628
+ );
629
+ export { createAssertCamelPure as createAssertCamel };
630
+
631
+ /**
632
+ * Creates a reusable {@link isCamel} function.
633
+ *
634
+ * @danger You must configure the generic argument `T`
635
+ * @returns Nothing until be configure the generic argument `T`
636
+ * @throws compile error
637
+ *
638
+ * @author Jeongho Nam - https://github.com/samchon
639
+ */
640
+ function createIsCamel(): never;
641
+
642
+ /**
643
+ * Creates a reusable {@link isCamel} function.
644
+ *
645
+ * @template T Type of the input value
646
+ * @returns A reusable `isCamel` function
647
+ *
648
+ * @author Jeongho Nam - https://github.com/samchon
649
+ */
650
+ function createIsCamel<T>(): (input: T) => CamelCase<T> | null;
651
+
652
+ /**
653
+ * @internal
654
+ */
655
+ function createIsCamel(): never {
656
+ halt("createIsCamel");
657
+ }
658
+ const createIsCamelPure = /** @__PURE__ */ Object.assign<
659
+ typeof createIsCamel,
660
+ {},
661
+ {}
662
+ >(
663
+ createIsCamel,
664
+ /** @__PURE__ */ Namespace.notations.camel("createIsCamel"),
665
+ /** @__PURE__ */ Namespace.is(),
666
+ );
667
+ export { createIsCamelPure as createIsCamel };
668
+
669
+ /**
670
+ * Creates a reusable {@link validateCamel} function.
671
+ *
672
+ * @danger You must configure the generic argument `T`
673
+ * @returns Nothing until be configure the generic argument `T`
674
+ * @throws compile error
675
+ *
676
+ * @author Jeongho Nam - https://github.com/samchon
677
+ */
678
+ function createValidateCamel(): never;
679
+
680
+ /**
681
+ * Creates a reusable {@link validateCamel} function.
682
+ *
683
+ * @template T Type of the input value
684
+ * @returns A reusable `validateCamel` function
685
+ *
686
+ * @author Jeongho Nam - https://github.com/samchon
687
+ */
688
+ function createValidateCamel<T>(): (input: T) => IValidation<CamelCase<T>>;
689
+
690
+ /**
691
+ * @internal
692
+ */
693
+ function createValidateCamel(): never {
694
+ halt("createValidateCamel");
695
+ }
696
+ const createValidateCamelPure = /** @__PURE__ */ Object.assign<
697
+ typeof createValidateCamel,
698
+ {},
699
+ {}
700
+ >(
701
+ createValidateCamel,
702
+ /** @__PURE__ */ Namespace.notations.camel("createValidateCamel"),
703
+ /** @__PURE__ */ Namespace.validate(),
704
+ );
705
+ export { createValidateCamelPure as createValidateCamel };
706
+
707
+ /**
708
+ * Creates a reusable {@link pascal} function.
709
+ *
710
+ * @danger You must configure the generic argument `T`
711
+ * @returns Nothing until be configure the generic argument `T`
712
+ * @throws compile error
713
+ *
714
+ * @author Jeongho Nam - https://github.com/samchon
715
+ */
716
+ function createPascal(): never;
717
+
718
+ /**
719
+ * Creates a reusable {@link pascal} function.
720
+ *
721
+ * @template T Type of the input value
722
+ * @returns A reusable `pascal` function
723
+ *
724
+ * @author Jeongho Nam - https://github.com/samchon
725
+ */
726
+ function createPascal<T>(): (input: T) => PascalCase<T>;
727
+
728
+ /**
729
+ * @internal
730
+ */
731
+ function createPascal(): never {
732
+ halt("createPascal");
733
+ }
734
+ const createPascalPure = /** @__PURE__ */ Object.assign<
735
+ typeof createPascal,
736
+ {}
737
+ >(createPascal, /** @__PURE__ */ Namespace.notations.pascal("createPascal"));
738
+ export { createPascalPure as createPascal };
739
+
740
+ /**
741
+ * Creates a reusable {@link assertPascal} function.
742
+ *
743
+ * @danger You must configure the generic argument `T`
744
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
745
+ * @returns Nothing until be configure the generic argument `T`
746
+ * @throws compile error
747
+ *
748
+ * @author Jeongho Nam - https://github.com/samchon
749
+ */
750
+ function createAssertPascal(
751
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
752
+ ): never;
753
+
754
+ /**
755
+ * Creates a reusable {@link assertPascal} function.
756
+ *
757
+ * @template T Type of the input value
758
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
759
+ * @returns A reusable `assertPascal` function
760
+ *
761
+ * @author Jeongho Nam - https://github.com/samchon
762
+ */
763
+ function createAssertPascal<T>(
764
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
765
+ ): (input: T) => PascalCase<T>;
766
+
767
+ /**
768
+ * @internal
769
+ */
770
+ function createAssertPascal(): never {
771
+ halt("createAssertPascal");
772
+ }
773
+ const createAssertPascalPure = /** @__PURE__ */ Object.assign<
774
+ typeof createAssertPascal,
775
+ {},
776
+ {}
777
+ >(
778
+ createAssertPascal,
779
+ /** @__PURE__ */ Namespace.notations.pascal("createAssertPascal"),
780
+ /** @__PURE__ */ Namespace.assert("notations.createAssertPascal"),
781
+ );
782
+ export { createAssertPascalPure as createAssertPascal };
783
+
784
+ /**
785
+ * Creates a reusable {@link isPascal} function.
786
+ *
787
+ * @danger You must configure the generic argument `T`
788
+ * @returns Nothing until be configure the generic argument `T`
789
+ * @throws compile error
790
+ *
791
+ * @author Jeongho Nam - https://github.com/samchon
792
+ */
793
+ function createIsPascal(): never;
794
+
795
+ /**
796
+ * Creates a reusable {@link isPascal} function.
797
+ *
798
+ * @template T Type of the input value
799
+ * @returns A reusable `isPascal` function
800
+ *
801
+ * @author Jeongho Nam - https://github.com/samchon
802
+ */
803
+ function createIsPascal<T>(): (input: T) => PascalCase<T> | null;
804
+
805
+ /**
806
+ * @internal
807
+ */
808
+ function createIsPascal(): never {
809
+ halt("createIsPascal");
810
+ }
811
+ const createIsPascalPure = /** @__PURE__ */ Object.assign<
812
+ typeof createIsPascal,
813
+ {},
814
+ {}
815
+ >(
816
+ createIsPascal,
817
+ /** @__PURE__ */ Namespace.notations.pascal("createIsPascal"),
818
+ /** @__PURE__ */ Namespace.is(),
819
+ );
820
+ export { createIsPascalPure as createIsPascal };
821
+
822
+ /**
823
+ * Creates a reusable {@link validatePascal} function.
824
+ *
825
+ * @danger You must configure the generic argument `T`
826
+ * @returns Nothing until be configure the generic argument `T`
827
+ * @throws compile error
828
+ *
829
+ * @author Jeongho Nam - https://github.com/samchon
830
+ */
831
+ function createValidatePascal(): never;
832
+
833
+ /**
834
+ * Creates a reusable {@link validatePascal} function.
835
+ *
836
+ * @template T Type of the input value
837
+ * @returns A reusable `validatePascal` function
838
+ *
839
+ * @author Jeongho Nam - https://github.com/samchon
840
+ */
841
+ function createValidatePascal<T>(): (input: T) => IValidation<PascalCase<T>>;
842
+
843
+ /**
844
+ * @internal
845
+ */
846
+ function createValidatePascal(): never {
847
+ halt("createValidatePascal");
848
+ }
849
+ const createValidatePascalPure = /** @__PURE__ */ Object.assign<
850
+ typeof createValidatePascal,
851
+ {},
852
+ {}
853
+ >(
854
+ createValidatePascal,
855
+ /** @__PURE__ */ Namespace.notations.pascal("createValidatePascal"),
856
+ /** @__PURE__ */ Namespace.validate(),
857
+ );
858
+ export { createValidatePascalPure as createValidatePascal };
859
+
860
+ /**
861
+ * Creates a reusable {@link snake} function.
862
+ *
863
+ * @danger You must configure the generic argument `T`
864
+ * @returns Nothing until be configure the generic argument `T`
865
+ * @throws compile error
866
+ *
867
+ * @author Jeongho Nam - https://github.com/samchon
868
+ */
869
+ function createSnake(): never;
870
+
871
+ /**
872
+ * Creates a reusable {@link snake} function.
873
+ *
874
+ * @template T Type of the input value
875
+ * @returns A reusable `snake` function
876
+ *
877
+ * @author Jeongho Nam - https://github.com/samchon
878
+ */
879
+ function createSnake<T>(): (input: T) => SnakeCase<T>;
880
+
881
+ /**
882
+ * @internal
883
+ */
884
+ function createSnake(): never {
885
+ halt("createSnake");
886
+ }
887
+ const createSnakePure = /** @__PURE__ */ Object.assign<typeof createSnake, {}>(
888
+ createSnake,
889
+ /** @__PURE__ */ Namespace.notations.snake("createSnake"),
890
+ );
891
+ export { createSnakePure as createSnake };
892
+
893
+ /**
894
+ * Creates a reusable {@link assertSnake} function.
895
+ *
896
+ * @danger You must configure the generic argument `T`
897
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
898
+ * @returns Nothing until be configure the generic argument `T`
899
+ * @throws compile error
900
+ *
901
+ * @author Jeongho Nam - https://github.com/samchon
902
+ */
903
+ function createAssertSnake(
904
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
905
+ ): never;
906
+
907
+ /**
908
+ * Creates a reusable {@link assertSnake} function.
909
+ *
910
+ * @template T Type of the input value
911
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
912
+ * @returns A reusable `assertSnake` function
913
+ *
914
+ * @author Jeongho Nam - https://github.com/samchon
915
+ */
916
+ function createAssertSnake<T>(
917
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
918
+ ): (input: T) => SnakeCase<T>;
919
+
920
+ /**
921
+ * @internal
922
+ */
923
+ function createAssertSnake(): never {
924
+ halt("createAssertSnake");
925
+ }
926
+ const createAssertSnakePure = /** @__PURE__ */ Object.assign<
927
+ typeof createAssertSnake,
928
+ {},
929
+ {}
930
+ >(
931
+ createAssertSnake,
932
+ /** @__PURE__ */ Namespace.notations.snake("createAssertSnake"),
933
+ /** @__PURE__ */ Namespace.assert("notations.createAssertSnake"),
934
+ );
935
+ export { createAssertSnakePure as createAssertSnake };
936
+
937
+ /**
938
+ * Creates a reusable {@link isSnake} function.
939
+ *
940
+ * @danger You must configure the generic argument `T`
941
+ * @returns Nothing until be configure the generic argument `T`
942
+ * @throws compile error
943
+ *
944
+ * @author Jeongho Nam - https://github.com/samchon
945
+ */
946
+ function createIsSnake(): never;
947
+
948
+ /**
949
+ * Creates a reusable {@link isSnake} function.
950
+ *
951
+ * @template T Type of the input value
952
+ * @returns A reusable `isSnake` function
953
+ *
954
+ * @author Jeongho Nam - https://github.com/samchon
955
+ */
956
+ function createIsSnake<T>(): (input: T) => SnakeCase<T> | null;
957
+
958
+ /**
959
+ * @internal
960
+ */
961
+ function createIsSnake(): never {
962
+ halt("createIsSnake");
963
+ }
964
+ const createIsSnakePure = /** @__PURE__ */ Object.assign<
965
+ typeof createIsSnake,
966
+ {},
967
+ {}
968
+ >(
969
+ createIsSnake,
970
+ /** @__PURE__ */ Namespace.notations.snake("createIsSnake"),
971
+ /** @__PURE__ */ Namespace.is(),
972
+ );
973
+ export { createIsSnakePure as createIsSnake };
974
+
975
+ /**
976
+ * Creates a reusable {@link validateSnake} function.
977
+ *
978
+ * @danger You must configure the generic argument `T`
979
+ * @returns Nothing until be configure the generic argument `T`
980
+ * @throws compile error
981
+ *
982
+ * @author Jeongho Nam - https://github.com/samchon
983
+ */
984
+ function createValidateSnake(): never;
985
+
986
+ /**
987
+ * Creates a reusable {@link validateSnake} function.
988
+ *
989
+ * @template T Type of the input value
990
+ * @returns A reusable `validateSnake` function
991
+ *
992
+ * @author Jeongho Nam - https://github.com/samchon
993
+ */
994
+ function createValidateSnake<T>(): (input: T) => IValidation<SnakeCase<T>>;
995
+
996
+ /**
997
+ * @internal
998
+ */
999
+ function createValidateSnake(): never {
1000
+ halt("createValidateSnake");
1001
+ }
1002
+ const createValidateSnakePure = /** @__PURE__ */ Object.assign<
1003
+ typeof createValidateSnake,
1004
+ {},
1005
+ {}
1006
+ >(
1007
+ createValidateSnake,
1008
+ /** @__PURE__ */ Namespace.notations.snake("createValidateSnake"),
1009
+ /** @__PURE__ */ Namespace.validate(),
1010
+ );
1011
+ export { createValidateSnakePure as createValidateSnake };
1012
+
1013
+ /**
1014
+ * @internal
1015
+ */
1016
+ function halt(name: string): never {
1017
+ throw new Error(
1018
+ `Error on typia.notations.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
1019
+ );
1020
+ }