typia 7.0.0-dev.20241003 → 7.0.0-dev.20241007

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 (955) hide show
  1. package/lib/IRandomGenerator.d.ts +17 -21
  2. package/lib/factories/ExpressionFactory.js +2 -2
  3. package/lib/factories/ExpressionFactory.js.map +1 -1
  4. package/lib/factories/IdentifierFactory.d.ts +1 -1
  5. package/lib/factories/LiteralFactory.d.ts +1 -1
  6. package/lib/factories/LiteralFactory.js +20 -17
  7. package/lib/factories/LiteralFactory.js.map +1 -1
  8. package/lib/factories/MetadataCommentTagFactory.js +28 -6
  9. package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
  10. package/lib/functional.d.ts +18 -54
  11. package/lib/functional.js +18 -75
  12. package/lib/functional.js.map +1 -1
  13. package/lib/http.d.ts +39 -91
  14. package/lib/http.js +26 -121
  15. package/lib/http.js.map +1 -1
  16. package/lib/index.mjs +188 -2688
  17. package/lib/index.mjs.map +1 -1
  18. package/lib/internal/$ProtobufReader.js.map +1 -0
  19. package/lib/{functional → internal}/$ProtobufSizer.d.ts +2 -2
  20. package/lib/{functional → internal}/$ProtobufSizer.js +9 -2
  21. package/lib/internal/$ProtobufSizer.js.map +1 -0
  22. package/lib/{functional → internal}/$ProtobufWriter.d.ts +2 -2
  23. package/lib/internal/$ProtobufWriter.js.map +1 -0
  24. package/lib/internal/$accessExpressionAsString.d.ts +1 -0
  25. package/lib/{functional/$join.js → internal/$accessExpressionAsString.js} +4 -4
  26. package/lib/internal/$accessExpressionAsString.js.map +1 -0
  27. package/lib/internal/$assertGuard.d.ts +2 -0
  28. package/lib/internal/$assertGuard.js +15 -0
  29. package/lib/internal/$assertGuard.js.map +1 -0
  30. package/lib/internal/$functionalTypeGuardErrorFactory.d.ts +2 -0
  31. package/lib/internal/$functionalTypeGuardErrorFactory.js +9 -0
  32. package/lib/internal/$functionalTypeGuardErrorFactory.js.map +1 -0
  33. package/lib/internal/$httpFormDataReadArray.d.ts +1 -0
  34. package/lib/internal/$httpFormDataReadArray.js +6 -0
  35. package/lib/internal/$httpFormDataReadArray.js.map +1 -0
  36. package/lib/internal/$httpFormDataReadBigint.d.ts +1 -0
  37. package/lib/internal/$httpFormDataReadBigint.js +22 -0
  38. package/lib/internal/$httpFormDataReadBigint.js.map +1 -0
  39. package/lib/internal/$httpFormDataReadBlob.d.ts +1 -0
  40. package/lib/internal/$httpFormDataReadBlob.js +14 -0
  41. package/lib/internal/$httpFormDataReadBlob.js.map +1 -0
  42. package/lib/internal/$httpFormDataReadBoolean.d.ts +1 -0
  43. package/lib/internal/$httpFormDataReadBoolean.js +20 -0
  44. package/lib/internal/$httpFormDataReadBoolean.js.map +1 -0
  45. package/lib/internal/$httpFormDataReadFile.d.ts +1 -0
  46. package/lib/internal/$httpFormDataReadFile.js +14 -0
  47. package/lib/internal/$httpFormDataReadFile.js.map +1 -0
  48. package/lib/internal/$httpFormDataReadNumber.d.ts +1 -0
  49. package/lib/internal/$httpFormDataReadNumber.js +18 -0
  50. package/lib/internal/$httpFormDataReadNumber.js.map +1 -0
  51. package/lib/internal/$httpFormDataReadString.d.ts +1 -0
  52. package/lib/internal/$httpFormDataReadString.js +14 -0
  53. package/lib/internal/$httpFormDataReadString.js.map +1 -0
  54. package/lib/internal/$httpHeaderReadBigint.d.ts +1 -0
  55. package/lib/internal/$httpHeaderReadBigint.js +16 -0
  56. package/lib/internal/$httpHeaderReadBigint.js.map +1 -0
  57. package/lib/internal/$httpHeaderReadBoolean.d.ts +1 -0
  58. package/lib/internal/$httpHeaderReadBoolean.js +14 -0
  59. package/lib/internal/$httpHeaderReadBoolean.js.map +1 -0
  60. package/lib/internal/$httpHeaderReadNumber.d.ts +1 -0
  61. package/lib/internal/$httpHeaderReadNumber.js +12 -0
  62. package/lib/internal/$httpHeaderReadNumber.js.map +1 -0
  63. package/lib/internal/$httpParameterBigint.d.ts +1 -0
  64. package/lib/internal/$httpParameterBigint.js +16 -0
  65. package/lib/internal/$httpParameterBigint.js.map +1 -0
  66. package/lib/internal/$httpParameterBoolean.d.ts +1 -0
  67. package/lib/internal/$httpParameterBoolean.js +14 -0
  68. package/lib/internal/$httpParameterBoolean.js.map +1 -0
  69. package/lib/internal/$httpParameterNumber.d.ts +1 -0
  70. package/lib/internal/$httpParameterNumber.js +12 -0
  71. package/lib/internal/$httpParameterNumber.js.map +1 -0
  72. package/lib/internal/$httpParameterString.d.ts +1 -0
  73. package/lib/internal/$httpParameterString.js +8 -0
  74. package/lib/internal/$httpParameterString.js.map +1 -0
  75. package/lib/internal/$httpQueryParseURLSearchParams.d.ts +1 -0
  76. package/lib/internal/$httpQueryParseURLSearchParams.js +13 -0
  77. package/lib/internal/$httpQueryParseURLSearchParams.js.map +1 -0
  78. package/lib/internal/$httpQueryReadArray.d.ts +1 -0
  79. package/lib/internal/$httpQueryReadArray.js +6 -0
  80. package/lib/internal/$httpQueryReadArray.js.map +1 -0
  81. package/lib/internal/$httpQueryReadBigint.d.ts +1 -0
  82. package/lib/internal/$httpQueryReadBigint.js +16 -0
  83. package/lib/internal/$httpQueryReadBigint.js.map +1 -0
  84. package/lib/internal/$httpQueryReadBoolean.d.ts +1 -0
  85. package/lib/internal/$httpQueryReadBoolean.js +18 -0
  86. package/lib/internal/$httpQueryReadBoolean.js.map +1 -0
  87. package/lib/internal/$httpQueryReadNumber.d.ts +1 -0
  88. package/lib/internal/$httpQueryReadNumber.js +12 -0
  89. package/lib/internal/$httpQueryReadNumber.js.map +1 -0
  90. package/lib/internal/$httpQueryReadString.d.ts +1 -0
  91. package/lib/internal/$httpQueryReadString.js +8 -0
  92. package/lib/internal/$httpQueryReadString.js.map +1 -0
  93. package/lib/internal/$isBetween.d.ts +1 -0
  94. package/lib/internal/$isBetween.js +8 -0
  95. package/lib/internal/$isBetween.js.map +1 -0
  96. package/lib/internal/$isBigintString.d.ts +1 -0
  97. package/lib/{functional/$stoll.js → internal/$isBigintString.js} +4 -4
  98. package/lib/internal/$isBigintString.js.map +1 -0
  99. package/lib/internal/$jsonStringifyNumber.d.ts +1 -0
  100. package/lib/{functional/$number.js → internal/$jsonStringifyNumber.js} +4 -4
  101. package/lib/internal/$jsonStringifyNumber.js.map +1 -0
  102. package/lib/internal/$jsonStringifyRest.d.ts +1 -0
  103. package/lib/internal/$jsonStringifyRest.js +8 -0
  104. package/lib/internal/$jsonStringifyRest.js.map +1 -0
  105. package/lib/{functional/$string.js → internal/$jsonStringifyString.js} +4 -4
  106. package/lib/internal/$jsonStringifyString.js.map +1 -0
  107. package/lib/internal/$jsonStringifyTail.d.ts +1 -0
  108. package/lib/internal/$jsonStringifyTail.js +8 -0
  109. package/lib/internal/$jsonStringifyTail.js.map +1 -0
  110. package/lib/internal/$llmApplicationFinalize.d.ts +2 -0
  111. package/lib/internal/$llmApplicationFinalize.js +42 -0
  112. package/lib/internal/$llmApplicationFinalize.js.map +1 -0
  113. package/lib/internal/$miscCloneAny.d.ts +2 -0
  114. package/lib/{functional/$clone.js → internal/$miscCloneAny.js} +4 -4
  115. package/lib/internal/$miscCloneAny.js.map +1 -0
  116. package/lib/internal/$notationAny.d.ts +1 -0
  117. package/lib/{functional/$convention.js → internal/$notationAny.js} +4 -4
  118. package/lib/{functional/$convention.js.map → internal/$notationAny.js.map} +1 -1
  119. package/lib/internal/$notationCamel.d.ts +1 -0
  120. package/lib/internal/$notationCamel.js +18 -0
  121. package/lib/internal/$notationCamel.js.map +1 -0
  122. package/lib/internal/$notationPascal.d.ts +1 -0
  123. package/lib/internal/$notationPascal.js +12 -0
  124. package/lib/internal/$notationPascal.js.map +1 -0
  125. package/lib/internal/$notationSnake.d.ts +1 -0
  126. package/lib/internal/$notationSnake.js +51 -0
  127. package/lib/internal/$notationSnake.js.map +1 -0
  128. package/lib/internal/$randomArray.d.ts +4 -0
  129. package/lib/internal/$randomArray.js +20 -0
  130. package/lib/internal/$randomArray.js.map +1 -0
  131. package/lib/internal/$randomBigint.d.ts +2 -0
  132. package/lib/internal/$randomBigint.js +9 -0
  133. package/lib/internal/$randomBigint.js.map +1 -0
  134. package/lib/internal/$randomBoolean.d.ts +1 -0
  135. package/lib/internal/$randomBoolean.js +6 -0
  136. package/lib/internal/$randomBoolean.js.map +1 -0
  137. package/lib/internal/$randomFormatByte.d.ts +1 -0
  138. package/lib/internal/$randomFormatByte.js +7 -0
  139. package/lib/internal/$randomFormatByte.js.map +1 -0
  140. package/lib/internal/$randomFormatDate.d.ts +4 -0
  141. package/lib/internal/$randomFormatDate.js +18 -0
  142. package/lib/internal/$randomFormatDate.js.map +1 -0
  143. package/lib/internal/$randomFormatDatetime.d.ts +4 -0
  144. package/lib/internal/$randomFormatDatetime.js +16 -0
  145. package/lib/internal/$randomFormatDatetime.js.map +1 -0
  146. package/lib/internal/$randomFormatDuration.d.ts +1 -0
  147. package/lib/internal/$randomFormatDuration.js +56 -0
  148. package/lib/internal/$randomFormatDuration.js.map +1 -0
  149. package/lib/internal/$randomFormatEmail.d.ts +1 -0
  150. package/lib/internal/$randomFormatEmail.js +16 -0
  151. package/lib/internal/$randomFormatEmail.js.map +1 -0
  152. package/lib/internal/$randomFormatHostname.d.ts +1 -0
  153. package/lib/internal/$randomFormatHostname.js +10 -0
  154. package/lib/internal/$randomFormatHostname.js.map +1 -0
  155. package/lib/internal/$randomFormatIdnEmail.d.ts +1 -0
  156. package/lib/internal/$randomFormatIdnEmail.js +7 -0
  157. package/lib/internal/$randomFormatIdnEmail.js.map +1 -0
  158. package/lib/internal/$randomFormatIdnHostname.d.ts +1 -0
  159. package/lib/internal/$randomFormatIdnHostname.js +7 -0
  160. package/lib/internal/$randomFormatIdnHostname.js.map +1 -0
  161. package/lib/internal/$randomFormatIpv4.d.ts +1 -0
  162. package/lib/internal/$randomFormatIpv4.js +16 -0
  163. package/lib/internal/$randomFormatIpv4.js.map +1 -0
  164. package/lib/internal/$randomFormatIpv6.d.ts +1 -0
  165. package/lib/internal/$randomFormatIpv6.js +16 -0
  166. package/lib/internal/$randomFormatIpv6.js.map +1 -0
  167. package/lib/internal/$randomFormatIri.d.ts +1 -0
  168. package/lib/internal/$randomFormatIri.js +7 -0
  169. package/lib/internal/$randomFormatIri.js.map +1 -0
  170. package/lib/internal/$randomFormatIriReference.d.ts +1 -0
  171. package/lib/internal/$randomFormatIriReference.js +7 -0
  172. package/lib/internal/$randomFormatIriReference.js.map +1 -0
  173. package/lib/internal/$randomFormatJsonPointer.d.ts +1 -0
  174. package/lib/internal/$randomFormatJsonPointer.js +12 -0
  175. package/lib/internal/$randomFormatJsonPointer.js.map +1 -0
  176. package/lib/internal/$randomFormatPassword.d.ts +1 -0
  177. package/lib/internal/$randomFormatPassword.js +13 -0
  178. package/lib/internal/$randomFormatPassword.js.map +1 -0
  179. package/lib/internal/$randomFormatRegex.d.ts +1 -0
  180. package/lib/internal/$randomFormatRegex.js +7 -0
  181. package/lib/internal/$randomFormatRegex.js.map +1 -0
  182. package/lib/internal/$randomFormatRelativeJsonPointer.d.ts +1 -0
  183. package/lib/internal/$randomFormatRelativeJsonPointer.js +13 -0
  184. package/lib/internal/$randomFormatRelativeJsonPointer.js.map +1 -0
  185. package/lib/internal/$randomFormatTime.d.ts +1 -0
  186. package/lib/internal/$randomFormatTime.js +16 -0
  187. package/lib/internal/$randomFormatTime.js.map +1 -0
  188. package/lib/internal/$randomFormatUri.d.ts +1 -0
  189. package/lib/internal/$randomFormatUri.js +7 -0
  190. package/lib/internal/$randomFormatUri.js.map +1 -0
  191. package/lib/internal/$randomFormatUriReference.d.ts +1 -0
  192. package/lib/internal/$randomFormatUriReference.js +7 -0
  193. package/lib/internal/$randomFormatUriReference.js.map +1 -0
  194. package/lib/internal/$randomFormatUriTemplate.d.ts +1 -0
  195. package/lib/internal/$randomFormatUriTemplate.js +7 -0
  196. package/lib/internal/$randomFormatUriTemplate.js.map +1 -0
  197. package/lib/internal/$randomFormatUrl.d.ts +1 -0
  198. package/lib/internal/$randomFormatUrl.js +16 -0
  199. package/lib/internal/$randomFormatUrl.js.map +1 -0
  200. package/lib/internal/$randomFormatUuid.d.ts +1 -0
  201. package/lib/internal/$randomFormatUuid.js +12 -0
  202. package/lib/internal/$randomFormatUuid.js.map +1 -0
  203. package/lib/internal/$randomInteger.d.ts +2 -0
  204. package/lib/internal/$randomInteger.js +42 -0
  205. package/lib/internal/$randomInteger.js.map +1 -0
  206. package/lib/internal/$randomNumber.d.ts +2 -0
  207. package/lib/internal/$randomNumber.js +59 -0
  208. package/lib/internal/$randomNumber.js.map +1 -0
  209. package/lib/internal/$randomPattern.d.ts +1 -0
  210. package/lib/internal/$randomPattern.js +18 -0
  211. package/lib/internal/$randomPattern.js.map +1 -0
  212. package/lib/internal/$randomPick.d.ts +1 -0
  213. package/lib/internal/$randomPick.js +14 -0
  214. package/lib/internal/$randomPick.js.map +1 -0
  215. package/lib/internal/$randomString.d.ts +2 -0
  216. package/lib/internal/$randomString.js +26 -0
  217. package/lib/internal/$randomString.js.map +1 -0
  218. package/lib/internal/$throwTypeGuardError.d.ts +2 -0
  219. package/lib/internal/$throwTypeGuardError.js +9 -0
  220. package/lib/internal/$throwTypeGuardError.js.map +1 -0
  221. package/lib/internal/$validateReport.d.ts +2 -0
  222. package/lib/{functional/$report.js → internal/$validateReport.js} +4 -4
  223. package/lib/internal/$validateReport.js.map +1 -0
  224. package/lib/{functional/IProtobufWriter.d.ts → internal/private/$__IProtobufWriter.d.ts} +1 -1
  225. package/lib/{functional/IProtobufWriter.js → internal/private/$__IProtobufWriter.js} +1 -1
  226. package/lib/internal/private/$__IProtobufWriter.js.map +1 -0
  227. package/lib/internal/private/$__notationCapitalize.d.ts +1 -0
  228. package/lib/internal/private/$__notationCapitalize.js +8 -0
  229. package/lib/internal/private/$__notationCapitalize.js.map +1 -0
  230. package/lib/internal/private/$__notationUnsnake.d.ts +4 -0
  231. package/lib/internal/private/$__notationUnsnake.js +28 -0
  232. package/lib/internal/private/$__notationUnsnake.js.map +1 -0
  233. package/lib/json.d.ts +27 -55
  234. package/lib/json.js +14 -62
  235. package/lib/json.js.map +1 -1
  236. package/lib/llm.d.ts +2 -4
  237. package/lib/llm.js +1 -28
  238. package/lib/llm.js.map +1 -1
  239. package/lib/misc.d.ts +30 -62
  240. package/lib/misc.js +16 -80
  241. package/lib/misc.js.map +1 -1
  242. package/lib/module.d.ts +36 -72
  243. package/lib/module.js +19 -44
  244. package/lib/module.js.map +1 -1
  245. package/lib/notations.d.ts +45 -93
  246. package/lib/notations.js +24 -114
  247. package/lib/notations.js.map +1 -1
  248. package/lib/programmers/AssertProgrammer.d.ts +2 -2
  249. package/lib/programmers/AssertProgrammer.js +24 -17
  250. package/lib/programmers/AssertProgrammer.js.map +1 -1
  251. package/lib/programmers/CheckerProgrammer.d.ts +9 -9
  252. package/lib/programmers/CheckerProgrammer.js +46 -46
  253. package/lib/programmers/CheckerProgrammer.js.map +1 -1
  254. package/lib/programmers/FeatureProgrammer.d.ts +8 -8
  255. package/lib/programmers/FeatureProgrammer.js +10 -10
  256. package/lib/programmers/FeatureProgrammer.js.map +1 -1
  257. package/lib/programmers/ImportProgrammer.d.ts +10 -0
  258. package/lib/programmers/ImportProgrammer.js +119 -0
  259. package/lib/programmers/ImportProgrammer.js.map +1 -0
  260. package/lib/programmers/IsProgrammer.d.ts +6 -6
  261. package/lib/programmers/IsProgrammer.js +11 -13
  262. package/lib/programmers/IsProgrammer.js.map +1 -1
  263. package/lib/programmers/RandomProgrammer.d.ts +2 -2
  264. package/lib/programmers/RandomProgrammer.js +298 -293
  265. package/lib/programmers/RandomProgrammer.js.map +1 -1
  266. package/lib/programmers/ValidateProgrammer.d.ts +2 -2
  267. package/lib/programmers/ValidateProgrammer.js +9 -10
  268. package/lib/programmers/ValidateProgrammer.js.map +1 -1
  269. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.d.ts +1 -1
  270. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +2 -3
  271. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -1
  272. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js +1 -1
  273. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js.map +1 -1
  274. package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js +1 -1
  275. package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js.map +1 -1
  276. package/lib/programmers/helpers/{FunctionImporter.d.ts → FunctionProgrammer.d.ts} +2 -6
  277. package/lib/programmers/helpers/{FunctionImporter.js → FunctionProgrammer.js} +14 -33
  278. package/lib/programmers/helpers/FunctionProgrammer.js.map +1 -0
  279. package/lib/programmers/helpers/RandomJoiner.d.ts +6 -11
  280. package/lib/programmers/helpers/RandomJoiner.js +68 -41
  281. package/lib/programmers/helpers/RandomJoiner.js.map +1 -1
  282. package/lib/programmers/helpers/StringifyJoinder.d.ts +2 -2
  283. package/lib/programmers/helpers/StringifyJoinder.js +1 -1
  284. package/lib/programmers/helpers/StringifyJoinder.js.map +1 -1
  285. package/lib/programmers/helpers/disable_function_programmer_declare.d.ts +2 -0
  286. package/lib/programmers/helpers/disable_function_programmer_declare.js +16 -0
  287. package/lib/programmers/helpers/disable_function_programmer_declare.js.map +1 -0
  288. package/lib/programmers/http/HttpAssertFormDataProgrammer.d.ts +2 -2
  289. package/lib/programmers/http/HttpAssertFormDataProgrammer.js +4 -4
  290. package/lib/programmers/http/HttpAssertFormDataProgrammer.js.map +1 -1
  291. package/lib/programmers/http/HttpAssertHeadersProgrammer.d.ts +2 -2
  292. package/lib/programmers/http/HttpAssertHeadersProgrammer.js +4 -4
  293. package/lib/programmers/http/HttpAssertHeadersProgrammer.js.map +1 -1
  294. package/lib/programmers/http/HttpAssertQueryProgrammer.d.ts +2 -2
  295. package/lib/programmers/http/HttpAssertQueryProgrammer.js +4 -4
  296. package/lib/programmers/http/HttpAssertQueryProgrammer.js.map +1 -1
  297. package/lib/programmers/http/HttpFormDataProgrammer.d.ts +2 -2
  298. package/lib/programmers/http/HttpFormDataProgrammer.js +13 -12
  299. package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -1
  300. package/lib/programmers/http/HttpHeadersProgrammer.d.ts +3 -3
  301. package/lib/programmers/http/HttpHeadersProgrammer.js +37 -31
  302. package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
  303. package/lib/programmers/http/HttpIsFormDataProgrammer.d.ts +2 -2
  304. package/lib/programmers/http/HttpIsFormDataProgrammer.js +4 -4
  305. package/lib/programmers/http/HttpIsFormDataProgrammer.js.map +1 -1
  306. package/lib/programmers/http/HttpIsHeadersProgrammer.d.ts +2 -2
  307. package/lib/programmers/http/HttpIsHeadersProgrammer.js +4 -4
  308. package/lib/programmers/http/HttpIsHeadersProgrammer.js.map +1 -1
  309. package/lib/programmers/http/HttpIsQueryProgrammer.d.ts +2 -2
  310. package/lib/programmers/http/HttpIsQueryProgrammer.js +4 -4
  311. package/lib/programmers/http/HttpIsQueryProgrammer.js.map +1 -1
  312. package/lib/programmers/http/HttpParameterProgrammer.js +3 -4
  313. package/lib/programmers/http/HttpParameterProgrammer.js.map +1 -1
  314. package/lib/programmers/http/HttpQueryProgrammer.d.ts +2 -2
  315. package/lib/programmers/http/HttpQueryProgrammer.js +14 -13
  316. package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
  317. package/lib/programmers/http/HttpValidateFormDataProgrammer.d.ts +2 -2
  318. package/lib/programmers/http/HttpValidateFormDataProgrammer.js +4 -4
  319. package/lib/programmers/http/HttpValidateFormDataProgrammer.js.map +1 -1
  320. package/lib/programmers/http/HttpValidateHeadersProgrammer.d.ts +2 -2
  321. package/lib/programmers/http/HttpValidateHeadersProgrammer.js +4 -4
  322. package/lib/programmers/http/HttpValidateHeadersProgrammer.js.map +1 -1
  323. package/lib/programmers/http/HttpValidateQueryProgrammer.d.ts +2 -2
  324. package/lib/programmers/http/HttpValidateQueryProgrammer.js +4 -4
  325. package/lib/programmers/http/HttpValidateQueryProgrammer.js.map +1 -1
  326. package/lib/programmers/internal/check_dynamic_key.js +2 -2
  327. package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
  328. package/lib/programmers/internal/check_dynamic_properties.js +1 -2
  329. package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
  330. package/lib/programmers/internal/check_object.js +0 -1
  331. package/lib/programmers/internal/check_object.js.map +1 -1
  332. package/lib/programmers/internal/feature_object_entries.js +3 -2
  333. package/lib/programmers/internal/feature_object_entries.js.map +1 -1
  334. package/lib/programmers/json/JsonAssertParseProgrammer.d.ts +2 -2
  335. package/lib/programmers/json/JsonAssertParseProgrammer.js +4 -4
  336. package/lib/programmers/json/JsonAssertParseProgrammer.js.map +1 -1
  337. package/lib/programmers/json/JsonAssertStringifyProgrammer.d.ts +2 -2
  338. package/lib/programmers/json/JsonAssertStringifyProgrammer.js +4 -4
  339. package/lib/programmers/json/JsonAssertStringifyProgrammer.js.map +1 -1
  340. package/lib/programmers/json/JsonIsParseProgrammer.d.ts +2 -2
  341. package/lib/programmers/json/JsonIsParseProgrammer.js +4 -4
  342. package/lib/programmers/json/JsonIsParseProgrammer.js.map +1 -1
  343. package/lib/programmers/json/JsonIsStringifyProgrammer.d.ts +2 -2
  344. package/lib/programmers/json/JsonIsStringifyProgrammer.js +4 -4
  345. package/lib/programmers/json/JsonIsStringifyProgrammer.js.map +1 -1
  346. package/lib/programmers/json/JsonStringifyProgrammer.d.ts +2 -2
  347. package/lib/programmers/json/JsonStringifyProgrammer.js +38 -33
  348. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
  349. package/lib/programmers/json/JsonValidateParseProgrammer.d.ts +2 -2
  350. package/lib/programmers/json/JsonValidateParseProgrammer.js +4 -4
  351. package/lib/programmers/json/JsonValidateParseProgrammer.js.map +1 -1
  352. package/lib/programmers/json/JsonValidateStringifyProgrammer.d.ts +2 -2
  353. package/lib/programmers/json/JsonValidateStringifyProgrammer.js +4 -4
  354. package/lib/programmers/json/JsonValidateStringifyProgrammer.js.map +1 -1
  355. package/lib/programmers/llm/LlmApplicationProgrammer.d.ts +1 -1
  356. package/lib/programmers/llm/LlmApplicationProgrammer.js +11 -11
  357. package/lib/programmers/llm/LlmApplicationProgrammer.js.map +1 -1
  358. package/lib/programmers/llm/LlmSchemaProgrammer.d.ts +1 -1
  359. package/lib/programmers/llm/LlmSchemaProgrammer.js +12 -12
  360. package/lib/programmers/llm/LlmSchemaProgrammer.js.map +1 -1
  361. package/lib/programmers/misc/MiscAssertCloneProgrammer.d.ts +2 -2
  362. package/lib/programmers/misc/MiscAssertCloneProgrammer.js +4 -4
  363. package/lib/programmers/misc/MiscAssertCloneProgrammer.js.map +1 -1
  364. package/lib/programmers/misc/MiscAssertPruneProgrammer.d.ts +2 -2
  365. package/lib/programmers/misc/MiscAssertPruneProgrammer.js +4 -4
  366. package/lib/programmers/misc/MiscAssertPruneProgrammer.js.map +1 -1
  367. package/lib/programmers/misc/MiscCloneProgrammer.d.ts +2 -2
  368. package/lib/programmers/misc/MiscCloneProgrammer.js +43 -37
  369. package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
  370. package/lib/programmers/misc/MiscIsCloneProgrammer.d.ts +2 -2
  371. package/lib/programmers/misc/MiscIsCloneProgrammer.js +4 -4
  372. package/lib/programmers/misc/MiscIsCloneProgrammer.js.map +1 -1
  373. package/lib/programmers/misc/MiscIsPruneProgrammer.d.ts +2 -2
  374. package/lib/programmers/misc/MiscIsPruneProgrammer.js +4 -4
  375. package/lib/programmers/misc/MiscIsPruneProgrammer.js.map +1 -1
  376. package/lib/programmers/misc/MiscPruneProgrammer.d.ts +2 -2
  377. package/lib/programmers/misc/MiscPruneProgrammer.js +33 -29
  378. package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
  379. package/lib/programmers/misc/MiscValidateCloneProgrammer.d.ts +2 -2
  380. package/lib/programmers/misc/MiscValidateCloneProgrammer.js +4 -4
  381. package/lib/programmers/misc/MiscValidateCloneProgrammer.js.map +1 -1
  382. package/lib/programmers/misc/MiscValidatePruneProgrammer.d.ts +2 -2
  383. package/lib/programmers/misc/MiscValidatePruneProgrammer.js +4 -4
  384. package/lib/programmers/misc/MiscValidatePruneProgrammer.js.map +1 -1
  385. package/lib/programmers/notations/NotationAssertGeneralProgrammer.d.ts +2 -2
  386. package/lib/programmers/notations/NotationAssertGeneralProgrammer.js +4 -4
  387. package/lib/programmers/notations/NotationAssertGeneralProgrammer.js.map +1 -1
  388. package/lib/programmers/notations/NotationGeneralProgrammer.d.ts +2 -2
  389. package/lib/programmers/notations/NotationGeneralProgrammer.js +49 -35
  390. package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
  391. package/lib/programmers/notations/NotationIsGeneralProgrammer.d.ts +2 -2
  392. package/lib/programmers/notations/NotationIsGeneralProgrammer.js +4 -4
  393. package/lib/programmers/notations/NotationIsGeneralProgrammer.js.map +1 -1
  394. package/lib/programmers/notations/NotationValidateGeneralProgrammer.d.ts +2 -2
  395. package/lib/programmers/notations/NotationValidateGeneralProgrammer.js +4 -4
  396. package/lib/programmers/notations/NotationValidateGeneralProgrammer.js.map +1 -1
  397. package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.d.ts +2 -2
  398. package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js +4 -4
  399. package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js.map +1 -1
  400. package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.d.ts +2 -2
  401. package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js +4 -4
  402. package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js.map +1 -1
  403. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.d.ts +2 -2
  404. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +14 -14
  405. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
  406. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.d.ts +2 -2
  407. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +26 -22
  408. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
  409. package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.d.ts +2 -2
  410. package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js +4 -4
  411. package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js.map +1 -1
  412. package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.d.ts +2 -2
  413. package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.js +4 -4
  414. package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.js.map +1 -1
  415. package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.d.ts +2 -2
  416. package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js +4 -4
  417. package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js.map +1 -1
  418. package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.d.ts +2 -2
  419. package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js +4 -4
  420. package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js.map +1 -1
  421. package/lib/protobuf.d.ts +31 -63
  422. package/lib/protobuf.js +16 -83
  423. package/lib/protobuf.js.map +1 -1
  424. package/lib/reflect.d.ts +2 -4
  425. package/lib/reflect.js +1 -3
  426. package/lib/reflect.js.map +1 -1
  427. package/lib/transformers/FileTransformer.d.ts +1 -1
  428. package/lib/transformers/FileTransformer.js +36 -2
  429. package/lib/transformers/FileTransformer.js.map +1 -1
  430. package/lib/transformers/ITypiaContext.d.ts +2 -0
  431. package/lib/transformers/features/json/JsonApplicationTransformer.js +1 -1
  432. package/lib/transformers/features/json/JsonApplicationTransformer.js.map +1 -1
  433. package/lib/transformers/features/llm/LlmApplicationTransformer.js +3 -5
  434. package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
  435. package/lib/transformers/features/llm/LlmSchemaTransformer.js +1 -1
  436. package/lib/transformers/features/llm/LlmSchemaTransformer.js.map +1 -1
  437. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js +1 -1
  438. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js.map +1 -1
  439. package/lib/utils/NamingConvention.d.ts +5 -0
  440. package/lib/utils/NamingConvention.js +102 -0
  441. package/lib/utils/NamingConvention.js.map +1 -0
  442. package/lib/utils/StringUtil.d.ts +8 -0
  443. package/lib/utils/StringUtil.js +19 -0
  444. package/lib/utils/StringUtil.js.map +1 -0
  445. package/package.json +2 -2
  446. package/src/IRandomGenerator.ts +11 -28
  447. package/src/Resolved.ts +74 -74
  448. package/src/executable/TypiaGenerateWizard.ts +83 -83
  449. package/src/executable/TypiaPatchWizard.ts +42 -42
  450. package/src/executable/TypiaSetupWizard.ts +174 -174
  451. package/src/executable/setup/ArgumentParser.ts +42 -42
  452. package/src/executable/setup/CommandExecutor.ts +8 -8
  453. package/src/executable/setup/FileRetriever.ts +19 -19
  454. package/src/executable/setup/PackageManager.ts +87 -87
  455. package/src/executable/setup/PluginConfigurator.ts +69 -69
  456. package/src/executable/typia.ts +55 -55
  457. package/src/factories/CommentFactory.ts +79 -79
  458. package/src/factories/ExpressionFactory.ts +3 -3
  459. package/src/factories/JsonMetadataFactory.ts +63 -63
  460. package/src/factories/LiteralFactory.ts +18 -15
  461. package/src/factories/MetadataCollection.ts +278 -278
  462. package/src/factories/MetadataCommentTagFactory.ts +650 -622
  463. package/src/factories/MetadataFactory.ts +400 -400
  464. package/src/factories/MetadataTypeTagSchemaFactory.ts +82 -82
  465. package/src/factories/ProtobufFactory.ts +275 -275
  466. package/src/factories/StatementFactory.ts +90 -90
  467. package/src/factories/TypeFactory.ts +140 -140
  468. package/src/factories/internal/metadata/IMetadataIteratorProps.ts +16 -16
  469. package/src/factories/internal/metadata/emplace_metadata_alias.ts +32 -32
  470. package/src/factories/internal/metadata/emplace_metadata_array_type.ts +39 -39
  471. package/src/factories/internal/metadata/emplace_metadata_object.ts +206 -206
  472. package/src/factories/internal/metadata/emplace_metadata_tuple.ts +56 -56
  473. package/src/factories/internal/metadata/explore_metadata.ts +30 -30
  474. package/src/factories/internal/metadata/iterate_metadata.ts +54 -54
  475. package/src/factories/internal/metadata/iterate_metadata_alias.ts +28 -28
  476. package/src/factories/internal/metadata/iterate_metadata_array.ts +63 -63
  477. package/src/factories/internal/metadata/iterate_metadata_atomic.ts +62 -62
  478. package/src/factories/internal/metadata/iterate_metadata_coalesce.ts +28 -28
  479. package/src/factories/internal/metadata/iterate_metadata_collection.ts +145 -145
  480. package/src/factories/internal/metadata/iterate_metadata_comment_tags.ts +32 -32
  481. package/src/factories/internal/metadata/iterate_metadata_constant.ts +76 -76
  482. package/src/factories/internal/metadata/iterate_metadata_escape.ts +49 -49
  483. package/src/factories/internal/metadata/iterate_metadata_function.ts +88 -88
  484. package/src/factories/internal/metadata/iterate_metadata_intersection.ts +216 -216
  485. package/src/factories/internal/metadata/iterate_metadata_map.ts +52 -52
  486. package/src/factories/internal/metadata/iterate_metadata_native.ts +236 -236
  487. package/src/factories/internal/metadata/iterate_metadata_object.ts +27 -27
  488. package/src/factories/internal/metadata/iterate_metadata_set.ts +39 -39
  489. package/src/factories/internal/metadata/iterate_metadata_sort.ts +83 -83
  490. package/src/factories/internal/metadata/iterate_metadata_template.ts +42 -42
  491. package/src/factories/internal/metadata/iterate_metadata_tuple.ts +26 -26
  492. package/src/factories/internal/metadata/iterate_metadata_union.ts +19 -19
  493. package/src/functional.ts +36 -158
  494. package/src/http.ts +79 -303
  495. package/src/{functional → internal}/$ProtobufSizer.ts +11 -4
  496. package/src/{functional → internal}/$ProtobufWriter.ts +2 -2
  497. package/src/{functional/$join.ts → internal/$accessExpressionAsString.ts} +1 -1
  498. package/src/internal/$assertGuard.ts +13 -0
  499. package/src/internal/$functionalTypeGuardErrorFactory.ts +4 -0
  500. package/src/internal/$httpFormDataReadArray.ts +4 -0
  501. package/src/internal/$httpFormDataReadBigint.ts +18 -0
  502. package/src/internal/$httpFormDataReadBlob.ts +10 -0
  503. package/src/internal/$httpFormDataReadBoolean.ts +16 -0
  504. package/src/internal/$httpFormDataReadFile.ts +10 -0
  505. package/src/internal/$httpFormDataReadNumber.ts +15 -0
  506. package/src/internal/$httpFormDataReadString.ts +10 -0
  507. package/src/internal/$httpHeaderReadBigint.ts +10 -0
  508. package/src/internal/$httpHeaderReadBoolean.ts +8 -0
  509. package/src/internal/$httpHeaderReadNumber.ts +7 -0
  510. package/src/internal/$httpParameterBigint.ts +10 -0
  511. package/src/internal/$httpParameterBoolean.ts +8 -0
  512. package/src/internal/$httpParameterNumber.ts +7 -0
  513. package/src/internal/$httpParameterString.ts +2 -0
  514. package/src/internal/$httpQueryParseURLSearchParams.ts +10 -0
  515. package/src/internal/$httpQueryReadArray.ts +4 -0
  516. package/src/internal/$httpQueryReadBigint.ts +12 -0
  517. package/src/internal/$httpQueryReadBoolean.ts +14 -0
  518. package/src/internal/$httpQueryReadNumber.ts +9 -0
  519. package/src/internal/$httpQueryReadString.ts +4 -0
  520. package/src/internal/$isBetween.ts +2 -0
  521. package/src/{functional/$stoll.ts → internal/$isBigintString.ts} +1 -1
  522. package/src/{functional/$number.ts → internal/$jsonStringifyNumber.ts} +1 -1
  523. package/src/{functional/$rest.ts → internal/$jsonStringifyRest.ts} +1 -1
  524. package/src/{functional/$string.ts → internal/$jsonStringifyString.ts} +1 -1
  525. package/src/{functional/$tail.ts → internal/$jsonStringifyTail.ts} +1 -4
  526. package/src/internal/$llmApplicationFinalize.ts +18 -0
  527. package/src/{functional/$clone.ts → internal/$miscCloneAny.ts} +1 -1
  528. package/src/{functional/$convention.ts → internal/$notationAny.ts} +1 -1
  529. package/src/internal/$notationCamel.ts +13 -0
  530. package/src/internal/$notationPascal.ts +8 -0
  531. package/src/{utils/NamingConvention/NamingConvention.ts → internal/$notationSnake.ts} +2 -46
  532. package/src/internal/$randomArray.ts +21 -0
  533. package/src/internal/$randomBigint.ts +6 -0
  534. package/src/internal/$randomBoolean.ts +1 -0
  535. package/src/internal/$randomFormatByte.ts +3 -0
  536. package/src/internal/$randomFormatDate.ts +18 -0
  537. package/src/internal/$randomFormatDatetime.ts +16 -0
  538. package/src/internal/$randomFormatDuration.ts +27 -0
  539. package/src/internal/$randomFormatEmail.ts +11 -0
  540. package/src/internal/$randomFormatHostname.ts +6 -0
  541. package/src/internal/$randomFormatIdnEmail.ts +3 -0
  542. package/src/internal/$randomFormatIdnHostname.ts +3 -0
  543. package/src/internal/$randomFormatIpv4.ts +11 -0
  544. package/src/internal/$randomFormatIpv6.ts +11 -0
  545. package/src/internal/$randomFormatIri.ts +3 -0
  546. package/src/internal/$randomFormatIriReference.ts +3 -0
  547. package/src/internal/$randomFormatJsonPointer.ts +7 -0
  548. package/src/internal/$randomFormatPassword.ts +8 -0
  549. package/src/internal/$randomFormatRegex.ts +4 -0
  550. package/src/internal/$randomFormatRelativeJsonPointer.ts +8 -0
  551. package/src/internal/$randomFormatTime.ts +14 -0
  552. package/src/internal/$randomFormatUri.ts +3 -0
  553. package/src/internal/$randomFormatUriReference.ts +3 -0
  554. package/src/internal/$randomFormatUriTemplate.ts +3 -0
  555. package/src/internal/$randomFormatUrl.ts +11 -0
  556. package/src/internal/$randomFormatUuid.ts +6 -0
  557. package/src/internal/$randomInteger.ts +47 -0
  558. package/src/internal/$randomNumber.ts +74 -0
  559. package/src/internal/$randomPattern.ts +10 -0
  560. package/src/internal/$randomPick.ts +9 -0
  561. package/src/internal/$randomString.ts +24 -0
  562. package/src/internal/$throwTypeGuardError.ts +5 -0
  563. package/src/{functional/$report.ts → internal/$validateReport.ts} +1 -1
  564. package/src/{functional/IProtobufWriter.ts → internal/private/$__IProtobufWriter.ts} +1 -1
  565. package/src/internal/private/$__notationCapitalize.ts +2 -0
  566. package/src/internal/private/$__notationUnsnake.ts +24 -0
  567. package/src/json.ts +651 -738
  568. package/src/llm.ts +178 -186
  569. package/src/misc.ts +52 -151
  570. package/src/module.ts +933 -1023
  571. package/src/notations.ts +76 -269
  572. package/src/programmers/AssertProgrammer.ts +456 -441
  573. package/src/programmers/CheckerProgrammer.ts +1610 -1610
  574. package/src/programmers/FeatureProgrammer.ts +616 -616
  575. package/src/programmers/ImportProgrammer.ts +109 -0
  576. package/src/programmers/IsProgrammer.ts +273 -275
  577. package/src/programmers/RandomProgrammer.ts +424 -412
  578. package/src/programmers/TypiaProgrammer.ts +171 -171
  579. package/src/programmers/ValidateProgrammer.ts +430 -436
  580. package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +153 -158
  581. package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +125 -125
  582. package/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +115 -115
  583. package/src/programmers/functional/FunctionalIsFunctionProgrammer.ts +72 -72
  584. package/src/programmers/functional/FunctionalIsParametersProgrammer.ts +113 -113
  585. package/src/programmers/functional/FunctionalIsReturnProgrammer.ts +116 -116
  586. package/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +123 -123
  587. package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +281 -281
  588. package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +134 -134
  589. package/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts +34 -34
  590. package/src/programmers/helpers/{FunctionImporter.ts → FunctionProgrammer.ts} +67 -98
  591. package/src/programmers/helpers/RandomJoiner.ts +97 -91
  592. package/src/programmers/helpers/StringifyJoinder.ts +4 -3
  593. package/src/programmers/helpers/disable_function_programmer_declare.ts +32 -0
  594. package/src/programmers/http/HttpAssertFormDataProgrammer.ts +96 -96
  595. package/src/programmers/http/HttpAssertHeadersProgrammer.ts +96 -96
  596. package/src/programmers/http/HttpAssertQueryProgrammer.ts +102 -102
  597. package/src/programmers/http/HttpFormDataProgrammer.ts +308 -305
  598. package/src/programmers/http/HttpHeadersProgrammer.ts +404 -378
  599. package/src/programmers/http/HttpIsFormDataProgrammer.ts +108 -108
  600. package/src/programmers/http/HttpIsHeadersProgrammer.ts +108 -108
  601. package/src/programmers/http/HttpIsQueryProgrammer.ts +114 -114
  602. package/src/programmers/http/HttpParameterProgrammer.ts +115 -118
  603. package/src/programmers/http/HttpQueryProgrammer.ts +333 -330
  604. package/src/programmers/http/HttpValidateFormDataProgrammer.ts +90 -90
  605. package/src/programmers/http/HttpValidateHeadersProgrammer.ts +90 -90
  606. package/src/programmers/http/HttpValidateQueryProgrammer.ts +96 -96
  607. package/src/programmers/internal/application_bigint.ts +25 -25
  608. package/src/programmers/internal/application_escaped.ts +96 -96
  609. package/src/programmers/internal/application_v30_alias.ts +59 -59
  610. package/src/programmers/internal/application_v30_object.ts +165 -165
  611. package/src/programmers/internal/application_v30_schema.ts +220 -220
  612. package/src/programmers/internal/application_v30_tuple.ts +33 -33
  613. package/src/programmers/internal/application_v31_constant.ts +29 -29
  614. package/src/programmers/internal/application_v31_object.ts +147 -147
  615. package/src/programmers/internal/application_v31_schema.ts +215 -215
  616. package/src/programmers/internal/check_array_length.ts +46 -46
  617. package/src/programmers/internal/check_bigint.ts +49 -49
  618. package/src/programmers/internal/check_dynamic_key.ts +201 -203
  619. package/src/programmers/internal/check_dynamic_properties.ts +208 -212
  620. package/src/programmers/internal/check_number.ts +111 -111
  621. package/src/programmers/internal/check_object.ts +75 -78
  622. package/src/programmers/internal/check_string.ts +49 -49
  623. package/src/programmers/internal/feature_object_entries.ts +7 -4
  624. package/src/programmers/internal/llm_schema_array.ts +22 -22
  625. package/src/programmers/internal/llm_schema_escaped.ts +84 -84
  626. package/src/programmers/internal/llm_schema_native.ts +17 -17
  627. package/src/programmers/internal/llm_schema_object.ts +132 -132
  628. package/src/programmers/internal/llm_schema_station.ts +190 -190
  629. package/src/programmers/internal/llm_schema_tuple.ts +31 -31
  630. package/src/programmers/internal/stringify_dynamic_properties.ts +162 -162
  631. package/src/programmers/internal/stringify_regular_properties.ts +81 -81
  632. package/src/programmers/json/JsonApplicationProgrammer.ts +92 -92
  633. package/src/programmers/json/JsonAssertParseProgrammer.ts +104 -104
  634. package/src/programmers/json/JsonAssertStringifyProgrammer.ts +112 -112
  635. package/src/programmers/json/JsonIsParseProgrammer.ts +118 -118
  636. package/src/programmers/json/JsonIsStringifyProgrammer.ts +108 -108
  637. package/src/programmers/json/JsonStringifyProgrammer.ts +1124 -1115
  638. package/src/programmers/json/JsonValidateParseProgrammer.ts +95 -95
  639. package/src/programmers/json/JsonValidateStringifyProgrammer.ts +119 -119
  640. package/src/programmers/llm/LlmApplicationProgrammer.ts +235 -235
  641. package/src/programmers/llm/LlmSchemaProgrammer.ts +51 -49
  642. package/src/programmers/misc/MiscAssertCloneProgrammer.ts +92 -92
  643. package/src/programmers/misc/MiscAssertPruneProgrammer.ts +113 -113
  644. package/src/programmers/misc/MiscCloneProgrammer.ts +1029 -1019
  645. package/src/programmers/misc/MiscIsCloneProgrammer.ts +99 -99
  646. package/src/programmers/misc/MiscIsPruneProgrammer.ts +97 -97
  647. package/src/programmers/misc/MiscLiteralsProgrammer.ts +80 -80
  648. package/src/programmers/misc/MiscPruneProgrammer.ts +725 -717
  649. package/src/programmers/misc/MiscValidateCloneProgrammer.ts +109 -109
  650. package/src/programmers/misc/MiscValidatePruneProgrammer.ts +109 -109
  651. package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +98 -98
  652. package/src/programmers/notations/NotationGeneralProgrammer.ts +973 -953
  653. package/src/programmers/notations/NotationIsGeneralProgrammer.ts +105 -105
  654. package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +117 -117
  655. package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +95 -95
  656. package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +99 -99
  657. package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +711 -711
  658. package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +1019 -1010
  659. package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +109 -109
  660. package/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +98 -98
  661. package/src/programmers/protobuf/ProtobufMessageProgrammer.ts +201 -201
  662. package/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +90 -90
  663. package/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +114 -114
  664. package/src/protobuf.ts +868 -999
  665. package/src/reflect.ts +3 -9
  666. package/src/schemas/json/IJsonApplication.ts +22 -22
  667. package/src/schemas/metadata/IMetadata.ts +36 -36
  668. package/src/schemas/metadata/IMetadataConstantValue.ts +11 -11
  669. package/src/schemas/metadata/IMetadataFunction.ts +8 -8
  670. package/src/schemas/metadata/IMetadataParameter.ts +9 -9
  671. package/src/schemas/metadata/IMetadataTemplate.ts +7 -7
  672. package/src/schemas/metadata/Metadata.ts +616 -616
  673. package/src/schemas/metadata/MetadataAtomic.ts +87 -87
  674. package/src/schemas/metadata/MetadataFunction.ts +49 -49
  675. package/src/schemas/metadata/MetadataParameter.ts +50 -50
  676. package/src/tags/Constant.ts +15 -15
  677. package/src/tags/Default.ts +22 -22
  678. package/src/tags/Example.ts +17 -17
  679. package/src/tags/Examples.ts +16 -16
  680. package/src/tags/ExclusiveMaximum.ts +25 -25
  681. package/src/tags/ExclusiveMinimum.ts +25 -25
  682. package/src/tags/JsonSchemaPlugin.ts +8 -8
  683. package/src/tags/Maximum.ts +19 -19
  684. package/src/tags/Minimum.ts +19 -19
  685. package/src/tags/MultipleOf.ts +21 -21
  686. package/src/tags/Pattern.ts +31 -31
  687. package/src/tags/Type.ts +32 -32
  688. package/src/tags/index.ts +20 -20
  689. package/src/transform.ts +35 -35
  690. package/src/transformers/CallExpressionTransformer.ts +540 -540
  691. package/src/transformers/FileTransformer.ts +120 -101
  692. package/src/transformers/IProgrammerProps.ts +11 -11
  693. package/src/transformers/ITransformProps.ts +9 -9
  694. package/src/transformers/ITypiaContext.ts +18 -15
  695. package/src/transformers/NodeTransformer.ts +17 -17
  696. package/src/transformers/TransformerError.ts +59 -59
  697. package/src/transformers/features/AssertTransformer.ts +24 -24
  698. package/src/transformers/features/CreateAssertTransformer.ts +24 -24
  699. package/src/transformers/features/CreateIsTransformer.ts +18 -18
  700. package/src/transformers/features/CreateRandomTransformer.ts +43 -43
  701. package/src/transformers/features/CreateValidateTransformer.ts +18 -18
  702. package/src/transformers/features/IsTransformer.ts +18 -18
  703. package/src/transformers/features/RandomTransformer.ts +41 -41
  704. package/src/transformers/features/ValidateTransformer.ts +18 -18
  705. package/src/transformers/features/functional/FunctionalGenericTransformer.ts +57 -57
  706. package/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +13 -13
  707. package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +13 -13
  708. package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +13 -13
  709. package/src/transformers/features/http/CreateHttpFormDataTransformer.ts +13 -13
  710. package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +13 -13
  711. package/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +13 -13
  712. package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +13 -13
  713. package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +13 -13
  714. package/src/transformers/features/http/CreateHttpParameterTransformer.ts +13 -13
  715. package/src/transformers/features/http/CreateHttpQueryTransformer.ts +13 -13
  716. package/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +13 -13
  717. package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +13 -13
  718. package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +13 -13
  719. package/src/transformers/features/http/HttpAssertFormDataTransformer.ts +13 -13
  720. package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +13 -13
  721. package/src/transformers/features/http/HttpAssertQueryTransformer.ts +13 -13
  722. package/src/transformers/features/http/HttpFormDataTransformer.ts +13 -13
  723. package/src/transformers/features/http/HttpHeadersTransformer.ts +13 -13
  724. package/src/transformers/features/http/HttpIsFormDataTransformer.ts +13 -13
  725. package/src/transformers/features/http/HttpIsHeadersTransformer.ts +13 -13
  726. package/src/transformers/features/http/HttpIsQueryTransformer.ts +13 -13
  727. package/src/transformers/features/http/HttpParameterTransformer.ts +13 -13
  728. package/src/transformers/features/http/HttpQueryTransformer.ts +13 -13
  729. package/src/transformers/features/http/HttpValidateFormDataTransformer.ts +13 -13
  730. package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +13 -13
  731. package/src/transformers/features/http/HttpValidateQueryTransformer.ts +13 -13
  732. package/src/transformers/features/json/JsonApplicationTransformer.ts +130 -130
  733. package/src/transformers/features/json/JsonAssertParseTransformer.ts +13 -13
  734. package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +13 -13
  735. package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +13 -13
  736. package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +13 -13
  737. package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +13 -13
  738. package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +13 -13
  739. package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +13 -13
  740. package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +13 -13
  741. package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +13 -13
  742. package/src/transformers/features/json/JsonIsParseTransformer.ts +13 -13
  743. package/src/transformers/features/json/JsonIsStringifyTransformer.ts +13 -13
  744. package/src/transformers/features/json/JsonStringifyTransformer.ts +13 -13
  745. package/src/transformers/features/json/JsonValidateParseTransformer.ts +13 -13
  746. package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +13 -13
  747. package/src/transformers/features/llm/LlmApplicationTransformer.ts +86 -91
  748. package/src/transformers/features/llm/LlmSchemaTransformer.ts +59 -59
  749. package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +13 -13
  750. package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +13 -13
  751. package/src/transformers/features/misc/MiscCloneTransformer.ts +13 -13
  752. package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +13 -13
  753. package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +13 -13
  754. package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +13 -13
  755. package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +13 -13
  756. package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +13 -13
  757. package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +13 -13
  758. package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +13 -13
  759. package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +13 -13
  760. package/src/transformers/features/misc/MiscIsCloneTransformer.ts +13 -13
  761. package/src/transformers/features/misc/MiscIsPruneTransformer.ts +13 -13
  762. package/src/transformers/features/misc/MiscLiteralsTransformer.ts +35 -35
  763. package/src/transformers/features/misc/MiscPruneTransformer.ts +13 -13
  764. package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +13 -13
  765. package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +13 -13
  766. package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +20 -20
  767. package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +20 -20
  768. package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +20 -20
  769. package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +20 -20
  770. package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +20 -20
  771. package/src/transformers/features/notations/NotationGeneralTransformer.ts +18 -18
  772. package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +20 -20
  773. package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +20 -20
  774. package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +13 -13
  775. package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +13 -13
  776. package/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +13 -13
  777. package/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +13 -13
  778. package/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +13 -13
  779. package/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +13 -13
  780. package/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +13 -13
  781. package/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +13 -13
  782. package/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +13 -13
  783. package/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +13 -13
  784. package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +13 -13
  785. package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +13 -13
  786. package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +13 -13
  787. package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +13 -13
  788. package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +35 -35
  789. package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +13 -13
  790. package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +13 -13
  791. package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +69 -69
  792. package/src/transformers/features/reflect/ReflectNameTransformer.ts +82 -82
  793. package/src/transformers/internal/GenericTransformer.ts +101 -101
  794. package/src/utils/Escaper.ts +50 -50
  795. package/src/utils/NamingConvention.ts +94 -0
  796. package/src/utils/StringUtil.ts +16 -0
  797. package/lib/functional/$FormDataReader/$FormDataReader.d.ts +0 -7
  798. package/lib/functional/$FormDataReader/$FormDataReader.js +0 -86
  799. package/lib/functional/$FormDataReader/$FormDataReader.js.map +0 -1
  800. package/lib/functional/$FormDataReader/index.d.ts +0 -1
  801. package/lib/functional/$FormDataReader/index.js +0 -28
  802. package/lib/functional/$FormDataReader/index.js.map +0 -1
  803. package/lib/functional/$HeadersReader/$HeadersReader.d.ts +0 -4
  804. package/lib/functional/$HeadersReader/$HeadersReader.js +0 -36
  805. package/lib/functional/$HeadersReader/$HeadersReader.js.map +0 -1
  806. package/lib/functional/$HeadersReader/index.d.ts +0 -1
  807. package/lib/functional/$HeadersReader/index.js +0 -28
  808. package/lib/functional/$HeadersReader/index.js.map +0 -1
  809. package/lib/functional/$ParameterReader/$ParameterReader.d.ts +0 -4
  810. package/lib/functional/$ParameterReader/$ParameterReader.js +0 -36
  811. package/lib/functional/$ParameterReader/$ParameterReader.js.map +0 -1
  812. package/lib/functional/$ParameterReader/index.d.ts +0 -1
  813. package/lib/functional/$ParameterReader/index.js +0 -28
  814. package/lib/functional/$ParameterReader/index.js.map +0 -1
  815. package/lib/functional/$ProtobufReader.js.map +0 -1
  816. package/lib/functional/$ProtobufSizer.js.map +0 -1
  817. package/lib/functional/$ProtobufWriter.js.map +0 -1
  818. package/lib/functional/$QueryReader/$QueryReader.d.ts +0 -6
  819. package/lib/functional/$QueryReader/$QueryReader.js +0 -55
  820. package/lib/functional/$QueryReader/$QueryReader.js.map +0 -1
  821. package/lib/functional/$QueryReader/index.d.ts +0 -1
  822. package/lib/functional/$QueryReader/index.js +0 -28
  823. package/lib/functional/$QueryReader/index.js.map +0 -1
  824. package/lib/functional/$any.d.ts +0 -1
  825. package/lib/functional/$any.js +0 -7
  826. package/lib/functional/$any.js.map +0 -1
  827. package/lib/functional/$clone.d.ts +0 -2
  828. package/lib/functional/$clone.js.map +0 -1
  829. package/lib/functional/$convention.d.ts +0 -1
  830. package/lib/functional/$dictionary.d.ts +0 -2
  831. package/lib/functional/$dictionary.js +0 -18
  832. package/lib/functional/$dictionary.js.map +0 -1
  833. package/lib/functional/$every.d.ts +0 -2
  834. package/lib/functional/$every.js +0 -12
  835. package/lib/functional/$every.js.map +0 -1
  836. package/lib/functional/$guard.js +0 -21
  837. package/lib/functional/$guard.js.map +0 -1
  838. package/lib/functional/$is_between.d.ts +0 -1
  839. package/lib/functional/$is_between.js +0 -8
  840. package/lib/functional/$is_between.js.map +0 -1
  841. package/lib/functional/$join.d.ts +0 -1
  842. package/lib/functional/$join.js.map +0 -1
  843. package/lib/functional/$number.d.ts +0 -1
  844. package/lib/functional/$number.js.map +0 -1
  845. package/lib/functional/$report.d.ts +0 -2
  846. package/lib/functional/$report.js.map +0 -1
  847. package/lib/functional/$rest.d.ts +0 -1
  848. package/lib/functional/$rest.js +0 -8
  849. package/lib/functional/$rest.js.map +0 -1
  850. package/lib/functional/$stoll.d.ts +0 -1
  851. package/lib/functional/$stoll.js.map +0 -1
  852. package/lib/functional/$string.d.ts +0 -1
  853. package/lib/functional/$string.js.map +0 -1
  854. package/lib/functional/$strlen.d.ts +0 -1
  855. package/lib/functional/$strlen.js +0 -13
  856. package/lib/functional/$strlen.js.map +0 -1
  857. package/lib/functional/$tail.d.ts +0 -1
  858. package/lib/functional/$tail.js +0 -11
  859. package/lib/functional/$tail.js.map +0 -1
  860. package/lib/functional/$throws.d.ts +0 -2
  861. package/lib/functional/$throws.js +0 -22
  862. package/lib/functional/$throws.js.map +0 -1
  863. package/lib/functional/IProtobufWriter.js.map +0 -1
  864. package/lib/functional/Namespace/functional.d.ts +0 -4
  865. package/lib/functional/Namespace/functional.js +0 -9
  866. package/lib/functional/Namespace/functional.js.map +0 -1
  867. package/lib/functional/Namespace/http.d.ts +0 -8
  868. package/lib/functional/Namespace/http.js +0 -16
  869. package/lib/functional/Namespace/http.js.map +0 -1
  870. package/lib/functional/Namespace/index.d.ts +0 -31
  871. package/lib/functional/Namespace/index.js +0 -86
  872. package/lib/functional/Namespace/index.js.map +0 -1
  873. package/lib/functional/Namespace/json.d.ts +0 -9
  874. package/lib/functional/Namespace/json.js +0 -23
  875. package/lib/functional/Namespace/json.js.map +0 -1
  876. package/lib/functional/Namespace/llm.d.ts +0 -4
  877. package/lib/functional/Namespace/llm.js +0 -44
  878. package/lib/functional/Namespace/llm.js.map +0 -1
  879. package/lib/functional/Namespace/misc.d.ts +0 -11
  880. package/lib/functional/Namespace/misc.js +0 -22
  881. package/lib/functional/Namespace/misc.js.map +0 -1
  882. package/lib/functional/Namespace/notations.d.ts +0 -18
  883. package/lib/functional/Namespace/notations.js +0 -26
  884. package/lib/functional/Namespace/notations.js.map +0 -1
  885. package/lib/functional/Namespace/protobuf.d.ts +0 -17
  886. package/lib/functional/Namespace/protobuf.js +0 -25
  887. package/lib/functional/Namespace/protobuf.js.map +0 -1
  888. package/lib/functional/is.d.ts +0 -1
  889. package/lib/functional/is.js +0 -14
  890. package/lib/functional/is.js.map +0 -1
  891. package/lib/programmers/helpers/FunctionImporter.js.map +0 -1
  892. package/lib/programmers/helpers/RandomRanger.d.ts +0 -33
  893. package/lib/programmers/helpers/RandomRanger.js +0 -158
  894. package/lib/programmers/helpers/RandomRanger.js.map +0 -1
  895. package/lib/programmers/helpers/disable_function_importer_declare.d.ts +0 -2
  896. package/lib/programmers/helpers/disable_function_importer_declare.js +0 -19
  897. package/lib/programmers/helpers/disable_function_importer_declare.js.map +0 -1
  898. package/lib/programmers/internal/random_custom.d.ts +0 -1
  899. package/lib/programmers/internal/random_custom.js +0 -23
  900. package/lib/programmers/internal/random_custom.js.map +0 -1
  901. package/lib/utils/NamingConvention/NamingConvention.d.ts +0 -3
  902. package/lib/utils/NamingConvention/NamingConvention.js +0 -93
  903. package/lib/utils/NamingConvention/NamingConvention.js.map +0 -1
  904. package/lib/utils/NamingConvention/index.d.ts +0 -1
  905. package/lib/utils/NamingConvention/index.js +0 -28
  906. package/lib/utils/NamingConvention/index.js.map +0 -1
  907. package/lib/utils/RandomGenerator/RandomGenerator.d.ts +0 -31
  908. package/lib/utils/RandomGenerator/RandomGenerator.js +0 -176
  909. package/lib/utils/RandomGenerator/RandomGenerator.js.map +0 -1
  910. package/lib/utils/RandomGenerator/index.d.ts +0 -1
  911. package/lib/utils/RandomGenerator/index.js +0 -28
  912. package/lib/utils/RandomGenerator/index.js.map +0 -1
  913. package/lib/utils/StringUtil/StringUtil.d.ts +0 -6
  914. package/lib/utils/StringUtil/StringUtil.js +0 -18
  915. package/lib/utils/StringUtil/StringUtil.js.map +0 -1
  916. package/lib/utils/StringUtil/index.d.ts +0 -1
  917. package/lib/utils/StringUtil/index.js +0 -28
  918. package/lib/utils/StringUtil/index.js.map +0 -1
  919. package/src/functional/$FormDataReader/$FormDataReader.ts +0 -83
  920. package/src/functional/$FormDataReader/index.ts +0 -1
  921. package/src/functional/$HeadersReader/$HeadersReader.ts +0 -26
  922. package/src/functional/$HeadersReader/index.ts +0 -1
  923. package/src/functional/$ParameterReader/$ParameterReader.ts +0 -29
  924. package/src/functional/$ParameterReader/index.ts +0 -1
  925. package/src/functional/$QueryReader/$QueryReader.ts +0 -46
  926. package/src/functional/$QueryReader/index.ts +0 -1
  927. package/src/functional/$any.ts +0 -3
  928. package/src/functional/$dictionary.ts +0 -22
  929. package/src/functional/$every.ts +0 -11
  930. package/src/functional/$guard.ts +0 -21
  931. package/src/functional/$is_between.ts +0 -2
  932. package/src/functional/$strlen.ts +0 -7
  933. package/src/functional/$throws.ts +0 -10
  934. package/src/functional/Namespace/functional.ts +0 -5
  935. package/src/functional/Namespace/http.ts +0 -9
  936. package/src/functional/Namespace/index.ts +0 -77
  937. package/src/functional/Namespace/json.ts +0 -15
  938. package/src/functional/Namespace/llm.ts +0 -20
  939. package/src/functional/Namespace/misc.ts +0 -14
  940. package/src/functional/Namespace/notations.ts +0 -23
  941. package/src/functional/Namespace/protobuf.ts +0 -20
  942. package/src/functional/is.ts +0 -10
  943. package/src/programmers/helpers/RandomRanger.ts +0 -225
  944. package/src/programmers/helpers/disable_function_importer_declare.ts +0 -33
  945. package/src/programmers/internal/random_custom.ts +0 -39
  946. package/src/utils/NamingConvention/index.ts +0 -1
  947. package/src/utils/RandomGenerator/RandomGenerator.ts +0 -119
  948. package/src/utils/RandomGenerator/index.ts +0 -1
  949. package/src/utils/StringUtil/StringUtil.ts +0 -14
  950. package/src/utils/StringUtil/index.ts +0 -1
  951. /package/lib/{functional → internal}/$ProtobufReader.d.ts +0 -0
  952. /package/lib/{functional → internal}/$ProtobufReader.js +0 -0
  953. /package/lib/{functional → internal}/$ProtobufWriter.js +0 -0
  954. /package/lib/{functional/$guard.d.ts → internal/$jsonStringifyString.d.ts} +0 -0
  955. /package/src/{functional → internal}/$ProtobufReader.ts +0 -0
package/src/module.ts CHANGED
@@ -1,1023 +1,933 @@
1
- import * as 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
- import { TypeGuardError } from "./TypeGuardError";
8
-
9
- export * as functional from "./functional";
10
- export * as http from "./http";
11
- export * as llm from "./llm";
12
- export * as json from "./json";
13
- export * as misc from "./misc";
14
- export * as notations from "./notations";
15
- export * as protobuf from "./protobuf";
16
- export * as reflect from "./reflect";
17
- export * as tags from "./tags";
18
-
19
- export * from "./schemas/metadata/IJsDocTagInfo";
20
- export * from "./schemas/json/IJsonApplication";
21
- export * from "./AssertionGuard";
22
- export * from "./IRandomGenerator";
23
- export * from "./IValidation";
24
- export * from "./TypeGuardError";
25
-
26
- export * from "./Primitive";
27
- export * from "./Resolved";
28
- export * from "./CamelCase";
29
- export * from "./PascalCase";
30
- export * from "./SnakeCase";
31
-
32
- /* -----------------------------------------------------------
33
- BASIC VALIDATORS
34
- ----------------------------------------------------------- */
35
- /**
36
- * Asserts a value type.
37
- *
38
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
39
- * reason, if the parametric value is not following the type `T`. Otherwise, the
40
- * value is following the type `T`, just input parameter would be returned.
41
- *
42
- * If what you want is not asserting but just knowing whether the parametric value is
43
- * following the type `T` or not, you can choose the {@link is} function instead.
44
- * Otherwise you want to know all the errors, {@link validate} is the way to go.
45
- * Also, if you want to automatically cast the parametric value to the type `T`
46
- * when no problem (perform the assertion guard of type).
47
- *
48
- * On the other and, if you don't want to allow any superfluous property that is not
49
- * enrolled to the type `T`, you can use {@link assertEquals} function instead.
50
- *
51
- * @template T Type of the input value
52
- * @param input A value to be asserted
53
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
54
- * @returns Parametric input value
55
- * @throws A {@link TypeGuardError} instance with detailed reason
56
- *
57
- * @author Jeongho Nam - https://github.com/samchon
58
- */
59
- function assert<T>(
60
- input: T,
61
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
62
- ): T;
63
-
64
- /**
65
- * Asserts a value type.
66
- *
67
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
68
- * reason, if the parametric value is not following the type `T`. Otherwise, the
69
- * value is following the type `T`, just input parameter would be returned.
70
- *
71
- * If what you want is not asserting but just knowing whether the parametric value is
72
- * following the type `T` or not, you can choose the {@link is} function instead.
73
- * Otherwise, you want to know all the errors, {@link validate} is the way to go.
74
- *
75
- * On the other and, if you don't want to allow any superfluous property that is not
76
- * enrolled to the type `T`, you can use {@link assertEquals} function instead.
77
- *
78
- * @template T Type of the input value
79
- * @param input A value to be asserted
80
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
81
- * @returns Parametric input value casted as `T`
82
- * @throws A {@link TypeGuardError} instance with detailed reason
83
- *
84
- * @author Jeongho Nam - https://github.com/samchon
85
- */
86
- function assert<T>(
87
- input: unknown,
88
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
89
- ): T;
90
-
91
- /**
92
- * @internal
93
- */
94
- function assert(): never {
95
- halt("assert");
96
- }
97
- const assertPure = /** @__PURE__ */ Object.assign<typeof assert, {}>(
98
- assert,
99
- /** @__PURE__ */ Namespace.assert("assert"),
100
- );
101
- export { assertPure as assert };
102
-
103
- /**
104
- * Assertion guard of a value type.
105
- *
106
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
107
- * reason, if the parametric value is not following the type `T`. Otherwise, the
108
- * value is following the type `T`, nothing would be returned, but the input value
109
- * would be automatically casted to the type `T`. This is the concept of
110
- * "Assertion Guard" of a value type.
111
- *
112
- * If what you want is not asserting but just knowing whether the parametric value is
113
- * following the type `T` or not, you can choose the {@link is} function instead.
114
- * Otherwise you want to know all the errors, {@link validate} is the way to go.
115
- * Also, if you want to returns the parametric value when no problem, you can use
116
- * {@link assert} function instead.
117
- *
118
- * On the other and, if you don't want to allow any superfluous property that is not
119
- * enrolled to the type `T`, you can use {@link assertGuardEquals} function instead.
120
- *
121
- * @template T Type of the input value
122
- * @param input A value to be asserted
123
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
124
- * @throws A {@link TypeGuardError} instance with detailed reason
125
- *
126
- * @author Jeongho Nam - https://github.com/samchon
127
- */
128
- function assertGuard<T>(
129
- input: T,
130
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
131
- ): asserts input is T;
132
-
133
- /**
134
- * Assertion guard of a value type.
135
- *
136
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
137
- * reason, if the parametric value is not following the type `T`. Otherwise, the
138
- * value is following the type `T`, nothing would be returned, but the input value
139
- * would be automatically casted to the type `T`. This is the concept of
140
- * "Assertion Guard" of a value type.
141
- *
142
- * If what you want is not asserting but just knowing whether the parametric value is
143
- * following the type `T` or not, you can choose the {@link is} function instead.
144
- * Otherwise you want to know all the errors, {@link validate} is the way to go.
145
- * Also, if you want to returns the parametric value when no problem, you can use
146
- * {@link assert} function instead.
147
- *
148
- * On the other and, if you don't want to allow any superfluous property that is not
149
- * enrolled to the type `T`, you can use {@link assertGuardEquals} function instead.
150
- *
151
- * @template T Type of the input value
152
- * @param input A value to be asserted
153
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
154
- * @throws A {@link TypeGuardError} instance with detailed reason
155
- *
156
- * @author Jeongho Nam - https://github.com/samchon
157
- */
158
- function assertGuard<T>(
159
- input: unknown,
160
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
161
- ): asserts input is T;
162
-
163
- /**
164
- * @internal
165
- */
166
- function assertGuard(): never {
167
- halt("assertGuard");
168
- }
169
- const assertGuardPure = /** @__PURE__ */ Object.assign<typeof assertGuard, {}>(
170
- assertGuard,
171
- /** @__PURE__ */ Namespace.assert("assertGuard"),
172
- );
173
- export { assertGuardPure as assertGuard };
174
-
175
- /**
176
- * Tests a value type.
177
- *
178
- * Tests a parametric value type and returns whether it's following the type `T` or not.
179
- * If the parametric value is matched with the type `T`, `true` value would be returned.
180
- * Otherwise, the parametric value is not following the type `T`, `false` value would be
181
- * returned.
182
- *
183
- * If what you want is not just knowing whether the parametric value is following the
184
- * type `T` or not, but throwing an exception with detailed reason, you can choose
185
- * {@link assert} function instead. Also, if you want to know all the errors with
186
- * detailed reasons, {@link validate} function would be useful.
187
- *
188
- * On the other and, if you don't want to allow any superfluous property that is not
189
- * enrolled to the type `T`, you can use {@link equals} function instead.
190
- *
191
- * @template T Type of the input value
192
- * @param input A value to be tested
193
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
194
- * @returns Whether the parametric value is following the type `T` or not
195
- *
196
- * @author Jeongho Nam - https://github.com/samchon
197
- */
198
- function is<T>(input: T): input is T;
199
-
200
- /**
201
- * Tests a value type.
202
- *
203
- * Tests a parametric value type and returns whether it's following the type `T` or not.
204
- * If the parametric value is matched with the type `T`, `true` value would be returned.
205
- * Otherwise, the parametric value is not following the type `T`, `false` value would be
206
- * returned.
207
- *
208
- * If what you want is not just knowing whether the parametric value is following the
209
- * type `T` or not, but throwing an exception with detailed reason, you can choose
210
- * {@link assert} function instead. Also, if you want to know all the errors with
211
- * detailed reasons, {@link validate} function would be useful.
212
- *
213
- * On the other and, if you don't want to allow any superfluous property that is not
214
- * enrolled to the type `T`, you can use {@link equals} function instead.
215
- *
216
- * @template T Type of the input value
217
- * @param input A value to be tested
218
- * @returns Whether the parametric value is following the type `T` or not
219
- *
220
- * @author Jeongho Nam - https://github.com/samchon
221
- */
222
- function is<T>(input: unknown): input is T;
223
-
224
- /**
225
- * @internal
226
- */
227
- function is(): never {
228
- halt("is");
229
- }
230
- const isPure = /** @__PURE__ */ Object.assign<typeof is, {}>(
231
- is,
232
- /** @__PURE__ */ Namespace.assert("is"),
233
- );
234
- export { isPure as is };
235
-
236
- /**
237
- * Validates a value type.
238
- *
239
- * Validates a parametric value type and archives all the type errors into an
240
- * {@link IValidation.errors} array, if the parametric value is not following the
241
- * type `T`. Of course, if the parametric value is following the type `T`, the
242
- * {@link IValidation.errors} array would be empty and {@link IValidation.success}
243
- * would have the `true` value.
244
- *
245
- * If what you want is not finding all the error, but asserting the parametric value
246
- * type with exception throwing, you can choose {@link assert} function instead.
247
- * Otherwise, you just want to know whether the parametric value is matched with the
248
- * type `T`, {@link is} function is the way to go.
249
- *
250
- * On the other and, if you don't want to allow any superfluous property that is not
251
- * enrolled to the type `T`, you can use {@link validateEquals} function instead.
252
- *
253
- * @template Type of the input value
254
- * @param input A value to be validated
255
- * @returns Validation result
256
- *
257
- * @author Jeongho Nam - https://github.com/samchon
258
- */
259
- function validate<T>(input: T): IValidation<T>;
260
-
261
- /**
262
- * Validates a value type.
263
- *
264
- * Validates a parametric value type and archives all the type errors into an
265
- * {@link IValidation.errors} array, if the parametric value is not following the
266
- * type `T`. Of course, if the parametric value is following the type `T`, the
267
- * {@link IValidation.errors} array would be empty and {@link IValidation.success}
268
- * would have the `true` value.
269
- *
270
- * If what you want is not finding all the error, but asserting the parametric value
271
- * type with exception throwing, you can choose {@link assert} function instead.
272
- * Otherwise, you just want to know whether the parametric value is matched with the
273
- * type `T`, {@link is} function is the way to go.
274
- *
275
- * On the other and, if you don't want to allow any superfluous property that is not
276
- * enrolled to the type `T`, you can use {@link validateEquals} function instead.
277
- *
278
- * @template Type of the input value
279
- * @param input A value to be validated
280
- * @returns Validation result
281
- *
282
- * @author Jeongho Nam - https://github.com/samchon
283
- */
284
- function validate<T>(input: unknown): IValidation<T>;
285
-
286
- /**
287
- * @internal
288
- */
289
- function validate(): never {
290
- halt("validate");
291
- }
292
- const validatePure = /** @__PURE__ */ Object.assign<typeof validate, {}>(
293
- validate,
294
- /** @__PURE__ */ Namespace.validate(),
295
- );
296
- export { validatePure as validate };
297
-
298
- /* -----------------------------------------------------------
299
- STRICT VALIDATORS
300
- ----------------------------------------------------------- */
301
- /**
302
- * Asserts equality between a value and its type.
303
- *
304
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
305
- * reason, if the parametric value is not following the type `T` or some superfluous
306
- * property that is not listed on the type `T` has been found. Otherwise, the value is
307
- * following the type `T` without any superfluous property, just input parameter would
308
- * be returned.
309
- *
310
- * If what you want is not asserting but just knowing whether the parametric value is
311
- * following the type `T` or not, you can choose the {@link equals} function instead.
312
- * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
313
- *
314
- * On the other hand, if you want to allow superfluous property that is not enrolled
315
- * to the type `T`, you can use {@link assert} function instead.
316
- *
317
- * @template T Type of the input value
318
- * @param input A value to be asserted
319
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
320
- * @returns Parametric input value
321
- * @throws A {@link TypeGuardError} instance with detailed reason
322
- *
323
- * @author Jeongho Nam - https://github.com/samchon
324
- */
325
- function assertEquals<T>(
326
- input: T,
327
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
328
- ): T;
329
-
330
- /**
331
- * Asserts equality between a value and its type.
332
- *
333
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
334
- * reason, if the parametric value is not following the type `T` or some superfluous
335
- * property that is not listed on the type `T` has been found. Otherwise, the value is
336
- * following the type `T` without any superfluous property, just input parameter would
337
- * be returned.
338
- *
339
- * If what you want is not asserting but just knowing whether the parametric value is
340
- * following the type `T` or not, you can choose the {@link equals} function instead.
341
- * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
342
- *
343
- * On the other hand, if you want to allow superfluous property that is not enrolled
344
- * to the type `T`, you can use {@link assert} function instead.
345
- *
346
- * @template T Type of the input value
347
- * @param input A value to be asserted
348
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
349
- * @returns Parametric input value casted as `T`
350
- * @throws A {@link TypeGuardError} instance with detailed reason
351
- *
352
- * @author Jeongho Nam - https://github.com/samchon
353
- */
354
- function assertEquals<T>(
355
- input: unknown,
356
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
357
- ): T;
358
-
359
- /**
360
- * @internal
361
- */
362
- function assertEquals(): never {
363
- halt("assertEquals");
364
- }
365
- const assertEqualsPure = /** @__PURE__ */ Object.assign<
366
- typeof assertEquals,
367
- {}
368
- >(assertEquals, /** @__PURE__ */ Namespace.assert("assertEquals"));
369
- export { assertEqualsPure as assertEquals };
370
-
371
- /**
372
- * Assertion guard of a type with equality.
373
- *
374
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
375
- * reason, if the parametric value is not following the type `T` or some superfluous
376
- * property that is not listed on the type `T` has been found.
377
- *
378
- * Otherwise, the value is following the type `T` without any superfluous property,
379
- * nothing would be returned, but the input value would be automatically casted to
380
- * the type `T`. This is the concept of "Assertion Guard" of a value type.
381
- *
382
- * If what you want is not asserting but just knowing whether the parametric value is
383
- * following the type `T` or not, you can choose the {@link equals} function instead.
384
- * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
385
- * Also, if you want to returns the parametric value when no problem, you can use
386
- * {@link assert} function instead.
387
- *
388
- * On the other hand, if you want to allow superfluous property that is not enrolled
389
- * to the type `T`, you can use {@link assertEquals} function instead.
390
- *
391
- * @template T Type of the input value
392
- * @param input A value to be asserted
393
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
394
- * @returns Parametric input value casted as `T`
395
- * @throws A {@link TypeGuardError} instance with detailed reason
396
- *
397
- * @author Jeongho Nam - https://github.com/samchon
398
- */
399
- function assertGuardEquals<T>(
400
- input: T,
401
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
402
- ): asserts input is T;
403
-
404
- /**
405
- * Assertion guard of a type with equality.
406
- *
407
- * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
408
- * reason, if the parametric value is not following the type `T` or some superfluous
409
- * property that is not listed on the type `T` has been found.
410
- *
411
- * Otherwise, the value is following the type `T` without any superfluous property,
412
- * nothing would be returned, but the input value would be automatically casted to
413
- * the type `T`. This is the concept of "Assertion Guard" of a value type.
414
- *
415
- * If what you want is not asserting but just knowing whether the parametric value is
416
- * following the type `T` or not, you can choose the {@link equals} function instead.
417
- * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
418
- * Also, if you want to returns the parametric value when no problem, you can use
419
- * {@link assertEquals} function instead.
420
- *
421
- * On the other hand, if you want to allow superfluous property that is not enrolled
422
- * to the type `T`, you can use {@link assertGuard} function instead.
423
- *
424
- * @template T Type of the input value
425
- * @param input A value to be asserted
426
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
427
- * @returns Parametric input value casted as `T`
428
- * @throws A {@link TypeGuardError} instance with detailed reason
429
- *
430
- * @author Jeongho Nam - https://github.com/samchon
431
- */
432
- function assertGuardEquals<T>(
433
- input: unknown,
434
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
435
- ): asserts input is T;
436
-
437
- /**
438
- * @internal
439
- */
440
- function assertGuardEquals(): never {
441
- halt("assertGuardEquals");
442
- }
443
- const assertGuardEqualsPure = /** @__PURE__ */ Object.assign<
444
- typeof assertGuardEquals,
445
- {}
446
- >(assertGuardEquals, /** @__PURE__ */ Namespace.assert("assertGuardEquals"));
447
- export { assertGuardEqualsPure as assertGuardEquals };
448
-
449
- /**
450
- * Tests equality between a value and its type.
451
- *
452
- * Tests a parametric value type and returns whether it's equivalent to the type `T`
453
- * or not. If the parametric value is matched with the type `T` and there's not any
454
- * superfluous property that is not listed on the type `T`, `true` value would be
455
- * returned. Otherwise, the parametric value is not following the type `T` or some
456
- * superfluous property exists, `false` value would be returned.
457
- *
458
- * If what you want is not just knowing whether the parametric value is following the
459
- * type `T` or not, but throwing an exception with detailed reason, you can choose
460
- * {@link assertEquals} function instead. Also, if you want to know all the errors with
461
- * detailed reasons, {@link validateEquals} function would be useful.
462
- *
463
- * On the other hand, if you want to allow superfluous property that is not enrolled
464
- * to the type `T`, you can use {@link is} function instead.
465
- *
466
- * @template T Type of the input value
467
- * @param input A value to be tested
468
- * @returns Whether the parametric value is equivalent to the type `T` or not
469
- *
470
- * @author Jeongho Nam - https://github.com/samchon
471
- */
472
- function equals<T>(input: T): input is T;
473
-
474
- /**
475
- * Tests equality between a value and its type.
476
- *
477
- * Tests a parametric value type and returns whether it's equivalent to the type `T`
478
- * or not. If the parametric value is matched with the type `T` and there's not any
479
- * superfluous property that is not listed on the type `T`, `true` value would be
480
- * returned. Otherwise, the parametric value is not following the type `T` or some
481
- * superfluous property exists, `false` value would be returned.
482
- *
483
- * If what you want is not just knowing whether the parametric value is following the
484
- * type `T` or not, but throwing an exception with detailed reason, you can choose
485
- * {@link assertEquals} function instead. Also, if you want to know all the errors with
486
- * detailed reasons, {@link validateEquals} function would be useful.
487
- *
488
- * On the other hand, if you want to allow superfluous property that is not enrolled
489
- * to the type `T`, you can use {@link is} function instead.
490
- *
491
- * @template T Type of the input value
492
- * @param input A value to be tested
493
- * @returns Whether the parametric value is equivalent to the type `T` or not
494
- *
495
- * @author Jeongho Nam - https://github.com/samchon
496
- */
497
- function equals<T>(input: unknown): input is T;
498
-
499
- /**
500
- * @internal
501
- */
502
- function equals(): never {
503
- halt("equals");
504
- }
505
- const equalsPure = /** @__PURE__ */ Object.assign<typeof equals, {}>(
506
- equals,
507
- /** @__PURE__ */ Namespace.is(),
508
- );
509
- export { equalsPure as equals };
510
-
511
- /**
512
- * Validates equality between a value and its type.
513
- *
514
- * Validates a parametric value type and archives all the type errors into an
515
- * {@link IValidation.errors} array, if the parametric value is not following the
516
- * type `T` or some superfluous property that is not listed on the type `T` has been
517
- * found. Of course, if the parametric value is following the type `T` and no
518
- * superfluous property exists, the {@link IValidation.errors} array would be empty
519
- * and {@link IValidation.success} would have the `true` value.
520
- *
521
- * If what you want is not finding all the error, but asserting the parametric value
522
- * type with exception throwing, you can choose {@link assert} function instead.
523
- * Otherwise, you just want to know whether the parametric value is matched with the
524
- * type `T`, {@link is} function is the way to go.
525
- *
526
- * On the other and, if you don't want to allow any superfluous property that is not
527
- * enrolled to the type `T`, you can use {@link validateEquals} function instead.
528
- *
529
- * @template Type of the input value
530
- * @param input A value to be validated
531
- * @returns Validation result
532
- *
533
- * @author Jeongho Nam - https://github.com/samchon
534
- */
535
- function validateEquals<T>(input: T): IValidation<T>;
536
-
537
- /**
538
- * Validates equality between a value and its type.
539
- *
540
- * Validates a parametric value type and archives all the type errors into an
541
- * {@link IValidation.errors} array, if the parametric value is not following the
542
- * type `T` or some superfluous property that is not listed on the type `T` has been
543
- * found. Of course, if the parametric value is following the type `T` and no
544
- * superfluous property exists, the {@link IValidation.errors} array would be empty
545
- * and {@link IValidation.success} would have the `true` value.
546
- *
547
- * If what you want is not finding all the error, but asserting the parametric value
548
- * type with exception throwing, you can choose {@link assert} function instead.
549
- * Otherwise, you just want to know whether the parametric value is matched with the
550
- * type `T`, {@link is} function is the way to go.
551
- *
552
- * On the other and, if you don't want to allow any superfluous property that is not
553
- * enrolled to the type `T`, you can use {@link validateEquals} function instead.
554
- *
555
- * @template Type of the input value
556
- * @param input A value to be validated
557
- * @returns Validation result
558
- *
559
- * @author Jeongho Nam - https://github.com/samchon
560
- */
561
- function validateEquals<T>(input: unknown): IValidation<T>;
562
-
563
- /**
564
- * @internal
565
- */
566
- function validateEquals(): never {
567
- halt("validateEquals");
568
- }
569
- const validateEqualsPure = /** @__PURE__ */ Object.assign<
570
- typeof validateEquals,
571
- {}
572
- >(validateEquals, /** @__PURE__ */ Namespace.validate());
573
- export { validateEqualsPure as validateEquals };
574
-
575
- /* -----------------------------------------------------------
576
- RANDOM
577
- ----------------------------------------------------------- */
578
- /**
579
- * > You must configure the generic argument `T`.
580
- *
581
- * Generate random data.
582
- *
583
- * Generates a random data following type the `T`.
584
- *
585
- * For reference, this `typia.random()` function generates only primitive type.
586
- * If there're some methods in the type `T` or its nested instances, those would
587
- * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
588
- * would be generated instead.
589
- *
590
- * @template T Type of data to generate
591
- * @param generator Random data generator
592
- * @return Randomly generated data
593
- *
594
- * @author Jeongho Nam - https://github.com/samchon
595
- */
596
- function random(generator?: Partial<IRandomGenerator>): never;
597
-
598
- /**
599
- * Generate random data.
600
- *
601
- * Generates a random data following type the `T`.
602
- *
603
- * For reference, this `typia.random()` function generates only primitive type.
604
- * If there're some methods in the type `T` or its nested instances, those would
605
- * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
606
- * would be generated instead.
607
- *
608
- * @template T Type of data to generate
609
- * @param generator Random data generator
610
- * @return Randomly generated data
611
- *
612
- * @author Jeongho Nam - https://github.com/samchon
613
- */
614
- function random<T>(generator?: Partial<IRandomGenerator>): Resolved<T>;
615
-
616
- /**
617
- * @internal
618
- */
619
- function random(): never {
620
- halt("random");
621
- }
622
- const randomPure = /** @__PURE__ */ Object.assign<typeof random, {}>(
623
- random,
624
- /** @__PURE__ */ Namespace.random(),
625
- );
626
- export { randomPure as random };
627
-
628
- /* -----------------------------------------------------------
629
- FACTORY FUNCTIONS
630
- ----------------------------------------------------------- */
631
- /**
632
- * Creates a reusable {@link assert} function.
633
- *
634
- * @danger You must configure the generic argument `T`
635
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
636
- * @returns Nothing until you configure the generic argument `T`
637
- * @throws compile error
638
- *
639
- * @author Jeongho Nam - https://github.com/samchon
640
- */
641
- function createAssert(
642
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
643
- ): never;
644
-
645
- /**
646
- * Creates a reusable {@link assert} function.
647
- *
648
- * @template T Type of the input value
649
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
650
- * @returns A reusable `assert` function
651
- *
652
- * @author Jeongho Nam - https://github.com/samchon
653
- */
654
- function createAssert<T>(
655
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
656
- ): (input: unknown) => T;
657
-
658
- /**
659
- * @internal
660
- */
661
- function createAssert<T>(): (input: unknown) => T {
662
- halt("createAssert");
663
- }
664
- const createAssertPure = /** @__PURE__ */ Object.assign<
665
- typeof createAssert,
666
- {}
667
- >(createAssert, assertPure);
668
- export { createAssertPure as createAssert };
669
-
670
- /**
671
- * Creates a reusable {@link assertGuard} function.
672
- *
673
- * Note that, you've to declare the variable type of the factory function caller
674
- * like below. If you don't declare the variable type, compilation error be thrown.
675
- * This is the special rule of the TypeScript compiler.
676
- *
677
- * ```typescript
678
- * // MUST DECLARE THE VARIABLE TYPE
679
- * const func: typia.AssertionGuard<number> = typia.createAssertGuard<number>();
680
- *
681
- * // IF NOT, COMPILATION ERROR BE OCCURED
682
- * const func = typia.createAssertGuard<number>();
683
- * ```
684
- *
685
- * > *Assertions require every name in the call target to be declared with an*
686
- * > *explicit type annotation.*
687
- *
688
- * @danger You must configure the generic argument `T`
689
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
690
- * @returns Nothing until you configure the generic argument `T`
691
- * @throws compile error
692
- *
693
- * @author Jeongho Nam - https://github.com/samchon
694
- */
695
- function createAssertGuard(
696
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
697
- ): never;
698
-
699
- /**
700
- * Creates a reusable {@link assertGuard} function.
701
- *
702
- * Note that, you've to declare the variable type of the factory function caller
703
- * like below. If you don't declare the variable type, compilation error be thrown.
704
- * This is the special rule of the TypeScript compiler.
705
- *
706
- * ```typescript
707
- * // MUST DECLARE THE VARIABLE TYPE
708
- * const func: typia.AssertionGuard<number> = typia.createAssertGuard<number>();
709
- *
710
- * // IF NOT, COMPILATION ERROR BE OCCURED
711
- * const func = typia.createAssertGuard<number>();
712
- * ```
713
- *
714
- * > *Assertions require every name in the call target to be declared with an*
715
- * > *explicit type annotation.*
716
- *
717
- * @returns Nothing until you configure the generic argument `T`
718
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
719
- * @throws compile error
720
- *
721
- * @author Jeongho Nam - https://github.com/samchon
722
- */
723
- function createAssertGuard<T>(
724
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
725
- ): (input: unknown) => AssertionGuard<T>;
726
-
727
- /**
728
- * @internal
729
- */
730
- function createAssertGuard<T>(): (input: unknown) => AssertionGuard<T> {
731
- halt("createAssertGuard");
732
- }
733
- const createAssertGuardPure = /** @__PURE__ */ Object.assign<
734
- typeof createAssertGuard,
735
- {}
736
- >(createAssertGuard, assertGuardPure);
737
- export { createAssertGuardPure as createAssertGuard };
738
-
739
- /**
740
- * Creates a reusable {@link is} function.
741
- *
742
- * @danger You must configure the generic argument `T`
743
- * @returns Nothing until you configure the generic argument `T`
744
- * @throws compile error
745
- *
746
- * @author Jeongho Nam - https://github.com/samchon
747
- */
748
- function createIs(): never;
749
-
750
- /**
751
- * Creates a reusable {@link is} function.
752
- *
753
- * @template T Type of the input value
754
- * @returns A reusable `is` function
755
- *
756
- * @author Jeongho Nam - https://github.com/samchon
757
- */
758
- function createIs<T>(): (input: unknown) => input is T;
759
-
760
- /**
761
- * @internal
762
- */
763
- function createIs<T>(): (input: unknown) => input is T {
764
- halt("createIs");
765
- }
766
- const createIsPure = /** @__PURE__ */ Object.assign<typeof createIs, {}>(
767
- createIs,
768
- isPure,
769
- );
770
- export { createIsPure as createIs };
771
-
772
- /**
773
- * Creates a reusable {@link validate} function.
774
- *
775
- * @danger You must configure the generic argument `T`
776
- * @returns Nothing until you configure the generic argument `T`
777
- * @throws compile error
778
- *
779
- * @author Jeongho Nam - https://github.com/samchon
780
- */
781
- function createValidate(): never;
782
-
783
- /**
784
- * Creates a reusable {@link validate} function.
785
- *
786
- * @template T Type of the input value
787
- * @returns A reusable `validate` function
788
- *
789
- * @author Jeongho Nam - https://github.com/samchon
790
- */
791
- function createValidate<T>(): (input: unknown) => IValidation<T>;
792
-
793
- /**
794
- * @internal
795
- */
796
- function createValidate(): (input: unknown) => IValidation {
797
- halt("createValidate");
798
- }
799
- const createValidatePure = /** @__PURE__ */ Object.assign<
800
- typeof createValidate,
801
- {}
802
- >(createValidate, validatePure);
803
- export { createValidatePure as createValidate };
804
-
805
- /**
806
- * Creates a reusable {@link assertEquals} function.
807
- *
808
- * @danger You must configure the generic argument `T`
809
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
810
- * @returns Nothing until you configure the generic argument `T`
811
- * @throws compile error
812
- *
813
- * @author Jeongho Nam - https://github.com/samchon
814
- */
815
- function createAssertEquals(
816
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
817
- ): never;
818
-
819
- /**
820
- * Creates a reusable {@link assertEquals} function.
821
- *
822
- * @template T Type of the input value
823
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
824
- * @returns A reusable `assertEquals` function
825
- *
826
- * @author Jeongho Nam - https://github.com/samchon
827
- */
828
- function createAssertEquals<T>(
829
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
830
- ): (input: unknown) => T;
831
-
832
- /**
833
- * @internal
834
- */
835
- function createAssertEquals<T>(): (input: unknown) => T {
836
- halt("createAssertEquals");
837
- }
838
- const createAssertEqualsPure = /** @__PURE__ */ Object.assign<
839
- typeof createAssertEquals,
840
- {}
841
- >(createAssertEquals, assertEqualsPure);
842
- export { createAssertEqualsPure as createAssertEquals };
843
-
844
- /**
845
- * Creates a reusable {@link assertGuardEquals} function.
846
- *
847
- * Note that, you've to declare the variable type of the factory function caller
848
- * like below. If you don't declare the variable type, compilation error be thrown.
849
- * This is the special rule of the TypeScript compiler.
850
- *
851
- * ```typescript
852
- * // MUST DECLARE THE VARIABLE TYPE
853
- * const func: typia.AssertionGuard<number> = typia.createAssertGuardEquals<number>();
854
- *
855
- * // IF NOT, COMPILATION ERROR BE OCCURED
856
- * const func = typia.createAssertGuardEquals<number>();
857
- * ```
858
- *
859
- * > *Assertions require every name in the call target to be declared with an*
860
- * > *explicit type annotation.*
861
- *
862
- * @danger You must configure the generic argument `T`
863
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
864
- * @returns Nothing until you configure the generic argument `T`
865
- * @throws compile error
866
- *
867
- * @author Jeongho Nam - https://github.com/samchon
868
- */
869
- function createAssertGuardEquals(
870
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
871
- ): never;
872
-
873
- /**
874
- * Creates a reusable {@link assertGuardEquals} function.
875
- *
876
- * Note that, you've to declare the variable type of the factory function caller
877
- * like below. If you don't declare the variable type, compilation error be thrown.
878
- * This is the special rule of the TypeScript compiler.
879
- *
880
- * ```typescript
881
- * // MUST DECLARE THE VARIABLE TYPE
882
- * const func: typia.AssertionGuard<number> = typia.createAssertGuardEquals<number>();
883
- *
884
- * // IF NOT, COMPILATION ERROR BE OCCURED
885
- * const func = typia.createAssertGuardEquals<number>();
886
- * ```
887
- *
888
- * > *Assertions require every name in the call target to be declared with an*
889
- * > *explicit type annotation.*
890
- *
891
- * @param errorFactory Custom error factory. Default is `TypeGuardError`
892
- * @returns Nothing until you configure the generic argument `T`
893
- * @throws compile error
894
- *
895
- * @author Jeongho Nam - https://github.com/samchon
896
- */
897
- function createAssertGuardEquals<T>(
898
- errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
899
- ): (input: unknown) => AssertionGuard<T>;
900
-
901
- /**
902
- * @internal
903
- */
904
- function createAssertGuardEquals<T>(): (input: unknown) => AssertionGuard<T> {
905
- halt("createAssertGuardEquals");
906
- }
907
- const createAssertGuardEqualsPure = /** @__PURE__ */ Object.assign<
908
- typeof createAssertGuardEquals,
909
- {}
910
- >(createAssertGuardEquals, assertGuardEqualsPure);
911
- export { createAssertGuardEqualsPure as createAssertGuardEquals };
912
-
913
- /**
914
- * Creates a reusable {@link equals} function.
915
- *
916
- * @danger You must configure the generic argument `T`
917
- * @returns Nothing until you configure the generic argument `T`
918
- * @throws compile error
919
- *
920
- * @author Jeongho Nam - https://github.com/samchon
921
- */
922
- function createEquals(): never;
923
-
924
- /**
925
- * Creates a reusable {@link equals} function.
926
- *
927
- * @template T Type of the input value
928
- * @returns A reusable `equals` function
929
- *
930
- * @author Jeongho Nam - https://github.com/samchon
931
- */
932
- function createEquals<T>(): (input: unknown) => input is T;
933
-
934
- /**
935
- * @internal
936
- */
937
- function createEquals<T>(): (input: unknown) => input is T {
938
- halt("createEquals");
939
- }
940
- const createEqualsPure = /** @__PURE__ */ Object.assign<
941
- typeof createEquals,
942
- {}
943
- >(createEquals, equalsPure);
944
- export { createEqualsPure as createEquals };
945
-
946
- /**
947
- * Creates a reusable {@link validateEquals} function.
948
- *
949
- * @danger You must configure the generic argument `T`
950
- * @returns Nothing until you configure the generic argument `T`
951
- * @throws compile error
952
- *
953
- * @author Jeongho Nam - https://github.com/samchon
954
- */
955
- function createValidateEquals(): never;
956
-
957
- /**
958
- * Creates a reusable {@link validateEquals} function.
959
- *
960
- * @template T Type of the input value
961
- * @returns A reusable `validateEquals` function
962
- *
963
- * @author Jeongho Nam - https://github.com/samchon
964
- */
965
- function createValidateEquals<T>(): (input: unknown) => IValidation<T>;
966
-
967
- /**
968
- * @internal
969
- */
970
- function createValidateEquals(): (input: unknown) => IValidation {
971
- halt("createValidateEquals");
972
- }
973
- const createValidateEqualsPure = /** @__PURE__ */ Object.assign<
974
- typeof createValidateEquals,
975
- {}
976
- >(createValidateEquals, validateEqualsPure);
977
- export { createValidateEqualsPure as createValidateEquals };
978
-
979
- /**
980
- * Creates a reusable {@link random} function.
981
- *
982
- * @danger You must configure the generic argument `T`
983
- * @param generator Random data generator
984
- * @returns Nothing until you configure the generic argument `T`
985
- * @throws compile error
986
- *
987
- * @author Jeongho Nam - https://github.com/samchon
988
- */
989
- function createRandom(generator?: Partial<IRandomGenerator>): never;
990
-
991
- /**
992
- * Creates a resuable {@link random} function.
993
- *
994
- * @template T Type of the input value
995
- * @param generator Random data generator
996
- * @returns A reusable `random` function
997
- *
998
- * @author Jeongho Nam - https://github.com/samchon
999
- */
1000
- function createRandom<T>(
1001
- generator?: Partial<IRandomGenerator>,
1002
- ): () => Resolved<T>;
1003
-
1004
- /**
1005
- * @internal
1006
- */
1007
- function createRandom(): never {
1008
- halt("createRandom");
1009
- }
1010
- const createRandomPure = /** @__PURE__ */ Object.assign<
1011
- typeof createRandom,
1012
- {}
1013
- >(createRandom, randomPure);
1014
- export { createRandomPure as createRandom };
1015
-
1016
- /**
1017
- * @internal
1018
- */
1019
- function halt(name: string): never {
1020
- throw new Error(
1021
- `Error on typia.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
1022
- );
1023
- }
1
+ import { AssertionGuard } from "./AssertionGuard";
2
+ import { IRandomGenerator } from "./IRandomGenerator";
3
+ import { IValidation } from "./IValidation";
4
+ import { Resolved } from "./Resolved";
5
+ import { TypeGuardError } from "./TypeGuardError";
6
+
7
+ export * as functional from "./functional";
8
+ export * as http from "./http";
9
+ export * as llm from "./llm";
10
+ export * as json from "./json";
11
+ export * as misc from "./misc";
12
+ export * as notations from "./notations";
13
+ export * as protobuf from "./protobuf";
14
+ export * as reflect from "./reflect";
15
+ export * as tags from "./tags";
16
+
17
+ export * from "./schemas/metadata/IJsDocTagInfo";
18
+ export * from "./schemas/json/IJsonApplication";
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
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
52
+ * @returns Parametric input value
53
+ * @throws A {@link TypeGuardError} instance with detailed reason
54
+ *
55
+ * @author Jeongho Nam - https://github.com/samchon
56
+ */
57
+ export function assert<T>(
58
+ input: T,
59
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
60
+ ): T;
61
+
62
+ /**
63
+ * Asserts a value type.
64
+ *
65
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
66
+ * reason, if the parametric value is not following the type `T`. Otherwise, the
67
+ * value is following the type `T`, just input parameter would be returned.
68
+ *
69
+ * If what you want is not asserting but just knowing whether the parametric value is
70
+ * following the type `T` or not, you can choose the {@link is} function instead.
71
+ * Otherwise, you want to know all the errors, {@link validate} is the way to go.
72
+ *
73
+ * On the other and, if you don't want to allow any superfluous property that is not
74
+ * enrolled to the type `T`, you can use {@link assertEquals} function instead.
75
+ *
76
+ * @template T Type of the input value
77
+ * @param input A value to be asserted
78
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
79
+ * @returns Parametric input value casted as `T`
80
+ * @throws A {@link TypeGuardError} instance with detailed reason
81
+ *
82
+ * @author Jeongho Nam - https://github.com/samchon
83
+ */
84
+ export function assert<T>(
85
+ input: unknown,
86
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
87
+ ): T;
88
+
89
+ /**
90
+ * @internal
91
+ */
92
+ export function assert(): never {
93
+ halt("assert");
94
+ }
95
+
96
+ /**
97
+ * Assertion guard of a value type.
98
+ *
99
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
100
+ * reason, if the parametric value is not following the type `T`. Otherwise, the
101
+ * value is following the type `T`, nothing would be returned, but the input value
102
+ * would be automatically casted to the type `T`. This is the concept of
103
+ * "Assertion Guard" of a value type.
104
+ *
105
+ * If what you want is not asserting but just knowing whether the parametric value is
106
+ * following the type `T` or not, you can choose the {@link is} function instead.
107
+ * Otherwise you want to know all the errors, {@link validate} is the way to go.
108
+ * Also, if you want to returns the parametric value when no problem, you can use
109
+ * {@link assert} function instead.
110
+ *
111
+ * On the other and, if you don't want to allow any superfluous property that is not
112
+ * enrolled to the type `T`, you can use {@link assertGuardEquals} function instead.
113
+ *
114
+ * @template T Type of the input value
115
+ * @param input A value to be asserted
116
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
117
+ * @throws A {@link TypeGuardError} instance with detailed reason
118
+ *
119
+ * @author Jeongho Nam - https://github.com/samchon
120
+ */
121
+ export function assertGuard<T>(
122
+ input: T,
123
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
124
+ ): asserts input is T;
125
+
126
+ /**
127
+ * Assertion guard of a value type.
128
+ *
129
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
130
+ * reason, if the parametric value is not following the type `T`. Otherwise, the
131
+ * value is following the type `T`, nothing would be returned, but the input value
132
+ * would be automatically casted to the type `T`. This is the concept of
133
+ * "Assertion Guard" of a value type.
134
+ *
135
+ * If what you want is not asserting but just knowing whether the parametric value is
136
+ * following the type `T` or not, you can choose the {@link is} function instead.
137
+ * Otherwise you want to know all the errors, {@link validate} is the way to go.
138
+ * Also, if you want to returns the parametric value when no problem, you can use
139
+ * {@link assert} function instead.
140
+ *
141
+ * On the other and, if you don't want to allow any superfluous property that is not
142
+ * enrolled to the type `T`, you can use {@link assertGuardEquals} function instead.
143
+ *
144
+ * @template T Type of the input value
145
+ * @param input A value to be asserted
146
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
147
+ * @throws A {@link TypeGuardError} instance with detailed reason
148
+ *
149
+ * @author Jeongho Nam - https://github.com/samchon
150
+ */
151
+ export function assertGuard<T>(
152
+ input: unknown,
153
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
154
+ ): asserts input is T;
155
+
156
+ /**
157
+ * @internal
158
+ */
159
+ export function assertGuard(): never {
160
+ halt("assertGuard");
161
+ }
162
+
163
+ /**
164
+ * Tests a value type.
165
+ *
166
+ * Tests a parametric value type and returns whether it's following the type `T` or not.
167
+ * If the parametric value is matched with the type `T`, `true` value would be returned.
168
+ * Otherwise, the parametric value is not following the type `T`, `false` value would be
169
+ * returned.
170
+ *
171
+ * If what you want is not just knowing whether the parametric value is following the
172
+ * type `T` or not, but throwing an exception with detailed reason, you can choose
173
+ * {@link assert} function instead. Also, if you want to know all the errors with
174
+ * detailed reasons, {@link validate} function would be useful.
175
+ *
176
+ * On the other and, if you don't want to allow any superfluous property that is not
177
+ * enrolled to the type `T`, you can use {@link equals} function instead.
178
+ *
179
+ * @template T Type of the input value
180
+ * @param input A value to be tested
181
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
182
+ * @returns Whether the parametric value is following the type `T` or not
183
+ *
184
+ * @author Jeongho Nam - https://github.com/samchon
185
+ */
186
+ export function is<T>(input: T): input is T;
187
+
188
+ /**
189
+ * Tests a value type.
190
+ *
191
+ * Tests a parametric value type and returns whether it's following the type `T` or not.
192
+ * If the parametric value is matched with the type `T`, `true` value would be returned.
193
+ * Otherwise, the parametric value is not following the type `T`, `false` value would be
194
+ * returned.
195
+ *
196
+ * If what you want is not just knowing whether the parametric value is following the
197
+ * type `T` or not, but throwing an exception with detailed reason, you can choose
198
+ * {@link assert} function instead. Also, if you want to know all the errors with
199
+ * detailed reasons, {@link validate} function would be useful.
200
+ *
201
+ * On the other and, if you don't want to allow any superfluous property that is not
202
+ * enrolled to the type `T`, you can use {@link equals} function instead.
203
+ *
204
+ * @template T Type of the input value
205
+ * @param input A value to be tested
206
+ * @returns Whether the parametric value is following the type `T` or not
207
+ *
208
+ * @author Jeongho Nam - https://github.com/samchon
209
+ */
210
+ export function is<T>(input: unknown): input is T;
211
+
212
+ /**
213
+ * @internal
214
+ */
215
+ export function is(): never {
216
+ halt("is");
217
+ }
218
+
219
+ /**
220
+ * Validates a value type.
221
+ *
222
+ * Validates a parametric value type and archives all the type errors into an
223
+ * {@link IValidation.errors} array, if the parametric value is not following the
224
+ * type `T`. Of course, if the parametric value is following the type `T`, the
225
+ * {@link IValidation.errors} array would be empty and {@link IValidation.success}
226
+ * would have the `true` value.
227
+ *
228
+ * If what you want is not finding all the error, but asserting the parametric value
229
+ * type with exception throwing, you can choose {@link assert} function instead.
230
+ * Otherwise, you just want to know whether the parametric value is matched with the
231
+ * type `T`, {@link is} function is the way to go.
232
+ *
233
+ * On the other and, if you don't want to allow any superfluous property that is not
234
+ * enrolled to the type `T`, you can use {@link validateEquals} function instead.
235
+ *
236
+ * @template Type of the input value
237
+ * @param input A value to be validated
238
+ * @returns Validation result
239
+ *
240
+ * @author Jeongho Nam - https://github.com/samchon
241
+ */
242
+ export function validate<T>(input: T): IValidation<T>;
243
+
244
+ /**
245
+ * Validates a value type.
246
+ *
247
+ * Validates a parametric value type and archives all the type errors into an
248
+ * {@link IValidation.errors} array, if the parametric value is not following the
249
+ * type `T`. Of course, if the parametric value is following the type `T`, the
250
+ * {@link IValidation.errors} array would be empty and {@link IValidation.success}
251
+ * would have the `true` value.
252
+ *
253
+ * If what you want is not finding all the error, but asserting the parametric value
254
+ * type with exception throwing, you can choose {@link assert} function instead.
255
+ * Otherwise, you just want to know whether the parametric value is matched with the
256
+ * type `T`, {@link is} function is the way to go.
257
+ *
258
+ * On the other and, if you don't want to allow any superfluous property that is not
259
+ * enrolled to the type `T`, you can use {@link validateEquals} function instead.
260
+ *
261
+ * @template Type of the input value
262
+ * @param input A value to be validated
263
+ * @returns Validation result
264
+ *
265
+ * @author Jeongho Nam - https://github.com/samchon
266
+ */
267
+ export function validate<T>(input: unknown): IValidation<T>;
268
+
269
+ /**
270
+ * @internal
271
+ */
272
+ export function validate(): never {
273
+ halt("validate");
274
+ }
275
+
276
+ /* -----------------------------------------------------------
277
+ STRICT VALIDATORS
278
+ ----------------------------------------------------------- */
279
+ /**
280
+ * Asserts equality between a value and its type.
281
+ *
282
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
283
+ * reason, if the parametric value is not following the type `T` or some superfluous
284
+ * property that is not listed on the type `T` has been found. Otherwise, the value is
285
+ * following the type `T` without any superfluous property, just input parameter would
286
+ * be returned.
287
+ *
288
+ * If what you want is not asserting but just knowing whether the parametric value is
289
+ * following the type `T` or not, you can choose the {@link equals} function instead.
290
+ * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
291
+ *
292
+ * On the other hand, if you want to allow superfluous property that is not enrolled
293
+ * to the type `T`, you can use {@link assert} function instead.
294
+ *
295
+ * @template T Type of the input value
296
+ * @param input A value to be asserted
297
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
298
+ * @returns Parametric input value
299
+ * @throws A {@link TypeGuardError} instance with detailed reason
300
+ *
301
+ * @author Jeongho Nam - https://github.com/samchon
302
+ */
303
+ export function assertEquals<T>(
304
+ input: T,
305
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
306
+ ): T;
307
+
308
+ /**
309
+ * Asserts equality between a value and its type.
310
+ *
311
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
312
+ * reason, if the parametric value is not following the type `T` or some superfluous
313
+ * property that is not listed on the type `T` has been found. Otherwise, the value is
314
+ * following the type `T` without any superfluous property, just input parameter would
315
+ * be returned.
316
+ *
317
+ * If what you want is not asserting but just knowing whether the parametric value is
318
+ * following the type `T` or not, you can choose the {@link equals} function instead.
319
+ * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
320
+ *
321
+ * On the other hand, if you want to allow superfluous property that is not enrolled
322
+ * to the type `T`, you can use {@link assert} function instead.
323
+ *
324
+ * @template T Type of the input value
325
+ * @param input A value to be asserted
326
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
327
+ * @returns Parametric input value casted as `T`
328
+ * @throws A {@link TypeGuardError} instance with detailed reason
329
+ *
330
+ * @author Jeongho Nam - https://github.com/samchon
331
+ */
332
+ export function assertEquals<T>(
333
+ input: unknown,
334
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
335
+ ): T;
336
+
337
+ /**
338
+ * @internal
339
+ */
340
+ export function assertEquals(): never {
341
+ halt("assertEquals");
342
+ }
343
+
344
+ /**
345
+ * Assertion guard of a type with equality.
346
+ *
347
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
348
+ * reason, if the parametric value is not following the type `T` or some superfluous
349
+ * property that is not listed on the type `T` has been found.
350
+ *
351
+ * Otherwise, the value is following the type `T` without any superfluous property,
352
+ * nothing would be returned, but the input value would be automatically casted to
353
+ * the type `T`. This is the concept of "Assertion Guard" of a value type.
354
+ *
355
+ * If what you want is not asserting but just knowing whether the parametric value is
356
+ * following the type `T` or not, you can choose the {@link equals} function instead.
357
+ * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
358
+ * Also, if you want to returns the parametric value when no problem, you can use
359
+ * {@link assert} function instead.
360
+ *
361
+ * On the other hand, if you want to allow superfluous property that is not enrolled
362
+ * to the type `T`, you can use {@link assertEquals} function instead.
363
+ *
364
+ * @template T Type of the input value
365
+ * @param input A value to be asserted
366
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
367
+ * @returns Parametric input value casted as `T`
368
+ * @throws A {@link TypeGuardError} instance with detailed reason
369
+ *
370
+ * @author Jeongho Nam - https://github.com/samchon
371
+ */
372
+ export function assertGuardEquals<T>(
373
+ input: T,
374
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
375
+ ): asserts input is T;
376
+
377
+ /**
378
+ * Assertion guard of a type with equality.
379
+ *
380
+ * Asserts a parametric value type and throws a {@link TypeGuardError} with detailed
381
+ * reason, if the parametric value is not following the type `T` or some superfluous
382
+ * property that is not listed on the type `T` has been found.
383
+ *
384
+ * Otherwise, the value is following the type `T` without any superfluous property,
385
+ * nothing would be returned, but the input value would be automatically casted to
386
+ * the type `T`. This is the concept of "Assertion Guard" of a value type.
387
+ *
388
+ * If what you want is not asserting but just knowing whether the parametric value is
389
+ * following the type `T` or not, you can choose the {@link equals} function instead.
390
+ * Otherwise, you want to know all the errors, {@link validateEquals} is the way to go.
391
+ * Also, if you want to returns the parametric value when no problem, you can use
392
+ * {@link assertEquals} function instead.
393
+ *
394
+ * On the other hand, if you want to allow superfluous property that is not enrolled
395
+ * to the type `T`, you can use {@link assertGuard} function instead.
396
+ *
397
+ * @template T Type of the input value
398
+ * @param input A value to be asserted
399
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
400
+ * @returns Parametric input value casted as `T`
401
+ * @throws A {@link TypeGuardError} instance with detailed reason
402
+ *
403
+ * @author Jeongho Nam - https://github.com/samchon
404
+ */
405
+ export function assertGuardEquals<T>(
406
+ input: unknown,
407
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
408
+ ): asserts input is T;
409
+
410
+ /**
411
+ * @internal
412
+ */
413
+ export function assertGuardEquals(): never {
414
+ halt("assertGuardEquals");
415
+ }
416
+
417
+ /**
418
+ * Tests equality between a value and its type.
419
+ *
420
+ * Tests a parametric value type and returns whether it's equivalent to the type `T`
421
+ * or not. If the parametric value is matched with the type `T` and there's not any
422
+ * superfluous property that is not listed on the type `T`, `true` value would be
423
+ * returned. Otherwise, the parametric value is not following the type `T` or some
424
+ * superfluous property exists, `false` value would be returned.
425
+ *
426
+ * If what you want is not just knowing whether the parametric value is following the
427
+ * type `T` or not, but throwing an exception with detailed reason, you can choose
428
+ * {@link assertEquals} function instead. Also, if you want to know all the errors with
429
+ * detailed reasons, {@link validateEquals} function would be useful.
430
+ *
431
+ * On the other hand, if you want to allow superfluous property that is not enrolled
432
+ * to the type `T`, you can use {@link is} function instead.
433
+ *
434
+ * @template T Type of the input value
435
+ * @param input A value to be tested
436
+ * @returns Whether the parametric value is equivalent to the type `T` or not
437
+ *
438
+ * @author Jeongho Nam - https://github.com/samchon
439
+ */
440
+ export function equals<T>(input: T): input is T;
441
+
442
+ /**
443
+ * Tests equality between a value and its type.
444
+ *
445
+ * Tests a parametric value type and returns whether it's equivalent to the type `T`
446
+ * or not. If the parametric value is matched with the type `T` and there's not any
447
+ * superfluous property that is not listed on the type `T`, `true` value would be
448
+ * returned. Otherwise, the parametric value is not following the type `T` or some
449
+ * superfluous property exists, `false` value would be returned.
450
+ *
451
+ * If what you want is not just knowing whether the parametric value is following the
452
+ * type `T` or not, but throwing an exception with detailed reason, you can choose
453
+ * {@link assertEquals} function instead. Also, if you want to know all the errors with
454
+ * detailed reasons, {@link validateEquals} function would be useful.
455
+ *
456
+ * On the other hand, if you want to allow superfluous property that is not enrolled
457
+ * to the type `T`, you can use {@link is} function instead.
458
+ *
459
+ * @template T Type of the input value
460
+ * @param input A value to be tested
461
+ * @returns Whether the parametric value is equivalent to the type `T` or not
462
+ *
463
+ * @author Jeongho Nam - https://github.com/samchon
464
+ */
465
+ export function equals<T>(input: unknown): input is T;
466
+
467
+ /**
468
+ * @internal
469
+ */
470
+ export function equals(): never {
471
+ halt("equals");
472
+ }
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: T): IValidation<T>;
499
+
500
+ /**
501
+ * Validates equality between a value and its type.
502
+ *
503
+ * Validates a parametric value type and archives all the type errors into an
504
+ * {@link IValidation.errors} array, if the parametric value is not following the
505
+ * type `T` or some superfluous property that is not listed on the type `T` has been
506
+ * found. Of course, if the parametric value is following the type `T` and no
507
+ * superfluous property exists, the {@link IValidation.errors} array would be empty
508
+ * and {@link IValidation.success} would have the `true` value.
509
+ *
510
+ * If what you want is not finding all the error, but asserting the parametric value
511
+ * type with exception throwing, you can choose {@link assert} function instead.
512
+ * Otherwise, you just want to know whether the parametric value is matched with the
513
+ * type `T`, {@link is} function is the way to go.
514
+ *
515
+ * On the other and, if you don't want to allow any superfluous property that is not
516
+ * enrolled to the type `T`, you can use {@link validateEquals} function instead.
517
+ *
518
+ * @template Type of the input value
519
+ * @param input A value to be validated
520
+ * @returns Validation result
521
+ *
522
+ * @author Jeongho Nam - https://github.com/samchon
523
+ */
524
+ export function validateEquals<T>(input: unknown): IValidation<T>;
525
+
526
+ /**
527
+ * @internal
528
+ */
529
+ export function validateEquals(): never {
530
+ halt("validateEquals");
531
+ }
532
+
533
+ /* -----------------------------------------------------------
534
+ RANDOM
535
+ ----------------------------------------------------------- */
536
+ /**
537
+ * > You must configure the generic argument `T`.
538
+ *
539
+ * Generate random data.
540
+ *
541
+ * Generates a random data following type the `T`.
542
+ *
543
+ * For reference, this `typia.random()` function generates only primitive type.
544
+ * If there're some methods in the type `T` or its nested instances, those would
545
+ * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
546
+ * would be generated instead.
547
+ *
548
+ * @template T Type of data to generate
549
+ * @param generator Random data generator
550
+ * @return Randomly generated data
551
+ *
552
+ * @author Jeongho Nam - https://github.com/samchon
553
+ */
554
+ export function random(generator?: Partial<IRandomGenerator>): never;
555
+
556
+ /**
557
+ * Generate random data.
558
+ *
559
+ * Generates a random data following type the `T`.
560
+ *
561
+ * For reference, this `typia.random()` function generates only primitive type.
562
+ * If there're some methods in the type `T` or its nested instances, those would
563
+ * be ignored. Also, when the type `T` has a `toJSON()` method, its return type
564
+ * would be generated instead.
565
+ *
566
+ * @template T Type of data to generate
567
+ * @param generator Random data generator
568
+ * @return Randomly generated data
569
+ *
570
+ * @author Jeongho Nam - https://github.com/samchon
571
+ */
572
+ export function random<T>(generator?: Partial<IRandomGenerator>): Resolved<T>;
573
+
574
+ /**
575
+ * @internal
576
+ */
577
+ export function random(): never {
578
+ halt("random");
579
+ }
580
+
581
+ /* -----------------------------------------------------------
582
+ FACTORY FUNCTIONS
583
+ ----------------------------------------------------------- */
584
+ /**
585
+ * Creates a reusable {@link assert} function.
586
+ *
587
+ * @danger You must configure the generic argument `T`
588
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
589
+ * @returns Nothing until you configure the generic argument `T`
590
+ * @throws compile error
591
+ *
592
+ * @author Jeongho Nam - https://github.com/samchon
593
+ */
594
+ export function createAssert(
595
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
596
+ ): never;
597
+
598
+ /**
599
+ * Creates a reusable {@link assert} function.
600
+ *
601
+ * @template T Type of the input value
602
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
603
+ * @returns A reusable `assert` function
604
+ *
605
+ * @author Jeongho Nam - https://github.com/samchon
606
+ */
607
+ export function createAssert<T>(
608
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
609
+ ): (input: unknown) => T;
610
+
611
+ /**
612
+ * @internal
613
+ */
614
+ export function createAssert<T>(): (input: unknown) => T {
615
+ halt("createAssert");
616
+ }
617
+
618
+ /**
619
+ * Creates a reusable {@link assertGuard} function.
620
+ *
621
+ * Note that, you've to declare the variable type of the factory function caller
622
+ * like below. If you don't declare the variable type, compilation error be thrown.
623
+ * This is the special rule of the TypeScript compiler.
624
+ *
625
+ * ```typescript
626
+ * // MUST DECLARE THE VARIABLE TYPE
627
+ * const func: typia.AssertionGuard<number> = typia.createAssertGuard<number>();
628
+ *
629
+ * // IF NOT, COMPILATION ERROR BE OCCURED
630
+ * const func = typia.createAssertGuard<number>();
631
+ * ```
632
+ *
633
+ * > *Assertions require every name in the call target to be declared with an*
634
+ * > *explicit type annotation.*
635
+ *
636
+ * @danger You must configure the generic argument `T`
637
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
638
+ * @returns Nothing until you configure the generic argument `T`
639
+ * @throws compile error
640
+ *
641
+ * @author Jeongho Nam - https://github.com/samchon
642
+ */
643
+ export function createAssertGuard(
644
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
645
+ ): never;
646
+
647
+ /**
648
+ * Creates a reusable {@link assertGuard} function.
649
+ *
650
+ * Note that, you've to declare the variable type of the factory function caller
651
+ * like below. If you don't declare the variable type, compilation error be thrown.
652
+ * This is the special rule of the TypeScript compiler.
653
+ *
654
+ * ```typescript
655
+ * // MUST DECLARE THE VARIABLE TYPE
656
+ * const func: typia.AssertionGuard<number> = typia.createAssertGuard<number>();
657
+ *
658
+ * // IF NOT, COMPILATION ERROR BE OCCURED
659
+ * const func = typia.createAssertGuard<number>();
660
+ * ```
661
+ *
662
+ * > *Assertions require every name in the call target to be declared with an*
663
+ * > *explicit type annotation.*
664
+ *
665
+ * @returns Nothing until you configure the generic argument `T`
666
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
667
+ * @throws compile error
668
+ *
669
+ * @author Jeongho Nam - https://github.com/samchon
670
+ */
671
+ export function createAssertGuard<T>(
672
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
673
+ ): (input: unknown) => AssertionGuard<T>;
674
+
675
+ /**
676
+ * @internal
677
+ */
678
+ export function createAssertGuard<T>(): (input: unknown) => AssertionGuard<T> {
679
+ halt("createAssertGuard");
680
+ }
681
+
682
+ /**
683
+ * Creates a reusable {@link is} function.
684
+ *
685
+ * @danger You must configure the generic argument `T`
686
+ * @returns Nothing until you configure the generic argument `T`
687
+ * @throws compile error
688
+ *
689
+ * @author Jeongho Nam - https://github.com/samchon
690
+ */
691
+ export function createIs(): never;
692
+
693
+ /**
694
+ * Creates a reusable {@link is} function.
695
+ *
696
+ * @template T Type of the input value
697
+ * @returns A reusable `is` function
698
+ *
699
+ * @author Jeongho Nam - https://github.com/samchon
700
+ */
701
+ export function createIs<T>(): (input: unknown) => input is T;
702
+
703
+ /**
704
+ * @internal
705
+ */
706
+ export function createIs<T>(): (input: unknown) => input is T {
707
+ halt("createIs");
708
+ }
709
+
710
+ /**
711
+ * Creates a reusable {@link validate} function.
712
+ *
713
+ * @danger You must configure the generic argument `T`
714
+ * @returns Nothing until you configure the generic argument `T`
715
+ * @throws compile error
716
+ *
717
+ * @author Jeongho Nam - https://github.com/samchon
718
+ */
719
+ export function createValidate(): never;
720
+
721
+ /**
722
+ * Creates a reusable {@link validate} function.
723
+ *
724
+ * @template T Type of the input value
725
+ * @returns A reusable `validate` function
726
+ *
727
+ * @author Jeongho Nam - https://github.com/samchon
728
+ */
729
+ export function createValidate<T>(): (input: unknown) => IValidation<T>;
730
+
731
+ /**
732
+ * @internal
733
+ */
734
+ export function createValidate(): (input: unknown) => IValidation {
735
+ halt("createValidate");
736
+ }
737
+
738
+ /**
739
+ * Creates a reusable {@link assertEquals} function.
740
+ *
741
+ * @danger You must configure the generic argument `T`
742
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
743
+ * @returns Nothing until you configure the generic argument `T`
744
+ * @throws compile error
745
+ *
746
+ * @author Jeongho Nam - https://github.com/samchon
747
+ */
748
+ export function createAssertEquals(
749
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
750
+ ): never;
751
+
752
+ /**
753
+ * Creates a reusable {@link assertEquals} function.
754
+ *
755
+ * @template T Type of the input value
756
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
757
+ * @returns A reusable `assertEquals` function
758
+ *
759
+ * @author Jeongho Nam - https://github.com/samchon
760
+ */
761
+ export function createAssertEquals<T>(
762
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
763
+ ): (input: unknown) => T;
764
+
765
+ /**
766
+ * @internal
767
+ */
768
+ export function createAssertEquals<T>(): (input: unknown) => T {
769
+ halt("createAssertEquals");
770
+ }
771
+
772
+ /**
773
+ * Creates a reusable {@link assertGuardEquals} function.
774
+ *
775
+ * Note that, you've to declare the variable type of the factory function caller
776
+ * like below. If you don't declare the variable type, compilation error be thrown.
777
+ * This is the special rule of the TypeScript compiler.
778
+ *
779
+ * ```typescript
780
+ * // MUST DECLARE THE VARIABLE TYPE
781
+ * const func: typia.AssertionGuard<number> = typia.createAssertGuardEquals<number>();
782
+ *
783
+ * // IF NOT, COMPILATION ERROR BE OCCURED
784
+ * const func = typia.createAssertGuardEquals<number>();
785
+ * ```
786
+ *
787
+ * > *Assertions require every name in the call target to be declared with an*
788
+ * > *explicit type annotation.*
789
+ *
790
+ * @danger You must configure the generic argument `T`
791
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
792
+ * @returns Nothing until you configure the generic argument `T`
793
+ * @throws compile error
794
+ *
795
+ * @author Jeongho Nam - https://github.com/samchon
796
+ */
797
+ export function createAssertGuardEquals(
798
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
799
+ ): never;
800
+
801
+ /**
802
+ * Creates a reusable {@link assertGuardEquals} function.
803
+ *
804
+ * Note that, you've to declare the variable type of the factory function caller
805
+ * like below. If you don't declare the variable type, compilation error be thrown.
806
+ * This is the special rule of the TypeScript compiler.
807
+ *
808
+ * ```typescript
809
+ * // MUST DECLARE THE VARIABLE TYPE
810
+ * const func: typia.AssertionGuard<number> = typia.createAssertGuardEquals<number>();
811
+ *
812
+ * // IF NOT, COMPILATION ERROR BE OCCURED
813
+ * const func = typia.createAssertGuardEquals<number>();
814
+ * ```
815
+ *
816
+ * > *Assertions require every name in the call target to be declared with an*
817
+ * > *explicit type annotation.*
818
+ *
819
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
820
+ * @returns Nothing until you configure the generic argument `T`
821
+ * @throws compile error
822
+ *
823
+ * @author Jeongho Nam - https://github.com/samchon
824
+ */
825
+ export function createAssertGuardEquals<T>(
826
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
827
+ ): (input: unknown) => AssertionGuard<T>;
828
+
829
+ /**
830
+ * @internal
831
+ */
832
+ export function createAssertGuardEquals<T>(): (
833
+ input: unknown,
834
+ ) => AssertionGuard<T> {
835
+ halt("createAssertGuardEquals");
836
+ }
837
+
838
+ /**
839
+ * Creates a reusable {@link equals} function.
840
+ *
841
+ * @danger You must configure the generic argument `T`
842
+ * @returns Nothing until you configure the generic argument `T`
843
+ * @throws compile error
844
+ *
845
+ * @author Jeongho Nam - https://github.com/samchon
846
+ */
847
+ export function createEquals(): never;
848
+
849
+ /**
850
+ * Creates a reusable {@link equals} function.
851
+ *
852
+ * @template T Type of the input value
853
+ * @returns A reusable `equals` function
854
+ *
855
+ * @author Jeongho Nam - https://github.com/samchon
856
+ */
857
+ export function createEquals<T>(): (input: unknown) => input is T;
858
+
859
+ /**
860
+ * @internal
861
+ */
862
+ export function createEquals<T>(): (input: unknown) => input is T {
863
+ halt("createEquals");
864
+ }
865
+
866
+ /**
867
+ * Creates a reusable {@link validateEquals} function.
868
+ *
869
+ * @danger You must configure the generic argument `T`
870
+ * @returns Nothing until you configure the generic argument `T`
871
+ * @throws compile error
872
+ *
873
+ * @author Jeongho Nam - https://github.com/samchon
874
+ */
875
+ export function createValidateEquals(): never;
876
+
877
+ /**
878
+ * Creates a reusable {@link validateEquals} function.
879
+ *
880
+ * @template T Type of the input value
881
+ * @returns A reusable `validateEquals` function
882
+ *
883
+ * @author Jeongho Nam - https://github.com/samchon
884
+ */
885
+ export function createValidateEquals<T>(): (input: unknown) => IValidation<T>;
886
+
887
+ /**
888
+ * @internal
889
+ */
890
+ export function createValidateEquals(): (input: unknown) => IValidation {
891
+ halt("createValidateEquals");
892
+ }
893
+
894
+ /**
895
+ * Creates a reusable {@link random} function.
896
+ *
897
+ * @danger You must configure the generic argument `T`
898
+ * @param generator Random data generator
899
+ * @returns Nothing until you configure the generic argument `T`
900
+ * @throws compile error
901
+ *
902
+ * @author Jeongho Nam - https://github.com/samchon
903
+ */
904
+ export function createRandom(generator?: Partial<IRandomGenerator>): never;
905
+
906
+ /**
907
+ * Creates a resuable {@link random} function.
908
+ *
909
+ * @template T Type of the input value
910
+ * @param generator Random data generator
911
+ * @returns A reusable `random` function
912
+ *
913
+ * @author Jeongho Nam - https://github.com/samchon
914
+ */
915
+ export function createRandom<T>(
916
+ generator?: Partial<IRandomGenerator>,
917
+ ): () => Resolved<T>;
918
+
919
+ /**
920
+ * @internal
921
+ */
922
+ export function createRandom(): never {
923
+ halt("createRandom");
924
+ }
925
+
926
+ /**
927
+ * @internal
928
+ */
929
+ function halt(name: string): never {
930
+ throw new Error(
931
+ `Error on typia.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`,
932
+ );
933
+ }