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/json.ts CHANGED
@@ -1,657 +1,724 @@
1
- import { Namespace } from "./functional/Namespace";
2
-
3
- import { IJsonApplication } from "./schemas/json/IJsonApplication";
4
-
5
- import { IValidation } from "./IValidation";
6
- import { Primitive } from "./Primitive";
7
-
8
- /* ===========================================================
9
- JSON
10
- - SCHEMA
11
- - PARSE
12
- - STRINGIFY
13
- - FACTORY FUNCTIONS
14
- ==============================================================
15
- SCHEMA
16
- ----------------------------------------------------------- */
17
- /**
18
- * > You must configure the generic argument `Types`.
19
- *
20
- * JSON Schema Application.
21
- *
22
- * Creates a JSON schema application which contains both main JSON schemas and
23
- * components. Note that, all of the named types are stored in the
24
- * {@link IJsonApplication.components} property for the `$ref` referencing.
25
- *
26
- * Also, `typia.json.application()` has two additional generic arguments.
27
- *
28
- * The 1st *Purpose* means the purpose determines the JSON schema definition spec.
29
- * For an example, `ajv` has an extra property "$recursiveRef" that are not
30
- * exists in the standard JSON schema definition spec. Otherwise, `swagger`
31
- * can't identify the tuple definition.
32
- *
33
- * The next *Surplus* means whether to allow surplus properties starting with
34
- * `x-typia-` or not. If `true`, the surplus properties like `x-typia-jsDocTags`
35
- * would be registered into the JSON schema, otherwise, not.
36
- *
37
- * @template Types Tuple of target types
38
- * @template Purpose Purpose of the JSON schema
39
- * @template Surplus Allow surplus properties starting with `x-typia-` or not
40
- * @return JSON schema application
41
- *
42
- * @author Jeongho Nam - https://github.com/samchon
43
- */
44
- export function application(): never;
45
-
46
- /**
47
- * JSON Schema Application.
48
- *
49
- * Creates a JSON schema application which contains both main JSON schemas and
50
- * components. Note that, all of the named types are stored in the
51
- * {@link IJsonApplication.components} property for the `$ref` referencing.
52
- *
53
- * Also, `typia.json.application()` has two additional generic arguments.
54
- *
55
- * The 1st *Purpose* means the purpose determines the JSON schema definition spec.
56
- * For an example, `ajv` has an extra property "$recursiveRef" that are not
57
- * exists in the standard JSON schema definition spec. Otherwise, `swagger`
58
- * can't identify the tuple definition.
59
- *
60
- * The next *Surplus* means whether to allow surplus properties starting with
61
- * `x-typia-` or not. If `true`, the surplus properties like `x-typia-jsDocTags`
62
- * would be registered into the JSON schema, otherwise, not.
63
- *
64
- * @template Types Tuple of target types
65
- * @template Purpose Purpose of the JSON schema
66
- * @template Surplus Allow surplus properties starting with `x-typia-` or not
67
- * @return JSON schema application
68
- *
69
- * @author Jeongho Nam - https://github.com/samchon
70
- */
71
- export function application<
72
- Types extends unknown[],
73
- Purpose extends "ajv" | "swagger" = "swagger",
74
- Surplus extends boolean = false,
75
- >(): IJsonApplication;
76
-
77
- /**
78
- * @internal
79
- */
80
- export function application(): never {
81
- halt("application");
82
- }
83
-
84
- /* -----------------------------------------------------------
85
- PARSE
86
- ----------------------------------------------------------- */
87
- /**
88
- * > You must configure the generic argument `T`.
89
- *
90
- * Safe `JSON.parse()` function with type assertion.
91
- *
92
- * `typia.json.assertParse()` is a combination function of `JSON.parse()` and
93
- * {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
94
- * to a `T` typed instance with type assertion.
95
- *
96
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
97
- * throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed value,
98
- * the parsed value would be returned.
99
- *
100
- * @template T Expected type of parsed value
101
- * @param input JSON string
102
- * @returns Parsed value
103
- *
104
- * @author Jeongho Nam - https://github.com/samchon
105
- */
106
- export function assertParse(input: string): never;
107
-
108
- /**
109
- * Safe `JSON.parse()` function with type assertion.
110
- *
111
- * `typia.json.assertParse()` is a combination function of `JSON.parse()` and
112
- * {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
113
- * to a `T` typed instance with type assertion.
114
- *
115
- * In such reason, when parsed JSON string value is not matched with the type `T`,
116
- * it throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed
117
- * value, the parsed value would be returned.
118
- *
119
- * @template T Expected type of parsed value
120
- * @param input JSON string
121
- * @returns Parsed value
122
- *
123
- * @author Jeongho Nam - https://github.com/samchon
124
- */
125
- export function assertParse<T>(input: string): Primitive<T>;
126
-
127
- /**
128
- * @internal
129
- */
130
- export function assertParse<T>(): Primitive<T> {
131
- halt("assertParse");
132
- }
133
- Object.assign(assertParse, Namespace.assert("json.assertParse"));
134
-
135
- /**
136
- * > You must configure the generic argument `T`.
137
- *
138
- * Safe `JSON.parse()` function with type checking.
139
- *
140
- * `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
141
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
142
- * instance with type checking.
143
- *
144
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
145
- * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
146
- * value would be returned.
147
- *
148
- * @template T Expected type of parsed value
149
- * @param input JSON string
150
- * @returns Parsed value when exact type, otherwise `null`
151
- *
152
- * @author Jeongho Nam - https://github.com/samchon
153
- */
154
- export function isParse(input: string): never;
155
-
156
- /**
157
- * Safe `JSON.parse()` function with type checking.
158
- *
159
- * `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
160
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
161
- * instance with type checking.
162
- *
163
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
164
- * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
165
- * value would be returned.
166
- *
167
- * @template T Expected type of parsed value
168
- * @param input JSON string
169
- * @returns Parsed value when exact type, otherwise `null`
170
- *
171
- * @author Jeongho Nam - https://github.com/samchon
172
- */
173
- export function isParse<T>(input: string): Primitive<T> | null;
174
-
175
- /**
176
- * @internal
177
- */
178
- export function isParse<T>(): Primitive<T> | null {
179
- halt("isParse");
180
- }
181
- Object.assign(isParse, Namespace.is());
182
-
183
- /**
184
- * > You must configure the generic argument `T`.
185
- *
186
- * Safe `JSON.parse()` function with detailed type validation.
187
- *
188
- * `typia.json.validateParse()` is a combination function of `JSON.parse()` and
189
- * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
190
- * to a `T` typed instance with detailed type validation.
191
- *
192
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
193
- * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
194
- * there's no problem on the parsed value, the parsed value would be stored in `data`
195
- * property of the output {@link IValidation.ISuccess} instance.
196
- *
197
- * @template T Expected type of parsed value
198
- * @param input JSON string
199
- * @returns Validation result with JSON parsed value
200
- *
201
- * @author Jeongho Nam - https://github.com/samchon
202
- */
203
- export function validateParse(input: string): never;
204
-
205
- /**
206
- * Safe `JSON.parse()` function with detailed type validation.
207
- *
208
- * `typia.json.validateParse()` is a combination function of `JSON.parse()` and
209
- * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
210
- * to a `T` typed instance with detailed type validation.
211
- *
212
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
213
- * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
214
- * there's no problem on the parsed value, the parsed value would be stored in `data`
215
- * property of the output {@link IValidation.ISuccess} instance.
216
- *
217
- * @template T Expected type of parsed value
218
- * @param input JSON string
219
- * @returns Validation result with JSON parsed value
220
- *
221
- * @author Jeongho Nam - https://github.com/samchon
222
- */
223
- export function validateParse<T>(input: string): IValidation<Primitive<T>>;
224
-
225
- /**
226
- * @internal
227
- */
228
- export function validateParse<T>(): IValidation<Primitive<T>> {
229
- halt("validateParse");
230
- }
231
- Object.assign(validateParse, Namespace.validate());
232
-
233
- /* -----------------------------------------------------------
234
- STRINGIFY
235
- ----------------------------------------------------------- */
236
- /**
237
- * 8x faster `JSON.stringify()` function.
238
- *
239
- * Converts an input value to a JSON (JavaScript Object Notation) string, about 8x
240
- * faster than the native `JSON.stringify()` function. The 5x faster principle is
241
- * because it writes an optimized JSON conversion plan, only for the type `T`.
242
- *
243
- * For reference, this `typia.json.stringify()` does not validate the input value type.
244
- * It just believes that the input value is following the type `T`. Therefore, if you
245
- * can't ensure the input value type, it would be better to call one of below
246
- * functions instead.
247
- *
248
- * - {@link assertStringify}
249
- * - {@link isStringify}
250
- * - {@link validateStringify}
251
- *
252
- * @template T Type of the input value
253
- * @param input A value to be converted
254
- * @return JSON string value
255
- *
256
- * @author Jeongho Nam - https://github.com/samchon
257
- */
258
- export function stringify<T>(input: T): string;
259
-
260
- /**
261
- * @internal
262
- */
263
- export function stringify(): never {
264
- halt("stringify");
265
- }
266
- Object.assign(stringify, Namespace.json.stringify("stringify"));
267
-
268
- /**
269
- * 5x faster `JSON.stringify()` function with type assertion.
270
- *
271
- * `typia.json.assertStringify()` is a combination function of {@link assert} and
272
- * {@link stringify}. Therefore, it converts an input value to
273
- * JSON (JavaScript Object Notation) string, with type assertion.
274
- *
275
- * In such reason, when `input` value is not matched with the type `T`, it throws an
276
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
277
- * string would be returned.
278
- *
279
- * For reference, with type assertion, it is even 5x times faster than the native
280
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
281
- * with confidence.
282
- *
283
- * @template T Type of the input value
284
- * @param input A value to be asserted and converted
285
- * @return JSON string value
286
- *
287
- * @author Jeongho Nam - https://github.com/samchon
288
- */
289
- export function assertStringify<T>(input: T): string;
290
-
291
- /**
292
- * 5x faster `JSON.stringify()` function with type assertion.
293
- *
294
- * `typia.json.assertStringify()` is a combination function of {@link assert} and
295
- * {@link stringify}. Therefore, it converts an input value to
296
- * JSON (JavaScript Object Notation) string, with type assertion.
297
- *
298
- * In such reason, when `input` value is not matched with the type `T`, it throws an
299
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
300
- * string would be returned.
301
- *
302
- * For reference, with type assertion, it is even 5x times faster than the native
303
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
304
- * with confidence.
305
- *
306
- * @template T Type of the input value
307
- * @param input A value to be asserted and converted
308
- * @return JSON string value
309
- *
310
- * @author Jeongho Nam - https://github.com/samchon
311
- */
312
- export function assertStringify<T>(input: T): unknown;
313
-
314
- /**
315
- * @internal
316
- */
317
- export function assertStringify(): string {
318
- halt("assertStringify");
319
- }
320
- Object.assign(assertStringify, Namespace.assert("json.assertStringify"));
321
- Object.assign(assertStringify, Namespace.json.stringify("assertStringify"));
322
-
323
- /**
324
- * 7x faster `JSON.stringify()` function with type checking.
325
- *
326
- * `typia.json.stringify()` is a combination function of {@link is} and
327
- * {@link stringify}. Therefore, it converts an input value to JSON
328
- * (JavaScript Object Notation) string, with type checking.
329
- *
330
- * In such reason, when `input` value is not matched with the type `T`, it returns
331
- * `null` value. Otherwise, there's no problem on the `input` value, JSON string
332
- * would be returned.
333
- *
334
- * For reference, with type checking, it is even 7x times faster than the native
335
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
336
- * with confidence.
337
- *
338
- * @template T Type of the input value
339
- * @param input A value to be checked and converted
340
- * @return JSON string value when exact type, otherwise null
341
- *
342
- * @author Jeongho Nam - https://github.com/samchon
343
- */
344
- export function isStringify<T>(input: T): string | null;
345
-
346
- /**
347
- * 7x faster `JSON.stringify()` function with type checking.
348
- *
349
- * `typia.json.isStringify()` is a combination function of {@link is} and
350
- * {@link stringify}. Therefore, it converts an input value to JSON
351
- * (JavaScript Object Notation) string, with type checking.
352
- *
353
- * In such reason, when `input` value is not matched with the type `T`, it returns
354
- * `null` value. Otherwise, there's no problem on the `input` value, JSON string
355
- * would be returned.
356
- *
357
- * For reference, with type checking, it is even 7x times faster than the native
358
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
359
- * with confidence.
360
- *
361
- * @template T Type of the input value
362
- * @param input A value to be checked and converted
363
- * @return JSON string value when exact type, otherwise null
364
- *
365
- * @author Jeongho Nam - https://github.com/samchon
366
- */
367
- export function isStringify<T>(input: unknown): string | null;
368
-
369
- /**
370
- * @internal
371
- */
372
- export function isStringify(): string | null {
373
- halt("isStringify");
374
- }
375
-
376
- Object.assign(isStringify, Namespace.is());
377
- Object.assign(isStringify, Namespace.json.stringify("isStringify"));
378
-
379
- /**
380
- * 5x faster `JSON.stringify()` function with detailed type validation.
381
- *
382
- * `typia.json.validateStringify()` is a combination function of {@link validate} and
383
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
384
- * Notation) string, with detailed type validation.
385
- *
386
- * In such reason, when `input` value is not matched with the type `T`, it returns
387
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
388
- * there's no problem on the `input` value, JSON string would be stored in `data`
389
- * property of the output {@link IValidation.ISuccess} instance.
390
- *
391
- * For reference, with detailed type validation, it is even 5x times faster than the
392
- * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
393
- * conversion with confidence.
394
- *
395
- * @template T Type of the input value
396
- * @param input A value to be checked and converted
397
- * @returns Validation result with JSON string value
398
- *
399
- * @author Jeongho Nam - https://github.com/samchon
400
- */
401
- export function validateStringify<T>(input: T): IValidation<string>;
402
-
403
- /**
404
- * 5x faster `JSON.stringify()` function with detailed type validation.
405
- *
406
- * `typia.json.validateStringify()` is a combination function of {@link validate} and
407
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
408
- * Notation) string, with detailed type validation.
409
- *
410
- * In such reason, when `input` value is not matched with the type `T`, it returns
411
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
412
- * there's no problem on the `input` value, JSON string would be stored in `data`
413
- * property of the output {@link IValidation.ISuccess} instance.
414
- *
415
- * For reference, with detailed type validation, it is even 5x times faster than the
416
- * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
417
- * conversion with confidence.
418
- *
419
- * @template T Type of the input value
420
- * @param input A value to be checked and converted
421
- * @returns Validation result with JSON string value
422
- *
423
- * @author Jeongho Nam - https://github.com/samchon
424
- */
425
- export function validateStringify<T>(input: unknown): IValidation<string>;
426
-
427
- /**
428
- * @internal
429
- */
430
- export function validateStringify(): IValidation<string> {
431
- halt("validateStringify");
432
- }
433
- Object.assign(validateStringify, Namespace.validate());
434
- Object.assign(validateStringify, Namespace.json.stringify("validateStringify"));
435
-
436
- /* -----------------------------------------------------------
437
- FACTORY FUNCTIONS
438
- ----------------------------------------------------------- */
439
- /**
440
- * Creates a reusable {@link isParse} function.
441
- *
442
- * @danger You must configure the generic argument `T`
443
- * @returns Nothing until you configure the generic argument `T`
444
- * @throws compile error
445
- *
446
- * @author Jeongho Nam - https://github.com/samchon
447
- */
448
- export function createIsParse(): never;
449
-
450
- /**
451
- * Creates a reusable {@link isParse} function.
452
- *
453
- * @template T Expected type of parsed value
454
- * @returns A reusable `isParse` function
455
- *
456
- * @author Jeongho Nam - https://github.com/samchon
457
- */
458
- export function createIsParse<T>(): (input: string) => Primitive<T> | null;
459
-
460
- /**
461
- * @internal
462
- */
463
- export function createIsParse<T>(): (input: string) => Primitive<T> | null {
464
- halt("createIsParse");
465
- }
466
- Object.assign(createIsParse, isParse);
467
-
468
- /**
469
- * Creates a reusable {@link assertParse} function.
470
- *
471
- * @danger You must configure the generic argument `T`
472
- * @returns Nothing until you configure the generic argument `T`
473
- * @throws compile error
474
- *
475
- * @author Jeongho Nam - https://github.com/samchon
476
- */
477
- export function createAssertParse(): never;
478
-
479
- /**
480
- * Creates a reusable {@link assertParse} function.
481
- *
482
- * @template T Expected type of parsed value
483
- * @returns A reusable `assertParse` function
484
- *
485
- * @author Jeongho Nam - https://github.com/samchon
486
- */
487
- export function createAssertParse<T>(): (input: string) => Primitive<T>;
488
-
489
- /**
490
- * @internal
491
- */
492
- export function createAssertParse<T>(): (input: string) => Primitive<T> {
493
- halt("createAssertParse");
494
- }
495
- Object.assign(createAssertParse, assertParse);
496
-
497
- /**
498
- * Creates a reusable {@link validateParse} function.
499
- *
500
- * @danger You must configure the generic argument `T`
501
- * @returns Nothing until you configure the generic argument `T`
502
- * @throws compile error
503
- *
504
- * @author Jeongho Nam - https://github.com/samchon
505
- */
506
- export function createValidateParse(): never;
507
-
508
- /**
509
- * Creates a reusable {@link validateParse} function.
510
- *
511
- * @template T Expected type of parsed value
512
- * @returns A reusable `validateParse` function
513
- *
514
- * @author Jeongho Nam - https://github.com/samchon
515
- */
516
- export function createValidateParse<T>(): (
517
- input: string,
518
- ) => IValidation<Primitive<T>>;
519
-
520
- /**
521
- * @internal
522
- */
523
- export function createValidateParse<T>(): (
524
- input: string,
525
- ) => IValidation<Primitive<T>> {
526
- halt("createValidateParse");
527
- }
528
- Object.assign(createValidateParse, validateParse);
529
-
530
- /**
531
- * Creates a reusable {@link stringify} function.
532
- *
533
- * @danger You must configure the generic argument `T`
534
- * @returns Nothing until you configure the generic argument `T`
535
- * @throws compile error
536
- *
537
- * @author Jeongho Nam - https://github.com/samchon
538
- */
539
- export function createStringify(): never;
540
-
541
- /**
542
- * Creates a reusable {@link stringify} function.
543
- *
544
- * @template T Type of the input value
545
- * @returns A reusable `stringify` function
546
- *
547
- * @author Jeongho Nam - https://github.com/samchon
548
- */
549
- export function createStringify<T>(): (input: T) => string;
550
-
551
- /**
552
- * @internal
553
- */
554
- export function createStringify<T>(): (input: T) => string {
555
- halt("createStringify");
556
- }
557
- Object.assign(createStringify, stringify);
558
-
559
- /**
560
- * Creates a reusable {@link assertStringify} function.
561
- *
562
- * @danger You must configure the generic argument `T`
563
- * @returns Nothing until you configure the generic argument `T`
564
- * @throws compile error
565
- *
566
- * @author Jeongho Nam - https://github.com/samchon
567
- */
568
- export function createAssertStringify(): never;
569
-
570
- /**
571
- * Creates a reusable {@link assertStringify} function.
572
- *
573
- * @template T Type of the input value
574
- * @returns A reusable `assertStringify` function
575
- *
576
- * @author Jeongho Nam - https://github.com/samchon
577
- */
578
- export function createAssertStringify<T>(): (input: unknown) => string;
579
-
580
- /**
581
- * @internal
582
- */
583
- export function createAssertStringify(): (input: unknown) => string {
584
- halt("createAssertStringify");
585
- }
586
- Object.assign(createAssertStringify, assertStringify);
587
-
588
- /**
589
- * Creates a reusable {@link isStringify} function.
590
- *
591
- * @danger You must configure the generic argument `T`
592
- * @returns Nothing until you configure the generic argument `T`
593
- * @throws compile error
594
- *
595
- * @author Jeongho Nam - https://github.com/samchon
596
- */
597
- export function createIsStringify(): never;
598
-
599
- /**
600
- * Creates a reusable {@link isStringify} function.
601
- *
602
- * @template T Type of the input value
603
- * @returns A reusable `isStringify` function
604
- *
605
- * @author Jeongho Nam - https://github.com/samchon
606
- */
607
- export function createIsStringify<T>(): (input: unknown) => string | null;
608
-
609
- /**
610
- * @internal
611
- */
612
- export function createIsStringify(): (input: unknown) => string | null {
613
- halt("createIsStringify");
614
- }
615
- Object.assign(createIsStringify, isStringify);
616
-
617
- /**
618
- * Creates a reusable {@link validateStringify} function.
619
- *
620
- * @danger You must configure the generic argument `T`
621
- * @returns Nothing until you configure the generic argument `T`
622
- * @throws compile error
623
- *
624
- * @author Jeongho Nam - https://github.com/samchon
625
- */
626
- export function createValidateStringify(): never;
627
-
628
- /**
629
- * Creates a reusable {@link validateStringify} function.
630
- *
631
- * @template T Type of the input value
632
- * @returns A reusable `validateStringify` function
633
-
634
- * @author Jeongho Nam - https://github.com/samchon
635
- */
636
- export function createValidateStringify<T>(): (
637
- input: unknown,
638
- ) => IValidation<string>;
639
-
640
- /**
641
- * @internal
642
- */
643
- export function createValidateStringify(): (
644
- input: unknown,
645
- ) => IValidation<string> {
646
- halt("createValidateStringify");
647
- }
648
- Object.assign(createValidateStringify, validateStringify);
649
-
650
- /**
651
- * @internal
652
- */
653
- function halt(name: string): never {
654
- throw new Error(
655
- `Error on typia.json.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
656
- );
657
- }
1
+ import * as Namespace from "./functional/Namespace";
2
+
3
+ import { IJsonApplication } from "./schemas/json/IJsonApplication";
4
+
5
+ import { IValidation } from "./IValidation";
6
+ import { Primitive } from "./Primitive";
7
+
8
+ /* ===========================================================
9
+ JSON
10
+ - SCHEMA
11
+ - PARSE
12
+ - STRINGIFY
13
+ - FACTORY FUNCTIONS
14
+ ==============================================================
15
+ SCHEMA
16
+ ----------------------------------------------------------- */
17
+ /**
18
+ * > You must configure the generic argument `Types`.
19
+ *
20
+ * JSON Schema Application.
21
+ *
22
+ * Creates a JSON schema application which contains both main JSON schemas and
23
+ * components. Note that, all of the named types are stored in the
24
+ * {@link IJsonApplication.components} property for the `$ref` referencing.
25
+ *
26
+ * Also, `typia.json.application()` has two additional generic arguments.
27
+ *
28
+ * The 1st *Purpose* means the purpose determines the JSON schema definition spec.
29
+ * For an example, `ajv` has an extra property "$recursiveRef" that are not
30
+ * exists in the standard JSON schema definition spec. Otherwise, `swagger`
31
+ * can't identify the tuple definition.
32
+ *
33
+ * The next *Surplus* means whether to allow surplus properties starting with
34
+ * `x-typia-` or not. If `true`, the surplus properties like `x-typia-jsDocTags`
35
+ * would be registered into the JSON schema, otherwise, not.
36
+ *
37
+ * @template Types Tuple of target types
38
+ * @template Purpose Purpose of the JSON schema
39
+ * @template Surplus Allow surplus properties starting with `x-typia-` or not
40
+ * @return JSON schema application
41
+ *
42
+ * @author Jeongho Nam - https://github.com/samchon
43
+ */
44
+ export function application(): never;
45
+
46
+ /**
47
+ * JSON Schema Application.
48
+ *
49
+ * Creates a JSON schema application which contains both main JSON schemas and
50
+ * components. Note that, all of the named types are stored in the
51
+ * {@link IJsonApplication.components} property for the `$ref` referencing.
52
+ *
53
+ * Also, `typia.json.application()` has two additional generic arguments.
54
+ *
55
+ * The 1st *Purpose* means the purpose determines the JSON schema definition spec.
56
+ * For an example, `ajv` has an extra property "$recursiveRef" that are not
57
+ * exists in the standard JSON schema definition spec. Otherwise, `swagger`
58
+ * can't identify the tuple definition.
59
+ *
60
+ * The next *Surplus* means whether to allow surplus properties starting with
61
+ * `x-typia-` or not. If `true`, the surplus properties like `x-typia-jsDocTags`
62
+ * would be registered into the JSON schema, otherwise, not.
63
+ *
64
+ * @template Types Tuple of target types
65
+ * @template Purpose Purpose of the JSON schema
66
+ * @template Surplus Allow surplus properties starting with `x-typia-` or not
67
+ * @return JSON schema application
68
+ *
69
+ * @author Jeongho Nam - https://github.com/samchon
70
+ */
71
+ export function application<
72
+ Types extends unknown[],
73
+ Purpose extends "ajv" | "swagger" = "swagger",
74
+ Surplus extends boolean = false,
75
+ >(): IJsonApplication;
76
+
77
+ /**
78
+ * @internal
79
+ */
80
+ export function application(): never {
81
+ halt("application");
82
+ }
83
+
84
+ /* -----------------------------------------------------------
85
+ PARSE
86
+ ----------------------------------------------------------- */
87
+ /**
88
+ * > You must configure the generic argument `T`.
89
+ *
90
+ * Safe `JSON.parse()` function with type assertion.
91
+ *
92
+ * `typia.json.assertParse()` is a combination function of `JSON.parse()` and
93
+ * {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
94
+ * to a `T` typed instance with type assertion.
95
+ *
96
+ * In such reason, when parsed JSON string value is not matched with the type `T`, it
97
+ * throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed value,
98
+ * the parsed value would be returned.
99
+ *
100
+ * @template T Expected type of parsed value
101
+ * @param input JSON string
102
+ * @returns Parsed value
103
+ *
104
+ * @author Jeongho Nam - https://github.com/samchon
105
+ */
106
+ function assertParse(input: string): never;
107
+
108
+ /**
109
+ * Safe `JSON.parse()` function with type assertion.
110
+ *
111
+ * `typia.json.assertParse()` is a combination function of `JSON.parse()` and
112
+ * {@link assert}. Therefore, it convers a JSON (JavaScript Object Notation) string
113
+ * to a `T` typed instance with type assertion.
114
+ *
115
+ * In such reason, when parsed JSON string value is not matched with the type `T`,
116
+ * it throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed
117
+ * value, the parsed value would be returned.
118
+ *
119
+ * @template T Expected type of parsed value
120
+ * @param input JSON string
121
+ * @returns Parsed value
122
+ *
123
+ * @author Jeongho Nam - https://github.com/samchon
124
+ */
125
+ function assertParse<T>(input: string): Primitive<T>;
126
+
127
+ /**
128
+ * @internal
129
+ */
130
+ function assertParse<T>(): Primitive<T> {
131
+ halt("assertParse");
132
+ }
133
+ const assertParsePure = /** @__PURE__ */ Object.assign<typeof assertParse, {}>(
134
+ assertParse,
135
+ /** @__PURE__ */ Namespace.assert("json.assertParse"),
136
+ );
137
+ export { assertParsePure as assertParse };
138
+
139
+ /**
140
+ * > You must configure the generic argument `T`.
141
+ *
142
+ * Safe `JSON.parse()` function with type checking.
143
+ *
144
+ * `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
145
+ * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
146
+ * instance with type checking.
147
+ *
148
+ * In such reason, when parsed JSON string value is not matched with the type `T`, it
149
+ * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
150
+ * value would be returned.
151
+ *
152
+ * @template T Expected type of parsed value
153
+ * @param input JSON string
154
+ * @returns Parsed value when exact type, otherwise `null`
155
+ *
156
+ * @author Jeongho Nam - https://github.com/samchon
157
+ */
158
+ function isParse(input: string): never;
159
+
160
+ /**
161
+ * Safe `JSON.parse()` function with type checking.
162
+ *
163
+ * `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
164
+ * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
165
+ * instance with type checking.
166
+ *
167
+ * In such reason, when parsed JSON string value is not matched with the type `T`, it
168
+ * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
169
+ * value would be returned.
170
+ *
171
+ * @template T Expected type of parsed value
172
+ * @param input JSON string
173
+ * @returns Parsed value when exact type, otherwise `null`
174
+ *
175
+ * @author Jeongho Nam - https://github.com/samchon
176
+ */
177
+ function isParse<T>(input: string): Primitive<T> | null;
178
+
179
+ /**
180
+ * @internal
181
+ */
182
+ function isParse<T>(): Primitive<T> | null {
183
+ halt("isParse");
184
+ }
185
+ const isParsePure = /** @__PURE__ */ Object.assign<typeof isParse, {}>(
186
+ isParse,
187
+ /** @__PURE__ */ Namespace.is(),
188
+ );
189
+ export { isParsePure as isParse };
190
+
191
+ /**
192
+ * > You must configure the generic argument `T`.
193
+ *
194
+ * Safe `JSON.parse()` function with detailed type validation.
195
+ *
196
+ * `typia.json.validateParse()` is a combination function of `JSON.parse()` and
197
+ * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
198
+ * to a `T` typed instance with detailed type validation.
199
+ *
200
+ * In such reason, when parsed JSON string value is not matched with the type `T`, it
201
+ * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
202
+ * there's no problem on the parsed value, the parsed value would be stored in `data`
203
+ * property of the output {@link IValidation.ISuccess} instance.
204
+ *
205
+ * @template T Expected type of parsed value
206
+ * @param input JSON string
207
+ * @returns Validation result with JSON parsed value
208
+ *
209
+ * @author Jeongho Nam - https://github.com/samchon
210
+ */
211
+ function validateParse(input: string): never;
212
+
213
+ /**
214
+ * Safe `JSON.parse()` function with detailed type validation.
215
+ *
216
+ * `typia.json.validateParse()` is a combination function of `JSON.parse()` and
217
+ * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
218
+ * to a `T` typed instance with detailed type validation.
219
+ *
220
+ * In such reason, when parsed JSON string value is not matched with the type `T`, it
221
+ * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
222
+ * there's no problem on the parsed value, the parsed value would be stored in `data`
223
+ * property of the output {@link IValidation.ISuccess} instance.
224
+ *
225
+ * @template T Expected type of parsed value
226
+ * @param input JSON string
227
+ * @returns Validation result with JSON parsed value
228
+ *
229
+ * @author Jeongho Nam - https://github.com/samchon
230
+ */
231
+ function validateParse<T>(input: string): IValidation<Primitive<T>>;
232
+
233
+ /**
234
+ * @internal
235
+ */
236
+ function validateParse<T>(): IValidation<Primitive<T>> {
237
+ halt("validateParse");
238
+ }
239
+ const validateParsePure = /** @__PURE__ */ Object.assign<
240
+ typeof validateParse,
241
+ {}
242
+ >(validateParse, /** @__PURE__ */ Namespace.validate());
243
+ export { validateParsePure as validateParse };
244
+
245
+ /* -----------------------------------------------------------
246
+ STRINGIFY
247
+ ----------------------------------------------------------- */
248
+ /**
249
+ * 8x faster `JSON.stringify()` function.
250
+ *
251
+ * Converts an input value to a JSON (JavaScript Object Notation) string, about 8x
252
+ * faster than the native `JSON.stringify()` function. The 5x faster principle is
253
+ * because it writes an optimized JSON conversion plan, only for the type `T`.
254
+ *
255
+ * For reference, this `typia.json.stringify()` does not validate the input value type.
256
+ * It just believes that the input value is following the type `T`. Therefore, if you
257
+ * can't ensure the input value type, it would be better to call one of below
258
+ * functions instead.
259
+ *
260
+ * - {@link assertStringify}
261
+ * - {@link isStringify}
262
+ * - {@link validateStringify}
263
+ *
264
+ * @template T Type of the input value
265
+ * @param input A value to be converted
266
+ * @return JSON string value
267
+ *
268
+ * @author Jeongho Nam - https://github.com/samchon
269
+ */
270
+ function stringify<T>(input: T): string;
271
+
272
+ /**
273
+ * @internal
274
+ */
275
+ function stringify(): never {
276
+ halt("stringify");
277
+ }
278
+ const stringifyPure = /** @__PURE__ */ Object.assign<typeof stringify, {}>(
279
+ stringify,
280
+ /** @__PURE__ */ Namespace.json.stringify("stringify"),
281
+ );
282
+ export { stringifyPure as stringify };
283
+
284
+ /**
285
+ * 5x faster `JSON.stringify()` function with type assertion.
286
+ *
287
+ * `typia.json.assertStringify()` is a combination function of {@link assert} and
288
+ * {@link stringify}. Therefore, it converts an input value to
289
+ * JSON (JavaScript Object Notation) string, with type assertion.
290
+ *
291
+ * In such reason, when `input` value is not matched with the type `T`, it throws an
292
+ * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
293
+ * string would be returned.
294
+ *
295
+ * For reference, with type assertion, it is even 5x times faster than the native
296
+ * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
297
+ * with confidence.
298
+ *
299
+ * @template T Type of the input value
300
+ * @param input A value to be asserted and converted
301
+ * @return JSON string value
302
+ *
303
+ * @author Jeongho Nam - https://github.com/samchon
304
+ */
305
+ function assertStringify<T>(input: T): string;
306
+
307
+ /**
308
+ * 5x faster `JSON.stringify()` function with type assertion.
309
+ *
310
+ * `typia.json.assertStringify()` is a combination function of {@link assert} and
311
+ * {@link stringify}. Therefore, it converts an input value to
312
+ * JSON (JavaScript Object Notation) string, with type assertion.
313
+ *
314
+ * In such reason, when `input` value is not matched with the type `T`, it throws an
315
+ * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
316
+ * string would be returned.
317
+ *
318
+ * For reference, with type assertion, it is even 5x times faster than the native
319
+ * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
320
+ * with confidence.
321
+ *
322
+ * @template T Type of the input value
323
+ * @param input A value to be asserted and converted
324
+ * @return JSON string value
325
+ *
326
+ * @author Jeongho Nam - https://github.com/samchon
327
+ */
328
+ function assertStringify<T>(input: T): unknown;
329
+
330
+ /**
331
+ * @internal
332
+ */
333
+ function assertStringify(): string {
334
+ halt("assertStringify");
335
+ }
336
+ const assertStringifyPure = /** @__PURE__ */ Object.assign<
337
+ typeof assertStringify,
338
+ {},
339
+ {}
340
+ >(
341
+ assertStringify,
342
+ /** @__PURE__ */ Namespace.assert("json.assertStringify"),
343
+ /** @__PURE__ */ Namespace.json.stringify("assertStringify"),
344
+ );
345
+ export { assertStringifyPure as assertStringify };
346
+
347
+ /**
348
+ * 7x faster `JSON.stringify()` function with type checking.
349
+ *
350
+ * `typia.json.stringify()` is a combination function of {@link is} and
351
+ * {@link stringify}. Therefore, it converts an input value to JSON
352
+ * (JavaScript Object Notation) string, with type checking.
353
+ *
354
+ * In such reason, when `input` value is not matched with the type `T`, it returns
355
+ * `null` value. Otherwise, there's no problem on the `input` value, JSON string
356
+ * would be returned.
357
+ *
358
+ * For reference, with type checking, it is even 7x times faster than the native
359
+ * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
360
+ * with confidence.
361
+ *
362
+ * @template T Type of the input value
363
+ * @param input A value to be checked and converted
364
+ * @return JSON string value when exact type, otherwise null
365
+ *
366
+ * @author Jeongho Nam - https://github.com/samchon
367
+ */
368
+ function isStringify<T>(input: T): string | null;
369
+
370
+ /**
371
+ * 7x faster `JSON.stringify()` function with type checking.
372
+ *
373
+ * `typia.json.isStringify()` is a combination function of {@link is} and
374
+ * {@link stringify}. Therefore, it converts an input value to JSON
375
+ * (JavaScript Object Notation) string, with type checking.
376
+ *
377
+ * In such reason, when `input` value is not matched with the type `T`, it returns
378
+ * `null` value. Otherwise, there's no problem on the `input` value, JSON string
379
+ * would be returned.
380
+ *
381
+ * For reference, with type checking, it is even 7x times faster than the native
382
+ * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
383
+ * with confidence.
384
+ *
385
+ * @template T Type of the input value
386
+ * @param input A value to be checked and converted
387
+ * @return JSON string value when exact type, otherwise null
388
+ *
389
+ * @author Jeongho Nam - https://github.com/samchon
390
+ */
391
+ function isStringify<T>(input: unknown): string | null;
392
+
393
+ /**
394
+ * @internal
395
+ */
396
+ function isStringify(): string | null {
397
+ halt("isStringify");
398
+ }
399
+
400
+ const isStringifyPure = /** @__PURE__ */ Object.assign<
401
+ typeof isStringify,
402
+ {},
403
+ {}
404
+ >(
405
+ isStringify,
406
+ /** @__PURE__ */ Namespace.is(),
407
+ /** @__PURE__ */ Namespace.json.stringify("isStringify"),
408
+ );
409
+ export { isStringifyPure as isStringify };
410
+
411
+ /**
412
+ * 5x faster `JSON.stringify()` function with detailed type validation.
413
+ *
414
+ * `typia.json.validateStringify()` is a combination function of {@link validate} and
415
+ * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
416
+ * Notation) string, with detailed type validation.
417
+ *
418
+ * In such reason, when `input` value is not matched with the type `T`, it returns
419
+ * {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
420
+ * there's no problem on the `input` value, JSON string would be stored in `data`
421
+ * property of the output {@link IValidation.ISuccess} instance.
422
+ *
423
+ * For reference, with detailed type validation, it is even 5x times faster than the
424
+ * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
425
+ * conversion with confidence.
426
+ *
427
+ * @template T Type of the input value
428
+ * @param input A value to be checked and converted
429
+ * @returns Validation result with JSON string value
430
+ *
431
+ * @author Jeongho Nam - https://github.com/samchon
432
+ */
433
+ function validateStringify<T>(input: T): IValidation<string>;
434
+
435
+ /**
436
+ * 5x faster `JSON.stringify()` function with detailed type validation.
437
+ *
438
+ * `typia.json.validateStringify()` is a combination function of {@link validate} and
439
+ * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
440
+ * Notation) string, with detailed type validation.
441
+ *
442
+ * In such reason, when `input` value is not matched with the type `T`, it returns
443
+ * {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
444
+ * there's no problem on the `input` value, JSON string would be stored in `data`
445
+ * property of the output {@link IValidation.ISuccess} instance.
446
+ *
447
+ * For reference, with detailed type validation, it is even 5x times faster than the
448
+ * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
449
+ * conversion with confidence.
450
+ *
451
+ * @template T Type of the input value
452
+ * @param input A value to be checked and converted
453
+ * @returns Validation result with JSON string value
454
+ *
455
+ * @author Jeongho Nam - https://github.com/samchon
456
+ */
457
+ function validateStringify<T>(input: unknown): IValidation<string>;
458
+
459
+ /**
460
+ * @internal
461
+ */
462
+ function validateStringify(): IValidation<string> {
463
+ halt("validateStringify");
464
+ }
465
+ const validateStringifyPure = /** @__PURE__ */ Object.assign<
466
+ typeof validateStringify,
467
+ {},
468
+ {}
469
+ >(
470
+ validateStringify,
471
+ /** @__PURE__ */ Namespace.validate(),
472
+ /** @__PURE__ */ Namespace.json.stringify("validateStringify"),
473
+ );
474
+ export { validateStringifyPure as validateStringify };
475
+
476
+ /* -----------------------------------------------------------
477
+ FACTORY FUNCTIONS
478
+ ----------------------------------------------------------- */
479
+ /**
480
+ * Creates a reusable {@link isParse} function.
481
+ *
482
+ * @danger You must configure the generic argument `T`
483
+ * @returns Nothing until you configure the generic argument `T`
484
+ * @throws compile error
485
+ *
486
+ * @author Jeongho Nam - https://github.com/samchon
487
+ */
488
+ function createIsParse(): never;
489
+
490
+ /**
491
+ * Creates a reusable {@link isParse} function.
492
+ *
493
+ * @template T Expected type of parsed value
494
+ * @returns A reusable `isParse` function
495
+ *
496
+ * @author Jeongho Nam - https://github.com/samchon
497
+ */
498
+ function createIsParse<T>(): (input: string) => Primitive<T> | null;
499
+
500
+ /**
501
+ * @internal
502
+ */
503
+ function createIsParse<T>(): (input: string) => Primitive<T> | null {
504
+ halt("createIsParse");
505
+ }
506
+ const createIsParsePure = /** @__PURE__ */ Object.assign<
507
+ typeof createIsParse,
508
+ {}
509
+ >(createIsParse, isParse);
510
+ export { createIsParsePure as createIsParse };
511
+
512
+ /**
513
+ * Creates a reusable {@link assertParse} function.
514
+ *
515
+ * @danger You must configure the generic argument `T`
516
+ * @returns Nothing until you configure the generic argument `T`
517
+ * @throws compile error
518
+ *
519
+ * @author Jeongho Nam - https://github.com/samchon
520
+ */
521
+ function createAssertParse(): never;
522
+
523
+ /**
524
+ * Creates a reusable {@link assertParse} function.
525
+ *
526
+ * @template T Expected type of parsed value
527
+ * @returns A reusable `assertParse` function
528
+ *
529
+ * @author Jeongho Nam - https://github.com/samchon
530
+ */
531
+ function createAssertParse<T>(): (input: string) => Primitive<T>;
532
+
533
+ /**
534
+ * @internal
535
+ */
536
+ function createAssertParse<T>(): (input: string) => Primitive<T> {
537
+ halt("createAssertParse");
538
+ }
539
+ const createAssertParsePure = /** @__PURE__ */ Object.assign<
540
+ typeof createAssertParse,
541
+ {}
542
+ >(createAssertParse, assertParse);
543
+ export { createAssertParsePure as createAssertParse };
544
+
545
+ /**
546
+ * Creates a reusable {@link validateParse} function.
547
+ *
548
+ * @danger You must configure the generic argument `T`
549
+ * @returns Nothing until you configure the generic argument `T`
550
+ * @throws compile error
551
+ *
552
+ * @author Jeongho Nam - https://github.com/samchon
553
+ */
554
+ function createValidateParse(): never;
555
+
556
+ /**
557
+ * Creates a reusable {@link validateParse} function.
558
+ *
559
+ * @template T Expected type of parsed value
560
+ * @returns A reusable `validateParse` function
561
+ *
562
+ * @author Jeongho Nam - https://github.com/samchon
563
+ */
564
+ function createValidateParse<T>(): (input: string) => IValidation<Primitive<T>>;
565
+
566
+ /**
567
+ * @internal
568
+ */
569
+ function createValidateParse<T>(): (
570
+ input: string,
571
+ ) => IValidation<Primitive<T>> {
572
+ halt("createValidateParse");
573
+ }
574
+
575
+ const createValidateParsePure = /** @__PURE__ */ Object.assign<
576
+ typeof createValidateParse,
577
+ {}
578
+ >(createValidateParse, validateParse);
579
+ export { createValidateParsePure as createValidateParse };
580
+
581
+ /**
582
+ * Creates a reusable {@link stringify} function.
583
+ *
584
+ * @danger You must configure the generic argument `T`
585
+ * @returns Nothing until you configure the generic argument `T`
586
+ * @throws compile error
587
+ *
588
+ * @author Jeongho Nam - https://github.com/samchon
589
+ */
590
+ function createStringify(): never;
591
+
592
+ /**
593
+ * Creates a reusable {@link stringify} function.
594
+ *
595
+ * @template T Type of the input value
596
+ * @returns A reusable `stringify` function
597
+ *
598
+ * @author Jeongho Nam - https://github.com/samchon
599
+ */
600
+ function createStringify<T>(): (input: T) => string;
601
+
602
+ /**
603
+ * @internal
604
+ */
605
+ function createStringify<T>(): (input: T) => string {
606
+ halt("createStringify");
607
+ }
608
+
609
+ const createStringifyPure = /** @__PURE__ */ Object.assign<
610
+ typeof createStringify,
611
+ {}
612
+ >(createStringify, stringify);
613
+ export { createStringifyPure as createStringify };
614
+
615
+ /**
616
+ * Creates a reusable {@link assertStringify} function.
617
+ *
618
+ * @danger You must configure the generic argument `T`
619
+ * @returns Nothing until you configure the generic argument `T`
620
+ * @throws compile error
621
+ *
622
+ * @author Jeongho Nam - https://github.com/samchon
623
+ */
624
+ function createAssertStringify(): never;
625
+
626
+ /**
627
+ * Creates a reusable {@link assertStringify} function.
628
+ *
629
+ * @template T Type of the input value
630
+ * @returns A reusable `assertStringify` function
631
+ *
632
+ * @author Jeongho Nam - https://github.com/samchon
633
+ */
634
+ function createAssertStringify<T>(): (input: unknown) => string;
635
+
636
+ /**
637
+ * @internal
638
+ */
639
+ function createAssertStringify(): (input: unknown) => string {
640
+ halt("createAssertStringify");
641
+ }
642
+
643
+ const createAssertStringifyPure = /** @__PURE__ */ Object.assign<
644
+ typeof createAssertStringify,
645
+ {}
646
+ >(createAssertStringify, assertStringify);
647
+ export { createAssertStringifyPure as createAssertStringify };
648
+
649
+ /**
650
+ * Creates a reusable {@link isStringify} function.
651
+ *
652
+ * @danger You must configure the generic argument `T`
653
+ * @returns Nothing until you configure the generic argument `T`
654
+ * @throws compile error
655
+ *
656
+ * @author Jeongho Nam - https://github.com/samchon
657
+ */
658
+ function createIsStringify(): never;
659
+
660
+ /**
661
+ * Creates a reusable {@link isStringify} function.
662
+ *
663
+ * @template T Type of the input value
664
+ * @returns A reusable `isStringify` function
665
+ *
666
+ * @author Jeongho Nam - https://github.com/samchon
667
+ */
668
+ function createIsStringify<T>(): (input: unknown) => string | null;
669
+
670
+ /**
671
+ * @internal
672
+ */
673
+ function createIsStringify(): (input: unknown) => string | null {
674
+ halt("createIsStringify");
675
+ }
676
+
677
+ const createIsStringifyPure = /** @__PURE__ */ Object.assign<
678
+ typeof createIsStringify,
679
+ {}
680
+ >(createIsStringify, isStringify);
681
+ export { createIsStringifyPure as createIsStringify };
682
+
683
+ /**
684
+ * Creates a reusable {@link validateStringify} function.
685
+ *
686
+ * @danger You must configure the generic argument `T`
687
+ * @returns Nothing until you configure the generic argument `T`
688
+ * @throws compile error
689
+ *
690
+ * @author Jeongho Nam - https://github.com/samchon
691
+ */
692
+ function createValidateStringify(): never;
693
+
694
+ /**
695
+ * Creates a reusable {@link validateStringify} function.
696
+ *
697
+ * @template T Type of the input value
698
+ * @returns A reusable `validateStringify` function
699
+
700
+ * @author Jeongho Nam - https://github.com/samchon
701
+ */
702
+ function createValidateStringify<T>(): (input: unknown) => IValidation<string>;
703
+
704
+ /**
705
+ * @internal
706
+ */
707
+ function createValidateStringify(): (input: unknown) => IValidation<string> {
708
+ halt("createValidateStringify");
709
+ }
710
+
711
+ const createValidateStringifyPure = /** @__PURE__ */ Object.assign<
712
+ typeof createValidateStringify,
713
+ {}
714
+ >(createValidateStringify, validateStringify);
715
+ export { createValidateStringifyPure as createValidateStringify };
716
+
717
+ /**
718
+ * @internal
719
+ */
720
+ function halt(name: string): never {
721
+ throw new Error(
722
+ `Error on typia.json.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
723
+ );
724
+ }