typia 5.3.0-dev.20231112 → 5.3.0-dev.20231119

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