typia 5.0.0-dev.20230711 → 5.0.0-dev.20230713

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 (381) hide show
  1. package/lib/functional/$number.js +2 -2
  2. package/lib/functional/$number.js.map +1 -1
  3. package/lib/json.d.ts +455 -0
  4. package/lib/json.js +85 -0
  5. package/lib/json.js.map +1 -0
  6. package/lib/misc.d.ts +442 -0
  7. package/lib/misc.js +98 -0
  8. package/lib/misc.js.map +1 -0
  9. package/lib/module.d.ts +132 -1024
  10. package/lib/module.js +32 -189
  11. package/lib/module.js.map +1 -1
  12. package/lib/programmers/IsPruneProgrammer.js +2 -2
  13. package/lib/programmers/IsPruneProgrammer.js.map +1 -1
  14. package/lib/programmers/internal/application_alias.d.ts +2 -2
  15. package/lib/programmers/internal/application_alias.js.map +1 -1
  16. package/lib/programmers/internal/application_array.js.map +1 -1
  17. package/lib/programmers/internal/application_native.js.map +1 -1
  18. package/lib/programmers/internal/application_object.js.map +1 -1
  19. package/lib/programmers/internal/application_resolved.d.ts +2 -2
  20. package/lib/programmers/internal/application_resolved.js.map +1 -1
  21. package/lib/programmers/internal/application_schema.js.map +1 -1
  22. package/lib/programmers/internal/application_tuple.js.map +1 -1
  23. package/lib/programmers/json/JsonApplicationProgrammer.d.ts +8 -0
  24. package/lib/programmers/{ApplicationProgrammer.js → json/JsonApplicationProgrammer.js} +8 -8
  25. package/lib/programmers/json/JsonApplicationProgrammer.js.map +1 -0
  26. package/lib/programmers/{AssertStringifyProgrammer.d.ts → json/JsonAssertParseProgrammer.d.ts} +2 -2
  27. package/lib/programmers/{AssertParseProgrammer.js → json/JsonAssertParseProgrammer.js} +10 -10
  28. package/lib/programmers/json/JsonAssertParseProgrammer.js.map +1 -0
  29. package/lib/programmers/json/JsonAssertStringifyProgrammer.d.ts +5 -0
  30. package/lib/programmers/{AssertStringifyProgrammer.js → json/JsonAssertStringifyProgrammer.js} +12 -12
  31. package/lib/programmers/json/JsonAssertStringifyProgrammer.js.map +1 -0
  32. package/lib/programmers/{IsCloneProgrammer.d.ts → json/JsonIsParseProgrammer.d.ts} +2 -2
  33. package/lib/programmers/{IsParseProgrammer.js → json/JsonIsParseProgrammer.js} +10 -10
  34. package/lib/programmers/json/JsonIsParseProgrammer.js.map +1 -0
  35. package/lib/programmers/{IsStringifyProgrammer.d.ts → json/JsonIsStringifyProgrammer.d.ts} +1 -1
  36. package/lib/programmers/{IsStringifyProgrammer.js → json/JsonIsStringifyProgrammer.js} +7 -7
  37. package/lib/programmers/json/JsonIsStringifyProgrammer.js.map +1 -0
  38. package/lib/programmers/{StringifyProgrammer.d.ts → json/JsonStringifyProgrammer.d.ts} +2 -2
  39. package/lib/programmers/{StringifyProgrammer.js → json/JsonStringifyProgrammer.js} +30 -30
  40. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -0
  41. package/lib/programmers/json/JsonValidateParseProgrammer.d.ts +5 -0
  42. package/lib/programmers/{ValidateParseProgrammer.js → json/JsonValidateParseProgrammer.js} +10 -10
  43. package/lib/programmers/json/JsonValidateParseProgrammer.js.map +1 -0
  44. package/lib/programmers/json/JsonValidateStringifyProgrammer.d.ts +5 -0
  45. package/lib/programmers/{ValidateStringifyProgrammer.js → json/JsonValidateStringifyProgrammer.js} +12 -12
  46. package/lib/programmers/json/JsonValidateStringifyProgrammer.js.map +1 -0
  47. package/lib/programmers/{AssertPruneProgrammer.d.ts → misc/MiscAssertCloneProgrammer.d.ts} +2 -2
  48. package/lib/programmers/{AssertCloneProgrammer.js → misc/MiscAssertCloneProgrammer.js} +12 -12
  49. package/lib/programmers/misc/MiscAssertCloneProgrammer.js.map +1 -0
  50. package/lib/programmers/{AssertCloneProgrammer.d.ts → misc/MiscAssertPruneProgrammer.d.ts} +2 -2
  51. package/lib/programmers/{AssertPruneProgrammer.js → misc/MiscAssertPruneProgrammer.js} +12 -12
  52. package/lib/programmers/misc/MiscAssertPruneProgrammer.js.map +1 -0
  53. package/lib/programmers/{CloneProgrammer.d.ts → misc/MiscCloneProgrammer.d.ts} +2 -2
  54. package/lib/programmers/{CloneProgrammer.js → misc/MiscCloneProgrammer.js} +20 -20
  55. package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -0
  56. package/lib/programmers/{AssertParseProgrammer.d.ts → misc/MiscIsCloneProgrammer.d.ts} +2 -2
  57. package/lib/programmers/{IsCloneProgrammer.js → misc/MiscIsCloneProgrammer.js} +12 -12
  58. package/lib/programmers/misc/MiscIsCloneProgrammer.js.map +1 -0
  59. package/lib/programmers/{LiteralsProgrammer.d.ts → misc/MiscLiteralsProgrammer.d.ts} +2 -2
  60. package/lib/programmers/{LiteralsProgrammer.js → misc/MiscLiteralsProgrammer.js} +12 -11
  61. package/lib/programmers/misc/MiscLiteralsProgrammer.js.map +1 -0
  62. package/lib/programmers/{PruneProgrammer.d.ts → misc/MiscPruneProgrammer.d.ts} +2 -2
  63. package/lib/programmers/{PruneProgrammer.js → misc/MiscPruneProgrammer.js} +20 -20
  64. package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -0
  65. package/lib/programmers/misc/MiscValidateCloneProgrammer.d.ts +5 -0
  66. package/lib/programmers/{ValidateCloneProgrammer.js → misc/MiscValidateCloneProgrammer.js} +12 -12
  67. package/lib/programmers/misc/MiscValidateCloneProgrammer.js.map +1 -0
  68. package/lib/programmers/misc/MiscValidatePruneProgrammer.d.ts +5 -0
  69. package/lib/programmers/{ValidatePruneProgrammer.js → misc/MiscValidatePruneProgrammer.js} +12 -12
  70. package/lib/programmers/misc/MiscValidatePruneProgrammer.js.map +1 -0
  71. package/lib/programmers/{MessageProgrammer.d.ts → protobuf/ProtobufMessageProgrammer.d.ts} +2 -2
  72. package/lib/programmers/{MessageProgrammer.js → protobuf/ProtobufMessageProgrammer.js} +11 -11
  73. package/lib/programmers/protobuf/ProtobufMessageProgrammer.js.map +1 -0
  74. package/lib/protobuf.d.ts +2 -0
  75. package/lib/protobuf.js +11 -0
  76. package/lib/protobuf.js.map +1 -0
  77. package/lib/transformers/CallExpressionTransformer.js +122 -103
  78. package/lib/transformers/CallExpressionTransformer.js.map +1 -1
  79. package/lib/transformers/features/AssertTransformer.d.ts +3 -0
  80. package/lib/transformers/features/{validators/AssertTransformer.js → AssertTransformer.js} +2 -2
  81. package/lib/transformers/features/AssertTransformer.js.map +1 -0
  82. package/lib/transformers/features/CreateAssertTransformer.d.ts +3 -0
  83. package/lib/transformers/features/{validators/CreateAssertTransformer.js → CreateAssertTransformer.js} +2 -2
  84. package/lib/transformers/features/CreateAssertTransformer.js.map +1 -0
  85. package/lib/transformers/features/CreateIsTransformer.d.ts +3 -0
  86. package/lib/transformers/features/{validators/CreateIsTransformer.js → CreateIsTransformer.js} +2 -2
  87. package/lib/transformers/features/CreateIsTransformer.js.map +1 -0
  88. package/lib/transformers/features/{miscellaneous/CreateRandomTransformer.d.ts → CreateRandomTransformer.d.ts} +1 -1
  89. package/lib/transformers/features/{miscellaneous/CreateRandomTransformer.js → CreateRandomTransformer.js} +1 -1
  90. package/lib/transformers/features/CreateRandomTransformer.js.map +1 -0
  91. package/lib/transformers/features/CreateValidateTransformer.d.ts +3 -0
  92. package/lib/transformers/features/{validators/CreateValidateTransformer.js → CreateValidateTransformer.js} +2 -2
  93. package/lib/transformers/features/CreateValidateTransformer.js.map +1 -0
  94. package/lib/transformers/features/IsTransformer.d.ts +3 -0
  95. package/lib/transformers/features/{validators/IsTransformer.js → IsTransformer.js} +2 -2
  96. package/lib/transformers/features/IsTransformer.js.map +1 -0
  97. package/lib/transformers/features/{miscellaneous/RandomTransformer.d.ts → RandomTransformer.d.ts} +1 -1
  98. package/lib/transformers/features/{miscellaneous/RandomTransformer.js → RandomTransformer.js} +1 -1
  99. package/lib/transformers/features/RandomTransformer.js.map +1 -0
  100. package/lib/transformers/features/ValidateTransformer.d.ts +3 -0
  101. package/lib/transformers/features/{validators/ValidateTransformer.js → ValidateTransformer.js} +2 -2
  102. package/lib/transformers/features/ValidateTransformer.js.map +1 -0
  103. package/lib/transformers/features/{parsers → json}/AssertParseTransformer.js +4 -2
  104. package/lib/transformers/features/json/AssertParseTransformer.js.map +1 -0
  105. package/lib/transformers/features/{stringifiers → json}/AssertStringifyTransformer.js +2 -2
  106. package/lib/transformers/features/json/AssertStringifyTransformer.js.map +1 -0
  107. package/lib/transformers/features/{parsers → json}/CreateAssertParseTransformer.js +4 -2
  108. package/lib/transformers/features/json/CreateAssertParseTransformer.js.map +1 -0
  109. package/lib/transformers/features/{stringifiers → json}/CreateAssertStringifyTransformer.js +2 -2
  110. package/lib/transformers/features/json/CreateAssertStringifyTransformer.js.map +1 -0
  111. package/lib/transformers/features/{parsers → json}/CreateIsParseTransformer.js +2 -2
  112. package/lib/transformers/features/json/CreateIsParseTransformer.js.map +1 -0
  113. package/lib/transformers/features/{stringifiers → json}/CreateIsStringifyTransformer.js +2 -2
  114. package/lib/transformers/features/json/CreateIsStringifyTransformer.js.map +1 -0
  115. package/lib/transformers/features/{stringifiers → json}/CreateStringifyTransformer.js +2 -2
  116. package/lib/transformers/features/json/CreateStringifyTransformer.js.map +1 -0
  117. package/lib/transformers/features/{parsers → json}/CreateValidateParseTransformer.js +4 -2
  118. package/lib/transformers/features/json/CreateValidateParseTransformer.js.map +1 -0
  119. package/lib/transformers/features/{stringifiers → json}/CreateValidateStringifyProgrammer.js +2 -2
  120. package/lib/transformers/features/json/CreateValidateStringifyProgrammer.js.map +1 -0
  121. package/lib/transformers/features/{parsers → json}/IsParseTransformer.js +2 -2
  122. package/lib/transformers/features/json/IsParseTransformer.js.map +1 -0
  123. package/lib/transformers/features/{stringifiers → json}/IsStringifyTransformer.js +2 -2
  124. package/lib/transformers/features/json/IsStringifyTransformer.js.map +1 -0
  125. package/lib/transformers/features/{stringifiers → json}/StringifyTransformer.js +2 -2
  126. package/lib/transformers/features/json/StringifyTransformer.js.map +1 -0
  127. package/lib/transformers/features/{parsers → json}/ValidateParseTransformer.js +4 -2
  128. package/lib/transformers/features/json/ValidateParseTransformer.js.map +1 -0
  129. package/lib/transformers/features/{stringifiers → json}/ValidateStringifyTransformer.js +2 -2
  130. package/lib/transformers/features/json/ValidateStringifyTransformer.js.map +1 -0
  131. package/lib/transformers/features/{miscellaneous → misc}/ApplicationTransformer.js +2 -2
  132. package/lib/transformers/features/misc/ApplicationTransformer.js.map +1 -0
  133. package/lib/transformers/features/{miscellaneous → misc}/AssertCloneTransformer.js +4 -2
  134. package/lib/transformers/features/misc/AssertCloneTransformer.js.map +1 -0
  135. package/lib/transformers/features/{miscellaneous → misc}/AssertPruneTransformer.js +4 -2
  136. package/lib/transformers/features/misc/AssertPruneTransformer.js.map +1 -0
  137. package/lib/transformers/features/{miscellaneous → misc}/CloneTransformer.js +2 -2
  138. package/lib/transformers/features/misc/CloneTransformer.js.map +1 -0
  139. package/lib/transformers/features/{miscellaneous → misc}/CreateAssertCloneTransformer.js +4 -2
  140. package/lib/transformers/features/misc/CreateAssertCloneTransformer.js.map +1 -0
  141. package/lib/transformers/features/{miscellaneous → misc}/CreateAssertPruneTransformer.js +4 -2
  142. package/lib/transformers/features/misc/CreateAssertPruneTransformer.js.map +1 -0
  143. package/lib/transformers/features/{miscellaneous → misc}/CreateCloneTransformer.js +2 -2
  144. package/lib/transformers/features/misc/CreateCloneTransformer.js.map +1 -0
  145. package/lib/transformers/features/{miscellaneous → misc}/CreateIsCloneTransformer.js +2 -2
  146. package/lib/transformers/features/misc/CreateIsCloneTransformer.js.map +1 -0
  147. package/lib/transformers/features/misc/CreateIsPruneTransformer.js.map +1 -0
  148. package/lib/transformers/features/{miscellaneous → misc}/CreatePruneTransformer.js +2 -2
  149. package/lib/transformers/features/misc/CreatePruneTransformer.js.map +1 -0
  150. package/lib/transformers/features/{miscellaneous → misc}/CreateValidateCloneTransformer.js +4 -2
  151. package/lib/transformers/features/misc/CreateValidateCloneTransformer.js.map +1 -0
  152. package/lib/transformers/features/{miscellaneous → misc}/CreateValidatePruneTransformer.js +4 -2
  153. package/lib/transformers/features/misc/CreateValidatePruneTransformer.js.map +1 -0
  154. package/lib/transformers/features/{miscellaneous → misc}/IsCloneTransformer.js +2 -2
  155. package/lib/transformers/features/misc/IsCloneTransformer.js.map +1 -0
  156. package/lib/transformers/features/misc/IsPruneTransformer.js.map +1 -0
  157. package/lib/transformers/features/{miscellaneous → misc}/LiteralsTransformer.js +2 -2
  158. package/lib/transformers/features/misc/LiteralsTransformer.js.map +1 -0
  159. package/lib/transformers/features/misc/MetadataTransformer.js.map +1 -0
  160. package/lib/transformers/features/{miscellaneous → misc}/PruneTransformer.js +2 -2
  161. package/lib/transformers/features/misc/PruneTransformer.js.map +1 -0
  162. package/lib/transformers/features/{miscellaneous → misc}/ValidateCloneTransformer.js +4 -2
  163. package/lib/transformers/features/misc/ValidateCloneTransformer.js.map +1 -0
  164. package/lib/transformers/features/{miscellaneous → misc}/ValidatePruneTransformer.js +4 -2
  165. package/lib/transformers/features/misc/ValidatePruneTransformer.js.map +1 -0
  166. package/lib/transformers/features/{protocols → protobuf}/MessageTransformer.js +2 -2
  167. package/lib/transformers/features/protobuf/MessageTransformer.js.map +1 -0
  168. package/package.json +1 -1
  169. package/src/factories/MetadataTagFactory.ts +362 -362
  170. package/src/factories/ProtocolFactory.ts +80 -80
  171. package/src/factories/internal/protocols/ProtocolMetadataUtil.ts +180 -180
  172. package/src/factories/internal/protocols/emplace_protocol_object.ts +25 -25
  173. package/src/factories/internal/protocols/emplace_protocol_property.ts +12 -12
  174. package/src/factories/internal/protocols/iterate_protocol_atomic.ts +34 -34
  175. package/src/factories/internal/protocols/iterate_protocol_constant.ts +27 -27
  176. package/src/factories/internal/protocols/iterate_protocol_main.ts +19 -19
  177. package/src/factories/internal/protocols/iterate_protocol_map.ts +58 -58
  178. package/src/factories/internal/protocols/iterate_protocol_metadata.ts +96 -96
  179. package/src/factories/internal/protocols/iterate_protocol_native.ts +34 -34
  180. package/src/factories/internal/protocols/iterate_protocol_never.ts +1 -1
  181. package/src/factories/internal/protocols/iterate_protocol_object.ts +110 -110
  182. package/src/factories/internal/protocols/iterate_protocol_repeated.ts +34 -34
  183. package/src/factories/internal/protocols/iterate_protocol_tuple.ts +29 -29
  184. package/src/functional/$number.ts +3 -2
  185. package/src/functional/$proto_bytes.ts +25 -25
  186. package/src/functional/$proto_field.ts +30 -30
  187. package/src/functional/$proto_float.ts +37 -37
  188. package/src/functional/$proto_i32.ts +29 -29
  189. package/src/functional/$proto_i64.ts +37 -37
  190. package/src/functional/$proto_size.ts +82 -82
  191. package/src/functional/$proto_string.ts +24 -24
  192. package/src/functional/$varint.ts +130 -130
  193. package/src/functional/$zigzag.ts +39 -39
  194. package/src/json.ts +648 -0
  195. package/src/messages/IProtocolMap.ts +5 -5
  196. package/src/messages/IProtocolMessage.ts +6 -6
  197. package/src/messages/IProtocolProperty.ts +13 -13
  198. package/src/metadata/IMetadataTag.ts +113 -113
  199. package/src/metadata/Metadata.ts +606 -606
  200. package/src/misc.ts +651 -0
  201. package/src/module.ts +781 -2049
  202. package/src/programmers/IsPruneProgrammer.ts +2 -2
  203. package/src/programmers/internal/application_alias.ts +2 -2
  204. package/src/programmers/internal/application_array.ts +2 -2
  205. package/src/programmers/internal/application_native.ts +2 -2
  206. package/src/programmers/internal/application_number.ts +77 -77
  207. package/src/programmers/internal/application_object.ts +3 -3
  208. package/src/programmers/internal/application_resolved.ts +2 -2
  209. package/src/programmers/internal/application_schema.ts +2 -2
  210. package/src/programmers/internal/application_tuple.ts +2 -2
  211. package/src/programmers/{ApplicationProgrammer.ts → json/JsonApplicationProgrammer.ts} +6 -6
  212. package/src/programmers/{AssertParseProgrammer.ts → json/JsonAssertParseProgrammer.ts} +6 -6
  213. package/src/programmers/{AssertStringifyProgrammer.ts → json/JsonAssertStringifyProgrammer.ts} +8 -8
  214. package/src/programmers/{IsParseProgrammer.ts → json/JsonIsParseProgrammer.ts} +6 -6
  215. package/src/programmers/{IsStringifyProgrammer.ts → json/JsonIsStringifyProgrammer.ts} +7 -7
  216. package/src/programmers/{StringifyProgrammer.ts → json/JsonStringifyProgrammer.ts} +40 -39
  217. package/src/programmers/{ValidateParseProgrammer.ts → json/JsonValidateParseProgrammer.ts} +6 -6
  218. package/src/programmers/{ValidateStringifyProgrammer.ts → json/JsonValidateStringifyProgrammer.ts} +8 -8
  219. package/src/programmers/{AssertCloneProgrammer.ts → misc/MiscAssertCloneProgrammer.ts} +8 -8
  220. package/src/programmers/{AssertPruneProgrammer.ts → misc/MiscAssertPruneProgrammer.ts} +8 -8
  221. package/src/programmers/{CloneProgrammer.ts → misc/MiscCloneProgrammer.ts} +24 -24
  222. package/src/programmers/{IsCloneProgrammer.ts → misc/MiscIsCloneProgrammer.ts} +8 -8
  223. package/src/programmers/{LiteralsProgrammer.ts → misc/MiscLiteralsProgrammer.ts} +63 -62
  224. package/src/programmers/{PruneProgrammer.ts → misc/MiscPruneProgrammer.ts} +24 -24
  225. package/src/programmers/{ValidateCloneProgrammer.ts → misc/MiscValidateCloneProgrammer.ts} +8 -8
  226. package/src/programmers/{ValidatePruneProgrammer.ts → misc/MiscValidatePruneProgrammer.ts} +8 -8
  227. package/src/programmers/{MessageProgrammer.ts → protobuf/ProtobufMessageProgrammer.ts} +126 -126
  228. package/src/protobuf.ts +18 -0
  229. package/src/transformers/CallExpressionTransformer.ts +196 -186
  230. package/src/transformers/features/{validators/AssertTransformer.ts → AssertTransformer.ts} +2 -2
  231. package/src/transformers/features/{validators/CreateAssertTransformer.ts → CreateAssertTransformer.ts} +2 -2
  232. package/src/transformers/features/{validators/CreateIsTransformer.ts → CreateIsTransformer.ts} +2 -2
  233. package/src/transformers/features/{miscellaneous/CreateRandomTransformer.ts → CreateRandomTransformer.ts} +2 -2
  234. package/src/transformers/features/{validators/CreateValidateTransformer.ts → CreateValidateTransformer.ts} +2 -2
  235. package/src/transformers/features/{validators/IsTransformer.ts → IsTransformer.ts} +2 -2
  236. package/src/transformers/features/{miscellaneous/RandomTransformer.ts → RandomTransformer.ts} +2 -2
  237. package/src/transformers/features/{validators/ValidateTransformer.ts → ValidateTransformer.ts} +2 -2
  238. package/src/transformers/features/{parsers → json}/AssertParseTransformer.ts +3 -2
  239. package/src/transformers/features/{stringifiers → json}/AssertStringifyTransformer.ts +2 -2
  240. package/src/transformers/features/{parsers → json}/CreateAssertParseTransformer.ts +3 -2
  241. package/src/transformers/features/{stringifiers → json}/CreateAssertStringifyTransformer.ts +2 -2
  242. package/src/transformers/features/{parsers → json}/CreateIsParseTransformer.ts +2 -2
  243. package/src/transformers/features/{stringifiers → json}/CreateIsStringifyTransformer.ts +1 -1
  244. package/src/transformers/features/{stringifiers → json}/CreateStringifyTransformer.ts +2 -2
  245. package/src/transformers/features/{parsers → json}/CreateValidateParseTransformer.ts +3 -2
  246. package/src/transformers/features/{stringifiers → json}/CreateValidateStringifyProgrammer.ts +2 -2
  247. package/src/transformers/features/{parsers → json}/IsParseTransformer.ts +2 -2
  248. package/src/transformers/features/{stringifiers → json}/IsStringifyTransformer.ts +1 -1
  249. package/src/transformers/features/{stringifiers → json}/StringifyTransformer.ts +2 -2
  250. package/src/transformers/features/{parsers → json}/ValidateParseTransformer.ts +3 -2
  251. package/src/transformers/features/{stringifiers → json}/ValidateStringifyTransformer.ts +2 -2
  252. package/src/transformers/features/{miscellaneous → misc}/ApplicationTransformer.ts +102 -102
  253. package/src/transformers/features/{miscellaneous → misc}/AssertCloneTransformer.ts +3 -2
  254. package/src/transformers/features/{miscellaneous → misc}/AssertPruneTransformer.ts +3 -2
  255. package/src/transformers/features/{miscellaneous → misc}/CloneTransformer.ts +2 -2
  256. package/src/transformers/features/{miscellaneous → misc}/CreateAssertCloneTransformer.ts +3 -2
  257. package/src/transformers/features/{miscellaneous → misc}/CreateAssertPruneTransformer.ts +3 -2
  258. package/src/transformers/features/{miscellaneous → misc}/CreateCloneTransformer.ts +2 -2
  259. package/src/transformers/features/{miscellaneous → misc}/CreateIsCloneTransformer.ts +2 -2
  260. package/src/transformers/features/{miscellaneous → misc}/CreatePruneTransformer.ts +2 -2
  261. package/src/transformers/features/{miscellaneous → misc}/CreateValidateCloneTransformer.ts +3 -2
  262. package/src/transformers/features/{miscellaneous → misc}/CreateValidatePruneTransformer.ts +3 -2
  263. package/src/transformers/features/{miscellaneous → misc}/IsCloneTransformer.ts +2 -2
  264. package/src/transformers/features/{miscellaneous → misc}/LiteralsTransformer.ts +2 -2
  265. package/src/transformers/features/{miscellaneous → misc}/PruneTransformer.ts +2 -2
  266. package/src/transformers/features/{miscellaneous → misc}/ValidateCloneTransformer.ts +3 -2
  267. package/src/transformers/features/{miscellaneous → misc}/ValidatePruneTransformer.ts +3 -2
  268. package/src/transformers/features/{protocols → protobuf}/MessageTransformer.ts +31 -31
  269. package/src/utils/Escaper.ts +46 -46
  270. package/src/utils/NameEncoder.ts +32 -32
  271. package/lib/programmers/ApplicationProgrammer.d.ts +0 -8
  272. package/lib/programmers/ApplicationProgrammer.js.map +0 -1
  273. package/lib/programmers/AssertCloneProgrammer.js.map +0 -1
  274. package/lib/programmers/AssertParseProgrammer.js.map +0 -1
  275. package/lib/programmers/AssertPruneProgrammer.js.map +0 -1
  276. package/lib/programmers/AssertStringifyProgrammer.js.map +0 -1
  277. package/lib/programmers/CloneProgrammer.js.map +0 -1
  278. package/lib/programmers/IsCloneProgrammer.js.map +0 -1
  279. package/lib/programmers/IsParseProgrammer.d.ts +0 -5
  280. package/lib/programmers/IsParseProgrammer.js.map +0 -1
  281. package/lib/programmers/IsStringifyProgrammer.js.map +0 -1
  282. package/lib/programmers/LiteralsProgrammer.js.map +0 -1
  283. package/lib/programmers/MessageProgrammer.js.map +0 -1
  284. package/lib/programmers/PruneProgrammer.js.map +0 -1
  285. package/lib/programmers/StringifyProgrammer.js.map +0 -1
  286. package/lib/programmers/ValidateCloneProgrammer.d.ts +0 -5
  287. package/lib/programmers/ValidateCloneProgrammer.js.map +0 -1
  288. package/lib/programmers/ValidateParseProgrammer.d.ts +0 -5
  289. package/lib/programmers/ValidateParseProgrammer.js.map +0 -1
  290. package/lib/programmers/ValidatePruneProgrammer.d.ts +0 -5
  291. package/lib/programmers/ValidatePruneProgrammer.js.map +0 -1
  292. package/lib/programmers/ValidateStringifyProgrammer.d.ts +0 -5
  293. package/lib/programmers/ValidateStringifyProgrammer.js.map +0 -1
  294. package/lib/transformers/features/miscellaneous/ApplicationTransformer.js.map +0 -1
  295. package/lib/transformers/features/miscellaneous/AssertCloneTransformer.js.map +0 -1
  296. package/lib/transformers/features/miscellaneous/AssertPruneTransformer.js.map +0 -1
  297. package/lib/transformers/features/miscellaneous/CloneTransformer.js.map +0 -1
  298. package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.js.map +0 -1
  299. package/lib/transformers/features/miscellaneous/CreateAssertPruneTransformer.js.map +0 -1
  300. package/lib/transformers/features/miscellaneous/CreateCloneTransformer.js.map +0 -1
  301. package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.js.map +0 -1
  302. package/lib/transformers/features/miscellaneous/CreateIsPruneTransformer.js.map +0 -1
  303. package/lib/transformers/features/miscellaneous/CreatePruneTransformer.js.map +0 -1
  304. package/lib/transformers/features/miscellaneous/CreateRandomTransformer.js.map +0 -1
  305. package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.js.map +0 -1
  306. package/lib/transformers/features/miscellaneous/CreateValidatePruneTransformer.js.map +0 -1
  307. package/lib/transformers/features/miscellaneous/IsCloneTransformer.js.map +0 -1
  308. package/lib/transformers/features/miscellaneous/IsPruneTransformer.js.map +0 -1
  309. package/lib/transformers/features/miscellaneous/LiteralsTransformer.js.map +0 -1
  310. package/lib/transformers/features/miscellaneous/MetadataTransformer.js.map +0 -1
  311. package/lib/transformers/features/miscellaneous/PruneTransformer.js.map +0 -1
  312. package/lib/transformers/features/miscellaneous/RandomTransformer.js.map +0 -1
  313. package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.js.map +0 -1
  314. package/lib/transformers/features/miscellaneous/ValidatePruneTransformer.js.map +0 -1
  315. package/lib/transformers/features/parsers/AssertParseTransformer.js.map +0 -1
  316. package/lib/transformers/features/parsers/CreateAssertParseTransformer.js.map +0 -1
  317. package/lib/transformers/features/parsers/CreateIsParseTransformer.js.map +0 -1
  318. package/lib/transformers/features/parsers/CreateValidateParseTransformer.js.map +0 -1
  319. package/lib/transformers/features/parsers/IsParseTransformer.js.map +0 -1
  320. package/lib/transformers/features/parsers/ValidateParseTransformer.js.map +0 -1
  321. package/lib/transformers/features/protocols/MessageTransformer.js.map +0 -1
  322. package/lib/transformers/features/stringifiers/AssertStringifyTransformer.js.map +0 -1
  323. package/lib/transformers/features/stringifiers/CreateAssertStringifyTransformer.js.map +0 -1
  324. package/lib/transformers/features/stringifiers/CreateIsStringifyTransformer.js.map +0 -1
  325. package/lib/transformers/features/stringifiers/CreateStringifyTransformer.js.map +0 -1
  326. package/lib/transformers/features/stringifiers/CreateValidateStringifyProgrammer.js.map +0 -1
  327. package/lib/transformers/features/stringifiers/IsStringifyTransformer.js.map +0 -1
  328. package/lib/transformers/features/stringifiers/StringifyTransformer.js.map +0 -1
  329. package/lib/transformers/features/stringifiers/ValidateStringifyTransformer.js.map +0 -1
  330. package/lib/transformers/features/validators/AssertTransformer.d.ts +0 -3
  331. package/lib/transformers/features/validators/AssertTransformer.js.map +0 -1
  332. package/lib/transformers/features/validators/CreateAssertTransformer.d.ts +0 -3
  333. package/lib/transformers/features/validators/CreateAssertTransformer.js.map +0 -1
  334. package/lib/transformers/features/validators/CreateIsTransformer.d.ts +0 -3
  335. package/lib/transformers/features/validators/CreateIsTransformer.js.map +0 -1
  336. package/lib/transformers/features/validators/CreateValidateTransformer.d.ts +0 -3
  337. package/lib/transformers/features/validators/CreateValidateTransformer.js.map +0 -1
  338. package/lib/transformers/features/validators/IsTransformer.d.ts +0 -3
  339. package/lib/transformers/features/validators/IsTransformer.js.map +0 -1
  340. package/lib/transformers/features/validators/ValidateTransformer.d.ts +0 -3
  341. package/lib/transformers/features/validators/ValidateTransformer.js.map +0 -1
  342. /package/lib/transformers/features/{parsers → json}/AssertParseTransformer.d.ts +0 -0
  343. /package/lib/transformers/features/{stringifiers → json}/AssertStringifyTransformer.d.ts +0 -0
  344. /package/lib/transformers/features/{parsers → json}/CreateAssertParseTransformer.d.ts +0 -0
  345. /package/lib/transformers/features/{stringifiers → json}/CreateAssertStringifyTransformer.d.ts +0 -0
  346. /package/lib/transformers/features/{parsers → json}/CreateIsParseTransformer.d.ts +0 -0
  347. /package/lib/transformers/features/{stringifiers → json}/CreateIsStringifyTransformer.d.ts +0 -0
  348. /package/lib/transformers/features/{stringifiers → json}/CreateStringifyTransformer.d.ts +0 -0
  349. /package/lib/transformers/features/{parsers → json}/CreateValidateParseTransformer.d.ts +0 -0
  350. /package/lib/transformers/features/{stringifiers → json}/CreateValidateStringifyProgrammer.d.ts +0 -0
  351. /package/lib/transformers/features/{parsers → json}/IsParseTransformer.d.ts +0 -0
  352. /package/lib/transformers/features/{stringifiers → json}/IsStringifyTransformer.d.ts +0 -0
  353. /package/lib/transformers/features/{stringifiers → json}/StringifyTransformer.d.ts +0 -0
  354. /package/lib/transformers/features/{parsers → json}/ValidateParseTransformer.d.ts +0 -0
  355. /package/lib/transformers/features/{stringifiers → json}/ValidateStringifyTransformer.d.ts +0 -0
  356. /package/lib/transformers/features/{miscellaneous → misc}/ApplicationTransformer.d.ts +0 -0
  357. /package/lib/transformers/features/{miscellaneous → misc}/AssertCloneTransformer.d.ts +0 -0
  358. /package/lib/transformers/features/{miscellaneous → misc}/AssertPruneTransformer.d.ts +0 -0
  359. /package/lib/transformers/features/{miscellaneous → misc}/CloneTransformer.d.ts +0 -0
  360. /package/lib/transformers/features/{miscellaneous → misc}/CreateAssertCloneTransformer.d.ts +0 -0
  361. /package/lib/transformers/features/{miscellaneous → misc}/CreateAssertPruneTransformer.d.ts +0 -0
  362. /package/lib/transformers/features/{miscellaneous → misc}/CreateCloneTransformer.d.ts +0 -0
  363. /package/lib/transformers/features/{miscellaneous → misc}/CreateIsCloneTransformer.d.ts +0 -0
  364. /package/lib/transformers/features/{miscellaneous → misc}/CreateIsPruneTransformer.d.ts +0 -0
  365. /package/lib/transformers/features/{miscellaneous → misc}/CreateIsPruneTransformer.js +0 -0
  366. /package/lib/transformers/features/{miscellaneous → misc}/CreatePruneTransformer.d.ts +0 -0
  367. /package/lib/transformers/features/{miscellaneous → misc}/CreateValidateCloneTransformer.d.ts +0 -0
  368. /package/lib/transformers/features/{miscellaneous → misc}/CreateValidatePruneTransformer.d.ts +0 -0
  369. /package/lib/transformers/features/{miscellaneous → misc}/IsCloneTransformer.d.ts +0 -0
  370. /package/lib/transformers/features/{miscellaneous → misc}/IsPruneTransformer.d.ts +0 -0
  371. /package/lib/transformers/features/{miscellaneous → misc}/IsPruneTransformer.js +0 -0
  372. /package/lib/transformers/features/{miscellaneous → misc}/LiteralsTransformer.d.ts +0 -0
  373. /package/lib/transformers/features/{miscellaneous → misc}/MetadataTransformer.d.ts +0 -0
  374. /package/lib/transformers/features/{miscellaneous → misc}/MetadataTransformer.js +0 -0
  375. /package/lib/transformers/features/{miscellaneous → misc}/PruneTransformer.d.ts +0 -0
  376. /package/lib/transformers/features/{miscellaneous → misc}/ValidateCloneTransformer.d.ts +0 -0
  377. /package/lib/transformers/features/{miscellaneous → misc}/ValidatePruneTransformer.d.ts +0 -0
  378. /package/lib/transformers/features/{protocols → protobuf}/MessageTransformer.d.ts +0 -0
  379. /package/src/transformers/features/{miscellaneous → misc}/CreateIsPruneTransformer.ts +0 -0
  380. /package/src/transformers/features/{miscellaneous → misc}/IsPruneTransformer.ts +0 -0
  381. /package/src/transformers/features/{miscellaneous → misc}/MetadataTransformer.ts +0 -0
package/lib/module.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { IJsonApplication } from "./schemas/IJsonApplication";
2
- import { Atomic } from "./typings/Atomic";
3
1
  import { CustomValidatorMap } from "./CustomValidatorMap";
4
2
  import { IRandomGenerator } from "./IRandomGenerator";
5
3
  import { IValidation } from "./IValidation";
6
4
  import { Primitive } from "./Primitive";
5
+ export * as json from "./json";
6
+ export * as protobuf from "./protobuf";
7
+ export * as misc from "./misc";
7
8
  export * from "./schemas/IJsonApplication";
8
9
  export * from "./schemas/IJsonComponents";
9
10
  export * from "./schemas/IJsonSchema";
@@ -11,6 +12,43 @@ export * from "./IRandomGenerator";
11
12
  export * from "./IValidation";
12
13
  export * from "./Primitive";
13
14
  export * from "./TypeGuardError";
15
+ /**
16
+ * Custom validators.
17
+ *
18
+ * If you want to add a custom validation logic utilizing comment tags,
19
+ * add a closure function with its tag and type name. Below example code
20
+ * would helpful to understand how to use this instance.
21
+ *
22
+ * ```ts
23
+ * typia.customValidators.insert("powerOf")("number")(
24
+ * (text: string) => {
25
+ * const denominator: number = Math.log(Number(text));
26
+ * return (value: number) => {
27
+ * value = Math.log(value) / denominator;
28
+ * return value === Math.floor(value);
29
+ * };
30
+ * }
31
+ * );
32
+ * typia.customValidators.insert("dollar")("string")(
33
+ * () => (value: string) => value.startsWith("$"),
34
+ * );
35
+ *
36
+ * interface TagCustom {
37
+ * /**
38
+ * * @powerOf 10
39
+ * *\/
40
+ * powerOf: number;
41
+ *
42
+ * /**
43
+ * * @dollar
44
+ * *\/
45
+ * dollar: string;
46
+ * }
47
+ * ```
48
+ *
49
+ * @author Jeongho Nam - https://github.com/samchon
50
+ */
51
+ export declare const customValidators: CustomValidatorMap;
14
52
  /**
15
53
  * Asserts a value type.
16
54
  *
@@ -323,1129 +361,199 @@ export declare function validateEquals<T>(input: T): IValidation<T>;
323
361
  * @author Jeongho Nam - https://github.com/samchon
324
362
  */
325
363
  export declare function validateEquals<T>(input: unknown): IValidation<T>;
326
- /**
327
- * Custom validators.
328
- *
329
- * If you want to add a custom validation logic utilizing comment tags,
330
- * add a closure function with its tag and type name. Below example code
331
- * would helpful to understand how to use this instance.
332
- *
333
- * ```ts
334
- * typia.customValidators.insert("powerOf")("number")(
335
- * (text: string) => {
336
- * const denominator: number = Math.log(Number(text));
337
- * return (value: number) => {
338
- * value = Math.log(value) / denominator;
339
- * return value === Math.floor(value);
340
- * };
341
- * }
342
- * );
343
- * typia.customValidators.insert("dollar")("string")(
344
- * () => (value: string) => value.startsWith("$"),
345
- * );
346
- *
347
- * interface TagCustom {
348
- * /**
349
- * * @powerOf 10
350
- * *\/
351
- * powerOf: number;
352
- *
353
- * /**
354
- * * @dollar
355
- * *\/
356
- * dollar: string;
357
- * }
358
- * ```
359
- *
360
- * @author Jeongho Nam - https://github.com/samchon
361
- */
362
- export declare const customValidators: CustomValidatorMap;
363
- export declare function message(): never;
364
- export declare function message<T>(): string;
365
364
  /**
366
365
  * > You must configure the generic argument `T`.
367
366
  *
368
- * JSON Schema Application.
369
- *
370
- * Creates a JSON schema application which contains both main JSON schemas and components.
371
- * Note that, all of the object types are stored in the {@link IJsonApplication.components}
372
- * property for the `$ref` referencing.
373
- *
374
- * Also, `typia.application()` has additional generic arguments, *Purpose*.
375
- * As JSON schema definitions used by `swagger` and `ajv` are different a little bit,
376
- * you should configure the *Purpose* appropriately.
377
- *
378
- * For an example, `ajv` has an extra property "$recursiveRef" that are not exists
379
- * in the standard JSON schema definition spec. Otherwise, `swagger` can't identify
380
- * the tuple definition.
381
- *
382
- * @template Types Tuple of target types
383
- * @template Purpose Purpose of the JSON schema`
384
- * @return JSON schema application
385
- *
386
- * @author Jeongho Nam - https://github.com/samchon
387
- */
388
- export declare function application(): never;
389
- /**
390
- * JSON Schema Application.
391
- *
392
- * Creates a JSON schema application which contains both main JSON schemas and components.
393
- * Note that, all of the object types are stored in the {@link IJsonApplication.components}
394
- * property for the `$ref` referencing.
367
+ * Generate random data.
395
368
  *
396
- * Also, `typia.application()` has additional generic arguments, *Purpose*.
397
- * As JSON schema definitions used by `swagger` and `ajv` are different a little bit,
398
- * you should configure the *Purpose* appropriately.
369
+ * Generates a random data following type the `T`.
399
370
  *
400
- * For an example, `ajv` has an extra property "$recursiveRef" that are not exists
401
- * in the standard JSON schema definition spec. Otherwise, `swagger` can't identify
402
- * the tuple definition.
371
+ * For reference, this `typia.random()` function generates only primitive type.
372
+ * If there're some methods in the type `T` or its nested instances, those would
373
+ * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
374
+ * would be generated instead.
403
375
  *
404
- * @template Types Tuple of target types
405
- * @template Purpose Purpose of the JSON schema
406
- * @return JSON schema application
376
+ * @template T Type of data to generate
377
+ * @param generator Random data generator
378
+ * @return Randomly generated data
407
379
  *
408
380
  * @author Jeongho Nam - https://github.com/samchon
409
381
  */
410
- export declare function application<Types extends unknown[], Purpose extends "ajv" | "swagger" = "swagger">(): IJsonApplication;
382
+ export declare function random(generator?: Partial<IRandomGenerator>): never;
411
383
  /**
412
- * > You must configure the generic argument `T`.
413
- *
414
- * Safe `JSON.parse()` function with type assertion.
384
+ * Generate random data.
415
385
  *
416
- * `typia.assertParse()` is a combination function of `JSON.parse()` and {@link assert}.
417
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
418
- * instance with type assertion.
386
+ * Generates a random data following type the `T`.
419
387
  *
420
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
421
- * throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed value,
422
- * the parsed value would be returned.
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.
423
392
  *
424
- * @template T Expected type of parsed value
425
- * @param input JSON string
426
- * @returns Parsed value
393
+ * @template T Type of data to generate
394
+ * @param generator Random data generator
395
+ * @return Randomly generated data
427
396
  *
428
397
  * @author Jeongho Nam - https://github.com/samchon
429
398
  */
430
- export declare function assertParse(input: string): never;
399
+ export declare function random<T>(generator?: Partial<IRandomGenerator>): Primitive<T>;
431
400
  /**
432
- * Safe `JSON.parse()` function with type assertion.
433
- *
434
- * `typia.assertParse()` is a combination function of `JSON.parse()` and {@link assert}.
435
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
436
- * instance with type assertion.
437
- *
438
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
439
- * throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed value,
440
- * the parsed value would be returned.
401
+ * Creates a reusable {@link assert} function.
441
402
  *
442
- * @template T Expected type of parsed value
443
- * @param input JSON string
444
- * @returns Parsed value
403
+ * @danger You have to specify the generic argument `T`
404
+ * @return Nothing until specifying the generic argument `T`
405
+ * @throws compile error
445
406
  *
446
407
  * @author Jeongho Nam - https://github.com/samchon
447
408
  */
448
- export declare function assertParse<T>(input: string): Primitive<T>;
409
+ export declare function createAssert(): never;
449
410
  /**
450
- * > You must configure the generic argument `T`.
451
- *
452
- * Safe `JSON.parse()` function with type checking.
453
- *
454
- * `typia.isParse()` is a combination function of `JSON.parse()` and {@link is}.
455
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
456
- * instance with type checking.
457
- *
458
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
459
- * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
460
- * value would be returned.
411
+ * Creates a reusable {@link assert} function.
461
412
  *
462
- * @template T Expected type of parsed value
463
- * @param input JSON string
464
- * @returns Parsed value when exact type, otherwise `null`
413
+ * @template T Type of the input value
414
+ * @returns A reusable `assert` function
465
415
  *
466
416
  * @author Jeongho Nam - https://github.com/samchon
467
417
  */
468
- export declare function isParse(input: string): never;
418
+ export declare function createAssert<T>(): (input: unknown) => T;
469
419
  /**
470
- * Safe `JSON.parse()` function with type checking.
471
- *
472
- * `typia.isParse()` is a combination function of `JSON.parse()` and {@link is}.
473
- * Therefore, it convers a JSON (JavaScript Object Notation) string to a `T` typed
474
- * instance with type checking.
420
+ * Creates a reusable {@link assertType} function.
475
421
  *
476
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
477
- * returns `null` value. Otherwise, there's no problem on the parsed value, the parsed
478
- * value would be returned.
422
+ * Duplicated function of {@link createAssert} for `typescript-is` users.
479
423
  *
480
- * @template T Expected type of parsed value
481
- * @param input JSON string
482
- * @returns Parsed value when exact type, otherwise `null`
424
+ * @danger You have to specify the generic argument `T`
425
+ * @return Nothing until specifying the generic argument `T`
426
+ * @throws compile error
483
427
  *
484
428
  * @author Jeongho Nam - https://github.com/samchon
429
+ * @deprecated
485
430
  */
486
- export declare function isParse<T>(input: string): Primitive<T> | null;
431
+ export declare function createAssertType(): never;
487
432
  /**
488
- * > You must configure the generic argument `T`.
489
- *
490
- * Safe `JSON.parse()` function with detailed type validation.
491
- *
492
- * `typia.validateParse()` is a combination function of `JSON.parse()` and
493
- * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
494
- * to a `T` typed instance with detailed type validation.
433
+ * Creates a reusable {@link assertType} function.
495
434
  *
496
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
497
- * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
498
- * there's no problem on the parsed value, the parsed value would be stored in `data`
499
- * property of the output {@link IValidation.ISuccess} instance.
435
+ * Duplicated function of {@link createAssert} for `typescript-is` users.
500
436
  *
501
- * @template T Expected type of parsed value
502
- * @param input JSON string
503
- * @returns Validation result with JSON parsed value
437
+ * @template T Type of the input value
438
+ * @returns A reusable `assert` function
504
439
  *
505
440
  * @author Jeongho Nam - https://github.com/samchon
441
+ * @deprecated
506
442
  */
507
- export declare function validateParse(input: string): never;
443
+ export declare function createAssertType<T>(): (input: unknown) => T;
508
444
  /**
509
- * Safe `JSON.parse()` function with detailed type validation.
510
- *
511
- * `typia.validateParse()` is a combination function of `JSON.parse()` and
512
- * {@link validate}. Therefore, it convers a JSON (JavaScript Object Notation) string
513
- * to a `T` typed instance with detailed type validation.
514
- *
515
- * In such reason, when parsed JSON string value is not matched with the type `T`, it
516
- * returns {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
517
- * there's no problem on the parsed value, the parsed value would be stored in `data`
518
- * property of the output {@link IValidation.ISuccess} instance.
445
+ * Creates a reusable {@link is} function.
519
446
  *
520
- * @template T Expected type of parsed value
521
- * @param input JSON string
522
- * @returns Validation result with JSON parsed value
447
+ * @danger You have to specify the generic argument `T`
448
+ * @return Nothing until specifying the generic argument `T`
449
+ * @throws compile error
523
450
  *
524
451
  * @author Jeongho Nam - https://github.com/samchon
525
452
  */
526
- export declare function validateParse<T>(input: string): IValidation<Primitive<T>>;
453
+ export declare function createIs(): never;
527
454
  /**
528
- * 8x faster `JSON.stringify()` function.
529
- *
530
- * Converts an input value to a JSON (JavaScript Object Notation) string, about 8x faster
531
- * than the native `JSON.stringify()` function. The 5x faster principle is because
532
- * it writes an optimized JSON conversion plan, only for the type `T`.
533
- *
534
- * For reference, this `typia.stringify()` does not validate the input value type.
535
- * It just believes that the input value is following the type `T`. Therefore, if you
536
- * can't ensure the input value type, it would be better to call one of below functions
537
- * instead.
538
- *
539
- * - {@link assertStringify}
540
- * - {@link isStringify}
541
- * - {@link validateStringify}
455
+ * Creates a reusable {@link is} function.
542
456
  *
543
457
  * @template T Type of the input value
544
- * @param input A value to be converted
545
- * @return JSON string value
458
+ * @returns A reusable `is` function
546
459
  *
547
460
  * @author Jeongho Nam - https://github.com/samchon
548
461
  */
549
- export declare function stringify<T>(input: T): string;
462
+ export declare function createIs<T>(): (input: unknown) => input is T;
550
463
  /**
551
- * 5x faster `JSON.stringify()` function with type assertion.
552
- *
553
- * `typia.assertStringify()` is a combination function of {@link assert} and
554
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
555
- * Notation) string, with type assertion.
556
- *
557
- * In such reason, when `input` value is not matched with the type `T`, it throws an
558
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
559
- * string would be returned.
560
- *
561
- * For reference, with type assertion, it is even 5x times faster than the native
562
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
563
- * with confidence.
464
+ * Creates a reusable {@link validate} function.
564
465
  *
565
- * @template T Type of the input value
566
- * @param input A value to be asserted and converted
567
- * @return JSON string value
466
+ * @danger You have to specify the generic argument `T`
467
+ * @return Nothing until specifying the generic argument `T`
468
+ * @throws compile error
568
469
  *
569
470
  * @author Jeongho Nam - https://github.com/samchon
570
471
  */
571
- export declare function assertStringify<T>(input: T): string;
472
+ export declare function createValidate(): never;
572
473
  /**
573
- * 5x faster `JSON.stringify()` function with type assertion.
574
- *
575
- * `typia.assertStringify()` is a combination function of {@link assert} and
576
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
577
- * Notation) string, with type assertion.
578
- *
579
- * In such reason, when `input` value is not matched with the type `T`, it throws an
580
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
581
- * string would be returned.
582
- *
583
- * For reference, with type assertion, it is even 5x times faster than the native
584
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
585
- * with confidence.
474
+ * Creates a reusable {@link validate} function.
586
475
  *
587
476
  * @template T Type of the input value
588
- * @param input A value to be asserted and converted
589
- * @return JSON string value
477
+ * @returns A reusable `validate` function
590
478
  *
591
479
  * @author Jeongho Nam - https://github.com/samchon
592
480
  */
593
- export declare function assertStringify<T>(input: T): unknown;
481
+ export declare function createValidate<T>(): (input: unknown) => IValidation<T>;
594
482
  /**
595
- * 7x faster `JSON.stringify()` function with type checking.
596
- *
597
- * `typia.stringify()` is a combination function of {@link is} and
598
- * {@link stringify}. Therefore, it converts an input value to JSON
599
- * (JavaScript Object Notation) string, with type checking.
600
- *
601
- * In such reason, when `input` value is not matched with the type `T`, it returns
602
- * `null` value. Otherwise, there's no problem on the `input` value, JSON string would
603
- * be returned.
604
- *
605
- * For reference, with type checking, it is even 7x times faster than the native
606
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
607
- * with confidence.
483
+ * Creates a reusable {@link assertEquals} function.
608
484
  *
609
- * @template T Type of the input value
610
- * @param input A value to be checked and converted
611
- * @return JSON string value when exact type, otherwise null
485
+ * @danger You have to specify the generic argument `T`
486
+ * @return Nothing until specifying the generic argument `T`
487
+ * @throws compile error
612
488
  *
613
489
  * @author Jeongho Nam - https://github.com/samchon
614
490
  */
615
- export declare function isStringify<T>(input: T): string | null;
491
+ export declare function createAssertEquals(): never;
616
492
  /**
617
- * 7x faster `JSON.stringify()` function with type checking.
618
- *
619
- * `typia.isStringify()` is a combination function of {@link is} and
620
- * {@link stringify}. Therefore, it converts an input value to JSON
621
- * (JavaScript Object Notation) string, with type checking.
622
- *f
623
- * In such reason, when `input` value is not matched with the type `T`, it returns
624
- * `null` value. Otherwise, there's no problem on the `input` value, JSON string would
625
- * be returned.
626
- *
627
- * For reference, with type checking, it is even 7x times faster than the native
628
- * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
629
- * with confidence.
493
+ * Creates a reusable {@link assertEquals} function.
630
494
  *
631
495
  * @template T Type of the input value
632
- * @param input A value to be checked and converted
633
- * @return JSON string value when exact type, otherwise null
496
+ * @returns A reusable `assertEquals` function
634
497
  *
635
498
  * @author Jeongho Nam - https://github.com/samchon
636
499
  */
637
- export declare function isStringify<T>(input: unknown): string | null;
500
+ export declare function createAssertEquals<T>(): (input: unknown) => T;
638
501
  /**
639
- * 5x faster `JSON.stringify()` function with detailed type validation.
640
- *
641
- * `typia.validateStringify()` is a combination function of {@link validate} and
642
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
643
- * Notation) string, with detailed type validation.
644
- *
645
- * In such reason, when `input` value is not matched with the type `T`, it returns
646
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's no
647
- * problem on the `input` value, JSON string would be stored in `data` property of
648
- * the output {@link IValidation.ISuccess} instance.
649
- *
650
- * For reference, with detailed type validation, it is even 5x times faster than the
651
- * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
652
- * with confidence.
502
+ * Creates a reusable {@link equals} function.
653
503
  *
654
- * @template T Type of the input value
655
- * @param input A value to be checked and converted
656
- * @returns Validation result with JSON string value
504
+ * @danger You have to specify the generic argument `T`
505
+ * @return Nothing until specifying the generic argument `T`
506
+ * @throws compile error
657
507
  *
658
508
  * @author Jeongho Nam - https://github.com/samchon
659
509
  */
660
- export declare function validateStringify<T>(input: T): IValidation<string>;
510
+ export declare function createEquals(): never;
661
511
  /**
662
- * 5x faster `JSON.stringify()` function with detailed type validation.
663
- *
664
- * `typia.validateStringify()` is a combination function of {@link validate} and
665
- * {@link stringify}. Therefore, it converts an input value to JSON (JavaScript Object
666
- * Notation) string, with detailed type validation.
667
- *
668
- * In such reason, when `input` value is not matched with the type `T`, it returns
669
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's no
670
- * problem on the `input` value, JSON string would be stored in `data` property of
671
- * the output {@link IValidation.ISuccess} instance.
672
- *
673
- * For reference, with detailed type validation, it is even 5x times faster than the
674
- * native `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
675
- * with confidence.
512
+ * Creates a reusable {@link equals} function.
676
513
  *
677
514
  * @template T Type of the input value
678
- * @param input A value to be checked and converted
679
- * @returns Validation result with JSON string value
680
- *
681
- * @author Jeongho Nam - https://github.com/samchon
682
- */
683
- export declare function validateStringify<T>(input: unknown): IValidation<string>;
684
- /**
685
- * > You must configure the generic argument `T`.
686
- *
687
- * Generate random data.
688
- *
689
- * Generates a random data following type the `T`.
690
- *
691
- * For reference, this `typia.random()` function generates only primitive type.
692
- * If there're some methods in the type `T` or its nested instances, those would
693
- * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
694
- * would be generated instead.
695
- *
696
- * @template T Type of data to generate
697
- * @param generator Random data generator
698
- * @return Randomly generated data
515
+ * @returns A reusable `equals` function
699
516
  *
700
517
  * @author Jeongho Nam - https://github.com/samchon
701
518
  */
702
- export declare function random(generator?: Partial<IRandomGenerator>): never;
519
+ export declare function createEquals<T>(): (input: unknown) => input is T;
703
520
  /**
704
- * Generate random data.
705
- *
706
- * Generates a random data following type the `T`.
707
- *
708
- * For reference, this `typia.random()` function generates only primitive type.
709
- * If there're some methods in the type `T` or its nested instances, those would
710
- * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
711
- * would be generated instead.
521
+ * Creates a reusable {@link validateEquals} function.
712
522
  *
713
- * @template T Type of data to generate
714
- * @param generator Random data generator
715
- * @return Randomly generated data
523
+ * @danger You have to specify the generic argument `T`
524
+ * @return Nothing until specifying the generic argument `T`
525
+ * @throws compile error
716
526
  *
717
527
  * @author Jeongho Nam - https://github.com/samchon
718
528
  */
719
- export declare function random<T>(generator?: Partial<IRandomGenerator>): Primitive<T>;
529
+ export declare function createValidateEquals(): never;
720
530
  /**
721
- * > You must configure the generic argument `T`.
722
- *
723
- * Union literal type to array.
724
- *
725
- * Converts a union literal type to an array of its members.
726
- *
727
- * ```typescript
728
- * literals<"A" | "B" | 1>; // ["A", "B", 1]
729
- * ```
531
+ * Creates a reusable {@link validateEquals} function.
730
532
  *
731
- * @template T Union literal type
732
- * @return Array of union literal type's members
533
+ * @template T Type of the input value
534
+ * @returns A reusable `validateEquals` function
733
535
  *
734
536
  * @author Jeongho Nam - https://github.com/samchon
735
537
  */
736
- export declare function literals(): never;
538
+ export declare function createValidateEquals<T>(): (input: unknown) => IValidation<T>;
737
539
  /**
738
- * Union literal type to array.
739
- *
740
- * Converts a union literal type to an array of its members.
741
- *
742
- * ```typescript
743
- * literals<"A" | "B" | 1>; // ["A", "B", 1]
744
- * ```
540
+ * Creates a reusable {@link random} function.
745
541
  *
746
- * @template T Union literal type
747
- * @return Array of union literal type's members
542
+ * @danger You have to specify the generic argument `T`
543
+ * @param generator Random data generator
544
+ * @return Nothing until specifying the generic argument `T`
545
+ * @throws compile error
748
546
  *
749
547
  * @author Jeongho Nam - https://github.com/samchon
750
548
  */
751
- export declare function literals<T extends Atomic.Type | null>(): T[];
549
+ export declare function createRandom(generator?: Partial<IRandomGenerator>): never;
752
550
  /**
753
- * Clone a data.
754
- *
755
- * Clones an instance following type `T`. If the target *input* value or its member
756
- * variable contains a class instance that is having a `toJSON()` method, its return
757
- * value would be cloned.
758
- *
759
- * For reference, this `typia.clone()` function does not validate the input value type.
760
- * It just believes that the input value is following the type `T`. Therefore, if you
761
- * can't ensure the input value type, it would be better to call {@link assertClone}
762
- * function instead.
551
+ * Creates a resuable {@link random} function.
763
552
  *
764
553
  * @template T Type of the input value
765
- * @param input A value to be cloned
766
- * @return Cloned data
767
- *
768
- * @author Jeongho Nam - https://github.com/samchon
769
- */
770
- export declare function clone<T>(input: T): Primitive<T>;
771
- /**
772
- * Clone a data with type assertion.
773
- *
774
- * Clones an instance following type `T`, with type assertion. If the target `input`
775
- * value or its member variable contains a class instance that is having a `toJSON()`
776
- * method, its return value would be cloned.
777
- *
778
- * In such reason, when `input` value is not matched with the type `T`, it throws an
779
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
780
- * data would be returned.
781
- *
782
- * @template T Type of the input value
783
- * @param input A value to be cloned
784
- * @return Cloned data
785
- *
786
- * @author Jeongho Nam - https://github.com/samchon
787
- */
788
- export declare function assertClone<T>(input: T): Primitive<T>;
789
- /**
790
- * Clone a data with type assertion.
791
- *
792
- * Clones an instance following type `T`, with type assertion. If the target `input`
793
- * value or its member variable contains a class instance that is having a `toJSON()`
794
- * method, its return value would be cloned.
795
- *
796
- * In such reason, when `input` value is not matched with the type `T`, it throws an
797
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
798
- * data would be returned.
799
- *
800
- * @template T Type of the input value
801
- * @param input A value to be cloned
802
- * @return Cloned data
803
- *
804
- * @author Jeongho Nam - https://github.com/samchon
805
- */
806
- export declare function assertClone<T>(input: unknown): Primitive<T>;
807
- /**
808
- * Clone a data with type checking.
809
- *
810
- * Clones an instance following type `T`, with type checking. If the target `input`
811
- * value or its member variable contains a class instance that is having a `toJSON()`
812
- * method, its return value would be cloned.
813
- *
814
- * In such reason, when `input` value is not matched with the type `T`, it returns
815
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
816
- * data would be returned.
817
- *
818
- * @template T Type of the input value
819
- * @param input A value to be cloned
820
- * @return Cloned data when exact type, otherwise null
821
- *
822
- * @author Jeongho Nam - https://github.com/samchon
823
- */
824
- export declare function isClone<T>(input: T): Primitive<T> | null;
825
- /**
826
- * Clone a data with type checking.
827
- *
828
- * Clones an instance following type `T`, with type checking. If the target `input`
829
- * value or its member variable contains a class instance that is having a `toJSON()`
830
- * method, its return value would be cloned.
831
- *
832
- * In such reason, when `input` value is not matched with the type `T`, it returns
833
- * `null` value instead. Otherwise, there's no problem on the `input` value, cloned
834
- * data would be returned.
835
- *
836
- * @template T Type of the input value
837
- * @param input A value to be cloned
838
- * @return Cloned data when exact type, otherwise null
839
- *
840
- * @author Jeongho Nam - https://github.com/samchon
841
- */
842
- export declare function isClone<T>(input: unknown): Primitive<T> | null;
843
- /**
844
- * Clone a data with detailed type validation.
845
- *
846
- * Clones an instance following type `T`, with detailed type validation. If the target
847
- * `input` value or its member variable contains a class instance that is having a
848
- * `toJSON()` method, its return value would be cloned.
849
- *
850
- * In such reason, when `input` value is not matched with the type `T`, it returns
851
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
852
- * value, cloned data would be stored in `data` property of the output
853
- * {@link IValidation.Success} instance.
854
- *
855
- * @template T Type of the input value
856
- * @param input A value to be cloned
857
- * @returns Validation result with cloned value
858
- */
859
- export declare function validateClone<T>(input: T): IValidation<Primitive<T>>;
860
- /**
861
- * Clone a data with detailed type validation.
862
- *
863
- * Clones an instance following type `T`, with detailed type validation. If the target
864
- * `input` value or its member variable contains a class instance that is having a
865
- * `toJSON()` method, its return value would be cloned.
866
- *
867
- * In such reason, when `input` value is not matched with the type `T`, it returns
868
- * {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
869
- * value, cloned data would be stored in `data` property of the output
870
- * {@link IValidation.Success} instance.
871
- *
872
- * @template T Type of the input value
873
- * @param input A value to be cloned
874
- * @returns Validation result with cloned value
875
- */
876
- export declare function validateClone<T>(input: unknown): IValidation<Primitive<T>>;
877
- /**
878
- * Prune, erase superfluous properties.
879
- *
880
- * Remove every superfluous properties from the `input` object, even including nested
881
- * objects. Note that, as every superfluous properties would be deleted, you never can
882
- * read those superfluous properties after calling this `prune()` function.
883
- *
884
- * For reference, this `typia.prune()` function does not validate the input value type.
885
- * It just believes that the input value is following the type `T`. Therefore, if you
886
- * can't ensure the input value type, it would better to call one of below functions
887
- * instead.
888
- *
889
- * - {@link assertPrune}
890
- * - {@link isPrune}
891
- * - {@link validatePrune}
892
- *
893
- * @template T Type of the input value
894
- * @param input Target instance to prune
895
- *
896
- * @author Jeongho Nam - https://github.com/samchon
897
- */
898
- export declare function prune<T extends object>(input: T): void;
899
- /**
900
- * Prune, erase superfluous properties, with type assertion.
901
- *
902
- * `typia.assertPrune()` is a combination function of {@link assert} and {@link prune}.
903
- * Therefore, it removes every superfluous properties from the `input` object including
904
- * nested objects, with type assertion.
905
- *
906
- * In such reason, when `input` value is not matched with the type `T`, it throws an
907
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
908
- * every superfluous properties would be removed, including nested objects.
909
- *
910
- * @template T Type of the input value
911
- * @param input Target instance to assert and prune
912
- *
913
- * @author Jeongho Nam - https://github.com/samchon
914
- */
915
- export declare function assertPrune<T>(input: T): T;
916
- /**
917
- * Prune, erase superfluous properties, with type assertion.
918
- *
919
- * `typia.assertPrune()` is a combination function of {@link assert} and {@link prune}.
920
- * Therefore, it removes every superfluous properties from the `input` object including
921
- * nested objects, with type assertion.
922
- *
923
- * In such reason, when `input` value is not matched with the type `T`, it throws an
924
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
925
- * every superfluous properties would be removed, including nested objects.
926
- *
927
- * @template T Type of the input value
928
- * @param input Target instance to assert and prune
929
- *
930
- * @author Jeongho Nam - https://github.com/samchon
931
- */
932
- export declare function assertPrune<T>(input: unknown): T;
933
- /**
934
- * Prune, erase superfluous properties, with type checking.
935
- *
936
- * `typia.assertPrune()` is a combination function of {@link is} and {@link prune}.
937
- * Therefore, it removes every superfluous properties from the `input` object including
938
- * nested objects, with type checking.
939
- *
940
- * In such reason, when `input` value is not matched with the type `T`, it returns
941
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
942
- * `true` after removing every superfluous properties, including nested objects.
943
- *
944
- * @template T Type of the input value
945
- * @param input Target instance to check and prune
946
- * @returns Whether the parametric value is following the type `T` or not
947
- *
948
- * @author Jeongho Nam - https://github.com/samchon
949
- */
950
- export declare function isPrune<T>(input: T): input is T;
951
- /**
952
- * Prune, erase superfluous properties, with type checking.
953
- *
954
- * `typia.assertPrune()` is a combination function of {@link is} and {@link prune}.
955
- * Therefore, it removes every superfluous properties from the `input` object including
956
- * nested objects, with type checking.
957
- *
958
- * In such reason, when `input` value is not matched with the type `T`, it returns
959
- * `false` value. Otherwise, there's no problem on the `input` value, it returns
960
- * `true` after removing every superfluous properties, including nested objects.
961
- *
962
- * @template T Type of the input value
963
- * @param input Target instance to check and prune
964
- * @returns Whether the parametric value is following the type `T` or not
965
- *
966
- * @author Jeongho Nam - https://github.com/samchon
967
- */
968
- export declare function isPrune<T>(input: unknown): input is T;
969
- /**
970
- * Prune, erase superfluous properties, with type validation.
971
- *
972
- * `typia.validatePrune()` is a combination function of {@link validate} and {@link prune}.
973
- * Therefore, it removes every superfluous properties from the `input` object including
974
- * nested objects, with type validation.
975
- *
976
- * In such reason, when `input` value is not matched with the type `T`, it returns
977
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
978
- * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
979
- * removing every superfluous properties, including nested objects.
980
- *
981
- * @template T Type of the input value
982
- * @param input Target instance to validate and prune
983
- * @returns Validation result
984
- *
985
- * @author Jeongho Nam - https://github.com/samchon
986
- */
987
- export declare function validatePrune<T>(input: T): IValidation<T>;
988
- /**
989
- * Prune, erase superfluous properties, with type validation.
990
- *
991
- * `typia.validatePrune()` is a combination function of {@link validate} and {@link prune}.
992
- * Therefore, it removes every superfluous properties from the `input` object including
993
- * nested objects, with type validation.
994
- *
995
- * In such reason, when `input` value is not matched with the type `T`, it returns
996
- * {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
997
- * no problem on the `input` value, it returns {@link IValidation.ISucess} value after
998
- * removing every superfluous properties, including nested objects.
999
- *
1000
- * @template T Type of the input value
1001
- * @param input Target instance to validate and prune
1002
- * @returns Validation result
1003
- *
1004
- * @author Jeongho Nam - https://github.com/samchon
1005
- */
1006
- export declare function validatePrune<T>(input: unknown): IValidation<T>;
1007
- /**
1008
- * Creates a reusable {@link assert} function.
1009
- *
1010
- * @danger You have to specify the generic argument `T`
1011
- * @return Nothing until specifying the generic argument `T`
1012
- * @throws compile error
1013
- *
1014
- * @author Jeongho Nam - https://github.com/samchon
1015
- */
1016
- export declare function createAssert(): never;
1017
- /**
1018
- * Creates a reusable {@link assert} function.
1019
- *
1020
- * @template T Type of the input value
1021
- * @returns A reusable `assert` function
1022
- *
1023
- * @author Jeongho Nam - https://github.com/samchon
1024
- */
1025
- export declare function createAssert<T>(): (input: unknown) => T;
1026
- /**
1027
- * Creates a reusable {@link assertType} function.
1028
- *
1029
- * Duplicated function of {@link createAssert} for `typescript-is` users.
1030
- *
1031
- * @danger You have to specify the generic argument `T`
1032
- * @return Nothing until specifying the generic argument `T`
1033
- * @throws compile error
1034
- *
1035
- * @author Jeongho Nam - https://github.com/samchon
1036
- * @deprecated
1037
- */
1038
- export declare function createAssertType(): never;
1039
- /**
1040
- * Creates a reusable {@link assertType} function.
1041
- *
1042
- * Duplicated function of {@link createAssert} for `typescript-is` users.
1043
- *
1044
- * @template T Type of the input value
1045
- * @returns A reusable `assert` function
1046
- *
1047
- * @author Jeongho Nam - https://github.com/samchon
1048
- * @deprecated
1049
- */
1050
- export declare function createAssertType<T>(): (input: unknown) => T;
1051
- /**
1052
- * Creates a reusable {@link is} function.
1053
- *
1054
- * @danger You have to specify the generic argument `T`
1055
- * @return Nothing until specifying the generic argument `T`
1056
- * @throws compile error
1057
- *
1058
- * @author Jeongho Nam - https://github.com/samchon
1059
- */
1060
- export declare function createIs(): never;
1061
- /**
1062
- * Creates a reusable {@link is} function.
1063
- *
1064
- * @template T Type of the input value
1065
- * @returns A reusable `is` function
1066
- *
1067
- * @author Jeongho Nam - https://github.com/samchon
1068
- */
1069
- export declare function createIs<T>(): (input: unknown) => input is T;
1070
- /**
1071
- * Creates a reusable {@link validate} function.
1072
- *
1073
- * @danger You have to specify the generic argument `T`
1074
- * @return Nothing until specifying the generic argument `T`
1075
- * @throws compile error
1076
- *
1077
- * @author Jeongho Nam - https://github.com/samchon
1078
- */
1079
- export declare function createValidate(): never;
1080
- /**
1081
- * Creates a reusable {@link validate} function.
1082
- *
1083
- * @template T Type of the input value
1084
- * @returns A reusable `validate` function
1085
- *
1086
- * @author Jeongho Nam - https://github.com/samchon
1087
- */
1088
- export declare function createValidate<T>(): (input: unknown) => IValidation<T>;
1089
- /**
1090
- * Creates a reusable {@link assertEquals} function.
1091
- *
1092
- * @danger You have to specify the generic argument `T`
1093
- * @return Nothing until specifying the generic argument `T`
1094
- * @throws compile error
1095
- *
1096
- * @author Jeongho Nam - https://github.com/samchon
1097
- */
1098
- export declare function createAssertEquals(): never;
1099
- /**
1100
- * Creates a reusable {@link assertEquals} function.
1101
- *
1102
- * @template T Type of the input value
1103
- * @returns A reusable `assertEquals` function
1104
- *
1105
- * @author Jeongho Nam - https://github.com/samchon
1106
- */
1107
- export declare function createAssertEquals<T>(): (input: unknown) => T;
1108
- /**
1109
- * Creates a reusable {@link equals} function.
1110
- *
1111
- * @danger You have to specify the generic argument `T`
1112
- * @return Nothing until specifying the generic argument `T`
1113
- * @throws compile error
1114
- *
1115
- * @author Jeongho Nam - https://github.com/samchon
1116
- */
1117
- export declare function createEquals(): never;
1118
- /**
1119
- * Creates a reusable {@link equals} function.
1120
- *
1121
- * @template T Type of the input value
1122
- * @returns A reusable `equals` function
1123
- *
1124
- * @author Jeongho Nam - https://github.com/samchon
1125
- */
1126
- export declare function createEquals<T>(): (input: unknown) => input is T;
1127
- /**
1128
- * Creates a reusable {@link validateEquals} function.
1129
- *
1130
- * @danger You have to specify the generic argument `T`
1131
- * @return Nothing until specifying the generic argument `T`
1132
- * @throws compile error
1133
- *
1134
- * @author Jeongho Nam - https://github.com/samchon
1135
- */
1136
- export declare function createValidateEquals(): never;
1137
- /**
1138
- * Creates a reusable {@link validateEquals} function.
1139
- *
1140
- * @template T Type of the input value
1141
- * @returns A reusable `validateEquals` function
1142
- *
1143
- * @author Jeongho Nam - https://github.com/samchon
1144
- */
1145
- export declare function createValidateEquals<T>(): (input: unknown) => IValidation<T>;
1146
- /**
1147
- * Creates a reusable {@link isParse} function.
1148
- *
1149
- * @danger You have to specify the generic argument `T`
1150
- * @return Nothing until specifying the generic argument `T`
1151
- * @throws compile error
1152
- *
1153
- * @author Jeongho Nam - https://github.com/samchon
1154
- */
1155
- export declare function createIsParse(): never;
1156
- /**
1157
- * Creates a reusable {@link isParse} function.
1158
- *
1159
- * @template T Expected type of parsed value
1160
- * @returns A reusable `isParse` function
1161
- *
1162
- * @author Jeongho Nam - https://github.com/samchon
1163
- */
1164
- export declare function createIsParse<T>(): (input: string) => Primitive<T> | null;
1165
- /**
1166
- * Creates a reusable {@link assertParse} function.
1167
- *
1168
- * @danger You have to specify the generic argument `T`
1169
- * @return Nothing until specifying the generic argument `T`
1170
- * @throws compile error
1171
- *
1172
- * @author Jeongho Nam - https://github.com/samchon
1173
- */
1174
- export declare function createAssertParse(): never;
1175
- /**
1176
- * Creates a reusable {@link assertParse} function.
1177
- *
1178
- * @template T Expected type of parsed value
1179
- * @returns A reusable `assertParse` function
1180
- *
1181
- * @author Jeongho Nam - https://github.com/samchon
1182
- */
1183
- export declare function createAssertParse<T>(): (input: string) => Primitive<T>;
1184
- /**
1185
- * Creates a reusable {@link validateParse} function.
1186
- *
1187
- * @danger You have to specify the generic argument `T`
1188
- * @return Nothing until specifying the generic argument `T`
1189
- * @throws compile error
1190
- *
1191
- * @author Jeongho Nam - https://github.com/samchon
1192
- */
1193
- export declare function createValidateParse(): never;
1194
- /**
1195
- * Creates a reusable {@link validateParse} function.
1196
- *
1197
- * @template T Expected type of parsed value
1198
- * @returns A reusable `validateParse` function
1199
- *
1200
- * @author Jeongho Nam - https://github.com/samchon
1201
- */
1202
- export declare function createValidateParse<T>(): (input: string) => IValidation<Primitive<T>>;
1203
- /**
1204
- * Creates a reusable {@link stringify} function.
1205
- *
1206
- * @danger You have to specify the generic argument `T`
1207
- * @return Nothing until specifying the generic argument `T`
1208
- * @throws compile error
1209
- *
1210
- * @author Jeongho Nam - https://github.com/samchon
1211
- */
1212
- export declare function createStringify(): never;
1213
- /**
1214
- * Creates a reusable {@link stringify} function.
1215
- *
1216
- * @template T Type of the input value
1217
- * @returns A reusable `stringify` function
1218
- *
1219
- * @author Jeongho Nam - https://github.com/samchon
1220
- */
1221
- export declare function createStringify<T>(): (input: T) => string;
1222
- /**
1223
- * Creates a reusable {@link assertStringify} function.
1224
- *
1225
- * @danger You have to specify the generic argument `T`
1226
- * @return Nothing until specifying the generic argument `T`
1227
- * @throws compile error
1228
- *
1229
- * @author Jeongho Nam - https://github.com/samchon
1230
- */
1231
- export declare function createAssertStringify(): never;
1232
- /**
1233
- * Creates a reusable {@link assertStringify} function.
1234
- *
1235
- * @template T Type of the input value
1236
- * @returns A reusable `assertStringify` function
1237
- *
1238
- * @author Jeongho Nam - https://github.com/samchon
1239
- */
1240
- export declare function createAssertStringify<T>(): (input: unknown) => string;
1241
- /**
1242
- * Creates a reusable {@link isStringify} function.
1243
- *
1244
- * @danger You have to specify the generic argument `T`
1245
- * @return Nothing until specifying the generic argument `T`
1246
- * @throws compile error
1247
- *
1248
- * @author Jeongho Nam - https://github.com/samchon
1249
- */
1250
- export declare function createIsStringify(): never;
1251
- /**
1252
- * Creates a reusable {@link isStringify} function.
1253
- *
1254
- * @template T Type of the input value
1255
- * @returns A reusable `isStringify` function
1256
- *
1257
- * @author Jeongho Nam - https://github.com/samchon
1258
- */
1259
- export declare function createIsStringify<T>(): (input: unknown) => string | null;
1260
- /**
1261
- * Creates a reusable {@link validateStringify} function.
1262
- *
1263
- * @danger You have to specify the generic argument `T`
1264
- * @return Nothing until specifying the generic argument `T`
1265
- * @throws compile error
1266
- *
1267
- * @author Jeongho Nam - https://github.com/samchon
1268
- */
1269
- export declare function createValidateStringify(): never;
1270
- /**
1271
- * Creates a reusable {@link validateStringify} function.
1272
- *
1273
- * @template T Type of the input value
1274
- * @returns A reusable `validateStringify` function
1275
-
1276
- * @author Jeongho Nam - https://github.com/samchon
1277
- */
1278
- export declare function createValidateStringify<T>(): (input: unknown) => IValidation<string>;
1279
- /**
1280
- * Creates a reusable {@link random} function.
1281
- *
1282
- * @danger You have to specify the generic argument `T`
1283
- * @param generator Random data generator
1284
- * @return Nothing until specifying the generic argument `T`
1285
- * @throws compile error
1286
- *
1287
- * @author Jeongho Nam - https://github.com/samchon
1288
- */
1289
- export declare function createRandom(generator?: Partial<IRandomGenerator>): never;
1290
- /**
1291
- * Creates a resuable {@link random} function.
1292
- *
1293
- * @template T Type of the input value
1294
- * @param generator Random data generator
1295
- * @returns A reusable `random` function
554
+ * @param generator Random data generator
555
+ * @returns A reusable `random` function
1296
556
  *
1297
557
  * @author Jeongho Nam - https://github.com/samchon
1298
558
  */
1299
559
  export declare function createRandom<T>(generator?: Partial<IRandomGenerator>): () => Primitive<T>;
1300
- /**
1301
- * Creates a reusable {@link clone} function.
1302
- *
1303
- * @danger You have to specify the generic argument `T`
1304
- * @return Nothing until specifying the generic argument `T`
1305
- * @throws compile error
1306
- *
1307
- * @author Jeongho Nam - https://github.com/samchon
1308
- */
1309
- export declare function createClone(): never;
1310
- /**
1311
- * Creates a resuable {@link clone} function.
1312
- *
1313
- * @template T Type of the input value
1314
- * @returns A reusable `clone` function
1315
- *
1316
- * @author Jeongho Nam - https://github.com/samchon
1317
- */
1318
- export declare function createClone<T>(): (input: T) => Primitive<T>;
1319
- /**
1320
- * Creates a reusable {@link assertClone} function.
1321
- *
1322
- * @danger You have to specify the generic argument `T`
1323
- * @return Nothing until specifying the generic argument `T`
1324
- * @throws compile error
1325
- *
1326
- * @author Jeongho Nam - https://github.com/samchon
1327
- */
1328
- export declare function createAssertClone(): never;
1329
- /**
1330
- * Creates a resuable {@link assertClone} function.
1331
- *
1332
- * @template T Type of the input value
1333
- * @returns A reusable `clone` function
1334
- *
1335
- * @author Jeongho Nam - https://github.com/samchon
1336
- */
1337
- export declare function createAssertClone<T>(): (input: unknown) => Primitive<T>;
1338
- /**
1339
- * Creates a reusable {@link isClone} function.
1340
- *
1341
- * @danger You have to specify the generic argument `T`
1342
- * @return Nothing until specifying the generic argument `T`
1343
- * @throws compile error
1344
- *
1345
- * @author Jeongho Nam - https://github.com/samchon
1346
- */
1347
- export declare function createIsClone(): never;
1348
- /**
1349
- * Creates a resuable {@link isClone} function.
1350
- *
1351
- * @template T Type of the input value
1352
- * @returns A reusable `clone` function
1353
- *
1354
- * @author Jeongho Nam - https://github.com/samchon
1355
- */
1356
- export declare function createIsClone<T>(): (input: unknown) => Primitive<T> | null;
1357
- /**
1358
- * Creates a reusable {@link validateClone} function.
1359
- *
1360
- * @danger You have to specify the generic argument `T`
1361
- * @return Nothing until specifying the generic argument `T`
1362
- * @throws compile error
1363
- *
1364
- * @author Jeongho Nam - https://github.com/samchon
1365
- */
1366
- export declare function createValidateClone(): never;
1367
- /**
1368
- * Creates a resuable {@link validateClone} function.
1369
- *
1370
- * @template T Type of the input value
1371
- * @returns A reusable `clone` function
1372
- *
1373
- * @author Jeongho Nam - https://github.com/samchon
1374
- */
1375
- export declare function createValidateClone<T>(): (input: unknown) => IValidation<Primitive<T>>;
1376
- /**
1377
- * Creates a reusable {@link prune} function.
1378
- *
1379
- * @danger You have to specify the generic argument `T`
1380
- * @return Nothing until specifying the generic argument `T`
1381
- * @throws compile error
1382
- *
1383
- * @author Jeongho Nam - https://github.com/samchon
1384
- */
1385
- export declare function createPrune(): never;
1386
- /**
1387
- * Creates a resuable {@link prune} function.
1388
- *
1389
- * @template T Type of the input value
1390
- * @returns A reusable `prune` function
1391
- *
1392
- * @author Jeongho Nam - https://github.com/samchon
1393
- */
1394
- export declare function createPrune<T extends object>(): (input: T) => void;
1395
- /**
1396
- * Creates a reusable {@link assertPrune} function.
1397
- *
1398
- * @danger You have to specify the generic argument `T`
1399
- * @return Nothing until specifying the generic argument `T`
1400
- * @throws compile error
1401
- *
1402
- * @author Jeongho Nam - https://github.com/samchon
1403
- */
1404
- export declare function createAssertPrune(): never;
1405
- /**
1406
- * Creates a resuable {@link assertPrune} function.
1407
- *
1408
- * @template T Type of the input value
1409
- * @returns A reusable `isPrune` function
1410
- *
1411
- * @author Jeongho Nam - https://github.com/samchon
1412
- */
1413
- export declare function createAssertPrune<T extends object>(): (input: T) => T;
1414
- /**
1415
- * Creates a reusable {@link isPrune} function.
1416
- *
1417
- * @danger You have to specify the generic argument `T`
1418
- * @return Nothing until specifying the generic argument `T`
1419
- * @throws compile error
1420
- *
1421
- * @author Jeongho Nam - https://github.com/samchon
1422
- */
1423
- export declare function createIsPrune(): never;
1424
- /**
1425
- * Creates a resuable {@link isPrune} function.
1426
- *
1427
- * @template T Type of the input value
1428
- * @returns A reusable `isPrune` function
1429
- *
1430
- * @author Jeongho Nam - https://github.com/samchon
1431
- */
1432
- export declare function createIsPrune<T extends object>(): (input: T) => input is T;
1433
- /**
1434
- * Creates a reusable {@link validatePrune} function.
1435
- *
1436
- * @danger You have to specify the generic argument `T`
1437
- * @return Nothing until specifying the generic argument `T`
1438
- * @throws compile error
1439
- *
1440
- * @author Jeongho Nam - https://github.com/samchon
1441
- */
1442
- export declare function createValidatePrune(): never;
1443
- /**
1444
- * Creates a resuable {@link validatePrune} function.
1445
- *
1446
- * @template T Type of the input value
1447
- * @returns A reusable `validatePrune` function
1448
- *
1449
- * @author Jeongho Nam - https://github.com/samchon
1450
- */
1451
- export declare function createValidatePrune<T extends object>(): (input: T) => IValidation<T>;