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