typia 5.3.12-dev.20240118 → 5.3.12-dev.20240121

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