typia 5.3.11 → 5.3.12-dev.20240119

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