@willaimg/yatsp 4.3.6

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 (830) hide show
  1. package/README.md +22 -0
  2. package/compile.cjs +96 -0
  3. package/compile.d.cts +1 -0
  4. package/compile.d.ts +1 -0
  5. package/compile.js +52 -0
  6. package/index.cjs +52 -0
  7. package/index.d.cts +3 -0
  8. package/index.d.ts +3 -0
  9. package/index.js +7 -0
  10. package/locales/index.cjs +36 -0
  11. package/locales/index.d.cts +1 -0
  12. package/locales/index.d.ts +1 -0
  13. package/locales/index.js +1 -0
  14. package/mini/index.cjs +51 -0
  15. package/mini/index.d.cts +3 -0
  16. package/mini/index.d.ts +3 -0
  17. package/mini/index.js +3 -0
  18. package/package.json +142 -0
  19. package/src/compile.ts +56 -0
  20. package/src/index.ts +7 -0
  21. package/src/locales/index.ts +1 -0
  22. package/src/mini/index.ts +3 -0
  23. package/src/v3/YatspError.ts +340 -0
  24. package/src/v3/benchmarks/datetime.ts +58 -0
  25. package/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  26. package/src/v3/benchmarks/index.ts +59 -0
  27. package/src/v3/benchmarks/ipv4.ts +57 -0
  28. package/src/v3/benchmarks/object.ts +69 -0
  29. package/src/v3/benchmarks/primitives.ts +162 -0
  30. package/src/v3/benchmarks/realworld.ts +63 -0
  31. package/src/v3/benchmarks/string.ts +55 -0
  32. package/src/v3/benchmarks/union.ts +80 -0
  33. package/src/v3/errors.ts +13 -0
  34. package/src/v3/external.ts +6 -0
  35. package/src/v3/helpers/enumUtil.ts +17 -0
  36. package/src/v3/helpers/errorUtil.ts +8 -0
  37. package/src/v3/helpers/parseUtil.ts +176 -0
  38. package/src/v3/helpers/partialUtil.ts +34 -0
  39. package/src/v3/helpers/typeAliases.ts +2 -0
  40. package/src/v3/helpers/util.ts +224 -0
  41. package/src/v3/index.ts +4 -0
  42. package/src/v3/locales/en.ts +124 -0
  43. package/src/v3/standard-schema.ts +113 -0
  44. package/src/v3/tests/Mocker.ts +54 -0
  45. package/src/v3/tests/all-errors.test.ts +157 -0
  46. package/src/v3/tests/anyunknown.test.ts +28 -0
  47. package/src/v3/tests/array.test.ts +71 -0
  48. package/src/v3/tests/async-parsing.test.ts +388 -0
  49. package/src/v3/tests/async-refinements.test.ts +46 -0
  50. package/src/v3/tests/base.test.ts +29 -0
  51. package/src/v3/tests/bigint.test.ts +55 -0
  52. package/src/v3/tests/branded.test.ts +53 -0
  53. package/src/v3/tests/catch.test.ts +220 -0
  54. package/src/v3/tests/coerce.test.ts +133 -0
  55. package/src/v3/tests/complex.test.ts +70 -0
  56. package/src/v3/tests/custom.test.ts +31 -0
  57. package/src/v3/tests/date.test.ts +32 -0
  58. package/src/v3/tests/deepmasking.test.ts +186 -0
  59. package/src/v3/tests/default.test.ts +112 -0
  60. package/src/v3/tests/description.test.ts +33 -0
  61. package/src/v3/tests/discriminated-unions.test.ts +315 -0
  62. package/src/v3/tests/enum.test.ts +80 -0
  63. package/src/v3/tests/error.test.ts +586 -0
  64. package/src/v3/tests/firstparty.test.ts +87 -0
  65. package/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  66. package/src/v3/tests/function.test.ts +261 -0
  67. package/src/v3/tests/generics.test.ts +48 -0
  68. package/src/v3/tests/instanceof.test.ts +37 -0
  69. package/src/v3/tests/intersection.test.ts +128 -0
  70. package/src/v3/tests/language-server.source.ts +76 -0
  71. package/src/v3/tests/language-server.test.ts +206 -0
  72. package/src/v3/tests/literal.test.ts +36 -0
  73. package/src/v3/tests/map.test.ts +110 -0
  74. package/src/v3/tests/masking.test.ts +4 -0
  75. package/src/v3/tests/mocker.test.ts +19 -0
  76. package/src/v3/tests/nan.test.ts +24 -0
  77. package/src/v3/tests/nativeEnum.test.ts +87 -0
  78. package/src/v3/tests/nullable.test.ts +42 -0
  79. package/src/v3/tests/number.test.ts +176 -0
  80. package/src/v3/tests/object-augmentation.test.ts +29 -0
  81. package/src/v3/tests/object-in-es5-env.test.ts +29 -0
  82. package/src/v3/tests/object.test.ts +431 -0
  83. package/src/v3/tests/optional.test.ts +42 -0
  84. package/src/v3/tests/parseUtil.test.ts +23 -0
  85. package/src/v3/tests/parser.test.ts +41 -0
  86. package/src/v3/tests/partials.test.ts +243 -0
  87. package/src/v3/tests/pickomit.test.ts +111 -0
  88. package/src/v3/tests/pipeline.test.ts +29 -0
  89. package/src/v3/tests/preprocess.test.ts +186 -0
  90. package/src/v3/tests/primitive.test.ts +440 -0
  91. package/src/v3/tests/promise.test.ts +90 -0
  92. package/src/v3/tests/readonly.test.ts +114 -0
  93. package/src/v3/tests/record.test.ts +171 -0
  94. package/src/v3/tests/recursive.test.ts +197 -0
  95. package/src/v3/tests/refine.test.ts +313 -0
  96. package/src/v3/tests/safeparse.test.ts +27 -0
  97. package/src/v3/tests/set.test.ts +142 -0
  98. package/src/v3/tests/standard-schema.test.ts +83 -0
  99. package/src/v3/tests/string.test.ts +922 -0
  100. package/src/v3/tests/transformer.test.ts +233 -0
  101. package/src/v3/tests/tuple.test.ts +90 -0
  102. package/src/v3/tests/unions.test.ts +57 -0
  103. package/src/v3/tests/validations.test.ts +133 -0
  104. package/src/v3/tests/void.test.ts +15 -0
  105. package/src/v3/types.ts +5162 -0
  106. package/src/v4/classic/checks.ts +33 -0
  107. package/src/v4/classic/coerce.ts +27 -0
  108. package/src/v4/classic/compat.ts +78 -0
  109. package/src/v4/classic/deep-partial.ts +76 -0
  110. package/src/v4/classic/errors.ts +97 -0
  111. package/src/v4/classic/external.ts +57 -0
  112. package/src/v4/classic/from-json-schema.ts +944 -0
  113. package/src/v4/classic/in-out.ts +45 -0
  114. package/src/v4/classic/index.ts +5 -0
  115. package/src/v4/classic/iso.ts +20 -0
  116. package/src/v4/classic/parse.ts +88 -0
  117. package/src/v4/classic/schemas.ts +2994 -0
  118. package/src/v4/classic/tests/anyunknown.test.ts +26 -0
  119. package/src/v4/classic/tests/apply.test.ts +86 -0
  120. package/src/v4/classic/tests/array.test.ts +264 -0
  121. package/src/v4/classic/tests/assignability.test.ts +402 -0
  122. package/src/v4/classic/tests/async-parsing.test.ts +381 -0
  123. package/src/v4/classic/tests/async-refinements.test.ts +68 -0
  124. package/src/v4/classic/tests/base.test.ts +7 -0
  125. package/src/v4/classic/tests/bigint.test.ts +89 -0
  126. package/src/v4/classic/tests/brand.test.ts +106 -0
  127. package/src/v4/classic/tests/catch.test.ts +604 -0
  128. package/src/v4/classic/tests/coalesce.test.ts +20 -0
  129. package/src/v4/classic/tests/codec-examples.test.ts +572 -0
  130. package/src/v4/classic/tests/codec.test.ts +704 -0
  131. package/src/v4/classic/tests/coerce.test.ts +160 -0
  132. package/src/v4/classic/tests/continuability.test.ts +374 -0
  133. package/src/v4/classic/tests/credit-card.test.ts +76 -0
  134. package/src/v4/classic/tests/custom.test.ts +40 -0
  135. package/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  136. package/src/v4/classic/tests/date.test.ts +92 -0
  137. package/src/v4/classic/tests/datetime.test.ts +316 -0
  138. package/src/v4/classic/tests/deep-partial.test.ts +380 -0
  139. package/src/v4/classic/tests/default-locale.test.ts +32 -0
  140. package/src/v4/classic/tests/default.test.ts +455 -0
  141. package/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  142. package/src/v4/classic/tests/description.test.ts +32 -0
  143. package/src/v4/classic/tests/detached-methods.test.ts +226 -0
  144. package/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
  145. package/src/v4/classic/tests/enum.test.ts +305 -0
  146. package/src/v4/classic/tests/error-utils.test.ts +917 -0
  147. package/src/v4/classic/tests/error.test.ts +1108 -0
  148. package/src/v4/classic/tests/file.test.ts +96 -0
  149. package/src/v4/classic/tests/firstparty.test.ts +179 -0
  150. package/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  151. package/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
  152. package/src/v4/classic/tests/function.test.ts +391 -0
  153. package/src/v4/classic/tests/generics.test.ts +72 -0
  154. package/src/v4/classic/tests/global-config.test.ts +32 -0
  155. package/src/v4/classic/tests/hash.test.ts +67 -0
  156. package/src/v4/classic/tests/iban.test.ts +81 -0
  157. package/src/v4/classic/tests/in-out.test.ts +159 -0
  158. package/src/v4/classic/tests/index.test.ts +958 -0
  159. package/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  160. package/src/v4/classic/tests/instanceof.test.ts +127 -0
  161. package/src/v4/classic/tests/intersection.test.ts +334 -0
  162. package/src/v4/classic/tests/issue-schema.test.ts +215 -0
  163. package/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
  164. package/src/v4/classic/tests/json.test.ts +109 -0
  165. package/src/v4/classic/tests/lazy.test.ts +262 -0
  166. package/src/v4/classic/tests/literal.test.ts +128 -0
  167. package/src/v4/classic/tests/locales_ka.test.ts +29 -0
  168. package/src/v4/classic/tests/locales_ro.test.ts +24 -0
  169. package/src/v4/classic/tests/map.test.ts +342 -0
  170. package/src/v4/classic/tests/nan.test.ts +21 -0
  171. package/src/v4/classic/tests/nested-refine.test.ts +168 -0
  172. package/src/v4/classic/tests/nonoptional.test.ts +101 -0
  173. package/src/v4/classic/tests/nullable.test.ts +22 -0
  174. package/src/v4/classic/tests/number.test.ts +401 -0
  175. package/src/v4/classic/tests/object.test.ts +1006 -0
  176. package/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  177. package/src/v4/classic/tests/optional.test.ts +366 -0
  178. package/src/v4/classic/tests/partial.test.ts +497 -0
  179. package/src/v4/classic/tests/pickomit.test.ts +211 -0
  180. package/src/v4/classic/tests/pipe.test.ts +101 -0
  181. package/src/v4/classic/tests/prefault.test.ts +144 -0
  182. package/src/v4/classic/tests/preprocess-types.test.ts +44 -0
  183. package/src/v4/classic/tests/preprocess.test.ts +351 -0
  184. package/src/v4/classic/tests/primitive.test.ts +175 -0
  185. package/src/v4/classic/tests/promise.test.ts +81 -0
  186. package/src/v4/classic/tests/properties.test.ts +141 -0
  187. package/src/v4/classic/tests/prototypes.test.ts +23 -0
  188. package/src/v4/classic/tests/readonly.test.ts +184 -0
  189. package/src/v4/classic/tests/record.test.ts +885 -0
  190. package/src/v4/classic/tests/recursive-types.test.ts +707 -0
  191. package/src/v4/classic/tests/redos.test.ts +68 -0
  192. package/src/v4/classic/tests/refine.test.ts +693 -0
  193. package/src/v4/classic/tests/registries.test.ts +243 -0
  194. package/src/v4/classic/tests/set.test.ts +190 -0
  195. package/src/v4/classic/tests/standard-schema.test.ts +153 -0
  196. package/src/v4/classic/tests/string-formats.test.ts +125 -0
  197. package/src/v4/classic/tests/string.test.ts +1440 -0
  198. package/src/v4/classic/tests/stringbool.test.ts +124 -0
  199. package/src/v4/classic/tests/template-literal.test.ts +814 -0
  200. package/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  201. package/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
  202. package/src/v4/classic/tests/transform.test.ts +378 -0
  203. package/src/v4/classic/tests/tuple.test.ts +511 -0
  204. package/src/v4/classic/tests/union.test.ts +310 -0
  205. package/src/v4/classic/tests/url.test.ts +13 -0
  206. package/src/v4/classic/tests/validate.test.ts +645 -0
  207. package/src/v4/classic/tests/validations.test.ts +283 -0
  208. package/src/v4/classic/tests/void.test.ts +12 -0
  209. package/src/v4/core/api.ts +1913 -0
  210. package/src/v4/core/checks.ts +1274 -0
  211. package/src/v4/core/compile.ts +2315 -0
  212. package/src/v4/core/core.ts +230 -0
  213. package/src/v4/core/doc.ts +52 -0
  214. package/src/v4/core/errors.ts +546 -0
  215. package/src/v4/core/index.ts +19 -0
  216. package/src/v4/core/json-schema-generator.ts +131 -0
  217. package/src/v4/core/json-schema-processors.ts +934 -0
  218. package/src/v4/core/json-schema.ts +148 -0
  219. package/src/v4/core/memoizer.ts +331 -0
  220. package/src/v4/core/parse.ts +309 -0
  221. package/src/v4/core/regexes.ts +217 -0
  222. package/src/v4/core/registries.ts +109 -0
  223. package/src/v4/core/schemas.ts +5295 -0
  224. package/src/v4/core/standard-schema.ts +159 -0
  225. package/src/v4/core/tests/cached.test.ts +54 -0
  226. package/src/v4/core/tests/compile-differential.test.ts +1004 -0
  227. package/src/v4/core/tests/compile-generative.test.ts +445 -0
  228. package/src/v4/core/tests/compile-global.test.ts +89 -0
  229. package/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  230. package/src/v4/core/tests/compile-stats.test.ts +34 -0
  231. package/src/v4/core/tests/compile.test.ts +2040 -0
  232. package/src/v4/core/tests/email-regex.test.ts +140 -0
  233. package/src/v4/core/tests/extend.test.ts +59 -0
  234. package/src/v4/core/tests/index.test.ts +46 -0
  235. package/src/v4/core/tests/locales/be.test.ts +124 -0
  236. package/src/v4/core/tests/locales/el.test.ts +214 -0
  237. package/src/v4/core/tests/locales/en.test.ts +22 -0
  238. package/src/v4/core/tests/locales/es.test.ts +180 -0
  239. package/src/v4/core/tests/locales/fr.test.ts +72 -0
  240. package/src/v4/core/tests/locales/he.test.ts +379 -0
  241. package/src/v4/core/tests/locales/hr.test.ts +163 -0
  242. package/src/v4/core/tests/locales/nl.test.ts +46 -0
  243. package/src/v4/core/tests/locales/parity.test.ts +42 -0
  244. package/src/v4/core/tests/locales/ru.test.ts +128 -0
  245. package/src/v4/core/tests/locales/tg.test.ts +85 -0
  246. package/src/v4/core/tests/locales/tk.test.ts +69 -0
  247. package/src/v4/core/tests/locales/tr.test.ts +69 -0
  248. package/src/v4/core/tests/locales/uz.test.ts +105 -0
  249. package/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  250. package/src/v4/core/tests/record-constructor.test.ts +125 -0
  251. package/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  252. package/src/v4/core/tests/treeshake.test.ts +51 -0
  253. package/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  254. package/src/v4/core/to-json-schema.ts +857 -0
  255. package/src/v4/core/util.ts +1284 -0
  256. package/src/v4/core/versions.ts +5 -0
  257. package/src/v4/core/visit.ts +193 -0
  258. package/src/v4/core/zsf.ts +323 -0
  259. package/src/v4/index.ts +4 -0
  260. package/src/v4/locales/ar.ts +120 -0
  261. package/src/v4/locales/az.ts +116 -0
  262. package/src/v4/locales/be.ts +188 -0
  263. package/src/v4/locales/bg.ts +133 -0
  264. package/src/v4/locales/bn.ts +123 -0
  265. package/src/v4/locales/ca.ts +121 -0
  266. package/src/v4/locales/ckb.ts +140 -0
  267. package/src/v4/locales/cs.ts +123 -0
  268. package/src/v4/locales/da.ts +128 -0
  269. package/src/v4/locales/de.ts +121 -0
  270. package/src/v4/locales/el.ts +124 -0
  271. package/src/v4/locales/en.ts +136 -0
  272. package/src/v4/locales/eo.ts +123 -0
  273. package/src/v4/locales/es.ts +145 -0
  274. package/src/v4/locales/fa.ts +131 -0
  275. package/src/v4/locales/fi.ts +126 -0
  276. package/src/v4/locales/fr-CA.ts +121 -0
  277. package/src/v4/locales/fr.ts +139 -0
  278. package/src/v4/locales/gu.ts +123 -0
  279. package/src/v4/locales/he.ts +253 -0
  280. package/src/v4/locales/hi.ts +126 -0
  281. package/src/v4/locales/hr.ts +135 -0
  282. package/src/v4/locales/hu.ts +122 -0
  283. package/src/v4/locales/hy.ts +175 -0
  284. package/src/v4/locales/id.ts +120 -0
  285. package/src/v4/locales/index.ts +63 -0
  286. package/src/v4/locales/is.ts +124 -0
  287. package/src/v4/locales/it.ts +121 -0
  288. package/src/v4/locales/ja.ts +119 -0
  289. package/src/v4/locales/ka.ts +128 -0
  290. package/src/v4/locales/kh.ts +7 -0
  291. package/src/v4/locales/km.ts +124 -0
  292. package/src/v4/locales/kn.ts +126 -0
  293. package/src/v4/locales/ko.ts +126 -0
  294. package/src/v4/locales/lt.ts +243 -0
  295. package/src/v4/locales/mk.ts +123 -0
  296. package/src/v4/locales/ms.ts +120 -0
  297. package/src/v4/locales/ne.ts +128 -0
  298. package/src/v4/locales/nl.ts +126 -0
  299. package/src/v4/locales/nn.ts +121 -0
  300. package/src/v4/locales/no.ts +121 -0
  301. package/src/v4/locales/ota.ts +122 -0
  302. package/src/v4/locales/pl.ts +123 -0
  303. package/src/v4/locales/ps.ts +131 -0
  304. package/src/v4/locales/pt-BR.ts +161 -0
  305. package/src/v4/locales/pt.ts +159 -0
  306. package/src/v4/locales/ro.ts +132 -0
  307. package/src/v4/locales/ru.ts +188 -0
  308. package/src/v4/locales/sk.ts +123 -0
  309. package/src/v4/locales/sl.ts +123 -0
  310. package/src/v4/locales/sv.ts +124 -0
  311. package/src/v4/locales/ta.ts +123 -0
  312. package/src/v4/locales/tg.ts +135 -0
  313. package/src/v4/locales/th.ts +124 -0
  314. package/src/v4/locales/tk.ts +113 -0
  315. package/src/v4/locales/tr.ts +116 -0
  316. package/src/v4/locales/ua.ts +7 -0
  317. package/src/v4/locales/uk.ts +122 -0
  318. package/src/v4/locales/ur.ts +124 -0
  319. package/src/v4/locales/uz.ts +120 -0
  320. package/src/v4/locales/vi.ts +122 -0
  321. package/src/v4/locales/yo.ts +129 -0
  322. package/src/v4/locales/zh-CN.ts +121 -0
  323. package/src/v4/locales/zh-TW.ts +120 -0
  324. package/src/v4/mini/checks.ts +33 -0
  325. package/src/v4/mini/coerce.ts +27 -0
  326. package/src/v4/mini/deep-partial.ts +73 -0
  327. package/src/v4/mini/external.ts +52 -0
  328. package/src/v4/mini/in-out.ts +45 -0
  329. package/src/v4/mini/index.ts +3 -0
  330. package/src/v4/mini/iso.ts +66 -0
  331. package/src/v4/mini/parse.ts +16 -0
  332. package/src/v4/mini/schemas.ts +2093 -0
  333. package/src/v4/mini/tests/apply.test.ts +57 -0
  334. package/src/v4/mini/tests/assignability.test.ts +190 -0
  335. package/src/v4/mini/tests/brand.test.ts +94 -0
  336. package/src/v4/mini/tests/checks.test.ts +158 -0
  337. package/src/v4/mini/tests/codec.test.ts +582 -0
  338. package/src/v4/mini/tests/computed.test.ts +30 -0
  339. package/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  340. package/src/v4/mini/tests/deep-partial.test.ts +54 -0
  341. package/src/v4/mini/tests/error.test.ts +41 -0
  342. package/src/v4/mini/tests/functions.test.ts +14 -0
  343. package/src/v4/mini/tests/index.test.ts +1148 -0
  344. package/src/v4/mini/tests/number.test.ts +109 -0
  345. package/src/v4/mini/tests/object.test.ts +292 -0
  346. package/src/v4/mini/tests/prototypes.test.ts +43 -0
  347. package/src/v4/mini/tests/recursive-types.test.ts +341 -0
  348. package/src/v4/mini/tests/standard-schema.test.ts +50 -0
  349. package/src/v4/mini/tests/string.test.ts +396 -0
  350. package/src/v4-mini/index.ts +3 -0
  351. package/v3/YatspError.cjs +167 -0
  352. package/v3/YatspError.d.cts +164 -0
  353. package/v3/YatspError.d.ts +164 -0
  354. package/v3/YatspError.js +143 -0
  355. package/v3/errors.cjs +36 -0
  356. package/v3/errors.d.cts +5 -0
  357. package/v3/errors.d.ts +5 -0
  358. package/v3/errors.js +9 -0
  359. package/v3/external.cjs +41 -0
  360. package/v3/external.d.cts +6 -0
  361. package/v3/external.d.ts +6 -0
  362. package/v3/external.js +6 -0
  363. package/v3/helpers/enumUtil.cjs +21 -0
  364. package/v3/helpers/enumUtil.d.cts +8 -0
  365. package/v3/helpers/enumUtil.d.ts +8 -0
  366. package/v3/helpers/enumUtil.js +1 -0
  367. package/v3/helpers/errorUtil.cjs +28 -0
  368. package/v3/helpers/errorUtil.d.cts +9 -0
  369. package/v3/helpers/errorUtil.d.ts +9 -0
  370. package/v3/helpers/errorUtil.js +6 -0
  371. package/v3/helpers/parseUtil.cjs +143 -0
  372. package/v3/helpers/parseUtil.d.cts +78 -0
  373. package/v3/helpers/parseUtil.d.ts +78 -0
  374. package/v3/helpers/parseUtil.js +109 -0
  375. package/v3/helpers/partialUtil.cjs +21 -0
  376. package/v3/helpers/partialUtil.d.cts +8 -0
  377. package/v3/helpers/partialUtil.d.ts +8 -0
  378. package/v3/helpers/partialUtil.js +1 -0
  379. package/v3/helpers/typeAliases.cjs +21 -0
  380. package/v3/helpers/typeAliases.d.cts +2 -0
  381. package/v3/helpers/typeAliases.d.ts +2 -0
  382. package/v3/helpers/typeAliases.js +1 -0
  383. package/v3/helpers/util.cjs +156 -0
  384. package/v3/helpers/util.d.cts +85 -0
  385. package/v3/helpers/util.d.ts +85 -0
  386. package/v3/helpers/util.js +133 -0
  387. package/v3/index.cjs +52 -0
  388. package/v3/index.d.cts +4 -0
  389. package/v3/index.d.ts +4 -0
  390. package/v3/index.js +4 -0
  391. package/v3/locales/en.cjs +112 -0
  392. package/v3/locales/en.d.cts +3 -0
  393. package/v3/locales/en.d.ts +3 -0
  394. package/v3/locales/en.js +109 -0
  395. package/v3/standard-schema.cjs +21 -0
  396. package/v3/standard-schema.d.cts +102 -0
  397. package/v3/standard-schema.d.ts +102 -0
  398. package/v3/standard-schema.js +1 -0
  399. package/v3/types.cjs +3798 -0
  400. package/v3/types.d.cts +1034 -0
  401. package/v3/types.d.ts +1034 -0
  402. package/v3/types.js +3697 -0
  403. package/v4/classic/checks.cjs +53 -0
  404. package/v4/classic/checks.d.cts +1 -0
  405. package/v4/classic/checks.d.ts +1 -0
  406. package/v4/classic/checks.js +1 -0
  407. package/v4/classic/coerce.cjs +66 -0
  408. package/v4/classic/coerce.d.cts +17 -0
  409. package/v4/classic/coerce.d.ts +17 -0
  410. package/v4/classic/coerce.js +17 -0
  411. package/v4/classic/compat.cjs +80 -0
  412. package/v4/classic/compat.d.cts +48 -0
  413. package/v4/classic/compat.d.ts +48 -0
  414. package/v4/classic/compat.js +31 -0
  415. package/v4/classic/deep-partial.cjs +58 -0
  416. package/v4/classic/deep-partial.d.cts +14 -0
  417. package/v4/classic/deep-partial.d.ts +14 -0
  418. package/v4/classic/deep-partial.js +13 -0
  419. package/v4/classic/errors.cjs +102 -0
  420. package/v4/classic/errors.d.cts +29 -0
  421. package/v4/classic/errors.d.ts +29 -0
  422. package/v4/classic/errors.js +57 -0
  423. package/v4/classic/external.cjs +97 -0
  424. package/v4/classic/external.d.cts +19 -0
  425. package/v4/classic/external.d.ts +19 -0
  426. package/v4/classic/external.js +17 -0
  427. package/v4/classic/from-json-schema.cjs +926 -0
  428. package/v4/classic/from-json-schema.d.cts +12 -0
  429. package/v4/classic/from-json-schema.d.ts +12 -0
  430. package/v4/classic/from-json-schema.js +881 -0
  431. package/v4/classic/in-out.cjs +82 -0
  432. package/v4/classic/in-out.d.cts +8 -0
  433. package/v4/classic/in-out.d.ts +8 -0
  434. package/v4/classic/in-out.js +36 -0
  435. package/v4/classic/index.cjs +52 -0
  436. package/v4/classic/index.d.cts +3 -0
  437. package/v4/classic/index.d.ts +3 -0
  438. package/v4/classic/index.js +4 -0
  439. package/v4/classic/iso.cjs +68 -0
  440. package/v4/classic/iso.d.cts +7 -0
  441. package/v4/classic/iso.d.ts +7 -0
  442. package/v4/classic/iso.js +15 -0
  443. package/v4/classic/parse.cjs +63 -0
  444. package/v4/classic/parse.d.cts +44 -0
  445. package/v4/classic/parse.d.ts +44 -0
  446. package/v4/classic/parse.js +16 -0
  447. package/v4/classic/schemas.cjs +1676 -0
  448. package/v4/classic/schemas.d.cts +816 -0
  449. package/v4/classic/schemas.d.ts +816 -0
  450. package/v4/classic/schemas.js +1535 -0
  451. package/v4/core/api.cjs +1269 -0
  452. package/v4/core/api.d.cts +335 -0
  453. package/v4/core/api.d.ts +335 -0
  454. package/v4/core/api.js +1107 -0
  455. package/v4/core/checks.cjs +561 -0
  456. package/v4/core/checks.d.cts +294 -0
  457. package/v4/core/checks.d.ts +294 -0
  458. package/v4/core/checks.js +516 -0
  459. package/v4/core/compile.cjs +1908 -0
  460. package/v4/core/compile.d.cts +65 -0
  461. package/v4/core/compile.d.ts +65 -0
  462. package/v4/core/compile.js +1858 -0
  463. package/v4/core/core.cjs +167 -0
  464. package/v4/core/core.d.cts +82 -0
  465. package/v4/core/core.d.ts +82 -0
  466. package/v4/core/core.js +141 -0
  467. package/v4/core/doc.cjs +61 -0
  468. package/v4/core/doc.d.cts +16 -0
  469. package/v4/core/doc.d.ts +16 -0
  470. package/v4/core/doc.js +38 -0
  471. package/v4/core/errors.cjs +317 -0
  472. package/v4/core/errors.d.cts +225 -0
  473. package/v4/core/errors.d.ts +225 -0
  474. package/v4/core/errors.js +267 -0
  475. package/v4/core/index.cjs +70 -0
  476. package/v4/core/index.d.cts +19 -0
  477. package/v4/core/index.d.ts +19 -0
  478. package/v4/core/index.js +19 -0
  479. package/v4/core/json-schema-generator.cjs +122 -0
  480. package/v4/core/json-schema-generator.d.cts +65 -0
  481. package/v4/core/json-schema-generator.d.ts +65 -0
  482. package/v4/core/json-schema-generator.js +99 -0
  483. package/v4/core/json-schema-processors.cjs +929 -0
  484. package/v4/core/json-schema-processors.d.cts +65 -0
  485. package/v4/core/json-schema-processors.d.ts +65 -0
  486. package/v4/core/json-schema-processors.js +843 -0
  487. package/v4/core/json-schema.cjs +21 -0
  488. package/v4/core/json-schema.d.cts +89 -0
  489. package/v4/core/json-schema.d.ts +89 -0
  490. package/v4/core/json-schema.js +1 -0
  491. package/v4/core/memoizer.cjs +360 -0
  492. package/v4/core/memoizer.d.cts +15 -0
  493. package/v4/core/memoizer.d.ts +15 -0
  494. package/v4/core/memoizer.js +311 -0
  495. package/v4/core/parse.cjs +233 -0
  496. package/v4/core/parse.d.cts +52 -0
  497. package/v4/core/parse.d.ts +52 -0
  498. package/v4/core/parse.js +175 -0
  499. package/v4/core/regexes.cjs +209 -0
  500. package/v4/core/regexes.d.cts +90 -0
  501. package/v4/core/regexes.d.ts +90 -0
  502. package/v4/core/regexes.js +156 -0
  503. package/v4/core/registries.cjs +76 -0
  504. package/v4/core/registries.d.cts +35 -0
  505. package/v4/core/registries.d.ts +35 -0
  506. package/v4/core/registries.js +52 -0
  507. package/v4/core/schemas.cjs +2669 -0
  508. package/v4/core/schemas.d.cts +1273 -0
  509. package/v4/core/schemas.d.ts +1273 -0
  510. package/v4/core/schemas.js +2606 -0
  511. package/v4/core/standard-schema.cjs +21 -0
  512. package/v4/core/standard-schema.d.cts +126 -0
  513. package/v4/core/standard-schema.d.ts +126 -0
  514. package/v4/core/standard-schema.js +1 -0
  515. package/v4/core/to-json-schema.cjs +681 -0
  516. package/v4/core/to-json-schema.d.cts +154 -0
  517. package/v4/core/to-json-schema.d.ts +154 -0
  518. package/v4/core/to-json-schema.js +651 -0
  519. package/v4/core/util.cjs +949 -0
  520. package/v4/core/util.d.cts +278 -0
  521. package/v4/core/util.d.ts +278 -0
  522. package/v4/core/util.js +859 -0
  523. package/v4/core/versions.cjs +27 -0
  524. package/v4/core/versions.d.cts +5 -0
  525. package/v4/core/versions.d.ts +5 -0
  526. package/v4/core/versions.js +5 -0
  527. package/v4/core/visit.cjs +214 -0
  528. package/v4/core/visit.d.cts +30 -0
  529. package/v4/core/visit.d.ts +30 -0
  530. package/v4/core/visit.js +169 -0
  531. package/v4/index.cjs +51 -0
  532. package/v4/index.d.cts +3 -0
  533. package/v4/index.d.ts +3 -0
  534. package/v4/index.js +4 -0
  535. package/v4/locales/ar.cjs +138 -0
  536. package/v4/locales/ar.d.cts +5 -0
  537. package/v4/locales/ar.d.ts +4 -0
  538. package/v4/locales/ar.js +111 -0
  539. package/v4/locales/az.cjs +137 -0
  540. package/v4/locales/az.d.cts +5 -0
  541. package/v4/locales/az.d.ts +4 -0
  542. package/v4/locales/az.js +110 -0
  543. package/v4/locales/be.cjs +195 -0
  544. package/v4/locales/be.d.cts +5 -0
  545. package/v4/locales/be.d.ts +4 -0
  546. package/v4/locales/be.js +168 -0
  547. package/v4/locales/bg.cjs +152 -0
  548. package/v4/locales/bg.d.cts +5 -0
  549. package/v4/locales/bg.d.ts +4 -0
  550. package/v4/locales/bg.js +125 -0
  551. package/v4/locales/bn.cjs +140 -0
  552. package/v4/locales/bn.d.cts +5 -0
  553. package/v4/locales/bn.d.ts +4 -0
  554. package/v4/locales/bn.js +113 -0
  555. package/v4/locales/ca.cjs +139 -0
  556. package/v4/locales/ca.d.cts +5 -0
  557. package/v4/locales/ca.d.ts +4 -0
  558. package/v4/locales/ca.js +112 -0
  559. package/v4/locales/ckb.cjs +160 -0
  560. package/v4/locales/ckb.d.cts +5 -0
  561. package/v4/locales/ckb.d.ts +4 -0
  562. package/v4/locales/ckb.js +133 -0
  563. package/v4/locales/cs.cjs +143 -0
  564. package/v4/locales/cs.d.cts +5 -0
  565. package/v4/locales/cs.d.ts +4 -0
  566. package/v4/locales/cs.js +116 -0
  567. package/v4/locales/da.cjs +147 -0
  568. package/v4/locales/da.d.cts +5 -0
  569. package/v4/locales/da.d.ts +4 -0
  570. package/v4/locales/da.js +120 -0
  571. package/v4/locales/de.cjs +140 -0
  572. package/v4/locales/de.d.cts +5 -0
  573. package/v4/locales/de.d.ts +4 -0
  574. package/v4/locales/de.js +113 -0
  575. package/v4/locales/el.cjs +139 -0
  576. package/v4/locales/el.d.cts +5 -0
  577. package/v4/locales/el.d.ts +4 -0
  578. package/v4/locales/el.js +112 -0
  579. package/v4/locales/en.cjs +152 -0
  580. package/v4/locales/en.d.cts +5 -0
  581. package/v4/locales/en.d.ts +4 -0
  582. package/v4/locales/en.js +125 -0
  583. package/v4/locales/eo.cjs +141 -0
  584. package/v4/locales/eo.d.cts +5 -0
  585. package/v4/locales/eo.d.ts +4 -0
  586. package/v4/locales/eo.js +114 -0
  587. package/v4/locales/es.cjs +163 -0
  588. package/v4/locales/es.d.cts +5 -0
  589. package/v4/locales/es.d.ts +4 -0
  590. package/v4/locales/es.js +136 -0
  591. package/v4/locales/fa.cjs +146 -0
  592. package/v4/locales/fa.d.cts +5 -0
  593. package/v4/locales/fa.d.ts +4 -0
  594. package/v4/locales/fa.js +119 -0
  595. package/v4/locales/fi.cjs +144 -0
  596. package/v4/locales/fi.d.cts +5 -0
  597. package/v4/locales/fi.d.ts +4 -0
  598. package/v4/locales/fi.js +117 -0
  599. package/v4/locales/fr-CA.cjs +139 -0
  600. package/v4/locales/fr-CA.d.cts +5 -0
  601. package/v4/locales/fr-CA.d.ts +4 -0
  602. package/v4/locales/fr-CA.js +112 -0
  603. package/v4/locales/fr.cjs +156 -0
  604. package/v4/locales/fr.d.cts +5 -0
  605. package/v4/locales/fr.d.ts +4 -0
  606. package/v4/locales/fr.js +129 -0
  607. package/v4/locales/gu.cjs +140 -0
  608. package/v4/locales/gu.d.cts +5 -0
  609. package/v4/locales/gu.d.ts +4 -0
  610. package/v4/locales/gu.js +113 -0
  611. package/v4/locales/he.cjs +248 -0
  612. package/v4/locales/he.d.cts +5 -0
  613. package/v4/locales/he.d.ts +4 -0
  614. package/v4/locales/he.js +221 -0
  615. package/v4/locales/hi.cjs +138 -0
  616. package/v4/locales/hi.d.cts +5 -0
  617. package/v4/locales/hi.d.ts +4 -0
  618. package/v4/locales/hi.js +111 -0
  619. package/v4/locales/hr.cjs +153 -0
  620. package/v4/locales/hr.d.cts +5 -0
  621. package/v4/locales/hr.d.ts +4 -0
  622. package/v4/locales/hr.js +126 -0
  623. package/v4/locales/hu.cjs +140 -0
  624. package/v4/locales/hu.d.cts +5 -0
  625. package/v4/locales/hu.d.ts +4 -0
  626. package/v4/locales/hu.js +113 -0
  627. package/v4/locales/hy.cjs +185 -0
  628. package/v4/locales/hy.d.cts +5 -0
  629. package/v4/locales/hy.d.ts +4 -0
  630. package/v4/locales/hy.js +158 -0
  631. package/v4/locales/id.cjs +138 -0
  632. package/v4/locales/id.d.cts +5 -0
  633. package/v4/locales/id.d.ts +4 -0
  634. package/v4/locales/id.js +111 -0
  635. package/v4/locales/index.cjs +152 -0
  636. package/v4/locales/index.d.cts +63 -0
  637. package/v4/locales/index.d.ts +63 -0
  638. package/v4/locales/index.js +63 -0
  639. package/v4/locales/is.cjs +141 -0
  640. package/v4/locales/is.d.cts +5 -0
  641. package/v4/locales/is.d.ts +4 -0
  642. package/v4/locales/is.js +114 -0
  643. package/v4/locales/it.cjs +140 -0
  644. package/v4/locales/it.d.cts +5 -0
  645. package/v4/locales/it.d.ts +4 -0
  646. package/v4/locales/it.js +113 -0
  647. package/v4/locales/ja.cjs +139 -0
  648. package/v4/locales/ja.d.cts +5 -0
  649. package/v4/locales/ja.d.ts +4 -0
  650. package/v4/locales/ja.js +112 -0
  651. package/v4/locales/ka.cjs +144 -0
  652. package/v4/locales/ka.d.cts +5 -0
  653. package/v4/locales/ka.d.ts +4 -0
  654. package/v4/locales/ka.js +117 -0
  655. package/v4/locales/kh.cjs +12 -0
  656. package/v4/locales/kh.d.cts +5 -0
  657. package/v4/locales/kh.d.ts +5 -0
  658. package/v4/locales/kh.js +5 -0
  659. package/v4/locales/km.cjs +142 -0
  660. package/v4/locales/km.d.cts +5 -0
  661. package/v4/locales/km.d.ts +4 -0
  662. package/v4/locales/km.js +115 -0
  663. package/v4/locales/kn.cjs +143 -0
  664. package/v4/locales/kn.d.cts +5 -0
  665. package/v4/locales/kn.d.ts +4 -0
  666. package/v4/locales/kn.js +116 -0
  667. package/v4/locales/ko.cjs +143 -0
  668. package/v4/locales/ko.d.cts +5 -0
  669. package/v4/locales/ko.d.ts +4 -0
  670. package/v4/locales/ko.js +116 -0
  671. package/v4/locales/lt.cjs +234 -0
  672. package/v4/locales/lt.d.cts +5 -0
  673. package/v4/locales/lt.d.ts +4 -0
  674. package/v4/locales/lt.js +207 -0
  675. package/v4/locales/mk.cjs +141 -0
  676. package/v4/locales/mk.d.cts +5 -0
  677. package/v4/locales/mk.d.ts +4 -0
  678. package/v4/locales/mk.js +114 -0
  679. package/v4/locales/ms.cjs +139 -0
  680. package/v4/locales/ms.d.cts +5 -0
  681. package/v4/locales/ms.d.ts +4 -0
  682. package/v4/locales/ms.js +112 -0
  683. package/v4/locales/ne.cjs +138 -0
  684. package/v4/locales/ne.d.cts +5 -0
  685. package/v4/locales/ne.d.ts +4 -0
  686. package/v4/locales/ne.js +111 -0
  687. package/v4/locales/nl.cjs +142 -0
  688. package/v4/locales/nl.d.cts +5 -0
  689. package/v4/locales/nl.d.ts +4 -0
  690. package/v4/locales/nl.js +115 -0
  691. package/v4/locales/nn.cjs +140 -0
  692. package/v4/locales/nn.d.cts +5 -0
  693. package/v4/locales/nn.d.ts +4 -0
  694. package/v4/locales/nn.js +113 -0
  695. package/v4/locales/no.cjs +140 -0
  696. package/v4/locales/no.d.cts +5 -0
  697. package/v4/locales/no.d.ts +4 -0
  698. package/v4/locales/no.js +113 -0
  699. package/v4/locales/ota.cjs +141 -0
  700. package/v4/locales/ota.d.cts +5 -0
  701. package/v4/locales/ota.d.ts +4 -0
  702. package/v4/locales/ota.js +114 -0
  703. package/v4/locales/pl.cjs +141 -0
  704. package/v4/locales/pl.d.cts +5 -0
  705. package/v4/locales/pl.d.ts +4 -0
  706. package/v4/locales/pl.js +114 -0
  707. package/v4/locales/ps.cjs +146 -0
  708. package/v4/locales/ps.d.cts +5 -0
  709. package/v4/locales/ps.d.ts +4 -0
  710. package/v4/locales/ps.js +119 -0
  711. package/v4/locales/pt-BR.cjs +170 -0
  712. package/v4/locales/pt-BR.d.cts +5 -0
  713. package/v4/locales/pt-BR.d.ts +4 -0
  714. package/v4/locales/pt-BR.js +143 -0
  715. package/v4/locales/pt.cjs +169 -0
  716. package/v4/locales/pt.d.cts +5 -0
  717. package/v4/locales/pt.d.ts +4 -0
  718. package/v4/locales/pt.js +142 -0
  719. package/v4/locales/ro.cjs +149 -0
  720. package/v4/locales/ro.d.cts +5 -0
  721. package/v4/locales/ro.d.ts +4 -0
  722. package/v4/locales/ro.js +122 -0
  723. package/v4/locales/ru.cjs +195 -0
  724. package/v4/locales/ru.d.cts +5 -0
  725. package/v4/locales/ru.d.ts +4 -0
  726. package/v4/locales/ru.js +168 -0
  727. package/v4/locales/sk.cjs +143 -0
  728. package/v4/locales/sk.d.cts +5 -0
  729. package/v4/locales/sk.d.ts +4 -0
  730. package/v4/locales/sk.js +116 -0
  731. package/v4/locales/sl.cjs +141 -0
  732. package/v4/locales/sl.d.cts +5 -0
  733. package/v4/locales/sl.d.ts +4 -0
  734. package/v4/locales/sl.js +114 -0
  735. package/v4/locales/sv.cjs +142 -0
  736. package/v4/locales/sv.d.cts +5 -0
  737. package/v4/locales/sv.d.ts +4 -0
  738. package/v4/locales/sv.js +115 -0
  739. package/v4/locales/ta.cjs +142 -0
  740. package/v4/locales/ta.d.cts +5 -0
  741. package/v4/locales/ta.d.ts +4 -0
  742. package/v4/locales/ta.js +115 -0
  743. package/v4/locales/tg.cjs +144 -0
  744. package/v4/locales/tg.d.cts +5 -0
  745. package/v4/locales/tg.d.ts +4 -0
  746. package/v4/locales/tg.js +117 -0
  747. package/v4/locales/th.cjs +142 -0
  748. package/v4/locales/th.d.cts +5 -0
  749. package/v4/locales/th.d.ts +4 -0
  750. package/v4/locales/th.js +115 -0
  751. package/v4/locales/tk.cjs +134 -0
  752. package/v4/locales/tk.d.cts +5 -0
  753. package/v4/locales/tk.d.ts +4 -0
  754. package/v4/locales/tk.js +107 -0
  755. package/v4/locales/tr.cjs +137 -0
  756. package/v4/locales/tr.d.cts +5 -0
  757. package/v4/locales/tr.d.ts +4 -0
  758. package/v4/locales/tr.js +110 -0
  759. package/v4/locales/ua.cjs +12 -0
  760. package/v4/locales/ua.d.cts +5 -0
  761. package/v4/locales/ua.d.ts +5 -0
  762. package/v4/locales/ua.js +5 -0
  763. package/v4/locales/uk.cjs +140 -0
  764. package/v4/locales/uk.d.cts +5 -0
  765. package/v4/locales/uk.d.ts +4 -0
  766. package/v4/locales/uk.js +113 -0
  767. package/v4/locales/ur.cjs +142 -0
  768. package/v4/locales/ur.d.cts +5 -0
  769. package/v4/locales/ur.d.ts +4 -0
  770. package/v4/locales/ur.js +115 -0
  771. package/v4/locales/uz.cjs +140 -0
  772. package/v4/locales/uz.d.cts +5 -0
  773. package/v4/locales/uz.d.ts +4 -0
  774. package/v4/locales/uz.js +113 -0
  775. package/v4/locales/vi.cjs +140 -0
  776. package/v4/locales/vi.d.cts +5 -0
  777. package/v4/locales/vi.d.ts +4 -0
  778. package/v4/locales/vi.js +113 -0
  779. package/v4/locales/yo.cjs +139 -0
  780. package/v4/locales/yo.d.cts +5 -0
  781. package/v4/locales/yo.d.ts +4 -0
  782. package/v4/locales/yo.js +112 -0
  783. package/v4/locales/zh-CN.cjs +141 -0
  784. package/v4/locales/zh-CN.d.cts +5 -0
  785. package/v4/locales/zh-CN.d.ts +4 -0
  786. package/v4/locales/zh-CN.js +114 -0
  787. package/v4/locales/zh-TW.cjs +139 -0
  788. package/v4/locales/zh-TW.d.cts +5 -0
  789. package/v4/locales/zh-TW.d.ts +4 -0
  790. package/v4/locales/zh-TW.js +112 -0
  791. package/v4/mini/checks.cjs +54 -0
  792. package/v4/mini/checks.d.cts +1 -0
  793. package/v4/mini/checks.d.ts +1 -0
  794. package/v4/mini/checks.js +1 -0
  795. package/v4/mini/coerce.cjs +71 -0
  796. package/v4/mini/coerce.d.cts +7 -0
  797. package/v4/mini/coerce.d.ts +7 -0
  798. package/v4/mini/coerce.js +22 -0
  799. package/v4/mini/deep-partial.cjs +58 -0
  800. package/v4/mini/deep-partial.d.cts +14 -0
  801. package/v4/mini/deep-partial.d.ts +14 -0
  802. package/v4/mini/deep-partial.js +13 -0
  803. package/v4/mini/external.cjs +95 -0
  804. package/v4/mini/external.d.cts +16 -0
  805. package/v4/mini/external.d.ts +16 -0
  806. package/v4/mini/external.js +16 -0
  807. package/v4/mini/in-out.cjs +82 -0
  808. package/v4/mini/in-out.d.cts +8 -0
  809. package/v4/mini/in-out.d.ts +8 -0
  810. package/v4/mini/in-out.js +36 -0
  811. package/v4/mini/index.cjs +51 -0
  812. package/v4/mini/index.d.cts +3 -0
  813. package/v4/mini/index.d.ts +3 -0
  814. package/v4/mini/index.js +3 -0
  815. package/v4/mini/iso.cjs +83 -0
  816. package/v4/mini/iso.d.cts +22 -0
  817. package/v4/mini/iso.d.ts +22 -0
  818. package/v4/mini/iso.js +34 -0
  819. package/v4/mini/parse.cjs +37 -0
  820. package/v4/mini/parse.d.cts +1 -0
  821. package/v4/mini/parse.d.ts +1 -0
  822. package/v4/mini/parse.js +1 -0
  823. package/v4/mini/schemas.cjs +1149 -0
  824. package/v4/mini/schemas.d.cts +480 -0
  825. package/v4/mini/schemas.d.ts +480 -0
  826. package/v4/mini/schemas.js +1004 -0
  827. package/v4-mini/index.cjs +51 -0
  828. package/v4-mini/index.d.cts +3 -0
  829. package/v4-mini/index.d.ts +3 -0
  830. package/v4-mini/index.js +3 -0
@@ -0,0 +1,1273 @@
1
+ import * as checks from "./checks.cjs";
2
+ import type { $YatspNumberFormats } from "./checks.cjs";
3
+ import type { $YatspBigIntFormats } from "./checks.cjs";
4
+ import * as core from "./core.cjs";
5
+ import type * as errors from "./errors.cjs";
6
+ import type * as JSONSchema from "./json-schema.cjs";
7
+ import type { StandardSchemaV1 } from "./standard-schema.cjs";
8
+ import type { ProcessParams, ToJSONSchemaContext } from "./to-json-schema.cjs";
9
+ import * as util from "./util.cjs";
10
+ import { version } from "./versions.cjs";
11
+ export interface ParseContext<T extends errors.$YatspIssueBase = never> {
12
+ /** Customize error messages. */
13
+ readonly error?: errors.$YatspErrorMap<T>;
14
+ /** Include the `input` field in issue objects. Default `false`. */
15
+ readonly reportInput?: boolean;
16
+ /** Skip eval-based fast path. Default `false`. */
17
+ readonly jitless?: boolean;
18
+ }
19
+ /** @internal */
20
+ export interface ParseContextInternal<T extends errors.$YatspIssueBase = never> extends ParseContext<T> {
21
+ readonly async?: boolean | undefined;
22
+ readonly direction?: "forward" | "backward";
23
+ readonly skipChecks?: boolean;
24
+ /** Set only by `validate`/`validateAsync`. A container may stop before its next child, never inside one, so a map entry and a tuple's fixed items parse whole. */
25
+ readonly abortEarly?: boolean;
26
+ }
27
+ /** Gives a container cycle support: `attach` wraps its parse, and `alloc` registers the object it builds into before any child is parsed so a reference back to the same input resolves to it. */
28
+ export interface $YatspMemoizer {
29
+ attach(inst: $YatspType): void;
30
+ guard(inst: $YatspType): void;
31
+ alloc<T extends object>(inst: $YatspType, payload: ParsePayload, empty: T, ctx: ParseContextInternal): T;
32
+ }
33
+ export interface ParsePayload<T = unknown> {
34
+ value: T;
35
+ issues: errors.$YatspRawIssue[];
36
+ /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
37
+ aborted?: boolean;
38
+ /** @internal Set when the value came from a repeat visit to a node still being
39
+ * parsed. Its checks run on the node itself, against the finished value. */
40
+ memo?: boolean | undefined;
41
+ }
42
+ export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
43
+ export interface $YatspTypeDef {
44
+ type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "function" | "custom";
45
+ error?: errors.$YatspErrorMap<never> | undefined;
46
+ checks?: checks.$YatspCheck<never>[];
47
+ }
48
+ export interface _$YatspTypeInternals {
49
+ /** The `@yatsp/core` version of this schema */
50
+ version: typeof version;
51
+ /** Schema definition. */
52
+ def: $YatspTypeDef;
53
+ /** @internal Randomly generated ID for this schema. */
54
+ /** @internal List of deferred initializers. */
55
+ deferred: util.AnyFunc[] | undefined;
56
+ /** @internal Parses input and runs all checks (refinements). */
57
+ run(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
58
+ /** @internal Parses input, doesn't run checks. */
59
+ parse(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
60
+ /** @internal Stores identifiers for the set of traits implemented by this schema. */
61
+ traits: Set<string>;
62
+ /** @internal Indicates that a schema output type should be considered optional inside objects.
63
+ * @default Required
64
+ */
65
+ /** @internal Three rungs, each strictly stronger than the last:
66
+ * undefined — required; the container may not omit this slot
67
+ * "optional" — the container may omit it; nothing is supplied in its place
68
+ * "defaulted" — the container may omit it AND this schema substitutes a value
69
+ * Consumers asking "may the slot be absent?" test `!== undefined`.
70
+ * $YatspOptional asks the stronger question and tests `=== "defaulted"`. */
71
+ optin?: "optional" | "defaulted" | undefined;
72
+ /** @internal */
73
+ optout?: "optional" | undefined;
74
+ /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
75
+ *
76
+ * Defined on: enum, const, literal, null, undefined
77
+ * Passthrough: optional, nullable, branded, default, catch, pipe
78
+ * Todo: unions?
79
+ */
80
+ values?: util.PrimitiveSet | undefined;
81
+ /** Default value bubbled up from */
82
+ /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
83
+ propValues?: util.PropValues | undefined;
84
+ /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
85
+ pattern: RegExp | undefined;
86
+ /** @internal The constructor function of this schema. */
87
+ constr: new (def: any) => $YatspType;
88
+ /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
89
+ bag: Record<string, unknown>;
90
+ /** @internal The set of issues this schema might throw during type checking. */
91
+ isst: errors.$YatspIssueBase;
92
+ /** @internal Subject to change, not a public API. */
93
+ processJSONSchema?: ((ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams) => void) | undefined;
94
+ /** An optional method used to override `toJSONSchema` logic. */
95
+ toJSONSchema?: () => unknown;
96
+ /** @internal The parent of this schema. Only set during certain clone operations. */
97
+ parent?: $YatspType | undefined;
98
+ }
99
+ /** @internal */
100
+ export interface $YatspTypeInternals<out O = unknown, out I = unknown> extends _$YatspTypeInternals {
101
+ /** @internal The inferred output type */
102
+ output: O;
103
+ /** @internal The inferred input type */
104
+ input: I;
105
+ }
106
+ export type $YatspStandardSchema<T> = StandardSchemaV1.Props<core.input<T>, core.output<T>>;
107
+ export type SomeType = {
108
+ _yatsp: _$YatspTypeInternals;
109
+ };
110
+ export interface $YatspType<O = unknown, I = unknown, Internals extends $YatspTypeInternals<O, I> = $YatspTypeInternals<O, I>> {
111
+ _yatsp: Internals;
112
+ "~standard": $YatspStandardSchema<this>;
113
+ }
114
+ export interface _$YatspType<T extends $YatspTypeInternals = $YatspTypeInternals> extends $YatspType<T["output"], T["input"], T> {
115
+ }
116
+ export declare const $YatspType: core.$constructor<$YatspType>;
117
+ export declare function standardProps(inst: $YatspType): StandardSchemaV1.Props<any, any>;
118
+ export { clone } from "./util.cjs";
119
+ export interface $YatspStringDef extends $YatspTypeDef {
120
+ type: "string";
121
+ coerce?: boolean;
122
+ checks?: checks.$YatspCheck<string>[];
123
+ }
124
+ export interface $YatspStringInternals<Input> extends $YatspTypeInternals<string, Input> {
125
+ def: $YatspStringDef;
126
+ /** @deprecated Internal API, use with caution (not deprecated) */
127
+ pattern: RegExp;
128
+ /** @deprecated Internal API, use with caution (not deprecated) */
129
+ isst: errors.$YatspIssueInvalidType;
130
+ bag: util.LoosePartial<{
131
+ minimum: number;
132
+ maximum: number;
133
+ patterns: Set<RegExp>;
134
+ format: string;
135
+ contentEncoding: string;
136
+ /** the pattern admits strings its `format` keyword forbids, so `toJSONSchema` must not emit it */
137
+ laxFormat: boolean;
138
+ }>;
139
+ }
140
+ export interface $YatspString<Input = unknown> extends _$YatspType<$YatspStringInternals<Input>> {
141
+ }
142
+ export declare const $YatspString: core.$constructor<$YatspString>;
143
+ export interface $YatspStringFormatDef<Format extends string = string> extends $YatspStringDef, checks.$YatspCheckStringFormatDef<Format> {
144
+ }
145
+ export interface $YatspStringFormatInternals<Format extends string = string> extends $YatspStringInternals<string>, checks.$YatspCheckStringFormatInternals {
146
+ def: $YatspStringFormatDef<Format>;
147
+ }
148
+ export interface $YatspStringFormat<Format extends string = string> extends $YatspType {
149
+ _yatsp: $YatspStringFormatInternals<Format>;
150
+ }
151
+ export declare const $YatspStringFormat: core.$constructor<$YatspStringFormat>;
152
+ export interface $YatspGUIDDef extends $YatspStringFormatDef<"guid"> {
153
+ }
154
+ export interface $YatspGUIDInternals extends $YatspStringFormatInternals<"guid"> {
155
+ }
156
+ export interface $YatspGUID extends $YatspType {
157
+ _yatsp: $YatspGUIDInternals;
158
+ }
159
+ export declare const $YatspGUID: core.$constructor<$YatspGUID>;
160
+ export interface $YatspUUIDDef extends $YatspStringFormatDef<"uuid"> {
161
+ version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
162
+ }
163
+ export interface $YatspUUIDInternals extends $YatspStringFormatInternals<"uuid"> {
164
+ def: $YatspUUIDDef;
165
+ }
166
+ export interface $YatspUUID extends $YatspType {
167
+ _yatsp: $YatspUUIDInternals;
168
+ }
169
+ export declare const $YatspUUID: core.$constructor<$YatspUUID>;
170
+ export interface $YatspEmailDef extends $YatspStringFormatDef<"email"> {
171
+ }
172
+ export interface $YatspEmailInternals extends $YatspStringFormatInternals<"email"> {
173
+ }
174
+ export interface $YatspEmail extends $YatspType {
175
+ _yatsp: $YatspEmailInternals;
176
+ }
177
+ export declare const $YatspEmail: core.$constructor<$YatspEmail>;
178
+ export interface $YatspURLDef extends $YatspStringFormatDef<"url"> {
179
+ hostname?: RegExp | undefined;
180
+ protocol?: RegExp | undefined;
181
+ normalize?: boolean | undefined;
182
+ }
183
+ export interface $YatspURLInternals extends $YatspStringFormatInternals<"url"> {
184
+ def: $YatspURLDef;
185
+ }
186
+ export interface $YatspURL extends $YatspType {
187
+ _yatsp: $YatspURLInternals;
188
+ }
189
+ /** The `://` guard rejected the input before the URL constructor saw it. */
190
+ export declare const URL_BAD_FORMAT = 1;
191
+ /** The URL parser rejected the input. */
192
+ export declare const URL_UNPARSEABLE = 2;
193
+ export declare function canParseURL(input: string): boolean;
194
+ export declare function validateURL(trimmed: string, def: Pick<$YatspURLDef, "protocol" | "hostname" | "normalize">): URL | true | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE;
195
+ /** Parses a URL while preserving the non-normalizing HTTP guard. */
196
+ export declare function parseURLObject(trimmed: string, def: Pick<$YatspURLDef, "protocol" | "normalize">): URL | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE;
197
+ /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */
198
+ export declare function stripTabAndNewline(value: string): string;
199
+ export declare function urlHostnameOk(url: URL, hostname: RegExp): boolean;
200
+ export declare function urlProtocolOk(url: URL, protocol: RegExp): boolean;
201
+ export declare const $YatspURL: core.$constructor<$YatspURL>;
202
+ export interface $YatspEmojiDef extends $YatspStringFormatDef<"emoji"> {
203
+ }
204
+ export interface $YatspEmojiInternals extends $YatspStringFormatInternals<"emoji"> {
205
+ }
206
+ export interface $YatspEmoji extends $YatspType {
207
+ _yatsp: $YatspEmojiInternals;
208
+ }
209
+ export declare const $YatspEmoji: core.$constructor<$YatspEmoji>;
210
+ export interface $YatspNanoIDDef extends $YatspStringFormatDef<"nanoid"> {
211
+ length?: number | undefined;
212
+ }
213
+ export interface $YatspNanoIDInternals extends $YatspStringFormatInternals<"nanoid"> {
214
+ def: $YatspNanoIDDef;
215
+ }
216
+ export interface $YatspNanoID extends $YatspType {
217
+ _yatsp: $YatspNanoIDInternals;
218
+ }
219
+ export declare const $YatspNanoID: core.$constructor<$YatspNanoID>;
220
+ /**
221
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
222
+ * (timestamps embedded in the id). Use {@link $YatspCUID2} instead.
223
+ * See https://github.com/paralleldrive/cuid.
224
+ */
225
+ export interface $YatspCUIDDef extends $YatspStringFormatDef<"cuid"> {
226
+ }
227
+ /**
228
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
229
+ * (timestamps embedded in the id). Use {@link $YatspCUID2} instead.
230
+ * See https://github.com/paralleldrive/cuid.
231
+ */
232
+ export interface $YatspCUIDInternals extends $YatspStringFormatInternals<"cuid"> {
233
+ }
234
+ /**
235
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
236
+ * (timestamps embedded in the id). Use {@link $YatspCUID2} instead.
237
+ * See https://github.com/paralleldrive/cuid.
238
+ */
239
+ export interface $YatspCUID extends $YatspType {
240
+ _yatsp: $YatspCUIDInternals;
241
+ }
242
+ /**
243
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
244
+ * (timestamps embedded in the id). Use {@link $YatspCUID2} instead.
245
+ * See https://github.com/paralleldrive/cuid.
246
+ */
247
+ export declare const $YatspCUID: core.$constructor<$YatspCUID>;
248
+ export interface $YatspCUID2Def extends $YatspStringFormatDef<"cuid2"> {
249
+ }
250
+ export interface $YatspCUID2Internals extends $YatspStringFormatInternals<"cuid2"> {
251
+ }
252
+ export interface $YatspCUID2 extends $YatspType {
253
+ _yatsp: $YatspCUID2Internals;
254
+ }
255
+ export declare const $YatspCUID2: core.$constructor<$YatspCUID2>;
256
+ export interface $YatspULIDDef extends $YatspStringFormatDef<"ulid"> {
257
+ }
258
+ export interface $YatspULIDInternals extends $YatspStringFormatInternals<"ulid"> {
259
+ }
260
+ export interface $YatspULID extends $YatspType {
261
+ _yatsp: $YatspULIDInternals;
262
+ }
263
+ export declare const $YatspULID: core.$constructor<$YatspULID>;
264
+ export interface $YatspXIDDef extends $YatspStringFormatDef<"xid"> {
265
+ }
266
+ export interface $YatspXIDInternals extends $YatspStringFormatInternals<"xid"> {
267
+ }
268
+ export interface $YatspXID extends $YatspType {
269
+ _yatsp: $YatspXIDInternals;
270
+ }
271
+ export declare const $YatspXID: core.$constructor<$YatspXID>;
272
+ export interface $YatspKSUIDDef extends $YatspStringFormatDef<"ksuid"> {
273
+ }
274
+ export interface $YatspKSUIDInternals extends $YatspStringFormatInternals<"ksuid"> {
275
+ }
276
+ export interface $YatspKSUID extends $YatspType {
277
+ _yatsp: $YatspKSUIDInternals;
278
+ }
279
+ export declare const $YatspKSUID: core.$constructor<$YatspKSUID>;
280
+ export interface $YatspISODateTimeDef extends $YatspStringFormatDef<"datetime"> {
281
+ precision: number | null;
282
+ offset: boolean;
283
+ local: boolean;
284
+ }
285
+ export interface $YatspISODateTimeInternals extends $YatspStringFormatInternals {
286
+ def: $YatspISODateTimeDef;
287
+ }
288
+ export interface $YatspISODateTime extends $YatspType {
289
+ _yatsp: $YatspISODateTimeInternals;
290
+ }
291
+ export declare const $YatspISODateTime: core.$constructor<$YatspISODateTime>;
292
+ export interface $YatspISODateDef extends $YatspStringFormatDef<"date"> {
293
+ }
294
+ export interface $YatspISODateInternals extends $YatspStringFormatInternals<"date"> {
295
+ }
296
+ export interface $YatspISODate extends $YatspType {
297
+ _yatsp: $YatspISODateInternals;
298
+ }
299
+ export declare const $YatspISODate: core.$constructor<$YatspISODate>;
300
+ export interface $YatspISOTimeDef extends $YatspStringFormatDef<"time"> {
301
+ precision?: number | null;
302
+ }
303
+ export interface $YatspISOTimeInternals extends $YatspStringFormatInternals<"time"> {
304
+ def: $YatspISOTimeDef;
305
+ }
306
+ export interface $YatspISOTime extends $YatspType {
307
+ _yatsp: $YatspISOTimeInternals;
308
+ }
309
+ export declare const $YatspISOTime: core.$constructor<$YatspISOTime>;
310
+ export interface $YatspISODurationDef extends $YatspStringFormatDef<"duration"> {
311
+ }
312
+ export interface $YatspISODurationInternals extends $YatspStringFormatInternals<"duration"> {
313
+ }
314
+ export interface $YatspISODuration extends $YatspType {
315
+ _yatsp: $YatspISODurationInternals;
316
+ }
317
+ export declare const $YatspISODuration: core.$constructor<$YatspISODuration>;
318
+ export interface $YatspIPv4Def extends $YatspStringFormatDef<"ipv4"> {
319
+ version?: "v4";
320
+ }
321
+ export interface $YatspIPv4Internals extends $YatspStringFormatInternals<"ipv4"> {
322
+ def: $YatspIPv4Def;
323
+ }
324
+ export interface $YatspIPv4 extends $YatspType {
325
+ _yatsp: $YatspIPv4Internals;
326
+ }
327
+ export declare const $YatspIPv4: core.$constructor<$YatspIPv4>;
328
+ export interface $YatspIPv6Def extends $YatspStringFormatDef<"ipv6"> {
329
+ version?: "v6";
330
+ }
331
+ export interface $YatspIPv6Internals extends $YatspStringFormatInternals<"ipv6"> {
332
+ def: $YatspIPv6Def;
333
+ }
334
+ export interface $YatspIPv6 extends $YatspType {
335
+ _yatsp: $YatspIPv6Internals;
336
+ }
337
+ export declare function isValidIPv6(value: string): boolean;
338
+ export declare const $YatspIPv6: core.$constructor<$YatspIPv6>;
339
+ export interface $YatspMACDef extends $YatspStringFormatDef<"mac"> {
340
+ delimiter?: string;
341
+ }
342
+ export interface $YatspMACInternals extends $YatspStringFormatInternals<"mac"> {
343
+ def: $YatspMACDef;
344
+ }
345
+ export interface $YatspMAC extends $YatspType {
346
+ _yatsp: $YatspMACInternals;
347
+ }
348
+ export declare const $YatspMAC: core.$constructor<$YatspMAC>;
349
+ export interface $YatspCIDRv4Def extends $YatspStringFormatDef<"cidrv4"> {
350
+ version?: "v4";
351
+ }
352
+ export interface $YatspCIDRv4Internals extends $YatspStringFormatInternals<"cidrv4"> {
353
+ def: $YatspCIDRv4Def;
354
+ }
355
+ export interface $YatspCIDRv4 extends $YatspType {
356
+ _yatsp: $YatspCIDRv4Internals;
357
+ }
358
+ export declare const $YatspCIDRv4: core.$constructor<$YatspCIDRv4>;
359
+ export interface $YatspCIDRv6Def extends $YatspStringFormatDef<"cidrv6"> {
360
+ version?: "v6";
361
+ }
362
+ export interface $YatspCIDRv6Internals extends $YatspStringFormatInternals<"cidrv6"> {
363
+ def: $YatspCIDRv6Def;
364
+ }
365
+ export interface $YatspCIDRv6 extends $YatspType {
366
+ _yatsp: $YatspCIDRv6Internals;
367
+ }
368
+ export declare function isValidCIDRv6(value: string): boolean;
369
+ export declare const $YatspCIDRv6: core.$constructor<$YatspCIDRv6>;
370
+ export declare function isValidBase64(data: string): boolean;
371
+ export interface $YatspBase64Def extends $YatspStringFormatDef<"base64"> {
372
+ }
373
+ export interface $YatspBase64Internals extends $YatspStringFormatInternals<"base64"> {
374
+ }
375
+ export interface $YatspBase64 extends $YatspType {
376
+ _yatsp: $YatspBase64Internals;
377
+ }
378
+ export declare const base64Charset: RegExp;
379
+ export declare const $YatspBase64: core.$constructor<$YatspBase64>;
380
+ export declare const base64urlCharset: RegExp;
381
+ export declare function isValidBase64URL(data: string): boolean;
382
+ export interface $YatspBase64URLDef extends $YatspStringFormatDef<"base64url"> {
383
+ }
384
+ export interface $YatspBase64URLInternals extends $YatspStringFormatInternals<"base64url"> {
385
+ }
386
+ export interface $YatspBase64URL extends $YatspType {
387
+ _yatsp: $YatspBase64URLInternals;
388
+ }
389
+ export declare const $YatspBase64URL: core.$constructor<$YatspBase64URL>;
390
+ export interface $YatspE164Def extends $YatspStringFormatDef<"e164"> {
391
+ }
392
+ export interface $YatspE164Internals extends $YatspStringFormatInternals<"e164"> {
393
+ }
394
+ export interface $YatspE164 extends $YatspType {
395
+ _yatsp: $YatspE164Internals;
396
+ }
397
+ export declare const $YatspE164: core.$constructor<$YatspE164>;
398
+ export declare function isValidCreditCard(input: string): boolean;
399
+ export interface $YatspCreditCardDef extends $YatspStringFormatDef<"credit_card"> {
400
+ }
401
+ export interface $YatspCreditCardInternals extends $YatspStringFormatInternals<"credit_card"> {
402
+ def: $YatspCreditCardDef;
403
+ }
404
+ export interface $YatspCreditCard extends $YatspType {
405
+ _yatsp: $YatspCreditCardInternals;
406
+ }
407
+ export declare const $YatspCreditCard: core.$constructor<$YatspCreditCard>;
408
+ export declare function isValidIBAN(input: string): boolean;
409
+ export interface $YatspIBANDef extends $YatspStringFormatDef<"iban"> {
410
+ }
411
+ export interface $YatspIBANInternals extends $YatspStringFormatInternals<"iban"> {
412
+ def: $YatspIBANDef;
413
+ }
414
+ export interface $YatspIBAN extends $YatspType {
415
+ _yatsp: $YatspIBANInternals;
416
+ }
417
+ export declare const $YatspIBAN: core.$constructor<$YatspIBAN>;
418
+ export declare function isValidJWT(token: string, algorithm?: util.JWTAlgorithm | null): boolean;
419
+ export interface $YatspJWTDef extends $YatspStringFormatDef<"jwt"> {
420
+ alg?: util.JWTAlgorithm | undefined;
421
+ }
422
+ export interface $YatspJWTInternals extends $YatspStringFormatInternals<"jwt"> {
423
+ def: $YatspJWTDef;
424
+ }
425
+ export interface $YatspJWT extends $YatspType {
426
+ _yatsp: $YatspJWTInternals;
427
+ }
428
+ export declare const $YatspJWT: core.$constructor<$YatspJWT>;
429
+ export interface $YatspCustomStringFormatDef<Format extends string = string> extends $YatspStringFormatDef<Format> {
430
+ fn: (val: string) => unknown;
431
+ }
432
+ export interface $YatspCustomStringFormatInternals<Format extends string = string> extends $YatspStringFormatInternals<Format> {
433
+ def: $YatspCustomStringFormatDef<Format>;
434
+ }
435
+ export interface $YatspCustomStringFormat<Format extends string = string> extends $YatspStringFormat<Format> {
436
+ _yatsp: $YatspCustomStringFormatInternals<Format>;
437
+ }
438
+ export declare const $YatspCustomStringFormat: core.$constructor<$YatspCustomStringFormat>;
439
+ export interface $YatspNumberDef extends $YatspTypeDef {
440
+ type: "number";
441
+ coerce?: boolean;
442
+ }
443
+ export interface $YatspNumberInternals<Input = unknown> extends $YatspTypeInternals<number, Input> {
444
+ def: $YatspNumberDef;
445
+ /** @deprecated Internal API, use with caution (not deprecated) */
446
+ pattern: RegExp;
447
+ /** @deprecated Internal API, use with caution (not deprecated) */
448
+ isst: errors.$YatspIssueInvalidType;
449
+ bag: util.LoosePartial<{
450
+ minimum: number;
451
+ maximum: number;
452
+ exclusiveMinimum: number;
453
+ exclusiveMaximum: number;
454
+ format: string;
455
+ pattern: RegExp;
456
+ }>;
457
+ }
458
+ export interface $YatspNumber<Input = unknown> extends $YatspType {
459
+ _yatsp: $YatspNumberInternals<Input>;
460
+ }
461
+ export declare const $YatspNumber: core.$constructor<$YatspNumber>;
462
+ export interface $YatspNumberFormatDef<Format extends $YatspNumberFormats = $YatspNumberFormats> extends $YatspNumberDef, checks.$YatspCheckNumberFormatDef<Format> {
463
+ }
464
+ export interface $YatspNumberFormatInternals<Format extends $YatspNumberFormats = $YatspNumberFormats> extends $YatspNumberInternals<number>, checks.$YatspCheckNumberFormatInternals<Format> {
465
+ def: $YatspNumberFormatDef<Format>;
466
+ isst: errors.$YatspIssueInvalidType;
467
+ }
468
+ export interface $YatspNumberFormat<Format extends $YatspNumberFormats = $YatspNumberFormats> extends $YatspType {
469
+ _yatsp: $YatspNumberFormatInternals<Format>;
470
+ }
471
+ export declare const $YatspNumberFormat: core.$constructor<$YatspNumberFormat>;
472
+ export interface $YatspBooleanDef extends $YatspTypeDef {
473
+ type: "boolean";
474
+ coerce?: boolean;
475
+ checks?: checks.$YatspCheck<boolean>[];
476
+ }
477
+ export interface $YatspBooleanInternals<T = unknown> extends $YatspTypeInternals<boolean, T> {
478
+ pattern: RegExp;
479
+ def: $YatspBooleanDef;
480
+ isst: errors.$YatspIssueInvalidType;
481
+ }
482
+ export interface $YatspBoolean<T = unknown> extends $YatspType {
483
+ _yatsp: $YatspBooleanInternals<T>;
484
+ }
485
+ export declare const $YatspBoolean: core.$constructor<$YatspBoolean>;
486
+ export interface $YatspBigIntDef extends $YatspTypeDef {
487
+ type: "bigint";
488
+ coerce?: boolean;
489
+ }
490
+ export interface $YatspBigIntInternals<T = unknown> extends $YatspTypeInternals<bigint, T> {
491
+ pattern: RegExp;
492
+ /** @internal Internal API, use with caution */
493
+ def: $YatspBigIntDef;
494
+ isst: errors.$YatspIssueInvalidType;
495
+ bag: util.LoosePartial<{
496
+ minimum: bigint;
497
+ maximum: bigint;
498
+ format: string;
499
+ }>;
500
+ }
501
+ export interface $YatspBigInt<T = unknown> extends $YatspType {
502
+ _yatsp: $YatspBigIntInternals<T>;
503
+ }
504
+ export declare const $YatspBigInt: core.$constructor<$YatspBigInt>;
505
+ export interface $YatspBigIntFormatDef<Format extends $YatspBigIntFormats = $YatspBigIntFormats> extends $YatspBigIntDef, checks.$YatspCheckBigIntFormatDef<Format> {
506
+ check: "bigint_format";
507
+ }
508
+ export interface $YatspBigIntFormatInternals<Format extends $YatspBigIntFormats = $YatspBigIntFormats> extends $YatspBigIntInternals<bigint>, checks.$YatspCheckBigIntFormatInternals<Format> {
509
+ def: $YatspBigIntFormatDef<Format>;
510
+ }
511
+ export interface $YatspBigIntFormat<Format extends $YatspBigIntFormats = $YatspBigIntFormats> extends $YatspType {
512
+ _yatsp: $YatspBigIntFormatInternals<Format>;
513
+ }
514
+ export declare const $YatspBigIntFormat: core.$constructor<$YatspBigIntFormat>;
515
+ export interface $YatspSymbolDef extends $YatspTypeDef {
516
+ type: "symbol";
517
+ }
518
+ export interface $YatspSymbolInternals extends $YatspTypeInternals<symbol, symbol> {
519
+ def: $YatspSymbolDef;
520
+ isst: errors.$YatspIssueInvalidType;
521
+ }
522
+ export interface $YatspSymbol extends $YatspType {
523
+ _yatsp: $YatspSymbolInternals;
524
+ }
525
+ export declare const $YatspSymbol: core.$constructor<$YatspSymbol>;
526
+ export interface $YatspUndefinedDef extends $YatspTypeDef {
527
+ type: "undefined";
528
+ }
529
+ export interface $YatspUndefinedInternals extends $YatspTypeInternals<undefined, undefined> {
530
+ pattern: RegExp;
531
+ def: $YatspUndefinedDef;
532
+ values: util.PrimitiveSet;
533
+ isst: errors.$YatspIssueInvalidType;
534
+ }
535
+ export interface $YatspUndefined extends $YatspType {
536
+ _yatsp: $YatspUndefinedInternals;
537
+ }
538
+ export declare const $YatspUndefined: core.$constructor<$YatspUndefined>;
539
+ export interface $YatspNullDef extends $YatspTypeDef {
540
+ type: "null";
541
+ }
542
+ export interface $YatspNullInternals extends $YatspTypeInternals<null, null> {
543
+ pattern: RegExp;
544
+ def: $YatspNullDef;
545
+ values: util.PrimitiveSet;
546
+ isst: errors.$YatspIssueInvalidType;
547
+ }
548
+ export interface $YatspNull extends $YatspType {
549
+ _yatsp: $YatspNullInternals;
550
+ }
551
+ export declare const $YatspNull: core.$constructor<$YatspNull>;
552
+ export interface $YatspAnyDef extends $YatspTypeDef {
553
+ type: "any";
554
+ }
555
+ export interface $YatspAnyInternals extends $YatspTypeInternals<any, any> {
556
+ def: $YatspAnyDef;
557
+ isst: never;
558
+ }
559
+ export interface $YatspAny extends $YatspType {
560
+ _yatsp: $YatspAnyInternals;
561
+ }
562
+ export declare const $YatspAny: core.$constructor<$YatspAny>;
563
+ export interface $YatspUnknownDef extends $YatspTypeDef {
564
+ type: "unknown";
565
+ }
566
+ export interface $YatspUnknownInternals extends $YatspTypeInternals<unknown, unknown> {
567
+ def: $YatspUnknownDef;
568
+ isst: never;
569
+ }
570
+ export interface $YatspUnknown extends $YatspType {
571
+ _yatsp: $YatspUnknownInternals;
572
+ }
573
+ export declare const $YatspUnknown: core.$constructor<$YatspUnknown>;
574
+ export interface $YatspNeverDef extends $YatspTypeDef {
575
+ type: "never";
576
+ }
577
+ export interface $YatspNeverInternals extends $YatspTypeInternals<never, never> {
578
+ def: $YatspNeverDef;
579
+ isst: errors.$YatspIssueInvalidType;
580
+ }
581
+ export interface $YatspNever extends $YatspType {
582
+ _yatsp: $YatspNeverInternals;
583
+ }
584
+ export declare const $YatspNever: core.$constructor<$YatspNever>;
585
+ export interface $YatspVoidDef extends $YatspTypeDef {
586
+ type: "void";
587
+ }
588
+ export interface $YatspVoidInternals extends $YatspTypeInternals<void, void> {
589
+ def: $YatspVoidDef;
590
+ isst: errors.$YatspIssueInvalidType;
591
+ }
592
+ export interface $YatspVoid extends $YatspType {
593
+ _yatsp: $YatspVoidInternals;
594
+ }
595
+ export declare const $YatspVoid: core.$constructor<$YatspVoid>;
596
+ export interface $YatspDateDef extends $YatspTypeDef {
597
+ type: "date";
598
+ coerce?: boolean;
599
+ }
600
+ export interface $YatspDateInternals<T = unknown> extends $YatspTypeInternals<Date, T> {
601
+ def: $YatspDateDef;
602
+ isst: errors.$YatspIssueInvalidType;
603
+ bag: util.LoosePartial<{
604
+ minimum: Date;
605
+ maximum: Date;
606
+ format: string;
607
+ }>;
608
+ }
609
+ export interface $YatspDate<T = unknown> extends $YatspType {
610
+ _yatsp: $YatspDateInternals<T>;
611
+ }
612
+ export declare const $YatspDate: core.$constructor<$YatspDate>;
613
+ export interface $YatspArrayDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
614
+ type: "array";
615
+ element: T;
616
+ }
617
+ export interface $YatspArrayInternals<T extends SomeType = $YatspType> extends _$YatspTypeInternals {
618
+ def: $YatspArrayDef<T>;
619
+ isst: errors.$YatspIssueInvalidType;
620
+ output: core.output<T>[];
621
+ input: core.input<T>[];
622
+ }
623
+ export interface $YatspArray<T extends SomeType = $YatspType> extends $YatspType<any, any, $YatspArrayInternals<T>> {
624
+ }
625
+ export declare const $YatspArray: core.$constructor<$YatspArray>;
626
+ type OptionalOutSchema = {
627
+ _yatsp: {
628
+ optout: "optional";
629
+ };
630
+ };
631
+ type OptionalInSchema = {
632
+ _yatsp: {
633
+ optin: "optional" | "defaulted";
634
+ };
635
+ };
636
+ export type $InferObjectOutput<T extends $YatspLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? util.IsAny<T[keyof T]> extends true ? Record<string, unknown> : {
637
+ [k in string]: core.output<T[keyof T]>;
638
+ } : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
639
+ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_yatsp"]["output"];
640
+ } & {
641
+ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_yatsp"]["output"];
642
+ } & Extra>;
643
+ export type $InferObjectInput<T extends $YatspLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? util.IsAny<T[keyof T]> extends true ? Record<string, unknown> : {
644
+ [k in string]: core.input<T[keyof T]>;
645
+ } : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
646
+ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_yatsp"]["input"];
647
+ } & {
648
+ -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_yatsp"]["input"];
649
+ } & Extra>;
650
+ export type $YatspObjectConfig = {
651
+ out: Record<string, unknown>;
652
+ in: Record<string, unknown>;
653
+ };
654
+ export type $loose = {
655
+ out: Record<string, unknown>;
656
+ in: Record<string, unknown>;
657
+ };
658
+ export type $strict = {
659
+ out: {};
660
+ in: {};
661
+ };
662
+ export type $strip = {
663
+ out: {};
664
+ in: {};
665
+ };
666
+ export type $catchall<T extends SomeType> = {
667
+ out: {
668
+ [k: string]: core.output<T>;
669
+ };
670
+ in: {
671
+ [k: string]: core.input<T>;
672
+ };
673
+ };
674
+ export type $YatspShape = Readonly<{
675
+ [k: string]: $YatspType;
676
+ }>;
677
+ export interface $YatspObjectDef<Shape extends $YatspShape = $YatspShape> extends $YatspTypeDef {
678
+ type: "object";
679
+ shape: Shape;
680
+ catchall?: $YatspType | undefined;
681
+ }
682
+ export interface $YatspObjectInternals<
683
+ /** @ts-ignore Cast variance */
684
+ out Shape extends $YatspShape = $YatspShape, out Config extends $YatspObjectConfig = $YatspObjectConfig> extends _$YatspTypeInternals {
685
+ def: $YatspObjectDef<Shape>;
686
+ config: Config;
687
+ isst: errors.$YatspIssueInvalidType | errors.$YatspIssueUnrecognizedKeys;
688
+ propValues: util.PropValues;
689
+ output: $InferObjectOutput<Shape, Config["out"]>;
690
+ input: $InferObjectInput<Shape, Config["in"]>;
691
+ optin?: "optional" | undefined;
692
+ optout?: "optional" | undefined;
693
+ }
694
+ export type $YatspLooseShape = Record<string, any>;
695
+ export interface $YatspObject<
696
+ /** @ts-ignore Cast variance */
697
+ out Shape extends Readonly<$YatspShape> = Readonly<$YatspShape>, out Params extends $YatspObjectConfig = $YatspObjectConfig> extends $YatspType<any, any, $YatspObjectInternals<Shape, Params>> {
698
+ }
699
+ export declare const $YatspObject: core.$constructor<$YatspObject>;
700
+ export declare const $YatspObjectJIT: core.$constructor<$YatspObject>;
701
+ export type $InferUnionOutput<T extends SomeType> = T extends any ? core.output<T> : never;
702
+ export type $InferUnionInput<T extends SomeType> = T extends any ? core.input<T> : never;
703
+ export interface $YatspUnionDef<Options extends readonly SomeType[] = readonly $YatspType[]> extends $YatspTypeDef {
704
+ type: "union";
705
+ options: Options;
706
+ inclusive?: boolean;
707
+ }
708
+ type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
709
+ type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
710
+ export interface $YatspUnionInternals<T extends readonly SomeType[] = readonly $YatspType[]> extends _$YatspTypeInternals {
711
+ def: $YatspUnionDef<T>;
712
+ isst: errors.$YatspIssueInvalidUnion;
713
+ pattern: T[number]["_yatsp"]["pattern"];
714
+ values: T[number]["_yatsp"]["values"];
715
+ output: $InferUnionOutput<T[number]>;
716
+ input: $InferUnionInput<T[number]>;
717
+ optin: IsOptionalIn<T[number]> extends false ? "optional" | "defaulted" | undefined : "optional" | "defaulted";
718
+ optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
719
+ }
720
+ export interface $YatspUnion<T extends readonly SomeType[] = readonly $YatspType[]> extends $YatspType<any, any, $YatspUnionInternals<T>> {
721
+ _yatsp: $YatspUnionInternals<T>;
722
+ }
723
+ export declare const $YatspUnion: core.$constructor<$YatspUnion>;
724
+ export interface $YatspXorInternals<T extends readonly SomeType[] = readonly $YatspType[]> extends $YatspUnionInternals<T> {
725
+ }
726
+ export interface $YatspXor<T extends readonly SomeType[] = readonly $YatspType[]> extends $YatspType<any, any, $YatspXorInternals<T>> {
727
+ _yatsp: $YatspXorInternals<T>;
728
+ }
729
+ export declare const $YatspXor: core.$constructor<$YatspXor>;
730
+ export interface $YatspDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $YatspType[], Disc extends string = string> extends $YatspUnionDef<Options> {
731
+ discriminator: Disc;
732
+ unionFallback?: boolean;
733
+ }
734
+ export interface $YatspDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $YatspType[], Disc extends string = string> extends $YatspUnionInternals<Options> {
735
+ def: $YatspDiscriminatedUnionDef<Options, Disc>;
736
+ propValues: util.PropValues;
737
+ bag: util.LoosePartial<{
738
+ optionsMap: Map<util.Primitive, $YatspType | null>;
739
+ }>;
740
+ }
741
+ /** The discriminator values a member of `Options` can declare. An omittable discriminator contributes `undefined`, matching what `propValues` claims for it. */
742
+ export type $DiscriminatorValue<Options extends readonly SomeType[], Disc extends string> = {
743
+ [I in keyof Options]: Options[I] extends {
744
+ _yatsp: {
745
+ output: infer Out;
746
+ };
747
+ } ? Disc extends keyof Out ? Out[Disc] : never : never;
748
+ }[number];
749
+ /** The member of `Options` that declares `V`. */
750
+ export type $DiscriminatedOption<Options extends readonly SomeType[], Disc extends string, V> = {
751
+ [I in keyof Options]: Options[I] extends {
752
+ _yatsp: {
753
+ output: infer Out;
754
+ };
755
+ } ? Disc extends keyof Out ? V extends Out[Disc] ? Options[I] : never : never : never;
756
+ }[number];
757
+ /** Returns the option whose discriminator claims `value`, or throws if ambiguous. */
758
+ export declare function getDiscriminatedOption<Options extends readonly SomeType[], Disc extends string, const V extends $DiscriminatorValue<Options, Disc>>(union: $YatspDiscriminatedUnion<Options, Disc>, value: V): $DiscriminatedOption<Options, Disc, V>;
759
+ export interface $YatspDiscriminatedUnion<Options extends readonly SomeType[] = readonly $YatspType[], Disc extends string = string> extends $YatspType {
760
+ _yatsp: $YatspDiscriminatedUnionInternals<Options, Disc>;
761
+ }
762
+ export declare const $YatspDiscriminatedUnion: core.$constructor<$YatspDiscriminatedUnion>;
763
+ export interface $YatspIntersectionDef<Left extends SomeType = $YatspType, Right extends SomeType = $YatspType> extends $YatspTypeDef {
764
+ type: "intersection";
765
+ left: Left;
766
+ right: Right;
767
+ }
768
+ export interface $YatspIntersectionInternals<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends _$YatspTypeInternals {
769
+ def: $YatspIntersectionDef<A, B>;
770
+ isst: never;
771
+ optin: A["_yatsp"]["optin"] | B["_yatsp"]["optin"];
772
+ optout: A["_yatsp"]["optout"] | B["_yatsp"]["optout"];
773
+ output: core.output<A> & core.output<B>;
774
+ input: core.input<A> & core.input<B>;
775
+ }
776
+ export interface $YatspIntersection<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspType {
777
+ _yatsp: $YatspIntersectionInternals<A, B>;
778
+ }
779
+ export declare const $YatspIntersection: core.$constructor<$YatspIntersection>;
780
+ export declare function mergeValues(a: any, b: any): {
781
+ valid: true;
782
+ data: any;
783
+ } | {
784
+ valid: false;
785
+ mergeErrorPath: (string | number)[];
786
+ };
787
+ export interface $YatspTupleDef<T extends util.TupleItems = readonly $YatspType[], Rest extends SomeType | null = $YatspType | null> extends $YatspTypeDef {
788
+ type: "tuple";
789
+ items: T;
790
+ rest: Rest;
791
+ }
792
+ export type $InferTupleInputType<T extends util.TupleItems, Rest extends SomeType | null> = [
793
+ ...TupleInputTypeWithOptionals<T>,
794
+ ...(Rest extends SomeType ? core.input<Rest>[] : [])
795
+ ];
796
+ type TupleInputTypeNoOptionals<T extends util.TupleItems> = {
797
+ [k in keyof T]: core.input<T[k]>;
798
+ };
799
+ type TupleInputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
800
+ ...infer Prefix extends SomeType[],
801
+ infer Tail extends SomeType
802
+ ] ? Tail["_yatsp"]["optin"] extends "optional" | "defaulted" ? [...TupleInputTypeWithOptionals<Prefix>, core.input<Tail>?] : TupleInputTypeNoOptionals<T> : [];
803
+ export type $InferTupleOutputType<T extends util.TupleItems, Rest extends SomeType | null> = [
804
+ ...TupleOutputTypeWithOptionals<T>,
805
+ ...(Rest extends SomeType ? core.output<Rest>[] : [])
806
+ ];
807
+ type TupleOutputTypeNoOptionals<T extends util.TupleItems> = {
808
+ [k in keyof T]: core.output<T[k]>;
809
+ };
810
+ type TupleOutputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
811
+ ...infer Prefix extends SomeType[],
812
+ infer Tail extends SomeType
813
+ ] ? Tail["_yatsp"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, core.output<Tail>?] : TupleOutputTypeNoOptionals<T> : [];
814
+ export interface $YatspTupleInternals<T extends util.TupleItems = readonly $YatspType[], Rest extends SomeType | null = $YatspType | null> extends _$YatspTypeInternals {
815
+ def: $YatspTupleDef<T, Rest>;
816
+ isst: errors.$YatspIssueInvalidType | errors.$YatspIssueTooBig<unknown[]> | errors.$YatspIssueTooSmall<unknown[]>;
817
+ output: $InferTupleOutputType<T, Rest>;
818
+ input: $InferTupleInputType<T, Rest>;
819
+ }
820
+ export interface $YatspTuple<T extends util.TupleItems = readonly $YatspType[], Rest extends SomeType | null = $YatspType | null> extends $YatspType {
821
+ _yatsp: $YatspTupleInternals<T, Rest>;
822
+ }
823
+ export declare const $YatspTuple: core.$constructor<$YatspTuple>;
824
+ export type $YatspRecordKey = $YatspType<string | number | symbol, unknown>;
825
+ export interface $YatspRecordDef<Key extends $YatspRecordKey = $YatspRecordKey, Value extends SomeType = $YatspType> extends $YatspTypeDef {
826
+ type: "record";
827
+ keyType: Key;
828
+ valueType: Value;
829
+ /** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
830
+ mode?: "strict" | "loose";
831
+ partial?: boolean;
832
+ }
833
+ export type $InferYatspRecordOutput<Key extends $YatspRecordKey = $YatspRecordKey, Value extends SomeType = $YatspType> = Key extends $partial ? Partial<Record<core.output<Key>, core.output<Value>>> : Record<core.output<Key>, core.output<Value>>;
834
+ export type $InferYatspRecordInput<Key extends $YatspRecordKey = $YatspRecordKey, Value extends SomeType = $YatspType> = Key extends $partial ? Partial<Record<core.input<Key> & PropertyKey, core.input<Value>>> : [
835
+ Value
836
+ ] extends [OptionalInSchema] ? Partial<Record<core.input<Key> & PropertyKey, core.input<Value>>> : Record<core.input<Key> & PropertyKey, core.input<Value>>;
837
+ export interface $YatspRecordInternals<Key extends $YatspRecordKey = $YatspRecordKey, Value extends SomeType = $YatspType> extends $YatspTypeInternals<$InferYatspRecordOutput<Key, Value>, $InferYatspRecordInput<Key, Value>> {
838
+ def: $YatspRecordDef<Key, Value>;
839
+ isst: errors.$YatspIssueInvalidType | errors.$YatspIssueInvalidKey<Record<PropertyKey, unknown>>;
840
+ optin?: "optional" | undefined;
841
+ optout?: "optional" | undefined;
842
+ }
843
+ export type $partial = {
844
+ "~~partial": true;
845
+ };
846
+ export interface $YatspRecord<Key extends $YatspRecordKey = $YatspRecordKey, Value extends SomeType = $YatspType> extends $YatspType {
847
+ _yatsp: $YatspRecordInternals<Key, Value>;
848
+ }
849
+ export declare const $YatspRecord: core.$constructor<$YatspRecord>;
850
+ export interface $YatspMapDef<Key extends SomeType = $YatspType, Value extends SomeType = $YatspType> extends $YatspTypeDef {
851
+ type: "map";
852
+ keyType: Key;
853
+ valueType: Value;
854
+ }
855
+ export interface $YatspMapInternals<Key extends SomeType = $YatspType, Value extends SomeType = $YatspType> extends $YatspTypeInternals<Map<core.output<Key>, core.output<Value>>, Map<core.input<Key>, core.input<Value>>> {
856
+ def: $YatspMapDef<Key, Value>;
857
+ isst: errors.$YatspIssueInvalidType | errors.$YatspIssueInvalidKey | errors.$YatspIssueInvalidElement<unknown>;
858
+ optin?: "optional" | undefined;
859
+ optout?: "optional" | undefined;
860
+ }
861
+ export interface $YatspMap<Key extends SomeType = $YatspType, Value extends SomeType = $YatspType> extends $YatspType {
862
+ _yatsp: $YatspMapInternals<Key, Value>;
863
+ }
864
+ export declare const $YatspMap: core.$constructor<$YatspMap>;
865
+ export interface $YatspSetDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
866
+ type: "set";
867
+ valueType: T;
868
+ }
869
+ export interface $YatspSetInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<Set<core.output<T>>, Set<core.input<T>>> {
870
+ def: $YatspSetDef<T>;
871
+ isst: errors.$YatspIssueInvalidType;
872
+ optin?: "optional" | undefined;
873
+ optout?: "optional" | undefined;
874
+ }
875
+ export interface $YatspSet<T extends SomeType = $YatspType> extends $YatspType {
876
+ _yatsp: $YatspSetInternals<T>;
877
+ }
878
+ export declare const $YatspSet: core.$constructor<$YatspSet>;
879
+ export type $InferEnumOutput<T extends util.EnumLike> = T[keyof T] & {};
880
+ export type $InferEnumInput<T extends util.EnumLike> = T[keyof T] & {};
881
+ export interface $YatspEnumDef<T extends util.EnumLike = util.EnumLike> extends $YatspTypeDef {
882
+ type: "enum";
883
+ entries: T;
884
+ }
885
+ export interface $YatspEnumInternals<
886
+ /** @ts-ignore Cast variance */
887
+ out T extends util.EnumLike = util.EnumLike> extends $YatspTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
888
+ def: $YatspEnumDef<T>;
889
+ /** @deprecated Internal API, use with caution (not deprecated) */
890
+ values: util.PrimitiveSet;
891
+ /** @deprecated Internal API, use with caution (not deprecated) */
892
+ pattern: RegExp;
893
+ isst: errors.$YatspIssueInvalidValue;
894
+ }
895
+ export interface $YatspEnum<T extends util.EnumLike = util.EnumLike> extends $YatspType {
896
+ _yatsp: $YatspEnumInternals<T>;
897
+ }
898
+ export declare const $YatspEnum: core.$constructor<$YatspEnum>;
899
+ export interface $YatspLiteralDef<T extends util.Literal> extends $YatspTypeDef {
900
+ type: "literal";
901
+ values: T[];
902
+ }
903
+ export interface $YatspLiteralInternals<T extends util.Literal = util.Literal> extends $YatspTypeInternals<T, T> {
904
+ def: $YatspLiteralDef<T>;
905
+ values: Set<T>;
906
+ pattern: RegExp;
907
+ isst: errors.$YatspIssueInvalidValue;
908
+ }
909
+ export interface $YatspLiteral<T extends util.Literal = util.Literal> extends $YatspType {
910
+ _yatsp: $YatspLiteralInternals<T>;
911
+ }
912
+ export declare const $YatspLiteral: core.$constructor<$YatspLiteral>;
913
+ type _File = typeof globalThis extends {
914
+ File: infer F extends new (...args: any[]) => any;
915
+ } ? InstanceType<F> : {};
916
+ /** Do not reference this directly. */
917
+ export interface File extends _File {
918
+ readonly type: string;
919
+ readonly size: number;
920
+ }
921
+ export interface $YatspFileDef extends $YatspTypeDef {
922
+ type: "file";
923
+ }
924
+ export interface $YatspFileInternals extends $YatspTypeInternals<File, File> {
925
+ def: $YatspFileDef;
926
+ isst: errors.$YatspIssueInvalidType;
927
+ bag: util.LoosePartial<{
928
+ minimum: number;
929
+ maximum: number;
930
+ mime: util.MimeTypes[];
931
+ }>;
932
+ }
933
+ export interface $YatspFile extends $YatspType {
934
+ _yatsp: $YatspFileInternals;
935
+ }
936
+ export declare const $YatspFile: core.$constructor<$YatspFile>;
937
+ export interface $YatspTransformDef extends $YatspTypeDef {
938
+ type: "transform";
939
+ transform: (input: unknown, payload: ParsePayload<unknown>) => util.MaybeAsync<unknown>;
940
+ }
941
+ export interface $YatspTransformInternals<O = unknown, I = unknown> extends $YatspTypeInternals<O, I> {
942
+ def: $YatspTransformDef;
943
+ isst: never;
944
+ }
945
+ export interface $YatspTransform<O = unknown, I = unknown> extends $YatspType {
946
+ _yatsp: $YatspTransformInternals<O, I>;
947
+ }
948
+ export declare const $YatspTransform: core.$constructor<$YatspTransform>;
949
+ export interface $YatspOptionalDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
950
+ type: "optional";
951
+ innerType: T;
952
+ }
953
+ export interface $YatspOptionalInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<T> | undefined, core.input<T> | undefined> {
954
+ def: $YatspOptionalDef<T>;
955
+ optin: "optional" | "defaulted";
956
+ optout: "optional";
957
+ isst: never;
958
+ values: T["_yatsp"]["values"];
959
+ pattern: T["_yatsp"]["pattern"];
960
+ }
961
+ export interface $YatspOptional<T extends SomeType = $YatspType> extends $YatspType {
962
+ _yatsp: $YatspOptionalInternals<T>;
963
+ }
964
+ export declare const $YatspOptional: core.$constructor<$YatspOptional>;
965
+ export interface $YatspExactOptionalDef<T extends SomeType = $YatspType> extends $YatspOptionalDef<T> {
966
+ }
967
+ export interface $YatspExactOptionalInternals<T extends SomeType = $YatspType> extends $YatspOptionalInternals<T> {
968
+ def: $YatspExactOptionalDef<T>;
969
+ output: core.output<T>;
970
+ input: core.input<T>;
971
+ }
972
+ export interface $YatspExactOptional<T extends SomeType = $YatspType> extends $YatspType {
973
+ _yatsp: $YatspExactOptionalInternals<T>;
974
+ }
975
+ export declare const $YatspExactOptional: core.$constructor<$YatspExactOptional>;
976
+ export interface $YatspNullableDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
977
+ type: "nullable";
978
+ innerType: T;
979
+ }
980
+ export interface $YatspNullableInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<T> | null, core.input<T> | null> {
981
+ def: $YatspNullableDef<T>;
982
+ optin: T["_yatsp"]["optin"];
983
+ optout: T["_yatsp"]["optout"];
984
+ isst: never;
985
+ values: T["_yatsp"]["values"];
986
+ pattern: T["_yatsp"]["pattern"];
987
+ }
988
+ export interface $YatspNullable<T extends SomeType = $YatspType> extends $YatspType {
989
+ _yatsp: $YatspNullableInternals<T>;
990
+ }
991
+ export declare const $YatspNullable: core.$constructor<$YatspNullable>;
992
+ export interface $YatspDefaultDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
993
+ type: "default";
994
+ innerType: T;
995
+ /** The default value. May be a getter. */
996
+ defaultValue: util.NoUndefined<core.output<T>>;
997
+ }
998
+ export interface $YatspDefaultInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<util.NoUndefined<core.output<T>>, core.input<T> | undefined> {
999
+ def: $YatspDefaultDef<T>;
1000
+ optin: "defaulted";
1001
+ optout?: "optional" | undefined;
1002
+ isst: never;
1003
+ values: T["_yatsp"]["values"];
1004
+ }
1005
+ export interface $YatspDefault<T extends SomeType = $YatspType> extends $YatspType {
1006
+ _yatsp: $YatspDefaultInternals<T>;
1007
+ }
1008
+ export declare const $YatspDefault: core.$constructor<$YatspDefault>;
1009
+ export interface $YatspPrefaultDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1010
+ type: "prefault";
1011
+ innerType: T;
1012
+ /** The default value. May be a getter. */
1013
+ defaultValue: core.input<T>;
1014
+ }
1015
+ export interface $YatspPrefaultInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<T>, core.input<T> | undefined> {
1016
+ def: $YatspPrefaultDef<T>;
1017
+ optin: "defaulted";
1018
+ optout?: "optional" | undefined;
1019
+ isst: never;
1020
+ values: T["_yatsp"]["values"];
1021
+ }
1022
+ export interface $YatspPrefault<T extends SomeType = $YatspType> extends $YatspType {
1023
+ _yatsp: $YatspPrefaultInternals<T>;
1024
+ }
1025
+ export declare const $YatspPrefault: core.$constructor<$YatspPrefault>;
1026
+ export interface $YatspNonOptionalDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1027
+ type: "nonoptional";
1028
+ innerType: T;
1029
+ }
1030
+ export interface $YatspNonOptionalInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<util.NoUndefined<core.output<T>>, util.NoUndefined<core.input<T>>> {
1031
+ def: $YatspNonOptionalDef<T>;
1032
+ isst: errors.$YatspIssueInvalidType;
1033
+ values: T["_yatsp"]["values"];
1034
+ optin: "optional" | undefined;
1035
+ optout: "optional" | undefined;
1036
+ }
1037
+ export interface $YatspNonOptional<T extends SomeType = $YatspType> extends $YatspType {
1038
+ _yatsp: $YatspNonOptionalInternals<T>;
1039
+ }
1040
+ export declare const $YatspNonOptional: core.$constructor<$YatspNonOptional>;
1041
+ export interface $YatspSuccessDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1042
+ type: "success";
1043
+ innerType: T;
1044
+ }
1045
+ export interface $YatspSuccessInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<boolean, core.input<T>> {
1046
+ def: $YatspSuccessDef<T>;
1047
+ isst: never;
1048
+ optin: T["_yatsp"]["optin"];
1049
+ optout: "optional" | undefined;
1050
+ }
1051
+ export interface $YatspSuccess<T extends SomeType = $YatspType> extends $YatspType {
1052
+ _yatsp: $YatspSuccessInternals<T>;
1053
+ }
1054
+ export declare const $YatspSuccess: core.$constructor<$YatspSuccess>;
1055
+ export interface $YatspCatchCtx extends ParsePayload {
1056
+ /** @deprecated Use `ctx.issues` */
1057
+ error: {
1058
+ issues: errors.$YatspIssue[];
1059
+ };
1060
+ /** @deprecated Use `ctx.value` */
1061
+ input: unknown;
1062
+ }
1063
+ export interface $YatspCatchDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1064
+ type: "catch";
1065
+ innerType: T;
1066
+ catchValue: (ctx: $YatspCatchCtx) => unknown;
1067
+ }
1068
+ export interface $YatspCatchInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<T>, core.input<T>> {
1069
+ def: $YatspCatchDef<T>;
1070
+ optin: T["_yatsp"]["optin"];
1071
+ optout: T["_yatsp"]["optout"];
1072
+ isst: never;
1073
+ values: T["_yatsp"]["values"];
1074
+ }
1075
+ export interface $YatspCatch<T extends SomeType = $YatspType> extends $YatspType {
1076
+ _yatsp: $YatspCatchInternals<T>;
1077
+ }
1078
+ export declare const $YatspCatch: core.$constructor<$YatspCatch>;
1079
+ export interface $YatspNaNDef extends $YatspTypeDef {
1080
+ type: "nan";
1081
+ }
1082
+ export interface $YatspNaNInternals extends $YatspTypeInternals<number, number> {
1083
+ def: $YatspNaNDef;
1084
+ isst: errors.$YatspIssueInvalidType;
1085
+ }
1086
+ export interface $YatspNaN extends $YatspType {
1087
+ _yatsp: $YatspNaNInternals;
1088
+ }
1089
+ export declare const $YatspNaN: core.$constructor<$YatspNaN>;
1090
+ export interface $YatspPipeDef<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspTypeDef {
1091
+ type: "pipe";
1092
+ in: A;
1093
+ out: B;
1094
+ /** Only defined inside $YatspCodec instances. */
1095
+ transform?: (value: core.output<A>, payload: ParsePayload<core.output<A>>) => util.MaybeAsync<core.input<B>>;
1096
+ /** Only defined inside $YatspCodec instances. */
1097
+ reverseTransform?: (value: core.input<B>, payload: ParsePayload<core.input<B>>) => util.MaybeAsync<core.output<A>>;
1098
+ }
1099
+ export interface $YatspPipeInternals<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<B>, core.input<A>> {
1100
+ def: $YatspPipeDef<A, B>;
1101
+ isst: never;
1102
+ values: A["_yatsp"]["values"];
1103
+ optin: A["_yatsp"]["optin"];
1104
+ optout: B["_yatsp"]["optout"];
1105
+ propValues: A["_yatsp"]["propValues"];
1106
+ }
1107
+ export interface $YatspPipe<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspType {
1108
+ _yatsp: $YatspPipeInternals<A, B>;
1109
+ }
1110
+ export declare const $YatspPipe: core.$constructor<$YatspPipe>;
1111
+ export interface $YatspCodecDef<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspPipeDef<A, B> {
1112
+ transform: (value: core.output<A>, payload: ParsePayload<core.output<A>>) => util.MaybeAsync<core.input<B>>;
1113
+ reverseTransform: (value: core.input<B>, payload: ParsePayload<core.input<B>>) => util.MaybeAsync<core.output<A>>;
1114
+ }
1115
+ export interface $YatspCodecInternals<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<B>, core.input<A>> {
1116
+ def: $YatspCodecDef<A, B>;
1117
+ isst: never;
1118
+ values: A["_yatsp"]["values"];
1119
+ optin: A["_yatsp"]["optin"];
1120
+ optout: B["_yatsp"]["optout"];
1121
+ propValues: A["_yatsp"]["propValues"];
1122
+ }
1123
+ export interface $YatspCodec<A extends SomeType = $YatspType, B extends SomeType = $YatspType> extends $YatspType {
1124
+ _yatsp: $YatspCodecInternals<A, B>;
1125
+ }
1126
+ export declare const $YatspCodec: core.$constructor<$YatspCodec>;
1127
+ export interface $YatspPreprocessDef<B extends SomeType = $YatspType, I = unknown> extends $YatspPipeDef<$YatspTransform<unknown, I>, B> {
1128
+ in: $YatspTransform<unknown, I>;
1129
+ out: B;
1130
+ }
1131
+ export interface $YatspPreprocessInternals<B extends SomeType = $YatspType, I = unknown> extends $YatspPipeInternals<$YatspTransform<unknown, I>, B> {
1132
+ def: $YatspPreprocessDef<B, I>;
1133
+ optin: B["_yatsp"]["optin"];
1134
+ optout: B["_yatsp"]["optout"];
1135
+ }
1136
+ export interface $YatspPreprocess<B extends SomeType = $YatspType, I = unknown> extends $YatspPipe<$YatspTransform<unknown, I>, B> {
1137
+ _yatsp: $YatspPreprocessInternals<B, I>;
1138
+ }
1139
+ export declare const $YatspPreprocess: core.$constructor<$YatspPreprocess>;
1140
+ export interface $YatspReadonlyDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1141
+ type: "readonly";
1142
+ innerType: T;
1143
+ }
1144
+ export interface $YatspReadonlyInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<util.MakeReadonly<core.output<T>>, util.MakeReadonly<core.input<T>>> {
1145
+ def: $YatspReadonlyDef<T>;
1146
+ optin: T["_yatsp"]["optin"];
1147
+ optout: T["_yatsp"]["optout"];
1148
+ isst: never;
1149
+ propValues: T["_yatsp"]["propValues"];
1150
+ values: T["_yatsp"]["values"];
1151
+ }
1152
+ export interface $YatspReadonly<T extends SomeType = $YatspType> extends $YatspType {
1153
+ _yatsp: $YatspReadonlyInternals<T>;
1154
+ }
1155
+ export declare const $YatspReadonly: core.$constructor<$YatspReadonly>;
1156
+ export interface $YatspTemplateLiteralDef extends $YatspTypeDef {
1157
+ type: "template_literal";
1158
+ parts: $YatspTemplateLiteralPart[];
1159
+ format?: string | undefined;
1160
+ }
1161
+ export interface $YatspTemplateLiteralInternals<Template extends string = string> extends $YatspTypeInternals<Template, Template> {
1162
+ pattern: RegExp;
1163
+ def: $YatspTemplateLiteralDef;
1164
+ isst: errors.$YatspIssueInvalidType;
1165
+ }
1166
+ export interface $YatspTemplateLiteral<Template extends string = string> extends $YatspType {
1167
+ _yatsp: $YatspTemplateLiteralInternals<Template>;
1168
+ }
1169
+ type LiteralPart = Exclude<util.Literal, symbol>;
1170
+ interface SchemaPartInternals extends $YatspTypeInternals<LiteralPart, LiteralPart> {
1171
+ pattern: RegExp;
1172
+ }
1173
+ interface SchemaPart extends $YatspType {
1174
+ _yatsp: SchemaPartInternals;
1175
+ }
1176
+ export type $YatspTemplateLiteralPart = LiteralPart | SchemaPart;
1177
+ type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
1178
+ type AppendToTemplateLiteral<Template extends string, Suffix extends LiteralPart | $YatspType> = Suffix extends LiteralPart ? `${Template}${UndefinedToEmptyString<Suffix>}` : Suffix extends $YatspType ? `${Template}${core.output<Suffix> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
1179
+ export type ConcatenateTupleOfStrings<T extends string[]> = T extends [
1180
+ infer First extends string,
1181
+ ...infer Rest extends string[]
1182
+ ] ? Rest extends string[] ? First extends "" ? ConcatenateTupleOfStrings<Rest> : `${First}${ConcatenateTupleOfStrings<Rest>}` : never : "";
1183
+ export type ConvertPartsToStringTuple<Parts extends $YatspTemplateLiteralPart[]> = {
1184
+ [K in keyof Parts]: Parts[K] extends LiteralPart ? `${UndefinedToEmptyString<Parts[K]>}` : Parts[K] extends $YatspType ? `${core.output<Parts[K]> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
1185
+ };
1186
+ export type ToTemplateLiteral<Parts extends $YatspTemplateLiteralPart[]> = ConcatenateTupleOfStrings<ConvertPartsToStringTuple<Parts>>;
1187
+ export type $PartsToTemplateLiteral<Parts extends $YatspTemplateLiteralPart[]> = [] extends Parts ? `` : Parts extends [...infer Rest, infer Last extends $YatspTemplateLiteralPart] ? Rest extends $YatspTemplateLiteralPart[] ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last> : never : never;
1188
+ export declare const $YatspTemplateLiteral: core.$constructor<$YatspTemplateLiteral>;
1189
+ export type $YatspFunctionArgs = $YatspType<unknown[], unknown[]>;
1190
+ export type $YatspFunctionIn = $YatspFunctionArgs;
1191
+ export type $YatspFunctionOut = $YatspType;
1192
+ export type $InferInnerFunctionType<Args extends $YatspFunctionIn, Returns extends $YatspFunctionOut> = (...args: $YatspFunctionIn extends Args ? never[] : core.output<Args>) => core.input<Returns>;
1193
+ export type $InferInnerFunctionTypeAsync<Args extends $YatspFunctionIn, Returns extends $YatspFunctionOut> = (...args: $YatspFunctionIn extends Args ? never[] : core.output<Args>) => util.MaybeAsync<core.input<Returns>>;
1194
+ export type $InferOuterFunctionType<Args extends $YatspFunctionIn, Returns extends $YatspFunctionOut> = (...args: $YatspFunctionIn extends Args ? never[] : core.input<Args>) => core.output<Returns>;
1195
+ export type $InferOuterFunctionTypeAsync<Args extends $YatspFunctionIn, Returns extends $YatspFunctionOut> = (...args: $YatspFunctionIn extends Args ? never[] : core.input<Args>) => Promise<core.output<Returns>>;
1196
+ export interface $YatspFunctionDef<In extends $YatspFunctionIn = $YatspFunctionIn, Out extends $YatspFunctionOut = $YatspFunctionOut> extends $YatspTypeDef {
1197
+ type: "function";
1198
+ input: In;
1199
+ output: Out;
1200
+ }
1201
+ export interface $YatspFunctionInternals<Args extends $YatspFunctionIn, Returns extends $YatspFunctionOut> extends $YatspTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
1202
+ def: $YatspFunctionDef<Args, Returns>;
1203
+ isst: errors.$YatspIssueInvalidType;
1204
+ }
1205
+ export interface $YatspFunction<Args extends $YatspFunctionIn = $YatspFunctionIn, Returns extends $YatspFunctionOut = $YatspFunctionOut> extends $YatspType<any, any, $YatspFunctionInternals<Args, Returns>> {
1206
+ /** @deprecated */
1207
+ _def: $YatspFunctionDef<Args, Returns>;
1208
+ _input: $InferInnerFunctionType<Args, Returns>;
1209
+ _output: $InferOuterFunctionType<Args, Returns>;
1210
+ implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
1211
+ implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
1212
+ input<const Items extends util.TupleItems, const Rest extends $YatspFunctionOut = $YatspFunctionOut>(args: Items, rest?: Rest): $YatspFunction<$YatspTuple<Items, Rest>, Returns>;
1213
+ input<NewArgs extends $YatspFunctionIn>(args: NewArgs): $YatspFunction<NewArgs, Returns>;
1214
+ input(...args: any[]): $YatspFunction<any, Returns>;
1215
+ output<NewReturns extends $YatspType>(output: NewReturns): $YatspFunction<Args, NewReturns>;
1216
+ }
1217
+ export interface $YatspFunctionParams<I extends $YatspFunctionIn, O extends $YatspType> {
1218
+ input?: I;
1219
+ output?: O;
1220
+ }
1221
+ export declare const $YatspFunction: core.$constructor<$YatspFunction>;
1222
+ export interface $YatspPromiseDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1223
+ type: "promise";
1224
+ innerType: T;
1225
+ }
1226
+ export interface $YatspPromiseInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<Promise<core.output<T>>, util.MaybeAsync<core.input<T>>> {
1227
+ def: $YatspPromiseDef<T>;
1228
+ isst: never;
1229
+ }
1230
+ export interface $YatspPromise<T extends SomeType = $YatspType> extends $YatspType {
1231
+ _yatsp: $YatspPromiseInternals<T>;
1232
+ }
1233
+ export declare const $YatspPromise: core.$constructor<$YatspPromise>;
1234
+ export interface $YatspLazyDef<T extends SomeType = $YatspType> extends $YatspTypeDef {
1235
+ type: "lazy";
1236
+ getter: () => T;
1237
+ }
1238
+ export interface $YatspLazyInternals<T extends SomeType = $YatspType> extends $YatspTypeInternals<core.output<T>, core.input<T>> {
1239
+ def: $YatspLazyDef<T>;
1240
+ isst: never;
1241
+ /** Auto-cached way to retrieve the inner schema */
1242
+ innerType: T;
1243
+ pattern: T["_yatsp"]["pattern"];
1244
+ propValues: T["_yatsp"]["propValues"];
1245
+ optin: T["_yatsp"]["optin"];
1246
+ optout: T["_yatsp"]["optout"];
1247
+ }
1248
+ export interface $YatspLazy<T extends SomeType = $YatspType> extends $YatspType {
1249
+ _yatsp: $YatspLazyInternals<T>;
1250
+ }
1251
+ export declare const $YatspLazy: core.$constructor<$YatspLazy>;
1252
+ export interface $YatspCustomDef<O = unknown> extends $YatspTypeDef, checks.$YatspCheckDef {
1253
+ type: "custom";
1254
+ check: "custom";
1255
+ path?: PropertyKey[] | undefined;
1256
+ error?: errors.$YatspErrorMap | undefined;
1257
+ params?: Record<string, any> | undefined;
1258
+ fn: (arg: O) => unknown;
1259
+ }
1260
+ export interface $YatspCustomInternals<O = unknown, I = unknown> extends $YatspTypeInternals<O, I>, checks.$YatspCheckInternals<O> {
1261
+ def: $YatspCustomDef;
1262
+ issc: errors.$YatspIssue;
1263
+ isst: never;
1264
+ bag: util.LoosePartial<{
1265
+ Class: typeof util.Class;
1266
+ }>;
1267
+ }
1268
+ export interface $YatspCustom<O = unknown, I = unknown> extends $YatspType {
1269
+ _yatsp: $YatspCustomInternals<O, I>;
1270
+ }
1271
+ export declare const $YatspCustom: core.$constructor<$YatspCustom>;
1272
+ export type $YatspTypes = $YatspString | $YatspNumber | $YatspBigInt | $YatspBoolean | $YatspDate | $YatspSymbol | $YatspUndefined | $YatspNullable | $YatspNull | $YatspAny | $YatspUnknown | $YatspNever | $YatspVoid | $YatspArray | $YatspObject | $YatspUnion | $YatspIntersection | $YatspTuple | $YatspRecord | $YatspMap | $YatspSet | $YatspLiteral | $YatspEnum | $YatspFunction | $YatspPromise | $YatspLazy | $YatspOptional | $YatspDefault | $YatspPrefault | $YatspTemplateLiteral | $YatspCustom | $YatspTransform | $YatspNonOptional | $YatspReadonly | $YatspNaN | $YatspPipe | $YatspSuccess | $YatspCatch | $YatspFile;
1273
+ export type $YatspStringFormatTypes = $YatspGUID | $YatspUUID | $YatspEmail | $YatspURL | $YatspEmoji | $YatspNanoID | $YatspCUID | $YatspCUID2 | $YatspULID | $YatspXID | $YatspKSUID | $YatspISODateTime | $YatspISODate | $YatspISOTime | $YatspISODuration | $YatspIPv4 | $YatspIPv6 | $YatspMAC | $YatspCIDRv4 | $YatspCIDRv6 | $YatspBase64 | $YatspBase64URL | $YatspE164 | $YatspCreditCard | $YatspIBAN | $YatspJWT | $YatspCustomStringFormat<"hex"> | $YatspCustomStringFormat<util.HashFormat> | $YatspCustomStringFormat<"hostname"> | $YatspCustomStringFormat<"currency_code">;