spana-test 0.19.1 → 0.20.0

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 (239) hide show
  1. package/README.md +4 -3
  2. package/dist/agent/index.js +15 -15
  3. package/dist/api/app.d.ts +1 -0
  4. package/dist/api/app.d.ts.map +1 -1
  5. package/dist/api/expect.d.ts +25 -11
  6. package/dist/api/expect.d.ts.map +1 -1
  7. package/dist/{app-RWO7IJ3R.js → app-ZSRJ3VFR.js} +3 -3
  8. package/dist/{appium-2PJWZXJI.js → appium-LOAWWZXA.js} +9 -9
  9. package/dist/build-info-KFFGVWDQ.js +9 -0
  10. package/dist/build-info.d.ts +5 -0
  11. package/dist/build-info.d.ts.map +1 -0
  12. package/dist/build-info.json +4 -0
  13. package/dist/channels/cdp-client.d.ts +28 -1
  14. package/dist/channels/cdp-client.d.ts.map +1 -1
  15. package/dist/channels/dom-channel.d.ts +14 -2
  16. package/dist/channels/dom-channel.d.ts.map +1 -1
  17. package/dist/{chunk-ABRN6BL6.js → chunk-26XIUSVS.js} +107 -29
  18. package/dist/chunk-26XIUSVS.js.map +1 -0
  19. package/dist/{chunk-EJHZZ2OP.js → chunk-2SDRH7ST.js} +5 -13
  20. package/dist/chunk-2SDRH7ST.js.map +1 -0
  21. package/dist/{chunk-T3PCI5QZ.js → chunk-2TK77LXY.js} +18 -16
  22. package/dist/chunk-2TK77LXY.js.map +1 -0
  23. package/dist/{chunk-AFWHSQHU.js → chunk-42D5LOGH.js} +8 -8
  24. package/dist/{chunk-7TMILDYA.js → chunk-5NZPLX2Y.js} +4 -5
  25. package/dist/chunk-5NZPLX2Y.js.map +1 -0
  26. package/dist/{chunk-CQ67PB3R.js → chunk-6GLL6SMP.js} +2 -2
  27. package/dist/{chunk-C2TMVKT7.js → chunk-7GDO4XAI.js} +160 -6
  28. package/dist/chunk-7GDO4XAI.js.map +1 -0
  29. package/dist/{chunk-F4DMBDPA.js → chunk-7QJY2HJO.js} +2 -2
  30. package/dist/{chunk-I7BUJBT2.js → chunk-GBV3XDWM.js} +8 -8
  31. package/dist/{chunk-BIV3DXB5.js → chunk-HX2PKESI.js} +2 -2
  32. package/dist/{chunk-3JAGQ4XW.js → chunk-QNCTEV2P.js} +14 -14
  33. package/dist/{chunk-FLPPA2XY.js → chunk-VWOTHDSE.js} +9 -4
  34. package/dist/chunk-VWOTHDSE.js.map +1 -0
  35. package/dist/chunk-XLHJCJ4O.js +15 -0
  36. package/dist/chunk-XLHJCJ4O.js.map +1 -0
  37. package/dist/{chunk-5Q2ROROC.js → chunk-XORHAB3R.js} +101 -47
  38. package/dist/chunk-XORHAB3R.js.map +1 -0
  39. package/dist/{chunk-3EBGWXYE.js → chunk-XUKBM64A.js} +3 -3
  40. package/dist/{chunk-ERFUFR5T.js → chunk-XZQGSUV7.js} +6 -6
  41. package/dist/{chunk-555KISAV.js → chunk-ZVUIG6A4.js} +6 -6
  42. package/dist/cli.js +16 -15
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{config-loader-MX232REU.js → config-loader-IDIKOQ4T.js} +3 -3
  45. package/dist/{doctor-command-O3MSNK7M.js → doctor-command-2PSDOREK.js} +7 -7
  46. package/dist/{driver-VKJEQCG3.js → driver-TNQ6HSID.js} +6 -6
  47. package/dist/{driver-TBRUL2EL.js → driver-TTJVCWCD.js} +7 -7
  48. package/dist/drivers/appium/android.d.ts +1 -1
  49. package/dist/drivers/appium/ios.d.ts +1 -1
  50. package/dist/drivers/cdp-browser.d.ts +1 -1
  51. package/dist/drivers/cdp-browser.d.ts.map +1 -1
  52. package/dist/drivers/device-controls.d.ts +1 -1
  53. package/dist/drivers/electrobun.d.ts +1 -1
  54. package/dist/drivers/electron.d.ts +1 -1
  55. package/dist/drivers/playwright.d.ts +2 -1
  56. package/dist/drivers/raw-driver.d.ts +2 -1
  57. package/dist/drivers/uiautomator2/driver.d.ts +1 -1
  58. package/dist/drivers/wasm.d.ts +1 -1
  59. package/dist/drivers/wda/driver.d.ts +1 -1
  60. package/dist/{electrobun-5OGIQHTC.js → electrobun-6ZJ6QFVQ.js} +5 -5
  61. package/dist/errors.d.ts +12 -12
  62. package/dist/index.d.ts +2 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +49 -45
  65. package/dist/index.js.map +1 -1
  66. package/dist/{local-7PACQMS4.js → local-E6FJI3QK.js} +5 -5
  67. package/dist/mcp/server.d.ts.map +1 -1
  68. package/dist/{playwright-MPVYCDGO.js → playwright-LS35WXQ6.js} +6 -6
  69. package/dist/runtime/local.d.ts.map +1 -1
  70. package/dist/schemas/config.d.ts +39 -484
  71. package/dist/schemas/config.d.ts.map +1 -1
  72. package/dist/schemas/device.d.ts +1 -1
  73. package/dist/schemas/element.d.ts +1 -1
  74. package/dist/schemas/selector.d.ts +1 -1
  75. package/dist/{server-ZCA5M6SW.js → server-A6Y6ZMET.js} +2 -2
  76. package/dist/{server-SGLHRRAE.js → server-D3HOIPQE.js} +16 -16
  77. package/dist/{session-NCG5GVP6.js → session-2VIEKA6A.js} +16 -16
  78. package/dist/session-2VIEKA6A.js.map +1 -0
  79. package/dist/smart/auto-wait.d.ts +1 -1
  80. package/dist/smart/channel-resolver.d.ts +1 -1
  81. package/dist/smart/channel-resolver.d.ts.map +1 -1
  82. package/dist/smart/coordinator.d.ts +6 -2
  83. package/dist/smart/coordinator.d.ts.map +1 -1
  84. package/dist/smart/hierarchy-cache.d.ts +1 -1
  85. package/dist/studio/context.d.ts +1 -1
  86. package/dist/studio/effect-handler.d.ts +3 -1
  87. package/dist/{studio-command-VJ26HQU3.js → studio-command-SPHIXFIW.js} +2 -2
  88. package/dist/{test-command-GPQL7SRB.js → test-command-OYMJNT23.js} +17 -17
  89. package/dist/vendor/effect/Array.d.ts +841 -0
  90. package/dist/vendor/effect/BigDecimal.d.ts +227 -0
  91. package/dist/vendor/effect/Brand.d.ts +71 -0
  92. package/dist/vendor/effect/ByteSize.d.ts +218 -0
  93. package/dist/vendor/effect/Cache.d.ts +104 -0
  94. package/dist/vendor/effect/Cause.d.ts +242 -0
  95. package/dist/vendor/effect/Channel.d.ts +1004 -0
  96. package/dist/vendor/effect/Chunk.d.ts +499 -0
  97. package/dist/vendor/effect/Clock.d.ts +31 -0
  98. package/dist/vendor/effect/Combiner.d.ts +23 -0
  99. package/dist/vendor/effect/Context.d.ts +167 -0
  100. package/dist/vendor/effect/Cron.d.ts +79 -0
  101. package/dist/vendor/effect/Data.d.ts +146 -0
  102. package/dist/vendor/effect/DateTime.d.ts +554 -0
  103. package/dist/vendor/effect/Deferred.d.ts +135 -0
  104. package/dist/vendor/effect/Differ.d.ts +8 -0
  105. package/dist/vendor/effect/Duration.d.ts +270 -0
  106. package/dist/vendor/effect/Effect.d.ts +2606 -0
  107. package/dist/vendor/effect/Equal.d.ts +20 -0
  108. package/dist/vendor/effect/Equivalence.d.ts +55 -0
  109. package/dist/vendor/effect/ExecutionPlan.d.ts +131 -0
  110. package/dist/vendor/effect/Exit.d.ts +114 -0
  111. package/dist/vendor/effect/Fiber.d.ts +90 -0
  112. package/dist/vendor/effect/FileSystem.d.ts +227 -0
  113. package/dist/vendor/effect/Filter.d.ts +133 -0
  114. package/dist/vendor/effect/Formatter.d.ts +13 -0
  115. package/dist/vendor/effect/Function.d.ts +91 -0
  116. package/dist/vendor/effect/Graph.d.ts +638 -0
  117. package/dist/vendor/effect/HKT.d.ts +30 -0
  118. package/dist/vendor/effect/Hash.d.ts +31 -0
  119. package/dist/vendor/effect/HashMap.d.ts +225 -0
  120. package/dist/vendor/effect/HashSet.d.ts +122 -0
  121. package/dist/vendor/effect/Inspectable.d.ts +25 -0
  122. package/dist/vendor/effect/JsonPatch.d.ts +26 -0
  123. package/dist/vendor/effect/JsonSchema.d.ts +43 -0
  124. package/dist/vendor/effect/LICENSE +21 -0
  125. package/dist/vendor/effect/Latch.d.ts +48 -0
  126. package/dist/vendor/effect/Layer.d.ts +273 -0
  127. package/dist/vendor/effect/LogLevel.d.ts +46 -0
  128. package/dist/vendor/effect/Logger.d.ts +106 -0
  129. package/dist/vendor/effect/ManagedRuntime.d.ts +52 -0
  130. package/dist/vendor/effect/Metric.d.ts +266 -0
  131. package/dist/vendor/effect/MutableHashMap.d.ts +80 -0
  132. package/dist/vendor/effect/MutableList.d.ts +52 -0
  133. package/dist/vendor/effect/MutableRef.d.ts +76 -0
  134. package/dist/vendor/effect/NonEmptyIterable.d.ts +9 -0
  135. package/dist/vendor/effect/Optic.d.ts +155 -0
  136. package/dist/vendor/effect/Option.d.ts +380 -0
  137. package/dist/vendor/effect/Order.d.ts +110 -0
  138. package/dist/vendor/effect/Ordering.d.ts +24 -0
  139. package/dist/vendor/effect/Path.d.ts +44 -0
  140. package/dist/vendor/effect/Pipeable.d.ts +38 -0
  141. package/dist/vendor/effect/PlatformError.d.ts +63 -0
  142. package/dist/vendor/effect/Predicate.d.ts +227 -0
  143. package/dist/vendor/effect/PrimaryKey.d.ts +11 -0
  144. package/dist/vendor/effect/PubSub.d.ts +229 -0
  145. package/dist/vendor/effect/Pull.d.ts +54 -0
  146. package/dist/vendor/effect/Queue.d.ts +212 -0
  147. package/dist/vendor/effect/Rational.d.ts +212 -0
  148. package/dist/vendor/effect/Record.d.ts +247 -0
  149. package/dist/vendor/effect/Redactable.d.ts +14 -0
  150. package/dist/vendor/effect/Redacted.d.ts +34 -0
  151. package/dist/vendor/effect/Reducer.d.ts +13 -0
  152. package/dist/vendor/effect/References.d.ts +53 -0
  153. package/dist/vendor/effect/Request.d.ts +106 -0
  154. package/dist/vendor/effect/RequestResolver.d.ts +159 -0
  155. package/dist/vendor/effect/Result.d.ts +285 -0
  156. package/dist/vendor/effect/Schedule.d.ts +172 -0
  157. package/dist/vendor/effect/Scheduler.d.ts +45 -0
  158. package/dist/vendor/effect/Schema.d.ts +3205 -0
  159. package/dist/vendor/effect/SchemaAST.d.ts +356 -0
  160. package/dist/vendor/effect/SchemaGetter.d.ts +181 -0
  161. package/dist/vendor/effect/SchemaIssue.d.ts +147 -0
  162. package/dist/vendor/effect/SchemaParser.d.ts +57 -0
  163. package/dist/vendor/effect/SchemaRepresentation.d.ts +563 -0
  164. package/dist/vendor/effect/SchemaTransformation.d.ts +155 -0
  165. package/dist/vendor/effect/Scope.d.ts +69 -0
  166. package/dist/vendor/effect/SemVer.d.ts +209 -0
  167. package/dist/vendor/effect/SemVerRange.d.ts +74 -0
  168. package/dist/vendor/effect/Semaphore.d.ts +87 -0
  169. package/dist/vendor/effect/Sink.d.ts +337 -0
  170. package/dist/vendor/effect/StandardSchema.d.ts +112 -0
  171. package/dist/vendor/effect/Stream.d.ts +1762 -0
  172. package/dist/vendor/effect/Struct.d.ts +162 -0
  173. package/dist/vendor/effect/Take.d.ts +8 -0
  174. package/dist/vendor/effect/Tracer.d.ts +150 -0
  175. package/dist/vendor/effect/TxRef.d.ts +40 -0
  176. package/dist/vendor/effect/Types.d.ts +139 -0
  177. package/dist/vendor/effect/Unify.d.ts +50 -0
  178. package/dist/vendor/effect/Utils.d.ts +31 -0
  179. package/dist/vendor/effect/crypto/Aead.d.ts +72 -0
  180. package/dist/vendor/effect/crypto/Cipher.d.ts +54 -0
  181. package/dist/vendor/effect/crypto/CryptoError.d.ts +81 -0
  182. package/dist/vendor/effect/crypto/Digest.d.ts +32 -0
  183. package/dist/vendor/effect/crypto/KeyAgreement.d.ts +80 -0
  184. package/dist/vendor/effect/crypto/KeyFormat.d.ts +82 -0
  185. package/dist/vendor/effect/crypto/KeyWrap.d.ts +97 -0
  186. package/dist/vendor/effect/crypto/Mac.d.ts +56 -0
  187. package/dist/vendor/effect/crypto/SecureRandom.d.ts +63 -0
  188. package/dist/vendor/effect/crypto/Signature.d.ts +122 -0
  189. package/dist/vendor/effect/crypto/WebCrypto.d.ts +18 -0
  190. package/dist/vendor/effect/http/Cookies.d.ts +185 -0
  191. package/dist/vendor/effect/http/Headers.d.ts +144 -0
  192. package/dist/vendor/effect/http/UrlParams.d.ts +122 -0
  193. package/dist/vendor/effect/internal/schemaError.d.ts +3 -0
  194. package/dist/vendor/effect/net/Dns.d.ts +166 -0
  195. package/dist/vendor/effect/net/Host.d.ts +80 -0
  196. package/dist/vendor/effect/net/IpInterface.d.ts +65 -0
  197. package/dist/vendor/effect/net/IpNetwork.d.ts +89 -0
  198. package/dist/vendor/effect/net/NetAddress.d.ts +350 -0
  199. package/dist/vendor/effect/persistence/KeyValueStore.d.ts +138 -0
  200. package/dist/vendor/effect/persistence/Persistable.d.ts +56 -0
  201. package/dist/vendor/effect/persistence/Persistence.d.ts +83 -0
  202. package/dist/vendor/effect/persistence/Redis.d.ts +98 -0
  203. package/dist/vendor/effect/reactivity/Reactivity.d.ts +59 -0
  204. package/dist/vendor/effect/sql/SqlClient.d.ts +121 -0
  205. package/dist/vendor/effect/sql/SqlConnection.d.ts +26 -0
  206. package/dist/vendor/effect/sql/SqlError.d.ts +186 -0
  207. package/dist/vendor/effect/sql/Statement.d.ts +225 -0
  208. package/native/win32-x64/spana_native.dll +0 -0
  209. package/package.json +4 -3
  210. package/dist/chunk-5Q2ROROC.js.map +0 -1
  211. package/dist/chunk-7TMILDYA.js.map +0 -1
  212. package/dist/chunk-ABRN6BL6.js.map +0 -1
  213. package/dist/chunk-C2TMVKT7.js.map +0 -1
  214. package/dist/chunk-EJHZZ2OP.js.map +0 -1
  215. package/dist/chunk-FLPPA2XY.js.map +0 -1
  216. package/dist/chunk-T3PCI5QZ.js.map +0 -1
  217. /package/dist/{app-RWO7IJ3R.js.map → app-ZSRJ3VFR.js.map} +0 -0
  218. /package/dist/{appium-2PJWZXJI.js.map → appium-LOAWWZXA.js.map} +0 -0
  219. /package/dist/{config-loader-MX232REU.js.map → build-info-KFFGVWDQ.js.map} +0 -0
  220. /package/dist/{chunk-AFWHSQHU.js.map → chunk-42D5LOGH.js.map} +0 -0
  221. /package/dist/{chunk-CQ67PB3R.js.map → chunk-6GLL6SMP.js.map} +0 -0
  222. /package/dist/{chunk-F4DMBDPA.js.map → chunk-7QJY2HJO.js.map} +0 -0
  223. /package/dist/{chunk-I7BUJBT2.js.map → chunk-GBV3XDWM.js.map} +0 -0
  224. /package/dist/{chunk-BIV3DXB5.js.map → chunk-HX2PKESI.js.map} +0 -0
  225. /package/dist/{chunk-3JAGQ4XW.js.map → chunk-QNCTEV2P.js.map} +0 -0
  226. /package/dist/{chunk-3EBGWXYE.js.map → chunk-XUKBM64A.js.map} +0 -0
  227. /package/dist/{chunk-ERFUFR5T.js.map → chunk-XZQGSUV7.js.map} +0 -0
  228. /package/dist/{chunk-555KISAV.js.map → chunk-ZVUIG6A4.js.map} +0 -0
  229. /package/dist/{driver-TBRUL2EL.js.map → config-loader-IDIKOQ4T.js.map} +0 -0
  230. /package/dist/{doctor-command-O3MSNK7M.js.map → doctor-command-2PSDOREK.js.map} +0 -0
  231. /package/dist/{driver-VKJEQCG3.js.map → driver-TNQ6HSID.js.map} +0 -0
  232. /package/dist/{electrobun-5OGIQHTC.js.map → driver-TTJVCWCD.js.map} +0 -0
  233. /package/dist/{local-7PACQMS4.js.map → electrobun-6ZJ6QFVQ.js.map} +0 -0
  234. /package/dist/{playwright-MPVYCDGO.js.map → local-E6FJI3QK.js.map} +0 -0
  235. /package/dist/{server-ZCA5M6SW.js.map → playwright-LS35WXQ6.js.map} +0 -0
  236. /package/dist/{session-NCG5GVP6.js.map → server-A6Y6ZMET.js.map} +0 -0
  237. /package/dist/{server-SGLHRRAE.js.map → server-D3HOIPQE.js.map} +0 -0
  238. /package/dist/{studio-command-VJ26HQU3.js.map → studio-command-SPHIXFIW.js.map} +0 -0
  239. /package/dist/{test-command-GPQL7SRB.js.map → test-command-OYMJNT23.js.map} +0 -0
@@ -0,0 +1,3205 @@
1
+
2
+ import * as BigDecimal_ from "./BigDecimal.ts";
3
+ import type * as Brand from "./Brand.ts";
4
+ import * as ByteSize_ from "./ByteSize.ts";
5
+ import * as Cause_ from "./Cause.ts";
6
+ import * as Chunk_ from "./Chunk.ts";
7
+ import * as Aead_ from "./crypto/Aead.ts";
8
+ import * as Cipher_ from "./crypto/Cipher.ts";
9
+ import * as KeyAgreement_ from "./crypto/KeyAgreement.ts";
10
+ import * as KeyFormat_ from "./crypto/KeyFormat.ts";
11
+ import * as KeyWrap_ from "./crypto/KeyWrap.ts";
12
+ import * as Mac_ from "./crypto/Mac.ts";
13
+ import * as Signature_ from "./crypto/Signature.ts";
14
+ import * as DateTime from "./DateTime.ts";
15
+ import type { Differ } from "./Differ.ts";
16
+ import * as Duration_ from "./Duration.ts";
17
+ import * as Effect from "./Effect.ts";
18
+ import type * as Equivalence from "./Equivalence.ts";
19
+ import * as Exit_ from "./Exit.ts";
20
+ import type { Formatter } from "./Formatter.ts";
21
+ import type * as Graph_ from "./Graph.ts";
22
+ import * as HashMap_ from "./HashMap.ts";
23
+ import * as HashSet_ from "./HashSet.ts";
24
+ import * as Cookies_ from "./http/Cookies.ts";
25
+ import * as Headers_ from "./http/Headers.ts";
26
+ import * as UrlParams_ from "./http/UrlParams.ts";
27
+ import { NodeInspectSymbol } from "./Inspectable.ts";
28
+ import { SchemaErrorTypeId } from "./internal/schemaError.ts";
29
+ import type * as JsonPatch from "./JsonPatch.ts";
30
+ import type * as JsonSchema from "./JsonSchema.ts";
31
+ import * as Dns_ from "./net/Dns.ts";
32
+ import * as Host_ from "./net/Host.ts";
33
+ import * as IpInterface_ from "./net/IpInterface.ts";
34
+ import * as IpNetwork_ from "./net/IpNetwork.ts";
35
+ import * as NetAddress_ from "./net/NetAddress.ts";
36
+ import type * as Optic_ from "./Optic.ts";
37
+ import * as Option_ from "./Option.ts";
38
+ import * as Order from "./Order.ts";
39
+ import * as Pipeable from "./Pipeable.ts";
40
+ import * as Rational_ from "./Rational.ts";
41
+ import type * as Record_ from "./Record.ts";
42
+ import * as Redacted_ from "./Redacted.ts";
43
+ import * as Result_ from "./Result.ts";
44
+ import * as SchemaAST from "./SchemaAST.ts";
45
+ import * as SchemaGetter from "./SchemaGetter.ts";
46
+ import * as SchemaIssue from "./SchemaIssue.ts";
47
+ import * as SchemaParser from "./SchemaParser.ts";
48
+ import type * as SchemaRepresentation from "./SchemaRepresentation.ts";
49
+ import * as SemVer_ from "./SemVer.ts";
50
+ import * as SemVerRange_ from "./SemVerRange.ts";
51
+ import type { StandardJSONSchemaV1, StandardSchemaV1 } from "./StandardSchema.ts";
52
+ import type { Assign, Lambda, Mutable, Simplify } from "./Struct.ts";
53
+ import * as Struct_ from "./Struct.ts";
54
+ import type { IsUnion, RequiredKeys } from "./Types.ts";
55
+ import type { Unify } from "./Unify.ts";
56
+ declare const TypeId = "~effect/Schema/Schema";
57
+
58
+ export type Optionality = "required" | "optional";
59
+
60
+ export type Mutability = "readonly" | "mutable";
61
+
62
+ export type ConstructorDefault = "no-default" | "with-default";
63
+
64
+ export interface MakeOptions {
65
+
66
+ readonly parseOptions?: SchemaAST.ParseOptions | undefined;
67
+
68
+ readonly disableChecks?: boolean | undefined;
69
+ }
70
+
71
+ export interface BottomWithoutNew<out T, out E, out RD, out RE, out Ast extends SchemaAST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends Pipeable.Pipeable {
72
+ readonly [TypeId]: typeof TypeId;
73
+ readonly "ast": Ast;
74
+ readonly "Rebuild": Rebuild;
75
+ readonly "~type.parameters": TypeParameters;
76
+ readonly "Type": T;
77
+ readonly "Encoded": E;
78
+ readonly "DecodingServices": RD;
79
+ readonly "EncodingServices": RE;
80
+ readonly "~type.make.in": TypeMakeIn;
81
+ readonly "~type.make": TypeMake;
82
+ readonly "~type.constructor.default": TypeConstructorDefault;
83
+ readonly "Iso": Iso;
84
+ readonly "~type.mutability": TypeMutability;
85
+ readonly "~type.optionality": TypeOptionality;
86
+ readonly "~encoded.mutability": EncodedMutability;
87
+ readonly "~encoded.optionality": EncodedOptionality;
88
+ annotate(annotations: Annotations.Bottom<this["Type"], this["~type.parameters"]>): this["Rebuild"];
89
+ annotateKey(annotations: Annotations.Key<this["Type"]>): this["Rebuild"];
90
+ check(...checks: readonly [SchemaAST.Check<this["Type"]>, ...Array<SchemaAST.Check<this["Type"]>>]): this["Rebuild"];
91
+ rebuild(ast: this["ast"]): this["Rebuild"];
92
+
93
+ make(input: this["~type.make.in"], options?: MakeOptions): this["Type"];
94
+
95
+ makeOption(input: this["~type.make.in"], options?: MakeOptions): Option_.Option<this["Type"]>;
96
+
97
+ makeEffect(input: this["~type.make.in"], options?: MakeOptions): Effect.Effect<this["Type"], SchemaIssue.Issue>;
98
+ }
99
+
100
+ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomWithoutNew<T, E, RD, RE, Ast, Rebuild, TypeMakeIn, Iso, TypeParameters, TypeMake, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
101
+ new (_: never): {};
102
+ }
103
+
104
+ export interface BottomLazyWithoutNew<out Ast extends SchemaAST.AST, out Rebuild extends Top, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomWithoutNew<unknown, unknown, unknown, unknown, Ast, Rebuild, unknown, unknown, TypeParameters, unknown, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
105
+ }
106
+
107
+ export interface BottomLazy<out Ast extends SchemaAST.AST, out Rebuild extends Top, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomLazyWithoutNew<Ast, Rebuild, TypeParameters, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
108
+ new (_: never): {};
109
+ }
110
+
111
+ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<Constraint>, Iso = T> extends Bottom<T, E, TypeParameters[number]["DecodingServices"], TypeParameters[number]["EncodingServices"], SchemaAST.Declaration, declareConstructor<T, E, TypeParameters, Iso>, T, Iso, TypeParameters> {
112
+ }
113
+
114
+ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypeParameters extends ReadonlyArray<Constraint>>(typeParameters: TypeParameters, run: (typeParameters: { readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"], TypeParameters[K]["Encoded"]>; }) => (u: unknown, self: SchemaAST.Declaration, options: SchemaAST.ParseOptions) => Effect.Effect<T, SchemaIssue.Issue>, annotations?: Annotations.Declaration<T, TypeParameters>) => declareConstructor<T, E, TypeParameters, Iso>;
115
+
116
+ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [], Iso> {
117
+ readonly "Rebuild": declare<T, Iso>;
118
+ }
119
+
120
+ export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotations?: Annotations.Declaration<T> | undefined): declare<T, Iso>;
121
+
122
+ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], S["Rebuild"], S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]>;
123
+
124
+ export declare function annotate<S extends Top>(annotations: Annotations.Bottom<S["Type"], S["~type.parameters"]>): (self: S) => S["Rebuild"];
125
+
126
+ export declare function annotateEncoded<S extends Top>(annotations: Annotations.Bottom<S["Encoded"], readonly []>): (self: S) => S["Rebuild"];
127
+
128
+ export declare function annotateKey<S extends Top>(annotations: Annotations.Key<S["Type"]>): (self: S) => S["Rebuild"];
129
+
130
+ export interface Top extends Bottom<unknown, unknown, unknown, unknown, SchemaAST.AST, Top, unknown, unknown, any, // this is because TypeParameters is invariant
131
+ unknown, Mutability, Optionality, ConstructorDefault, Mutability, Optionality> {
132
+ }
133
+
134
+ export interface Constraint {
135
+ readonly [TypeId]: typeof TypeId;
136
+ readonly "ast": SchemaAST.AST;
137
+ readonly "Type": unknown;
138
+ readonly "Encoded": unknown;
139
+ readonly "DecodingServices": unknown;
140
+ readonly "EncodingServices": unknown;
141
+ readonly "~type.parameters": any;
142
+ readonly "~type.make.in": unknown;
143
+ readonly "~type.make": unknown;
144
+ readonly "Iso": unknown;
145
+ readonly "~type.optionality": Optionality;
146
+ readonly "~type.mutability": Mutability;
147
+ readonly "~type.constructor.default": ConstructorDefault;
148
+ readonly "~encoded.optionality": Optionality;
149
+ readonly "~encoded.mutability": Mutability;
150
+ }
151
+
152
+ export interface ConstraintCodec<out T, out E = T, out RD = never, out RE = never> extends Constraint {
153
+ readonly "Type": T;
154
+ readonly "Encoded": E;
155
+ readonly "DecodingServices": RD;
156
+ readonly "EncodingServices": RE;
157
+ }
158
+
159
+ export interface ConstraintDecoder<out T, out RD = never> extends ConstraintCodec<T, unknown, RD, unknown> {
160
+ }
161
+
162
+ export interface ConstraintEncoder<out E, out RE = never> extends ConstraintCodec<unknown, E, unknown, RE> {
163
+ }
164
+
165
+ export interface ConstraintRebuildable extends Constraint {
166
+ readonly "Rebuild": Constraint;
167
+ }
168
+
169
+ export declare namespace Schema {
170
+
171
+ type Type<S> = S extends {
172
+ readonly "Type": infer T;
173
+ } ? T : never;
174
+ }
175
+
176
+ export interface Schema<out T> extends Top {
177
+ readonly "Type": T;
178
+ readonly "Rebuild": Schema<T>;
179
+ }
180
+
181
+ export declare namespace Codec {
182
+
183
+ type Encoded<S> = S extends {
184
+ readonly "Encoded": infer E;
185
+ } ? E : never;
186
+
187
+ type DecodingServices<S> = S extends {
188
+ readonly "DecodingServices": infer R;
189
+ } ? R : never;
190
+
191
+ type EncodingServices<S> = S extends {
192
+ readonly "EncodingServices": infer R;
193
+ } ? R : never;
194
+ }
195
+
196
+ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends Schema<T> {
197
+ readonly "Encoded": E;
198
+ readonly "DecodingServices": RD;
199
+ readonly "EncodingServices": RE;
200
+ readonly "Rebuild": Codec<T, E, RD, RE>;
201
+ }
202
+
203
+ export interface Decoder<out T, out RD = never> extends Schema<T> {
204
+ readonly "Encoded": unknown;
205
+ readonly "DecodingServices": RD;
206
+ readonly "EncodingServices": unknown;
207
+ readonly "Rebuild": Decoder<T, RD>;
208
+ }
209
+
210
+ export interface Encoder<out E, out RE = never> extends Schema<unknown> {
211
+ readonly "Encoded": E;
212
+ readonly "DecodingServices": unknown;
213
+ readonly "EncodingServices": RE;
214
+ readonly "Rebuild": Encoder<E, RE>;
215
+ }
216
+
217
+ export declare function revealCodec<T, E, RD, RE>(codec: Codec<T, E, RD, RE>): Codec<T, E, RD, RE>;
218
+
219
+ export interface Optic<out T, out Iso> extends Schema<T> {
220
+ readonly "Iso": Iso;
221
+ readonly "DecodingServices": never;
222
+ readonly "EncodingServices": never;
223
+ readonly "Rebuild": Optic<T, Iso>;
224
+ }
225
+ declare const SchemaError_base: new <A extends Record<string, any> = {}>(args: import("./Types.ts").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause_.YieldableError & {
226
+ readonly _tag: "SchemaError";
227
+ } & Readonly<A>;
228
+
229
+ export declare class SchemaError extends SchemaError_base<{
230
+ readonly issue: SchemaIssue.Issue;
231
+ }> {
232
+ readonly [SchemaErrorTypeId]: typeof SchemaErrorTypeId;
233
+ constructor(issue: SchemaIssue.Issue);
234
+ get message(): string;
235
+ toJSON(): {
236
+ _tag: "SchemaError";
237
+ message: string;
238
+ };
239
+ [NodeInspectSymbol](): {
240
+ _tag: "SchemaError";
241
+ message: string;
242
+ };
243
+ toString(): string;
244
+ }
245
+
246
+ export declare function isSchemaError(u: unknown): u is SchemaError;
247
+
248
+ export declare function toStandardSchemaV1<S extends ConstraintDecoder<unknown>>(self: S, options?: {
249
+ readonly leafHook?: SchemaIssue.LeafHook | undefined;
250
+ readonly checkHook?: SchemaIssue.CheckHook | undefined;
251
+ readonly parseOptions?: SchemaAST.ParseOptions | undefined;
252
+ }): StandardSchemaV1<S["Encoded"], S["Type"]> & S;
253
+
254
+ export declare function toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & S;
255
+
256
+ export declare const is: typeof SchemaParser.is;
257
+
258
+ export declare const asserts: <S extends Constraint, I>(schema: S, input: I) => asserts input is I & S["Type"];
259
+
260
+ export declare function decodeUnknownEffect<S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
261
+
262
+ export declare const decodeEffect: <S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
263
+
264
+ export declare function decodeUnknownExit<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
265
+
266
+ export declare const decodeExit: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
267
+
268
+ export declare const decodeUnknownOption: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option<S["Type"]>;
269
+
270
+ export declare const decodeOption: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Option_.Option<S["Type"]>;
271
+
272
+ export declare function decodeUnknownResult<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result<S["Type"], SchemaError>;
273
+
274
+ export declare const decodeResult: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Result_.Result<S["Type"], SchemaError>;
275
+
276
+ export declare function decodeUnknownPromise<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise<S["Type"]>;
277
+
278
+ export declare const decodePromise: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Promise<S["Type"]>;
279
+
280
+ export declare function decodeUnknownSync<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Type"];
281
+
282
+ export declare const decodeSync: <S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => S["Type"];
283
+
284
+ export declare function encodeUnknownEffect<S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
285
+
286
+ export declare const encodeEffect: <S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
287
+
288
+ export declare function encodeUnknownExit<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
289
+
290
+ export declare const encodeExit: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
291
+
292
+ export declare const encodeUnknownOption: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option<S["Encoded"]>;
293
+
294
+ export declare const encodeOption: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Option_.Option<S["Encoded"]>;
295
+
296
+ export declare function encodeUnknownResult<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result<S["Encoded"], SchemaError>;
297
+
298
+ export declare const encodeResult: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Result_.Result<S["Encoded"], SchemaError>;
299
+
300
+ export declare function encodeUnknownPromise<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise<S["Encoded"]>;
301
+
302
+ export declare const encodePromise: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Promise<S["Encoded"]>;
303
+
304
+ export declare function encodeUnknownSync<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Encoded"];
305
+
306
+ export declare const encodeSync: <S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => S["Encoded"];
307
+
308
+ export declare const make: <S extends Constraint>(ast: S["ast"], options?: object) => S;
309
+
310
+ export declare function isSchema(u: unknown): u is Top;
311
+
312
+ export interface optionalKey<S extends Constraint> extends BottomLazy<S["ast"], optionalKey<S>, S["~type.parameters"], S["~type.mutability"], "optional", S["~type.constructor.default"], S["~encoded.mutability"], "optional"> {
313
+ readonly "Type": S["Type"];
314
+ readonly "Encoded": S["Encoded"];
315
+ readonly "DecodingServices": S["DecodingServices"];
316
+ readonly "EncodingServices": S["EncodingServices"];
317
+ readonly "~type.make.in": S["~type.make.in"];
318
+ readonly "~type.make": S["~type.make"];
319
+ readonly "Iso": S["Iso"];
320
+ readonly schema: S;
321
+ }
322
+ interface optionalKeyLambda extends Lambda {
323
+ <S extends Constraint>(self: S): optionalKey<S>;
324
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? optionalKey<this["~lambda.in"]> : never;
325
+ }
326
+
327
+ export declare const optionalKey: optionalKeyLambda;
328
+ interface requiredKeyLambda extends Lambda {
329
+ <S extends Constraint>(self: optionalKey<S>): S;
330
+ readonly "~lambda.out": this["~lambda.in"] extends optionalKey<Constraint> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for requiredKey";
331
+ }
332
+
333
+ export declare const requiredKey: requiredKeyLambda;
334
+
335
+ export interface optional<S extends Constraint> extends optionalKey<UndefinedOr<S>> {
336
+ readonly "Rebuild": optional<S>;
337
+ }
338
+ interface optionalLambda extends Lambda {
339
+ <S extends Constraint>(self: S): optional<S>;
340
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? optional<this["~lambda.in"]> : never;
341
+ }
342
+
343
+ export declare const optional: optionalLambda;
344
+ interface requiredLambda extends Lambda {
345
+ <S extends Constraint>(self: optional<S>): S;
346
+ readonly "~lambda.out": this["~lambda.in"] extends optional<Constraint> ? this["~lambda.in"]["schema"]["members"][0] : "Error: schema not eligible for required";
347
+ }
348
+
349
+ export declare const required: requiredLambda;
350
+
351
+ export interface mutableKey<S extends Constraint> extends BottomLazy<S["ast"], mutableKey<S>, S["~type.parameters"], "mutable", S["~type.optionality"], S["~type.constructor.default"], "mutable", S["~encoded.optionality"]> {
352
+ readonly "Type": S["Type"];
353
+ readonly "Encoded": S["Encoded"];
354
+ readonly "DecodingServices": S["DecodingServices"];
355
+ readonly "EncodingServices": S["EncodingServices"];
356
+ readonly "~type.make.in": S["~type.make.in"];
357
+ readonly "~type.make": S["~type.make"];
358
+ readonly "Iso": S["Iso"];
359
+ readonly schema: S;
360
+ }
361
+ interface mutableKeyLambda extends Lambda {
362
+ <S extends Constraint>(self: S): mutableKey<S>;
363
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? mutableKey<this["~lambda.in"]> : never;
364
+ }
365
+
366
+ export declare const mutableKey: mutableKeyLambda;
367
+ interface readonlyKeyLambda extends Lambda {
368
+ <S extends Constraint>(self: mutableKey<S>): S;
369
+ readonly "~lambda.out": this["~lambda.in"] extends mutableKey<Constraint> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for readonlyKey";
370
+ }
371
+
372
+ export declare const readonlyKey: readonlyKeyLambda;
373
+
374
+ export interface toType<S extends Constraint> extends BottomLazy<S["ast"], toType<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
375
+ readonly "Type": S["Type"];
376
+ readonly "Encoded": S["Type"];
377
+ readonly "DecodingServices": never;
378
+ readonly "EncodingServices": never;
379
+ readonly "~type.make.in": S["~type.make.in"];
380
+ readonly "~type.make": S["~type.make"];
381
+ readonly "Iso": S["Iso"];
382
+ readonly schema: S;
383
+ }
384
+ interface toTypeLambda extends Lambda {
385
+ <S extends Constraint>(self: S): toType<S>;
386
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? toType<this["~lambda.in"]> : never;
387
+ }
388
+
389
+ export declare const toType: toTypeLambda;
390
+
391
+ export interface toEncoded<S extends Constraint> extends BottomLazy<SchemaAST.AST, toEncoded<S>, ReadonlyArray<Constraint>, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
392
+ readonly "Type": S["Encoded"];
393
+ readonly "Encoded": S["Encoded"];
394
+ readonly "DecodingServices": never;
395
+ readonly "EncodingServices": never;
396
+ readonly "~type.make.in": S["Encoded"];
397
+ readonly "~type.make": S["Encoded"];
398
+ readonly "Iso": S["Encoded"];
399
+ readonly schema: S;
400
+ }
401
+ interface toEncodedLambda extends Lambda {
402
+ <S extends Constraint>(self: S): toEncoded<S>;
403
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? toEncoded<this["~lambda.in"]> : never;
404
+ }
405
+
406
+ export declare const toEncoded: toEncodedLambda;
407
+ declare const FlipTypeId = "~effect/Schema/flip";
408
+
409
+ export interface flip<S extends Top> extends BottomLazy<SchemaAST.AST, flip<S>, ReadonlyArray<Constraint>, S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> {
410
+ readonly "Type": S["Encoded"];
411
+ readonly "Encoded": S["Type"];
412
+ readonly "DecodingServices": S["EncodingServices"];
413
+ readonly "EncodingServices": S["DecodingServices"];
414
+ readonly "~type.make.in": S["Encoded"];
415
+ readonly "~type.make": S["Encoded"];
416
+ readonly "Iso": S["Encoded"];
417
+ readonly [FlipTypeId]: typeof FlipTypeId;
418
+ readonly schema: S;
419
+ }
420
+
421
+ export declare function flip<S extends Top>(schema: S): S extends flip<infer F> ? F["Rebuild"] : flip<S>;
422
+
423
+ export interface Literal<L extends SchemaAST.LiteralValue> extends Bottom<L, L, never, never, SchemaAST.Literal, Literal<L>> {
424
+ readonly literal: L;
425
+ transform<L2 extends SchemaAST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>>;
426
+ }
427
+
428
+ export declare function Literal<L extends SchemaAST.LiteralValue>(literal: L): Literal<L>;
429
+
430
+ export declare namespace TemplateLiteral {
431
+
432
+ interface SchemaPart extends Constraint {
433
+ readonly Encoded: string | number | bigint;
434
+ }
435
+
436
+ type LiteralPart = string | number | bigint;
437
+
438
+ type Part = SchemaPart | LiteralPart;
439
+
440
+ type Parts = ReadonlyArray<Part>;
441
+ type AppendType<Template extends string, Next> = Next extends LiteralPart ? `${Template}${Next}` : Next extends {
442
+ readonly Encoded: infer E extends LiteralPart;
443
+ } ? `${Template}${E}` : never;
444
+
445
+ type Encoded<Parts> = Parts extends readonly [...infer Init, infer Last] ? AppendType<Encoded<Init>, Last> : ``;
446
+ }
447
+
448
+ export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteral.Encoded<Parts>, TemplateLiteral.Encoded<Parts>, never, never, SchemaAST.TemplateLiteral, TemplateLiteral<Parts>> {
449
+ readonly parts: Parts;
450
+ }
451
+
452
+ export declare function TemplateLiteral<const Parts extends TemplateLiteral.Parts>(parts: Parts): TemplateLiteral<Parts>;
453
+
454
+ export declare namespace TemplateLiteralParser {
455
+
456
+ type Type<Parts> = Parts extends readonly [infer Head, ...infer Tail] ? readonly [
457
+ Head extends TemplateLiteral.LiteralPart ? Head : Head extends ConstraintDecoder<infer T, unknown> ? T : never,
458
+ ...Type<Tail>
459
+ ] : [
460
+ ];
461
+ }
462
+
463
+ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> extends BottomLazy<SchemaAST.Arrays, TemplateLiteralParser<Parts>> {
464
+ readonly "Type": TemplateLiteralParser.Type<Parts>;
465
+ readonly "Encoded": TemplateLiteral.Encoded<Parts>;
466
+ readonly "DecodingServices": Extract<Parts[number], Constraint>["DecodingServices"];
467
+ readonly "EncodingServices": Extract<Parts[number], Constraint>["EncodingServices"];
468
+ readonly "~type.make.in": TemplateLiteralParser.Type<Parts>;
469
+ readonly "~type.make": TemplateLiteralParser.Type<Parts>;
470
+ readonly "Iso": TemplateLiteralParser.Type<Parts>;
471
+ readonly parts: Parts;
472
+ }
473
+
474
+ export declare function TemplateLiteralParser<const Parts extends TemplateLiteral.Parts>(parts: Parts): TemplateLiteralParser<Parts>;
475
+
476
+ export interface Enum<A extends {
477
+ [x: string]: string | number;
478
+ }> extends Bottom<A[keyof A], A[keyof A], never, never, SchemaAST.Enum, Enum<A>> {
479
+ readonly enums: A;
480
+ }
481
+
482
+ export declare function Enum<const A extends {
483
+ [x: string]: string | number;
484
+ }>(enums: A): Enum<A>;
485
+
486
+ export interface Never extends Bottom<never, never, never, never, SchemaAST.Never, Never> {
487
+ }
488
+
489
+ export declare const Never: Never;
490
+
491
+ export interface Any extends Bottom<any, any, never, never, SchemaAST.Any, Any> {
492
+ }
493
+
494
+ export declare const Any: Any;
495
+
496
+ export interface Unknown extends Bottom<unknown, unknown, never, never, SchemaAST.Unknown, Unknown> {
497
+ }
498
+
499
+ export declare const Unknown: Unknown;
500
+
501
+ export interface Null extends Bottom<null, null, never, never, SchemaAST.Null, Null> {
502
+ }
503
+
504
+ export declare const Null: Null;
505
+
506
+ export interface Undefined extends Bottom<undefined, undefined, never, never, SchemaAST.Undefined, Undefined> {
507
+ }
508
+
509
+ export declare const Undefined: Undefined;
510
+
511
+ export interface String extends Bottom<string, string, never, never, SchemaAST.String, String> {
512
+ }
513
+
514
+ export declare const String: String;
515
+
516
+ export interface StringForLiteralAutocomplete extends Bottom<string & {}, string & {}, never, never, SchemaAST.String, StringForLiteralAutocomplete> {
517
+ }
518
+
519
+ export declare const StringForLiteralAutocomplete: StringForLiteralAutocomplete;
520
+
521
+ export interface Number extends Bottom<number, number, never, never, SchemaAST.Number, Number> {
522
+ }
523
+
524
+ export declare const Number: Number;
525
+
526
+ export interface Boolean extends Bottom<boolean, boolean, never, never, SchemaAST.Boolean, Boolean> {
527
+ }
528
+
529
+ export declare const Boolean: Boolean;
530
+
531
+ export interface Symbol extends Bottom<symbol, symbol, never, never, SchemaAST.Symbol, Symbol> {
532
+ }
533
+
534
+ export declare const Symbol: Symbol;
535
+
536
+ export interface BigInt extends Bottom<bigint, bigint, never, never, SchemaAST.BigInt, BigInt> {
537
+ }
538
+
539
+ export declare const BigInt: BigInt;
540
+
541
+ export interface Void extends Bottom<void, void, never, never, SchemaAST.Void, Void> {
542
+ }
543
+
544
+ export declare const Void: Void;
545
+
546
+ export interface ObjectKeyword extends Bottom<object, object, never, never, SchemaAST.ObjectKeyword, ObjectKeyword> {
547
+ }
548
+
549
+ export declare const ObjectKeyword: ObjectKeyword;
550
+
551
+ export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never, never, SchemaAST.UniqueSymbol, UniqueSymbol<sym>> {
552
+ }
553
+
554
+ export declare function UniqueSymbol<const sym extends symbol>(symbol: sym): UniqueSymbol<sym>;
555
+
556
+ export declare namespace Struct {
557
+
558
+ type Fields = {
559
+ readonly [x: PropertyKey]: Constraint;
560
+ };
561
+ type TypeOptionalKeys<Fields extends Struct.Fields> = {
562
+ [K in keyof Fields]: Fields[K] extends {
563
+ readonly "~type.optionality": "optional";
564
+ } ? K : never;
565
+ }[keyof Fields];
566
+ type TypeMutableKeys<Fields extends Struct.Fields> = {
567
+ [K in keyof Fields]: Fields[K] extends {
568
+ readonly "~type.mutability": "mutable";
569
+ } ? K : never;
570
+ }[keyof Fields];
571
+ type SetOptional<A, K extends keyof A> = Omit<A, K> & Partial<Pick<A, K>>;
572
+ type Mutable<A> = {
573
+ -readonly [K in keyof A]: A[K];
574
+ };
575
+ type SetMutable<A, K extends keyof A> = Omit<A, K> & Mutable<Pick<A, K>>;
576
+ type Side = "Type" | "Iso" | "Encoded";
577
+ type EncodedOptionalKeys<Fields extends Struct.Fields> = {
578
+ [K in keyof Fields]: Fields[K] extends {
579
+ readonly "~encoded.optionality": "optional";
580
+ } ? K : never;
581
+ }[keyof Fields];
582
+ type EncodedMutableKeys<Fields extends Struct.Fields> = {
583
+ [K in keyof Fields]: Fields[K] extends {
584
+ readonly "~encoded.mutability": "mutable";
585
+ } ? K : never;
586
+ }[keyof Fields];
587
+ type SideOptionalKeys<F extends Fields, S extends Side> = S extends "Encoded" ? EncodedOptionalKeys<F> : TypeOptionalKeys<F>;
588
+ type SideMutableKeys<F extends Fields, S extends Side> = S extends "Encoded" ? EncodedMutableKeys<F> : TypeMutableKeys<F>;
589
+ type ReadonlySide<F extends Fields, S extends Side> = {
590
+ readonly [K in keyof F]: F[K][S];
591
+ };
592
+ type View<F extends Fields, S extends Side, O extends keyof F = SideOptionalKeys<F, S>, M extends keyof F = SideMutableKeys<F, S>> = [O | M] extends [never] ? Simplify<ReadonlySide<F, S>> : [M] extends [never] ? Simplify<SetOptional<ReadonlySide<F, S>, O>> : [O] extends [never] ? Simplify<SetMutable<ReadonlySide<F, S>, M>> : Simplify<SetMutable<SetOptional<ReadonlySide<F, S>, O>, Extract<keyof SetOptional<ReadonlySide<F, S>, O>, M>>>;
593
+
594
+ type Type<F extends Fields> = View<F, "Type">;
595
+
596
+ type Iso<F extends Fields> = View<F, "Iso">;
597
+
598
+ type Encoded<F extends Fields> = View<F, "Encoded">;
599
+
600
+ type DecodingServices<F extends Fields> = {
601
+ readonly [K in keyof F]: F[K]["DecodingServices"];
602
+ }[keyof F];
603
+
604
+ type EncodingServices<F extends Fields> = {
605
+ readonly [K in keyof F]: F[K]["EncodingServices"];
606
+ }[keyof F];
607
+ type TypeConstructorDefaultedKeys<Fields extends Struct.Fields> = {
608
+ [K in keyof Fields]: Fields[K] extends {
609
+ readonly "~type.constructor.default": "with-default";
610
+ } ? K : never;
611
+ }[keyof Fields];
612
+ type ReadonlyMakeIn<F extends Fields> = {
613
+ readonly [K in keyof F]: F[K]["~type.make"];
614
+ };
615
+ type MakeInView<F extends Fields, O extends keyof F = TypeOptionalKeys<F> | TypeConstructorDefaultedKeys<F>> = [O] extends [never] ? Simplify<ReadonlyMakeIn<F>> : Simplify<SetOptional<ReadonlyMakeIn<F>, O>>;
616
+
617
+ type MakeIn<F extends Fields> = MakeInView<F>;
618
+ }
619
+
620
+ export interface Struct<Fields extends Struct.Fields> extends BottomLazy<SchemaAST.Objects, Struct<Fields>> {
621
+ readonly "Type": Struct.Type<Fields>;
622
+ readonly "Encoded": Struct.Encoded<Fields>;
623
+ readonly "DecodingServices": Struct.DecodingServices<Fields>;
624
+ readonly "EncodingServices": Struct.EncodingServices<Fields>;
625
+ readonly "~type.make.in": Struct.MakeIn<Fields>;
626
+ readonly "~type.make": Struct.MakeIn<Fields>;
627
+ readonly "Iso": Struct.Iso<Fields>;
628
+
629
+ readonly fields: Fields;
630
+
631
+ mapFields<To extends Struct.Fields>(f: (fields: Fields) => To, options?: {
632
+ readonly unsafePreserveChecks?: boolean | undefined;
633
+ } | undefined): Struct<Simplify<Readonly<To>>>;
634
+ }
635
+
636
+ export declare function Struct<const Fields extends Struct.Fields>(fields: Fields): Struct<Fields>;
637
+ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
638
+ <Fields extends Struct.Fields>(struct: Struct<Fields>): Struct<Struct_.Simplify<Struct_.Assign<Fields, NewFields>>>;
639
+ readonly "~lambda.out": this["~lambda.in"] extends Struct<Struct.Fields> ? Struct<Struct_.Simplify<Struct_.Assign<this["~lambda.in"]["fields"], NewFields>>> : "Error: schema not eligible for fieldsAssign";
640
+ }
641
+
642
+ export declare function fieldsAssign<const NewFields extends Struct.Fields>(fields: NewFields): fieldsAssign<NewFields>;
643
+
644
+ export interface encodeKeys<S extends Constraint & {
645
+ readonly fields: Struct.Fields;
646
+ }, M extends {
647
+ readonly [K in keyof S["fields"]]?: PropertyKey;
648
+ }> extends decodeTo<S, Struct<{
649
+ [K in keyof S["fields"] as K extends keyof M ? M[K] extends PropertyKey ? M[K] : K : K]: toEncoded<S["fields"][K]>;
650
+ }>> {
651
+ }
652
+
653
+ export declare function encodeKeys<S extends Constraint & {
654
+ readonly fields: Struct.Fields;
655
+ }, const M extends {
656
+ readonly [K in keyof S["fields"]]?: PropertyKey;
657
+ }>(mapping: M): (self: S) => encodeKeys<S, M>;
658
+
659
+ export declare function extendTo<S extends Struct<Struct.Fields>, const Fields extends Struct.Fields>(fields: Fields, derive: {
660
+ readonly [K in keyof Fields]: (s: S["Type"]) => Option_.Option<Fields[K]["Type"]>;
661
+ }): (self: S) => decodeTo<Struct<Simplify<{ [K in keyof S["fields"]]: toType<S["fields"][K]>; } & Fields>>, S>;
662
+
663
+ export declare namespace Record {
664
+
665
+ interface Key extends Codec<PropertyKey, PropertyKey, unknown, unknown> {
666
+ readonly "~type.make": PropertyKey;
667
+ readonly "Iso": PropertyKey;
668
+ }
669
+
670
+ type Type<Key extends Record.Key, Value extends Constraint> = Value extends {
671
+ readonly "~type.optionality": "optional";
672
+ } ? Value extends {
673
+ readonly "~type.mutability": "mutable";
674
+ } ? {
675
+ [P in Key["Type"]]?: Value["Type"];
676
+ } : {
677
+ readonly [P in Key["Type"]]?: Value["Type"];
678
+ } : Value extends {
679
+ readonly "~type.mutability": "mutable";
680
+ } ? {
681
+ [P in Key["Type"]]: Value["Type"];
682
+ } : {
683
+ readonly [P in Key["Type"]]: Value["Type"];
684
+ };
685
+
686
+ type Iso<Key extends Record.Key, Value extends Constraint> = Value extends {
687
+ readonly "~type.optionality": "optional";
688
+ } ? Value extends {
689
+ readonly "~type.mutability": "mutable";
690
+ } ? {
691
+ [P in Key["Iso"]]?: Value["Iso"];
692
+ } : {
693
+ readonly [P in Key["Iso"]]?: Value["Iso"];
694
+ } : Value extends {
695
+ readonly "~type.mutability": "mutable";
696
+ } ? {
697
+ [P in Key["Iso"]]: Value["Iso"];
698
+ } : {
699
+ readonly [P in Key["Iso"]]: Value["Iso"];
700
+ };
701
+
702
+ type Encoded<Key extends Record.Key, Value extends Constraint> = Value extends {
703
+ readonly "~encoded.optionality": "optional";
704
+ } ? Value extends {
705
+ readonly "~encoded.mutability": "mutable";
706
+ } ? {
707
+ [P in Key["Encoded"]]?: Value["Encoded"];
708
+ } : {
709
+ readonly [P in Key["Encoded"]]?: Value["Encoded"];
710
+ } : Value extends {
711
+ readonly "~encoded.mutability": "mutable";
712
+ } ? {
713
+ [P in Key["Encoded"]]: Value["Encoded"];
714
+ } : {
715
+ readonly [P in Key["Encoded"]]: Value["Encoded"];
716
+ };
717
+
718
+ type DecodingServices<Key extends Record.Key, Value extends Constraint> = Key["DecodingServices"] | Value["DecodingServices"];
719
+
720
+ type EncodingServices<Key extends Record.Key, Value extends Constraint> = Key["EncodingServices"] | Value["EncodingServices"];
721
+
722
+ type MakeIn<Key extends Record.Key, Value extends Constraint> = Value extends {
723
+ readonly "~encoded.optionality": "optional";
724
+ } ? Value extends {
725
+ readonly "~encoded.mutability": "mutable";
726
+ } ? {
727
+ [P in Key["~type.make"]]?: Value["~type.make"];
728
+ } : {
729
+ readonly [P in Key["~type.make"]]?: Value["~type.make"];
730
+ } : Value extends {
731
+ readonly "~encoded.mutability": "mutable";
732
+ } ? {
733
+ [P in Key["~type.make"]]: Value["~type.make"];
734
+ } : {
735
+ readonly [P in Key["~type.make"]]: Value["~type.make"];
736
+ };
737
+ }
738
+
739
+ export interface $Record<Key extends Record.Key, Value extends Constraint> extends BottomLazy<SchemaAST.Objects, $Record<Key, Value>> {
740
+ readonly "Type": Record.Type<Key, Value>;
741
+ readonly "Encoded": Record.Encoded<Key, Value>;
742
+ readonly "DecodingServices": Record.DecodingServices<Key, Value>;
743
+ readonly "EncodingServices": Record.EncodingServices<Key, Value>;
744
+ readonly "~type.make.in": Simplify<Record.MakeIn<Key, Value>>;
745
+ readonly "~type.make": Simplify<Record.MakeIn<Key, Value>>;
746
+ readonly "Iso": Record.Iso<Key, Value>;
747
+ readonly key: Key;
748
+ readonly value: Value;
749
+ }
750
+
751
+ export declare function Record<Key extends Record.Key, Value extends Constraint>(key: Key, value: Value): $Record<Key, Value>;
752
+
753
+ export declare namespace StructWithRest {
754
+
755
+ type Objects = Constraint & {
756
+ readonly ast: SchemaAST.Objects;
757
+ readonly Encoded: object;
758
+ };
759
+
760
+ type Records = ReadonlyArray<$Record<Record.Key, Constraint>>;
761
+ type MergeTuple<T extends ReadonlyArray<unknown>> = T extends readonly [infer Head, ...infer Tail] ? Head & MergeTuple<Tail> : {};
762
+ type Intersect<S extends Objects, Records extends StructWithRest.Records, Side extends "Type" | "Iso" | "Encoded" | "~type.make"> = S[Side] & MergeTuple<{
763
+ readonly [K in keyof Records]: Records[K][Side];
764
+ }>;
765
+
766
+ type Type<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Type">;
767
+
768
+ type Iso<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Iso">;
769
+
770
+ type Encoded<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Encoded">;
771
+
772
+ type MakeIn<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "~type.make">;
773
+ type Services<S extends Objects, Records extends StructWithRest.Records, Side extends "DecodingServices" | "EncodingServices"> = S[Side] | {
774
+ [K in keyof Records]: Records[K][Side];
775
+ }[number];
776
+
777
+ type DecodingServices<S extends Objects, Records extends StructWithRest.Records> = Services<S, Records, "DecodingServices">;
778
+
779
+ type EncodingServices<S extends Objects, Records extends StructWithRest.Records> = Services<S, Records, "EncodingServices">;
780
+ type IncompatibleKeys<A, B, OK extends (keyof A & keyof B) = Extract<keyof A, keyof B>> = {
781
+ [K in OK]: Required<Pick<A, K>>[K] extends B[K] ? never : K;
782
+ }[OK];
783
+ type IncompatibleSideKeys<S extends Objects, Records extends StructWithRest.Records, Side extends "Type" | "Encoded" | "Iso" | "~type.make"> = {
784
+ [I in keyof Records]: Records[I][Side] extends object ? IncompatibleKeys<S[Side], Records[I][Side]> : never;
785
+ }[number];
786
+ type IncompatibleRecords<S extends Objects, Records extends StructWithRest.Records> = IncompatibleSideKeys<S, Records, "Type"> | IncompatibleSideKeys<S, Records, "Encoded"> | IncompatibleSideKeys<S, Records, "Iso"> | IncompatibleSideKeys<S, Records, "~type.make">;
787
+
788
+ type ValidateRecords<S extends Objects, Records extends StructWithRest.Records> = [
789
+ IncompatibleRecords<S, Records>
790
+ ] extends [never] ? true : {
791
+ "incompatible index signatures": IncompatibleRecords<S, Records>;
792
+ };
793
+ }
794
+
795
+ export interface StructWithRest<S extends StructWithRest.Objects, Records extends StructWithRest.Records> extends BottomLazy<SchemaAST.Objects, StructWithRest<S, Records>> {
796
+ readonly "Type": Simplify<StructWithRest.Type<S, Records>>;
797
+ readonly "Encoded": Simplify<StructWithRest.Encoded<S, Records>>;
798
+ readonly "DecodingServices": StructWithRest.DecodingServices<S, Records>;
799
+ readonly "EncodingServices": StructWithRest.EncodingServices<S, Records>;
800
+ readonly "~type.make.in": Simplify<StructWithRest.MakeIn<S, Records>>;
801
+ readonly "~type.make": Simplify<StructWithRest.MakeIn<S, Records>>;
802
+ readonly "Iso": Simplify<StructWithRest.Iso<S, Records>>;
803
+ readonly schema: S;
804
+ readonly records: Records;
805
+ }
806
+
807
+ export declare function StructWithRest<const S extends StructWithRest.Objects, const Records extends StructWithRest.Records>(schema: S, records: Records): StructWithRest<S, Records>;
808
+
809
+ export declare namespace Tuple {
810
+
811
+ type Elements = ReadonlyArray<Constraint>;
812
+ type Type_<Elements, Out extends ReadonlyArray<any> = readonly []> = Elements extends readonly [infer Head, ...infer Tail] ? Head extends {
813
+ readonly "Type": infer T;
814
+ } ? Head extends {
815
+ readonly "~type.optionality": "optional";
816
+ } ? Type_<Tail, readonly [...Out, T?]> : Type_<Tail, readonly [...Out, T]> : Out : Out;
817
+
818
+ type Type<E extends Elements> = Type_<E>;
819
+ type Iso_<Elements, Out extends ReadonlyArray<any> = readonly []> = Elements extends readonly [infer Head, ...infer Tail] ? Head extends {
820
+ readonly "Iso": infer T;
821
+ } ? Head extends {
822
+ readonly "~type.optionality": "optional";
823
+ } ? Iso_<Tail, readonly [...Out, T?]> : Iso_<Tail, readonly [...Out, T]> : Out : Out;
824
+
825
+ type Iso<E extends Elements> = Iso_<E>;
826
+ type Encoded_<Elements, Out extends ReadonlyArray<any> = readonly []> = Elements extends readonly [infer Head, ...infer Tail] ? Head extends {
827
+ readonly "Encoded": infer T;
828
+ } ? Head extends {
829
+ readonly "~encoded.optionality": "optional";
830
+ } ? Encoded_<Tail, readonly [...Out, T?]> : Encoded_<Tail, readonly [...Out, T]> : Out : Out;
831
+
832
+ type Encoded<E extends Elements> = Encoded_<E>;
833
+
834
+ type DecodingServices<E extends Elements> = E[number]["DecodingServices"];
835
+
836
+ type EncodingServices<E extends Elements> = E[number]["EncodingServices"];
837
+ type MakeIn_<E, Out extends ReadonlyArray<any> = readonly []> = E extends readonly [infer Head, ...infer Tail] ? Head extends {
838
+ "~type.make": infer T;
839
+ } ? Head extends {
840
+ readonly "~type.optionality": "optional";
841
+ } | {
842
+ readonly "~type.constructor.default": "with-default";
843
+ } ? MakeIn_<Tail, readonly [...Out, T?]> : MakeIn_<Tail, readonly [...Out, T]> : Out : Out;
844
+
845
+ type MakeIn<E extends Elements> = MakeIn_<E>;
846
+ }
847
+
848
+ export interface Tuple<Elements extends Tuple.Elements> extends BottomLazy<SchemaAST.Arrays, Tuple<Elements>> {
849
+ readonly "Type": Tuple.Type<Elements>;
850
+ readonly "Encoded": Tuple.Encoded<Elements>;
851
+ readonly "DecodingServices": Tuple.DecodingServices<Elements>;
852
+ readonly "EncodingServices": Tuple.EncodingServices<Elements>;
853
+ readonly "~type.make.in": Tuple.MakeIn<Elements>;
854
+ readonly "~type.make": Tuple.MakeIn<Elements>;
855
+ readonly "Iso": Tuple.Iso<Elements>;
856
+ readonly elements: Elements;
857
+
858
+ mapElements<To extends Tuple.Elements>(f: (elements: Elements) => To, options?: {
859
+ readonly unsafePreserveChecks?: boolean | undefined;
860
+ } | undefined): Tuple<Simplify<Readonly<To>>>;
861
+ }
862
+
863
+ export declare function Tuple<const Elements extends ReadonlyArray<Constraint>>(elements: Elements): Tuple<Elements>;
864
+
865
+ export declare namespace TupleWithRest {
866
+
867
+ type TupleType = Constraint & {
868
+ readonly Type: ReadonlyArray<unknown>;
869
+ readonly Encoded: ReadonlyArray<unknown>;
870
+ readonly ast: SchemaAST.Arrays;
871
+ readonly "~type.make": ReadonlyArray<unknown>;
872
+ readonly "Iso": ReadonlyArray<unknown>;
873
+ };
874
+
875
+ type Rest = readonly [Constraint, ...Array<Constraint>];
876
+
877
+ type Type<T extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Constraint, ...infer Tail extends ReadonlyArray<Constraint>] ? Readonly<[
878
+ ...T,
879
+ ...Array<Head["Type"]>,
880
+ ...{
881
+ readonly [K in keyof Tail]: Tail[K]["Type"];
882
+ }
883
+ ]> : T;
884
+
885
+ type Iso<T extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Constraint, ...infer Tail extends ReadonlyArray<Constraint>] ? Readonly<[
886
+ ...T,
887
+ ...Array<Head["Iso"]>,
888
+ ...{
889
+ readonly [K in keyof Tail]: Tail[K]["Iso"];
890
+ }
891
+ ]> : T;
892
+
893
+ type Encoded<E extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Constraint, ...infer Tail extends ReadonlyArray<Constraint>] ? readonly [
894
+ ...E,
895
+ ...Array<Head["Encoded"]>,
896
+ ...{
897
+ readonly [K in keyof Tail]: Tail[K]["Encoded"];
898
+ }
899
+ ] : E;
900
+
901
+ type MakeIn<M extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Constraint, ...infer Tail extends ReadonlyArray<Constraint>] ? readonly [
902
+ ...M,
903
+ ...Array<Head["~type.make"]>,
904
+ ...{
905
+ readonly [K in keyof Tail]: Tail[K]["~type.make"];
906
+ }
907
+ ] : M;
908
+ }
909
+
910
+ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends TupleWithRest.Rest> extends BottomLazy<SchemaAST.Arrays, TupleWithRest<S, Rest>> {
911
+ readonly "Type": TupleWithRest.Type<S["Type"], Rest>;
912
+ readonly "Encoded": TupleWithRest.Encoded<S["Encoded"], Rest>;
913
+ readonly "DecodingServices": S["DecodingServices"] | Rest[number]["DecodingServices"];
914
+ readonly "EncodingServices": S["EncodingServices"] | Rest[number]["EncodingServices"];
915
+ readonly "~type.make.in": TupleWithRest.MakeIn<S["~type.make"], Rest>;
916
+ readonly "~type.make": TupleWithRest.MakeIn<S["~type.make"], Rest>;
917
+ readonly "Iso": TupleWithRest.Iso<S["Iso"], Rest>;
918
+ readonly schema: S;
919
+ readonly rest: Rest;
920
+ }
921
+
922
+ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Rest extends TupleWithRest.Rest>(schema: S, rest: Rest): TupleWithRest<S, Rest>;
923
+
924
+ export interface $Array<S extends Constraint> extends BottomLazy<SchemaAST.Arrays, $Array<S>> {
925
+ readonly "Type": ReadonlyArray<S["Type"]>;
926
+ readonly "Encoded": ReadonlyArray<S["Encoded"]>;
927
+ readonly "DecodingServices": S["DecodingServices"];
928
+ readonly "EncodingServices": S["EncodingServices"];
929
+ readonly "~type.make.in": ReadonlyArray<S["~type.make"]>;
930
+ readonly "~type.make": ReadonlyArray<S["~type.make"]>;
931
+ readonly "Iso": ReadonlyArray<S["Iso"]>;
932
+ readonly value: S;
933
+ }
934
+ interface ArrayLambda extends Lambda {
935
+ <S extends Constraint>(self: S): $Array<S>;
936
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? $Array<this["~lambda.in"]> : never;
937
+ }
938
+
939
+ declare const ArraySchema: ArrayLambda;
940
+ export {
941
+
942
+ ArraySchema as Array };
943
+
944
+ export interface NonEmptyArray<S extends Constraint> extends BottomLazy<SchemaAST.Arrays, NonEmptyArray<S>> {
945
+ readonly "Type": readonly [S["Type"], ...Array<S["Type"]>];
946
+ readonly "Encoded": readonly [S["Encoded"], ...Array<S["Encoded"]>];
947
+ readonly "DecodingServices": S["DecodingServices"];
948
+ readonly "EncodingServices": S["EncodingServices"];
949
+ readonly "~type.make.in": readonly [S["~type.make"], ...Array<S["~type.make"]>];
950
+ readonly "~type.make": readonly [S["~type.make"], ...Array<S["~type.make"]>];
951
+ readonly "Iso": readonly [S["Iso"], ...Array<S["Iso"]>];
952
+ readonly value: S;
953
+ }
954
+ interface NonEmptyArrayLambda extends Lambda {
955
+ <S extends Constraint>(self: S): NonEmptyArray<S>;
956
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? NonEmptyArray<this["~lambda.in"]> : never;
957
+ }
958
+
959
+ export declare const NonEmptyArray: NonEmptyArrayLambda;
960
+
961
+ export interface ArrayEnsure<S extends Constraint> extends decodeTo<$Array<toType<S>>, Union<readonly [S, $Array<S>]>> {
962
+ readonly "Rebuild": ArrayEnsure<S>;
963
+ }
964
+
965
+ export declare function ArrayEnsure<S extends Constraint>(schema: S): ArrayEnsure<S>;
966
+
967
+ export interface UniqueArray<S extends Constraint> extends $Array<S> {
968
+ readonly "Rebuild": UniqueArray<S>;
969
+ }
970
+
971
+ export declare function UniqueArray<S extends Constraint>(item: S): UniqueArray<S>;
972
+
973
+ export interface mutable<S extends Constraint & {
974
+ readonly "ast": SchemaAST.Arrays;
975
+ }> extends BottomLazy<S["ast"], mutable<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
976
+ readonly "Type": Mutable<S["Type"]>;
977
+ readonly "Encoded": Mutable<S["Encoded"]>;
978
+ readonly "DecodingServices": S["DecodingServices"];
979
+ readonly "EncodingServices": S["EncodingServices"];
980
+ readonly "~type.make.in": S["~type.make.in"];
981
+ readonly "~type.make": S["~type.make"];
982
+ readonly "Iso": S["Iso"];
983
+ readonly schema: S;
984
+ }
985
+ interface mutableLambda extends Lambda {
986
+ <S extends Constraint & {
987
+ readonly "ast": SchemaAST.Arrays;
988
+ }>(self: S): mutable<S>;
989
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint & {
990
+ readonly "ast": SchemaAST.Arrays;
991
+ } ? mutable<this["~lambda.in"]> : "Error: schema not eligible for mutable";
992
+ }
993
+
994
+ export declare const mutable: mutableLambda;
995
+
996
+ export interface Union<Members extends ReadonlyArray<Constraint>> extends BottomLazy<SchemaAST.Union<{
997
+ [K in keyof Members]: Members[K]["ast"];
998
+ }[number]>, Union<Members>> {
999
+ readonly "Type": {
1000
+ [K in keyof Members]: Members[K]["Type"];
1001
+ }[number];
1002
+ readonly "Encoded": {
1003
+ [K in keyof Members]: Members[K]["Encoded"];
1004
+ }[number];
1005
+ readonly "DecodingServices": {
1006
+ [K in keyof Members]: Members[K]["DecodingServices"];
1007
+ }[number];
1008
+ readonly "EncodingServices": {
1009
+ [K in keyof Members]: Members[K]["EncodingServices"];
1010
+ }[number];
1011
+ readonly "~type.make.in": {
1012
+ [K in keyof Members]: Members[K]["~type.make"];
1013
+ }[number];
1014
+ readonly "~type.make": {
1015
+ [K in keyof Members]: Members[K]["~type.make"];
1016
+ }[number];
1017
+ readonly "Iso": {
1018
+ [K in keyof Members]: Members[K]["Iso"];
1019
+ }[number];
1020
+ readonly members: Members;
1021
+
1022
+ mapMembers<To extends ReadonlyArray<Constraint>>(f: (members: Members) => To, options?: {
1023
+ readonly unsafePreserveChecks?: boolean | undefined;
1024
+ } | undefined): Union<Simplify<Readonly<To>>>;
1025
+ }
1026
+
1027
+ export declare function Union<const Members extends ReadonlyArray<Constraint>>(members: Members, options?: SchemaAST.UnionOptions): Union<Members>;
1028
+
1029
+ export interface Literals<L extends ReadonlyArray<SchemaAST.LiteralValue>> extends Bottom<L[number], L[number], never, never, SchemaAST.Union<SchemaAST.Literal>, Literals<L>> {
1030
+ readonly literals: L;
1031
+ readonly members: {
1032
+ readonly [K in keyof L]: Literal<L[K]>;
1033
+ };
1034
+
1035
+ mapMembers<To extends ReadonlyArray<Constraint>>(f: (members: this["members"]) => To): Union<Simplify<Readonly<To>>>;
1036
+ pick<const L2 extends ReadonlyArray<L[number]>>(literals: L2): Literals<L2>;
1037
+
1038
+ transform<const L2 extends {
1039
+ readonly [I in keyof L]: SchemaAST.LiteralValue;
1040
+ }>(to: L2): Union<{
1041
+ [I in keyof L]: decodeTo<Literal<L2[I]>, Literal<L[I]>>;
1042
+ }>;
1043
+ }
1044
+
1045
+ export declare function Literals<const L extends ReadonlyArray<SchemaAST.LiteralValue>>(literals: L): Literals<L>;
1046
+
1047
+ export interface NullOr<S extends Constraint> extends Union<readonly [S, Null]> {
1048
+ readonly "Rebuild": NullOr<S>;
1049
+ }
1050
+ interface NullOrLambda extends Lambda {
1051
+ <S extends Constraint>(self: S): NullOr<S>;
1052
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? NullOr<this["~lambda.in"]> : never;
1053
+ }
1054
+
1055
+ export declare const NullOr: NullOrLambda;
1056
+
1057
+ export interface UndefinedOr<S extends Constraint> extends Union<readonly [S, Undefined]> {
1058
+ readonly "Rebuild": UndefinedOr<S>;
1059
+ }
1060
+ interface UndefinedOrLambda extends Lambda {
1061
+ <S extends Constraint>(self: S): UndefinedOr<S>;
1062
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? UndefinedOr<this["~lambda.in"]> : never;
1063
+ }
1064
+
1065
+ export declare const UndefinedOr: UndefinedOrLambda;
1066
+
1067
+ export interface NullishOr<S extends Constraint> extends Union<readonly [S, Null, Undefined]> {
1068
+ readonly "Rebuild": NullishOr<S>;
1069
+ }
1070
+ interface NullishOrLambda extends Lambda {
1071
+ <S extends Constraint>(self: S): NullishOr<S>;
1072
+ readonly "~lambda.out": this["~lambda.in"] extends Constraint ? NullishOr<this["~lambda.in"]> : never;
1073
+ }
1074
+
1075
+ export declare const NullishOr: NullishOrLambda;
1076
+
1077
+ export interface suspend<S extends Constraint> extends BottomLazy<SchemaAST.Suspend, suspend<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1078
+ readonly "Type": S["Type"];
1079
+ readonly "Encoded": S["Encoded"];
1080
+ readonly "DecodingServices": S["DecodingServices"];
1081
+ readonly "EncodingServices": S["EncodingServices"];
1082
+ readonly "~type.make.in": S["~type.make.in"];
1083
+ readonly "~type.make": S["~type.make"];
1084
+ readonly "Iso": S["Iso"];
1085
+ }
1086
+
1087
+ export declare function suspend<S extends Constraint>(f: () => S): suspend<S>;
1088
+
1089
+ export declare function check<S extends Top>(...checks: readonly [SchemaAST.Check<S["Type"]>, ...Array<SchemaAST.Check<S["Type"]>>]): (self: S) => S["Rebuild"];
1090
+
1091
+ export interface refine<T extends S["Type"], S extends Constraint> extends BottomLazy<S["ast"], refine<T, S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1092
+ readonly "Type": T;
1093
+ readonly "Encoded": S["Encoded"];
1094
+ readonly "DecodingServices": S["DecodingServices"];
1095
+ readonly "EncodingServices": S["EncodingServices"];
1096
+ readonly "~type.make.in": S["~type.make.in"];
1097
+ readonly "~type.make": T;
1098
+ readonly "Iso": T;
1099
+ readonly schema: S;
1100
+ }
1101
+
1102
+ export declare function refine<S extends Constraint, T extends S["Type"]>(refinement: (value: S["Type"]) => value is T, annotations?: Annotations.Filter): (schema: S) => refine<T, S>;
1103
+ type EnsureSingleBrandKey<K extends PropertyKey> = IsUnion<K> extends false ? {} extends Record<K, unknown> ? never : unknown : never;
1104
+ type FromBrandKeys<A extends Brand.Brand<any>> = A extends unknown ? Brand.Brand.Keys<A> : never;
1105
+
1106
+ export interface brand<S extends Constraint, B extends string> extends BottomLazy<S["ast"], brand<S, B>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1107
+ readonly "Type": S["Type"] & Brand.Brand<B>;
1108
+ readonly "Encoded": S["Encoded"];
1109
+ readonly "DecodingServices": S["DecodingServices"];
1110
+ readonly "EncodingServices": S["EncodingServices"];
1111
+ readonly "~type.make.in": S["~type.make.in"];
1112
+ readonly "~type.make": S["Type"] & Brand.Brand<B>;
1113
+ readonly "Iso": S["Iso"] & Brand.Brand<B>;
1114
+ readonly schema: S;
1115
+ readonly identifier: string;
1116
+ }
1117
+
1118
+ export declare function brand<B extends string>(identifier: B & EnsureSingleBrandKey<B>): <S extends ConstraintRebuildable>(schema: S) => brand<S["Rebuild"], B>;
1119
+
1120
+ export declare function fromBrand<A extends Brand.Brand<any>>(identifier: Brand.Brand.Keys<A> & string, ctor: Brand.Constructor<A> & EnsureSingleBrandKey<FromBrandKeys<A>>): <S extends Top & {
1121
+ readonly "Type": Brand.Brand.Unbranded<A>;
1122
+ }>(self: S) => brand<S["Rebuild"], keyof A["~effect/Brand"] & string>;
1123
+
1124
+ export interface middlewareDecoding<S extends Constraint, RD> extends BottomLazy<S["ast"], middlewareDecoding<S, RD>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1125
+ readonly "Type": S["Type"];
1126
+ readonly "Encoded": S["Encoded"];
1127
+ readonly "DecodingServices": RD;
1128
+ readonly "EncodingServices": S["EncodingServices"];
1129
+ readonly "~type.make.in": S["~type.make.in"];
1130
+ readonly "~type.make": S["~type.make"];
1131
+ readonly "Iso": S["Iso"];
1132
+ readonly schema: S;
1133
+ }
1134
+
1135
+ export declare function middlewareDecoding<S extends Constraint, RD>(decode: (effect: Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, S["DecodingServices"]>, options: SchemaAST.ParseOptions) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, RD>): (schema: S) => middlewareDecoding<S, RD>;
1136
+
1137
+ export interface middlewareEncoding<S extends Constraint, RE> extends BottomLazy<S["ast"], middlewareEncoding<S, RE>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1138
+ readonly "Type": S["Type"];
1139
+ readonly "Encoded": S["Encoded"];
1140
+ readonly "DecodingServices": S["DecodingServices"];
1141
+ readonly "EncodingServices": RE;
1142
+ readonly "~type.make.in": S["~type.make.in"];
1143
+ readonly "~type.make": S["~type.make"];
1144
+ readonly "Iso": S["Iso"];
1145
+ readonly schema: S;
1146
+ }
1147
+
1148
+ export declare function middlewareEncoding<S extends Constraint, RE>(encode: (effect: Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue, S["EncodingServices"]>, options: SchemaAST.ParseOptions) => Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue, RE>): (schema: S) => middlewareEncoding<S, RE>;
1149
+
1150
+ export declare function catchDecoding<S extends Constraint>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue>): (self: S) => middlewareDecoding<S, S["DecodingServices"]>;
1151
+
1152
+ export declare function catchDecodingWithContext<S extends Constraint, R = never>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, R>): (self: S) => middlewareDecoding<S, S["DecodingServices"] | R>;
1153
+
1154
+ export declare function catchEncoding<S extends Constraint>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue>): (self: S) => middlewareEncoding<S, S["EncodingServices"]>;
1155
+
1156
+ export declare function catchEncodingWithContext<S extends Constraint, R = never>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue, R>): (self: S) => middlewareEncoding<S, S["EncodingServices"] | R>;
1157
+
1158
+ export interface decodeTo<To extends Constraint, From extends Constraint, RD = never, RE = never> extends BottomLazy<To["ast"], decodeTo<To, From, RD, RE>, To["~type.parameters"], To["~type.mutability"], To["~type.optionality"], To["~type.constructor.default"], From["~encoded.mutability"], From["~encoded.optionality"]> {
1159
+ readonly "Type": To["Type"];
1160
+ readonly "Encoded": From["Encoded"];
1161
+ readonly "DecodingServices": To["DecodingServices"] | From["DecodingServices"] | RD;
1162
+ readonly "EncodingServices": To["EncodingServices"] | From["EncodingServices"] | RE;
1163
+ readonly "~type.make.in": To["~type.make.in"];
1164
+ readonly "~type.make": To["~type.make"];
1165
+ readonly "Iso": To["Iso"];
1166
+ readonly from: From;
1167
+ readonly to: To;
1168
+ }
1169
+
1170
+ export interface compose<To extends Constraint, From extends Constraint> extends decodeTo<To, From> {
1171
+ }
1172
+
1173
+ export declare function decodeTo<To extends Constraint>(to: To): <From extends Constraint>(from: From) => compose<To, From>;
1174
+ export declare function decodeTo<To extends Constraint, From extends Constraint, RD = never, RE = never>(to: To, transformation: {
1175
+ readonly decode: SchemaGetter.Getter<NoInfer<To["Encoded"]>, NoInfer<From["Type"]>, RD>;
1176
+ readonly encode: SchemaGetter.Getter<NoInfer<From["Type"]>, NoInfer<To["Encoded"]>, RE>;
1177
+ }): (from: From) => decodeTo<To, From, RD, RE>;
1178
+
1179
+ export declare function decode<S extends Constraint, RD = never, RE = never>(transformation: {
1180
+ readonly decode: SchemaGetter.Getter<S["Type"], S["Type"], RD>;
1181
+ readonly encode: SchemaGetter.Getter<S["Type"], S["Type"], RE>;
1182
+ }): (self: S) => decodeTo<toType<S>, S, RD, RE>;
1183
+
1184
+ export declare function encodeTo<To extends Constraint>(to: To): <From extends Constraint>(from: From) => compose<From, To>;
1185
+ export declare function encodeTo<To extends Constraint, From extends Constraint, RD = never, RE = never>(to: To, transformation: {
1186
+ readonly decode: SchemaGetter.Getter<NoInfer<From["Encoded"]>, NoInfer<To["Type"]>, RD>;
1187
+ readonly encode: SchemaGetter.Getter<NoInfer<To["Type"]>, NoInfer<From["Encoded"]>, RE>;
1188
+ }): (from: From) => decodeTo<From, To, RD, RE>;
1189
+
1190
+ export declare function encode<S extends Constraint, RD = never, RE = never>(transformation: {
1191
+ readonly decode: SchemaGetter.Getter<S["Encoded"], S["Encoded"], RD>;
1192
+ readonly encode: SchemaGetter.Getter<S["Encoded"], S["Encoded"], RE>;
1193
+ }): (self: S) => decodeTo<S, toEncoded<S>, RD, RE>;
1194
+
1195
+ export interface WithoutConstructorDefault {
1196
+ readonly "~type.constructor.default": "no-default";
1197
+ }
1198
+
1199
+ export interface withConstructorDefault<S extends Constraint & WithoutConstructorDefault> extends BottomLazy<S["ast"], withConstructorDefault<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], "with-default", S["~encoded.mutability"], S["~encoded.optionality"]> {
1200
+ readonly "Type": S["Type"];
1201
+ readonly "Encoded": S["Encoded"];
1202
+ readonly "DecodingServices": S["DecodingServices"];
1203
+ readonly "EncodingServices": S["EncodingServices"];
1204
+ readonly "~type.make.in": S["~type.make.in"];
1205
+ readonly "~type.make": S["~type.make"];
1206
+ readonly "Iso": S["Iso"];
1207
+ readonly schema: S;
1208
+ }
1209
+
1210
+ export declare function withConstructorDefault<S extends Constraint & WithoutConstructorDefault>(defaultValue: Effect.Effect<S["~type.make.in"], SchemaIssue.Issue>): (schema: S) => withConstructorDefault<S>;
1211
+
1212
+ export interface withDecodingDefaultKey<S extends Constraint, R = never> extends decodeTo<S, optionalKey<toEncoded<S>>, R> {
1213
+ readonly "Rebuild": withDecodingDefaultKey<S, R>;
1214
+ }
1215
+
1216
+ export type DecodingDefaultOptions = {
1217
+ readonly encodingStrategy?: "omit" | "passthrough" | undefined;
1218
+ };
1219
+
1220
+ export declare function withDecodingDefaultKey<S extends Constraint, R = never>(defaultValue: Effect.Effect<S["Encoded"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultKey<S, R>;
1221
+
1222
+ export interface withDecodingDefaultTypeKey<S extends Constraint, R = never> extends decodeTo<withDecodingDefaultKey<toType<S>, R>, optionalKey<S>> {
1223
+ readonly "Rebuild": withDecodingDefaultTypeKey<S, R>;
1224
+ }
1225
+
1226
+ export declare function withDecodingDefaultTypeKey<S extends Constraint, R = never>(defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultTypeKey<S, R>;
1227
+
1228
+ export interface withDecodingDefault<S extends Constraint, R = never> extends decodeTo<S, optional<toEncoded<S>>, R> {
1229
+ readonly "Rebuild": withDecodingDefault<S, R>;
1230
+ }
1231
+
1232
+ export declare function withDecodingDefault<S extends Constraint, R = never>(defaultValue: Effect.Effect<S["Encoded"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefault<S, R>;
1233
+
1234
+ export interface withDecodingDefaultType<S extends Constraint, R = never> extends decodeTo<withDecodingDefault<toType<S>, R>, optional<S>> {
1235
+ readonly "Rebuild": withDecodingDefaultType<S, R>;
1236
+ }
1237
+
1238
+ export declare function withDecodingDefaultType<S extends Constraint, R = never>(defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultType<S, R>;
1239
+
1240
+ export interface tag<Tag extends SchemaAST.LiteralValue> extends withConstructorDefault<Literal<Tag>> {
1241
+ }
1242
+
1243
+ export declare function tag<Tag extends SchemaAST.LiteralValue>(literal: Tag): tag<Tag>;
1244
+
1245
+ export declare function tagDefaultOmit<Tag extends SchemaAST.LiteralValue>(literal: Tag): withDecodingDefaultKey<tag<Tag>, never>;
1246
+
1247
+ export type TaggedStruct<Tag extends SchemaAST.LiteralValue, Fields extends Struct.Fields> = Struct<Simplify<{
1248
+ readonly _tag: tag<Tag>;
1249
+ } & Fields>>;
1250
+
1251
+ export declare function TaggedStruct<const Tag extends SchemaAST.LiteralValue, const Fields extends Struct.Fields>(value: Tag, fields: Fields): TaggedStruct<Tag, Fields>;
1252
+
1253
+ type Flatten<Schemas> = Schemas extends readonly [infer Head, ...infer Tail] ? Head extends Union<infer Inner> ? [...Flatten<Inner>, ...Flatten<Tail>] : [Head, ...Flatten<Tail>] : [];
1254
+ type MatchCasesResult<Cases> = {
1255
+ [K in keyof Cases]-?: NonNullable<Cases[K]> extends (...args: Array<any>) => infer R ? R : never;
1256
+ }[keyof Cases];
1257
+ type MatchOrElseResult<Cases, OrElse> = Unify<MatchCasesResult<Cases> | (OrElse extends (...args: Array<any>) => infer R ? R : never)>;
1258
+ type TaggedUnionMatch<Cases extends Record<PropertyKey, Constraint>, Value> = {
1259
+ <Handlers extends {
1260
+ [K in keyof Cases]: (value: Cases[K]["Type"]) => any;
1261
+ }>(value: Value, cases: Handlers): Unify<ReturnType<Handlers[keyof Cases]>>;
1262
+ <Handlers extends {
1263
+ [K in keyof Cases]: (value: Cases[K]["Type"]) => any;
1264
+ }>(cases: Handlers): (value: Value) => Unify<ReturnType<Handlers[keyof Cases]>>;
1265
+ };
1266
+ type TaggedUnionMatchOrElse<Cases extends Record<PropertyKey, Constraint>, Value, Tag extends PropertyKey> = {
1267
+ <Handlers, OrElse>(value: Value, cases: Handlers & {
1268
+ [K in keyof Cases]?: (value: Cases[K]["Type"]) => any;
1269
+ } & (Exclude<keyof Handlers, keyof Cases> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<Value, {
1270
+ readonly [K in Tag]: keyof Handlers;
1271
+ }>) => any)): MatchOrElseResult<Handlers, OrElse>;
1272
+ <Handlers, OrElse>(cases: Handlers & {
1273
+ [K in keyof Cases]?: (value: Cases[K]["Type"]) => any;
1274
+ } & (Exclude<keyof Handlers, keyof Cases> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<Value, {
1275
+ readonly [K in Tag]: keyof Handlers;
1276
+ }>) => any)): (value: Value) => MatchOrElseResult<Handlers, OrElse>;
1277
+ };
1278
+ type TaggedUnionUtils<Tag extends PropertyKey, Members extends ReadonlyArray<Constraint & {
1279
+ readonly Type: {
1280
+ readonly [K in Tag]: PropertyKey;
1281
+ };
1282
+ }>, Flattened extends ReadonlyArray<Constraint & {
1283
+ readonly Type: {
1284
+ readonly [K in Tag]: PropertyKey;
1285
+ };
1286
+ }> = Flatten<Members>> = {
1287
+
1288
+ readonly tag: Tag;
1289
+
1290
+ readonly discriminants: {
1291
+ readonly [I in keyof Flattened]: Flattened[I]["Type"][Tag];
1292
+ };
1293
+ readonly cases: Simplify<{
1294
+ [M in Flattened[number] as M["Type"][Tag]]: M;
1295
+ }>;
1296
+ readonly isAnyOf: <const Keys extends Members[number]["Type"][Tag]>(keys: ReadonlyArray<Keys>) => (value: Members[number]["Type"]) => value is Extract<Members[number]["Type"], {
1297
+ readonly [K in Tag]: Keys;
1298
+ }>;
1299
+ readonly guards: {
1300
+ [M in Flattened[number] as M["Type"][Tag]]: (u: unknown) => u is M["Type"];
1301
+ };
1302
+ readonly match: TaggedUnionMatch<{
1303
+ readonly [M in Flattened[number] as M["Type"][Tag]]: M;
1304
+ }, Members[number]["Type"]>;
1305
+ readonly matchOrElse: TaggedUnionMatchOrElse<{
1306
+ readonly [M in Flattened[number] as M["Type"][Tag]]: M;
1307
+ }, Members[number]["Type"], Tag>;
1308
+ };
1309
+
1310
+ export type toTaggedUnion<Tag extends PropertyKey, Members extends ReadonlyArray<Constraint & {
1311
+ readonly Type: {
1312
+ readonly [K in Tag]: PropertyKey;
1313
+ };
1314
+ }>> = Union<Members> & TaggedUnionUtils<Tag, Members>;
1315
+
1316
+ export declare function toTaggedUnion<const Tag extends PropertyKey>(tag: Tag): <const Members extends ReadonlyArray<Constraint & {
1317
+ readonly Type: { readonly [K in Tag]: PropertyKey; };
1318
+ }>>(self: Union<Members>) => toTaggedUnion<Tag, Members>;
1319
+
1320
+ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends BottomLazy<SchemaAST.Union<SchemaAST.Objects>, TaggedUnion<Cases>> {
1321
+ readonly "Type": {
1322
+ [K in keyof Cases]: Cases[K]["Type"];
1323
+ }[keyof Cases];
1324
+ readonly "Encoded": {
1325
+ [K in keyof Cases]: Cases[K]["Encoded"];
1326
+ }[keyof Cases];
1327
+ readonly "DecodingServices": {
1328
+ [K in keyof Cases]: Cases[K]["DecodingServices"];
1329
+ }[keyof Cases];
1330
+ readonly "EncodingServices": {
1331
+ [K in keyof Cases]: Cases[K]["EncodingServices"];
1332
+ }[keyof Cases];
1333
+ readonly "~type.make.in": {
1334
+ [K in keyof Cases]: Cases[K]["~type.make"];
1335
+ }[keyof Cases];
1336
+ readonly "~type.make": {
1337
+ [K in keyof Cases]: Cases[K]["~type.make"];
1338
+ }[keyof Cases];
1339
+ readonly "Iso": {
1340
+ [K in keyof Cases]: Cases[K]["Iso"];
1341
+ }[keyof Cases];
1342
+ readonly tag: "_tag";
1343
+ readonly cases: Cases;
1344
+ readonly isAnyOf: <const Keys extends keyof Cases>(keys: ReadonlyArray<Keys>) => (value: Cases[keyof Cases]["Type"]) => value is Extract<Cases[keyof Cases]["Type"], {
1345
+ _tag: Keys;
1346
+ }>;
1347
+ readonly guards: {
1348
+ [K in keyof Cases]: (u: unknown) => u is Cases[K]["Type"];
1349
+ };
1350
+ readonly match: TaggedUnionMatch<Cases, Cases[keyof Cases]["Type"]>;
1351
+ readonly matchOrElse: TaggedUnionMatchOrElse<Cases, Cases[keyof Cases]["Type"], "_tag">;
1352
+ }
1353
+
1354
+ export declare function TaggedUnion<const CasesByTag extends Record<string, Struct.Fields>>(casesByTag: CasesByTag): TaggedUnion<{
1355
+ readonly [K in keyof CasesByTag & string]: TaggedStruct<K, CasesByTag[K]>;
1356
+ }>;
1357
+
1358
+ export interface Opaque<Self, S extends Top, Brand> extends BottomLazyWithoutNew<S["ast"], S["Rebuild"], S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1359
+ readonly "Type": Self;
1360
+ readonly "Encoded": S["Encoded"];
1361
+ readonly "DecodingServices": S["DecodingServices"];
1362
+ readonly "EncodingServices": S["EncodingServices"];
1363
+ readonly "~type.make.in": S["~type.make.in"];
1364
+ readonly "~type.make": S["~type.make"];
1365
+ readonly "Iso": S["Iso"];
1366
+ new (_: never): S["Type"] & Brand;
1367
+ }
1368
+
1369
+ export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) => Opaque<Self, S, Brand> & Omit<S, keyof Top>;
1370
+
1371
+ export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
1372
+ readonly "Rebuild": instanceOf<T, Iso>;
1373
+ }
1374
+
1375
+ export declare function instanceOf<C extends abstract new (...args: any) => any, Iso = InstanceType<C>>(constructor: C, annotations?: Annotations.Declaration<InstanceType<C>> | undefined): instanceOf<InstanceType<C>, Iso>;
1376
+
1377
+ export declare function link<T>(): <To extends Constraint>(encodeTo: To, transformation: {
1378
+ readonly decode: SchemaGetter.Getter<T, NoInfer<To["Type"]>>;
1379
+ readonly encode: SchemaGetter.Getter<NoInfer<To["Type"]>, T>;
1380
+ }) => SchemaAST.Link;
1381
+
1382
+ export declare const makeFilter: <T>(filter: (input: T, ast: SchemaAST.AST, options: SchemaAST.ParseOptions) => FilterOutput, annotations?: Annotations.Filter | undefined, abort?: boolean) => SchemaAST.Filter<T>;
1383
+
1384
+ export type FilterIssue = string | SchemaIssue.Issue | {
1385
+ readonly path: ReadonlyArray<PropertyKey>;
1386
+ readonly issue: string | SchemaIssue.Issue;
1387
+ };
1388
+
1389
+ export type FilterOutput = undefined | boolean | FilterIssue | ReadonlyArray<FilterIssue>;
1390
+
1391
+ export declare function makeFilterGroup<T>(checks: readonly [SchemaAST.Check<T>, ...Array<SchemaAST.Check<T>>], annotations?: Annotations.Filter | undefined): SchemaAST.FilterGroup<T>;
1392
+
1393
+ export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1394
+
1395
+ export declare function isPattern(regExp: globalThis.RegExp, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1396
+
1397
+ export declare function isStringFinite(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1398
+
1399
+ export declare function isStringBigInt(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1400
+
1401
+ export declare function isStringSymbol(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1402
+
1403
+ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1404
+
1405
+ export declare function isGUID(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1406
+
1407
+ export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1408
+
1409
+ export declare function isAscii(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1410
+
1411
+ export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1412
+
1413
+ export declare function isBase64Url(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1414
+
1415
+ export declare function isStartingWith(startsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1416
+
1417
+ export declare function isEndingWith(endsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1418
+
1419
+ export declare function isIncluding(includes: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1420
+
1421
+ export declare function isUppercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1422
+
1423
+ export declare function isLowercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1424
+
1425
+ export declare function isCapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1426
+
1427
+ export declare function isUncapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1428
+
1429
+ export interface Finite extends Number {
1430
+ readonly "Rebuild": Finite;
1431
+ }
1432
+
1433
+ export declare const Finite: Finite;
1434
+
1435
+ export declare const isFinite: (annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1436
+
1437
+ export declare function makeIsGreaterThan<T>(options: {
1438
+ readonly order: Order.Order<T>;
1439
+ readonly annotate?: ((exclusiveMinimum: T) => Annotations.Filter) | undefined;
1440
+ readonly formatter?: Formatter<T> | undefined;
1441
+ }): (exclusiveMinimum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1442
+
1443
+ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
1444
+ readonly order: Order.Order<T>;
1445
+ readonly annotate?: ((exclusiveMinimum: T) => Annotations.Filter) | undefined;
1446
+ readonly formatter?: Formatter<T> | undefined;
1447
+ }): (minimum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1448
+
1449
+ export declare function makeIsLessThan<T>(options: {
1450
+ readonly order: Order.Order<T>;
1451
+ readonly annotate?: ((exclusiveMaximum: T) => Annotations.Filter) | undefined;
1452
+ readonly formatter?: Formatter<T> | undefined;
1453
+ }): (exclusiveMaximum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1454
+
1455
+ export declare function makeIsLessThanOrEqualTo<T>(options: {
1456
+ readonly order: Order.Order<T>;
1457
+ readonly annotate?: ((exclusiveMaximum: T) => Annotations.Filter) | undefined;
1458
+ readonly formatter?: Formatter<T> | undefined;
1459
+ }): (maximum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1460
+
1461
+ export declare function makeIsBetween<T>(deriveOptions: {
1462
+ readonly order: Order.Order<T>;
1463
+ readonly annotate?: ((options: {
1464
+ readonly minimum: T;
1465
+ readonly maximum: T;
1466
+ readonly exclusiveMinimum?: boolean | undefined;
1467
+ readonly exclusiveMaximum?: boolean | undefined;
1468
+ }) => Annotations.Filter) | undefined;
1469
+ readonly formatter?: Formatter<T> | undefined;
1470
+ }): (options: {
1471
+ readonly minimum: T;
1472
+ readonly maximum: T;
1473
+ readonly exclusiveMinimum?: boolean | undefined;
1474
+ readonly exclusiveMaximum?: boolean | undefined;
1475
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1476
+
1477
+ export declare function makeIsMultipleOf<T>(options: {
1478
+ readonly remainder: (input: T, divisor: T) => T;
1479
+ readonly zero: NoInfer<T>;
1480
+ readonly annotate?: ((divisor: T) => Annotations.Filter) | undefined;
1481
+ readonly formatter?: Formatter<T> | undefined;
1482
+ }): (divisor: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
1483
+
1484
+ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1485
+
1486
+ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1487
+
1488
+ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1489
+
1490
+ export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1491
+
1492
+ export declare const isBetween: (options: {
1493
+ readonly minimum: number;
1494
+ readonly maximum: number;
1495
+ readonly exclusiveMinimum?: boolean | undefined;
1496
+ readonly exclusiveMaximum?: boolean | undefined;
1497
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
1498
+
1499
+ export declare function isMultipleOf(divisor: number, annotations?: Annotations.Filter): SchemaAST.Filter<number>;
1500
+
1501
+ export declare function isInt(annotations?: Annotations.Filter): SchemaAST.Filter<number>;
1502
+
1503
+ export interface Int extends Number {
1504
+ readonly "Rebuild": Int;
1505
+ }
1506
+
1507
+ export declare const Int: Int;
1508
+
1509
+ export interface Natural extends Int {
1510
+ readonly "Rebuild": Natural;
1511
+ }
1512
+
1513
+ export declare const Natural: Natural;
1514
+
1515
+ export declare function isInt32(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>;
1516
+
1517
+ export declare function isUint32(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>;
1518
+
1519
+ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
1520
+
1521
+ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
1522
+
1523
+ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
1524
+
1525
+ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
1526
+
1527
+ export declare const isBetweenDate: (options: {
1528
+ readonly minimum: globalThis.Date;
1529
+ readonly maximum: globalThis.Date;
1530
+ readonly exclusiveMinimum?: boolean | undefined;
1531
+ readonly exclusiveMaximum?: boolean | undefined;
1532
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
1533
+
1534
+ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
1535
+
1536
+ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
1537
+
1538
+ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
1539
+
1540
+ export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
1541
+
1542
+ export declare const isBetweenBigInt: (options: {
1543
+ readonly minimum: bigint;
1544
+ readonly maximum: bigint;
1545
+ readonly exclusiveMinimum?: boolean | undefined;
1546
+ readonly exclusiveMaximum?: boolean | undefined;
1547
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
1548
+
1549
+ export declare function isMinLength(minLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1550
+ readonly length: number;
1551
+ }>;
1552
+
1553
+ export declare function isNonEmpty(annotations?: Annotations.Filter): SchemaAST.Filter<{
1554
+ readonly length: number;
1555
+ }>;
1556
+
1557
+ export declare function isMaxLength(maxLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1558
+ readonly length: number;
1559
+ }>;
1560
+
1561
+ export declare function isBetweenLength(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1562
+ readonly length: number;
1563
+ }>;
1564
+
1565
+ export declare function isMinCodePoints(minCodePoints: number, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1566
+
1567
+ export declare function isMaxCodePoints(maxCodePoints: number, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1568
+
1569
+ export declare function isBetweenCodePoints(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
1570
+
1571
+ export declare function isMinSize(minSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1572
+ readonly size: number;
1573
+ }>;
1574
+
1575
+ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1576
+ readonly size: number;
1577
+ }>;
1578
+
1579
+ export declare function isBetweenSize(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
1580
+ readonly size: number;
1581
+ }>;
1582
+
1583
+ export declare function isMinProperties(minProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
1584
+
1585
+ export declare function isMaxProperties(maxProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
1586
+
1587
+ export declare function isBetweenProperties(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
1588
+
1589
+ export declare function isPropertyNames(keySchema: Constraint, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
1590
+
1591
+ export declare function isUnique<T>(annotations?: Annotations.Filter): SchemaAST.Filter<readonly T[]>;
1592
+
1593
+ export declare function isUniqueKey<Key, Value>(annotations?: Annotations.Filter): SchemaAST.Filter<readonly (readonly [Key, Value])[]>;
1594
+
1595
+ export interface NonEmptyString extends String {
1596
+ readonly "Rebuild": NonEmptyString;
1597
+ }
1598
+
1599
+ export declare const NonEmptyString: NonEmptyString;
1600
+
1601
+ export interface Char extends String {
1602
+ readonly "Rebuild": Char;
1603
+ }
1604
+
1605
+ export declare const Char: Char;
1606
+
1607
+ export interface ErrorInstance extends instanceOf<globalThis.Error> {
1608
+ readonly "Rebuild": ErrorInstance;
1609
+ }
1610
+
1611
+ export interface ErrorOptions {
1612
+
1613
+ readonly includeStack?: boolean | undefined;
1614
+
1615
+ readonly excludeCause?: boolean | undefined;
1616
+ }
1617
+
1618
+ export declare function ErrorInstance(options?: ErrorOptions): ErrorInstance;
1619
+
1620
+ export interface Defect extends decodeTo<Unknown, typeof Json> {
1621
+ readonly "Rebuild": Defect;
1622
+ }
1623
+
1624
+ export declare function Defect(options?: ErrorOptions): Defect;
1625
+
1626
+ export interface $ReadonlyMap<Key extends Constraint, Value extends Constraint> extends declareConstructor<globalThis.ReadonlyMap<Key["Type"], Value["Type"]>, globalThis.ReadonlyMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], ReadonlyMapIso<Key, Value>> {
1627
+ readonly "Rebuild": $ReadonlyMap<Key, Value>;
1628
+ readonly key: Key;
1629
+ readonly value: Value;
1630
+ }
1631
+
1632
+ export type ReadonlyMapIso<Key extends Constraint, Value extends Constraint> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
1633
+
1634
+ export declare function ReadonlyMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): $ReadonlyMap<Key, Value>;
1635
+
1636
+ export interface $ReadonlySet<Value extends Constraint> extends declareConstructor<globalThis.ReadonlySet<Value["Type"]>, globalThis.ReadonlySet<Value["Encoded"]>, readonly [Value], ReadonlySetIso<Value>> {
1637
+ readonly "Rebuild": $ReadonlySet<Value>;
1638
+ readonly value: Value;
1639
+ }
1640
+
1641
+ export type ReadonlySetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
1642
+
1643
+ export declare function ReadonlySet<Value extends Constraint>(value: Value): $ReadonlySet<Value>;
1644
+
1645
+ export interface RegExp extends instanceOf<globalThis.RegExp> {
1646
+ readonly "Rebuild": RegExp;
1647
+ }
1648
+
1649
+ export declare const RegExp: RegExp;
1650
+
1651
+ export interface URL extends instanceOf<globalThis.URL> {
1652
+ readonly "Rebuild": URL;
1653
+ }
1654
+
1655
+ export declare const URL: URL;
1656
+
1657
+ export interface URLFromString extends decodeTo<URL, String> {
1658
+ readonly "Rebuild": URLFromString;
1659
+ }
1660
+
1661
+ export declare const URLFromString: URLFromString;
1662
+
1663
+ export interface Date extends declare<globalThis.Date> {
1664
+ readonly "Rebuild": Date;
1665
+ }
1666
+
1667
+ export declare const Date: Date;
1668
+
1669
+ export interface DateFromString extends decodeTo<Date, String> {
1670
+ readonly "Rebuild": DateFromString;
1671
+ }
1672
+
1673
+ export declare const DateFromString: DateFromString;
1674
+
1675
+ export interface DateFromMillis extends decodeTo<Date, Int> {
1676
+ readonly "Rebuild": DateFromMillis;
1677
+ }
1678
+
1679
+ export declare const DateFromMillis: DateFromMillis;
1680
+
1681
+ export interface fromJsonString<S extends Constraint> extends decodeTo<S, String> {
1682
+ readonly "Rebuild": fromJsonString<S>;
1683
+ }
1684
+
1685
+ export declare function fromJsonString<S extends Constraint>(schema: S, options?: {
1686
+ readonly reviver?: Parameters<typeof JSON.parse>[1] | undefined;
1687
+ readonly replacer?: SchemaGetter.JsonReplacer | undefined;
1688
+ readonly space?: Parameters<typeof JSON.stringify>[2] | undefined;
1689
+ }): fromJsonString<S>;
1690
+
1691
+ export interface File extends instanceOf<globalThis.File> {
1692
+ readonly "Rebuild": File;
1693
+ }
1694
+
1695
+ export declare const File: File;
1696
+
1697
+ export interface FormData extends instanceOf<globalThis.FormData> {
1698
+ readonly "Rebuild": FormData;
1699
+ }
1700
+
1701
+ export declare const FormData: FormData;
1702
+
1703
+ export interface fromFormData<S extends Constraint> extends decodeTo<S, FormData> {
1704
+ readonly "Rebuild": fromFormData<S>;
1705
+ }
1706
+
1707
+ export declare function fromFormData<S extends Constraint>(schema: S): fromFormData<S>;
1708
+
1709
+ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams> {
1710
+ readonly "Rebuild": URLSearchParams;
1711
+ }
1712
+
1713
+ export declare const URLSearchParams: URLSearchParams;
1714
+
1715
+ export interface fromURLSearchParams<S extends Constraint> extends decodeTo<S, URLSearchParams> {
1716
+ readonly "Rebuild": fromURLSearchParams<S>;
1717
+ }
1718
+
1719
+ export declare function fromURLSearchParams<S extends Constraint>(schema: S): fromURLSearchParams<S>;
1720
+
1721
+ export interface NumberFromString extends decodeTo<Number, String> {
1722
+ readonly "Rebuild": NumberFromString;
1723
+ }
1724
+
1725
+ export declare const NumberFromString: NumberFromString;
1726
+
1727
+ export interface FiniteFromString extends decodeTo<Finite, String> {
1728
+ readonly "Rebuild": FiniteFromString;
1729
+ }
1730
+
1731
+ export declare const FiniteFromString: FiniteFromString;
1732
+
1733
+ export interface BigIntFromString extends decodeTo<BigInt, String> {
1734
+ readonly "Rebuild": BigIntFromString;
1735
+ }
1736
+
1737
+ export declare const BigIntFromString: BigIntFromString;
1738
+
1739
+ export interface Trimmed extends String {
1740
+ readonly "Rebuild": Trimmed;
1741
+ }
1742
+
1743
+ export declare const Trimmed: Trimmed;
1744
+
1745
+ export interface Trim extends decodeTo<Trimmed, String> {
1746
+ readonly "Rebuild": Trim;
1747
+ }
1748
+
1749
+ export declare const Trim: Trim;
1750
+
1751
+ export interface StringFromBase64 extends decodeTo<String, String> {
1752
+ readonly "Rebuild": StringFromBase64;
1753
+ }
1754
+
1755
+ export declare const StringFromBase64: StringFromBase64;
1756
+
1757
+ export interface StringFromBase64Url extends decodeTo<String, String> {
1758
+ readonly "Rebuild": StringFromBase64Url;
1759
+ }
1760
+
1761
+ export declare const StringFromBase64Url: StringFromBase64Url;
1762
+
1763
+ export interface StringFromHex extends decodeTo<String, String> {
1764
+ readonly "Rebuild": StringFromHex;
1765
+ }
1766
+
1767
+ export declare const StringFromHex: StringFromHex;
1768
+
1769
+ export interface StringFromUriComponent extends decodeTo<String, String> {
1770
+ readonly "Rebuild": StringFromUriComponent;
1771
+ }
1772
+
1773
+ export declare const StringFromUriComponent: StringFromUriComponent;
1774
+
1775
+ export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
1776
+
1777
+ export declare const StandardSchemaV1FailureResult: Struct<{
1778
+ readonly issues: $Array<Struct<{
1779
+ readonly message: String;
1780
+ readonly path: optional<$Array<Union<readonly [
1781
+ Union<readonly [Finite, Symbol, String]>,
1782
+ Struct<{
1783
+ readonly key: Union<readonly [Finite, Symbol, String]>;
1784
+ }>
1785
+ ]>>>;
1786
+ }>>;
1787
+ }>;
1788
+
1789
+ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0, 1]>> {
1790
+ readonly "Rebuild": BooleanFromBit;
1791
+ }
1792
+
1793
+ export declare const BooleanFromBit: BooleanFromBit;
1794
+
1795
+ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBufferLike>> {
1796
+ readonly "Rebuild": Uint8Array;
1797
+ }
1798
+
1799
+ export declare const Uint8Array: Uint8Array;
1800
+
1801
+ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
1802
+ readonly "Rebuild": Uint8ArrayFromBase64;
1803
+ }
1804
+
1805
+ export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
1806
+
1807
+ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
1808
+ readonly "Rebuild": Uint8ArrayFromBase64Url;
1809
+ }
1810
+
1811
+ export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
1812
+
1813
+ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
1814
+ readonly "Rebuild": Uint8ArrayFromHex;
1815
+ }
1816
+
1817
+ export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
1818
+
1819
+ export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
1820
+
1821
+ export declare const isGreaterThanOrEqualToBigDecimal: (minimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
1822
+
1823
+ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
1824
+
1825
+ export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
1826
+
1827
+ export declare const isBetweenBigDecimal: (options: {
1828
+ readonly minimum: BigDecimal_.BigDecimal;
1829
+ readonly maximum: BigDecimal_.BigDecimal;
1830
+ readonly exclusiveMinimum?: boolean | undefined;
1831
+ readonly exclusiveMaximum?: boolean | undefined;
1832
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
1833
+
1834
+ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
1835
+ readonly "Rebuild": BigDecimal;
1836
+ }
1837
+
1838
+ export declare const BigDecimal: BigDecimal;
1839
+
1840
+ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
1841
+ readonly "Rebuild": BigDecimalFromString;
1842
+ }
1843
+
1844
+ export declare const BigDecimalFromString: BigDecimalFromString;
1845
+
1846
+ export interface Rational extends declare<Rational_.Rational> {
1847
+ readonly "Rebuild": Rational;
1848
+ }
1849
+
1850
+ export declare const Rational: Rational;
1851
+
1852
+ export interface RationalFromString extends decodeTo<Rational, String> {
1853
+ readonly "Rebuild": RationalFromString;
1854
+ }
1855
+
1856
+ export declare const RationalFromString: RationalFromString;
1857
+
1858
+ export interface ByteSize extends declare<ByteSize_.ByteSize> {
1859
+ readonly "Rebuild": ByteSize;
1860
+ }
1861
+
1862
+ export declare const ByteSize: ByteSize;
1863
+
1864
+ export interface ByteSizeFromString extends decodeTo<ByteSize, String> {
1865
+ readonly "Rebuild": ByteSizeFromString;
1866
+ }
1867
+
1868
+ export declare const ByteSizeFromString: ByteSizeFromString;
1869
+
1870
+ export interface ByteSizeFromBigInt extends decodeTo<ByteSize, BigInt> {
1871
+ readonly "Rebuild": ByteSizeFromBigInt;
1872
+ }
1873
+
1874
+ export declare const ByteSizeFromBigInt: ByteSizeFromBigInt;
1875
+
1876
+ export interface ByteSizeFromNumber extends decodeTo<ByteSize, Number> {
1877
+ readonly "Rebuild": ByteSizeFromNumber;
1878
+ }
1879
+
1880
+ export declare const ByteSizeFromNumber: ByteSizeFromNumber;
1881
+
1882
+ export interface CauseReason<E extends Constraint, D extends Constraint> extends declareConstructor<Cause_.Reason<E["Type"]>, Cause_.Reason<E["Encoded"]>, readonly [E, D], CauseReasonIso<E, D>> {
1883
+ readonly "Rebuild": CauseReason<E, D>;
1884
+ readonly error: E;
1885
+ readonly defect: D;
1886
+ }
1887
+
1888
+ export type CauseReasonIso<E extends Constraint, D extends Constraint> = {
1889
+ readonly _tag: "Fail";
1890
+ readonly error: E["Iso"];
1891
+ } | {
1892
+ readonly _tag: "Die";
1893
+ readonly defect: D["Iso"];
1894
+ } | {
1895
+ readonly _tag: "Interrupt";
1896
+ readonly fiberId: number | undefined;
1897
+ };
1898
+
1899
+ export declare function CauseReason<E extends Constraint, D extends Constraint>(error: E, defect: D): CauseReason<E, D>;
1900
+
1901
+ export interface Cause<E extends Constraint, D extends Constraint> extends declareConstructor<Cause_.Cause<E["Type"]>, Cause_.Cause<E["Encoded"]>, readonly [E, D], CauseIso<E, D>> {
1902
+ readonly "Rebuild": Cause<E, D>;
1903
+ readonly error: E;
1904
+ readonly defect: D;
1905
+ }
1906
+
1907
+ export type CauseIso<E extends Constraint, D extends Constraint> = ReadonlyArray<CauseReasonIso<E, D>>;
1908
+
1909
+ export declare function Cause<E extends Constraint, D extends Constraint>(error: E, defect: D): Cause<E, D>;
1910
+
1911
+ export interface Chunk<Value extends Constraint> extends declareConstructor<Chunk_.Chunk<Value["Type"]>, Chunk_.Chunk<Value["Encoded"]>, readonly [Value], ChunkIso<Value>> {
1912
+ readonly "Rebuild": Chunk<Value>;
1913
+ readonly value: Value;
1914
+ }
1915
+
1916
+ export type ChunkIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
1917
+
1918
+ export declare function Chunk<Value extends Constraint>(value: Value): Chunk<Value>;
1919
+
1920
+ export interface DateTimeUtc extends declare<DateTime.Utc> {
1921
+ readonly "Rebuild": DateTimeUtc;
1922
+ }
1923
+
1924
+ export declare const DateTimeUtc: DateTimeUtc;
1925
+
1926
+ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
1927
+ readonly "Rebuild": DateTimeUtcFromDate;
1928
+ }
1929
+
1930
+ export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
1931
+
1932
+ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
1933
+ readonly "Rebuild": DateTimeUtcFromString;
1934
+ }
1935
+
1936
+ export declare const DateTimeUtcFromString: DateTimeUtcFromString;
1937
+
1938
+ export interface DateTimeUtcFromHttpDate extends decodeTo<DateTimeUtc, String> {
1939
+ readonly "Rebuild": DateTimeUtcFromHttpDate;
1940
+ }
1941
+
1942
+ export declare const DateTimeUtcFromHttpDate: DateTimeUtcFromHttpDate;
1943
+
1944
+ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>, Int> {
1945
+ readonly "Rebuild": DateTimeUtcFromMillis;
1946
+ }
1947
+
1948
+ export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
1949
+
1950
+ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
1951
+ readonly "Rebuild": TimeZoneOffset;
1952
+ }
1953
+
1954
+ export declare const TimeZoneOffset: TimeZoneOffset;
1955
+
1956
+ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
1957
+ readonly "Rebuild": TimeZoneNamed;
1958
+ }
1959
+
1960
+ export declare const TimeZoneNamed: TimeZoneNamed;
1961
+
1962
+ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String> {
1963
+ readonly "Rebuild": TimeZoneNamedFromString;
1964
+ }
1965
+
1966
+ export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
1967
+
1968
+ export interface TimeZone extends declare<DateTime.TimeZone> {
1969
+ readonly "Rebuild": TimeZone;
1970
+ }
1971
+
1972
+ export declare const TimeZone: TimeZone;
1973
+
1974
+ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
1975
+ readonly "Rebuild": TimeZoneFromString;
1976
+ }
1977
+
1978
+ export declare const TimeZoneFromString: TimeZoneFromString;
1979
+
1980
+ export interface DateTimeZoned extends declare<DateTime.Zoned> {
1981
+ readonly "Rebuild": DateTimeZoned;
1982
+ }
1983
+
1984
+ export declare const DateTimeZoned: DateTimeZoned;
1985
+
1986
+ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String> {
1987
+ readonly "Rebuild": DateTimeZonedFromString;
1988
+ }
1989
+
1990
+ export declare const DateTimeZonedFromString: DateTimeZonedFromString;
1991
+
1992
+ export interface MacAddress extends declare<NetAddress_.MacAddress> {
1993
+ readonly "Rebuild": MacAddress;
1994
+ }
1995
+
1996
+ export declare const MacAddress: MacAddress;
1997
+
1998
+ export interface MacAddressFromString extends decodeTo<MacAddress, String> {
1999
+ readonly "Rebuild": MacAddressFromString;
2000
+ }
2001
+
2002
+ export declare const MacAddressFromString: MacAddressFromString;
2003
+
2004
+ export interface Ipv4Address extends declare<NetAddress_.Ipv4Address> {
2005
+ readonly "Rebuild": Ipv4Address;
2006
+ }
2007
+
2008
+ export declare const Ipv4Address: Ipv4Address;
2009
+
2010
+ export interface Ipv4AddressFromString extends decodeTo<Ipv4Address, String> {
2011
+ readonly "Rebuild": Ipv4AddressFromString;
2012
+ }
2013
+
2014
+ export declare const Ipv4AddressFromString: Ipv4AddressFromString;
2015
+
2016
+ export interface Ipv6Address extends declare<NetAddress_.Ipv6Address> {
2017
+ readonly "Rebuild": Ipv6Address;
2018
+ }
2019
+
2020
+ export declare const Ipv6Address: Ipv6Address;
2021
+
2022
+ export interface Ipv6AddressFromString extends decodeTo<Ipv6Address, String> {
2023
+ readonly "Rebuild": Ipv6AddressFromString;
2024
+ }
2025
+
2026
+ export declare const Ipv6AddressFromString: Ipv6AddressFromString;
2027
+
2028
+ export interface IpAddress extends declare<NetAddress_.IpAddress> {
2029
+ readonly "Rebuild": IpAddress;
2030
+ }
2031
+
2032
+ export declare const IpAddress: IpAddress;
2033
+
2034
+ export interface IpAddressFromString extends decodeTo<IpAddress, String> {
2035
+ readonly "Rebuild": IpAddressFromString;
2036
+ }
2037
+
2038
+ export declare const IpAddressFromString: IpAddressFromString;
2039
+
2040
+ export interface IpMulticastAddress extends refine<NetAddress_.MulticastAddress<NetAddress_.IpAddress>, IpAddress> {
2041
+ readonly "Rebuild": IpMulticastAddress;
2042
+ }
2043
+
2044
+ export declare const IpMulticastAddress: IpMulticastAddress;
2045
+
2046
+ export interface IpMulticastAddressFromString extends refine<NetAddress_.MulticastAddress<NetAddress_.IpAddress>, IpAddressFromString> {
2047
+ readonly "Rebuild": IpMulticastAddressFromString;
2048
+ }
2049
+
2050
+ export declare const IpMulticastAddressFromString: IpMulticastAddressFromString;
2051
+
2052
+ export interface MacMulticastAddress extends refine<NetAddress_.MulticastAddress<NetAddress_.MacAddress>, MacAddress> {
2053
+ readonly "Rebuild": MacMulticastAddress;
2054
+ }
2055
+
2056
+ export declare const MacMulticastAddress: MacMulticastAddress;
2057
+
2058
+ export interface MacMulticastAddressFromString extends refine<NetAddress_.MulticastAddress<NetAddress_.MacAddress>, MacAddressFromString> {
2059
+ readonly "Rebuild": MacMulticastAddressFromString;
2060
+ }
2061
+
2062
+ export declare const MacMulticastAddressFromString: MacMulticastAddressFromString;
2063
+
2064
+ export interface IpUnicastAddress extends refine<NetAddress_.UnicastAddress<NetAddress_.IpAddress>, IpAddress> {
2065
+ readonly "Rebuild": IpUnicastAddress;
2066
+ }
2067
+
2068
+ export declare const IpUnicastAddress: IpUnicastAddress;
2069
+
2070
+ export interface IpUnicastAddressFromString extends refine<NetAddress_.UnicastAddress<NetAddress_.IpAddress>, IpAddressFromString> {
2071
+ readonly "Rebuild": IpUnicastAddressFromString;
2072
+ }
2073
+
2074
+ export declare const IpUnicastAddressFromString: IpUnicastAddressFromString;
2075
+
2076
+ export interface MacUnicastAddress extends refine<NetAddress_.UnicastAddress<NetAddress_.MacAddress>, MacAddress> {
2077
+ readonly "Rebuild": MacUnicastAddress;
2078
+ }
2079
+
2080
+ export declare const MacUnicastAddress: MacUnicastAddress;
2081
+
2082
+ export interface MacUnicastAddressFromString extends refine<NetAddress_.UnicastAddress<NetAddress_.MacAddress>, MacAddressFromString> {
2083
+ readonly "Rebuild": MacUnicastAddressFromString;
2084
+ }
2085
+
2086
+ export declare const MacUnicastAddressFromString: MacUnicastAddressFromString;
2087
+
2088
+ export interface Ipv4BroadcastAddress extends refine<NetAddress_.BroadcastAddress<NetAddress_.Ipv4Address>, Ipv4Address> {
2089
+ readonly "Rebuild": Ipv4BroadcastAddress;
2090
+ }
2091
+
2092
+ export declare const Ipv4BroadcastAddress: Ipv4BroadcastAddress;
2093
+
2094
+ export interface Ipv4BroadcastAddressFromString extends refine<NetAddress_.BroadcastAddress<NetAddress_.Ipv4Address>, Ipv4AddressFromString> {
2095
+ readonly "Rebuild": Ipv4BroadcastAddressFromString;
2096
+ }
2097
+
2098
+ export declare const Ipv4BroadcastAddressFromString: Ipv4BroadcastAddressFromString;
2099
+
2100
+ export interface MacBroadcastAddress extends refine<NetAddress_.BroadcastAddress<NetAddress_.MacAddress>, MacAddress> {
2101
+ readonly "Rebuild": MacBroadcastAddress;
2102
+ }
2103
+
2104
+ export declare const MacBroadcastAddress: MacBroadcastAddress;
2105
+
2106
+ export interface MacBroadcastAddressFromString extends refine<NetAddress_.BroadcastAddress<NetAddress_.MacAddress>, MacAddressFromString> {
2107
+ readonly "Rebuild": MacBroadcastAddressFromString;
2108
+ }
2109
+
2110
+ export declare const MacBroadcastAddressFromString: MacBroadcastAddressFromString;
2111
+
2112
+ export interface IpLoopbackAddress extends refine<NetAddress_.LoopbackAddress<NetAddress_.IpAddress>, IpAddress> {
2113
+ readonly "Rebuild": IpLoopbackAddress;
2114
+ }
2115
+
2116
+ export declare const IpLoopbackAddress: IpLoopbackAddress;
2117
+
2118
+ export interface IpLoopbackAddressFromString extends refine<NetAddress_.LoopbackAddress<NetAddress_.IpAddress>, IpAddressFromString> {
2119
+ readonly "Rebuild": IpLoopbackAddressFromString;
2120
+ }
2121
+
2122
+ export declare const IpLoopbackAddressFromString: IpLoopbackAddressFromString;
2123
+
2124
+ export interface IpLinkLocalAddress extends refine<NetAddress_.LinkLocalAddress<NetAddress_.IpAddress>, IpAddress> {
2125
+ readonly "Rebuild": IpLinkLocalAddress;
2126
+ }
2127
+
2128
+ export declare const IpLinkLocalAddress: IpLinkLocalAddress;
2129
+
2130
+ export interface IpLinkLocalAddressFromString extends refine<NetAddress_.LinkLocalAddress<NetAddress_.IpAddress>, IpAddressFromString> {
2131
+ readonly "Rebuild": IpLinkLocalAddressFromString;
2132
+ }
2133
+
2134
+ export declare const IpLinkLocalAddressFromString: IpLinkLocalAddressFromString;
2135
+
2136
+ export interface IpUnspecifiedAddress extends refine<NetAddress_.UnspecifiedAddress<NetAddress_.IpAddress>, IpAddress> {
2137
+ readonly "Rebuild": IpUnspecifiedAddress;
2138
+ }
2139
+
2140
+ export declare const IpUnspecifiedAddress: IpUnspecifiedAddress;
2141
+
2142
+ export interface IpUnspecifiedAddressFromString extends refine<NetAddress_.UnspecifiedAddress<NetAddress_.IpAddress>, IpAddressFromString> {
2143
+ readonly "Rebuild": IpUnspecifiedAddressFromString;
2144
+ }
2145
+
2146
+ export declare const IpUnspecifiedAddressFromString: IpUnspecifiedAddressFromString;
2147
+
2148
+ export interface Ipv4PrivateAddress extends refine<NetAddress_.PrivateAddress<NetAddress_.Ipv4Address>, Ipv4Address> {
2149
+ readonly "Rebuild": Ipv4PrivateAddress;
2150
+ }
2151
+
2152
+ export declare const Ipv4PrivateAddress: Ipv4PrivateAddress;
2153
+
2154
+ export interface Ipv4PrivateAddressFromString extends refine<NetAddress_.PrivateAddress<NetAddress_.Ipv4Address>, Ipv4AddressFromString> {
2155
+ readonly "Rebuild": Ipv4PrivateAddressFromString;
2156
+ }
2157
+
2158
+ export declare const Ipv4PrivateAddressFromString: Ipv4PrivateAddressFromString;
2159
+
2160
+ export interface Ipv6UniqueLocalAddress extends refine<NetAddress_.UniqueLocalAddress<NetAddress_.Ipv6Address>, Ipv6Address> {
2161
+ readonly "Rebuild": Ipv6UniqueLocalAddress;
2162
+ }
2163
+
2164
+ export declare const Ipv6UniqueLocalAddress: Ipv6UniqueLocalAddress;
2165
+
2166
+ export interface Ipv6UniqueLocalAddressFromString extends refine<NetAddress_.UniqueLocalAddress<NetAddress_.Ipv6Address>, Ipv6AddressFromString> {
2167
+ readonly "Rebuild": Ipv6UniqueLocalAddressFromString;
2168
+ }
2169
+
2170
+ export declare const Ipv6UniqueLocalAddressFromString: Ipv6UniqueLocalAddressFromString;
2171
+
2172
+ export interface MacLocallyAdministeredAddress extends refine<NetAddress_.LocallyAdministeredAddress<NetAddress_.MacAddress>, MacAddress> {
2173
+ readonly "Rebuild": MacLocallyAdministeredAddress;
2174
+ }
2175
+
2176
+ export declare const MacLocallyAdministeredAddress: MacLocallyAdministeredAddress;
2177
+
2178
+ export interface MacLocallyAdministeredAddressFromString extends refine<NetAddress_.LocallyAdministeredAddress<NetAddress_.MacAddress>, MacAddressFromString> {
2179
+ readonly "Rebuild": MacLocallyAdministeredAddressFromString;
2180
+ }
2181
+
2182
+ export declare const MacLocallyAdministeredAddressFromString: MacLocallyAdministeredAddressFromString;
2183
+
2184
+ export interface MacUniversallyAdministeredAddress extends refine<NetAddress_.UniversallyAdministeredAddress<NetAddress_.MacAddress>, MacAddress> {
2185
+ readonly "Rebuild": MacUniversallyAdministeredAddress;
2186
+ }
2187
+
2188
+ export declare const MacUniversallyAdministeredAddress: MacUniversallyAdministeredAddress;
2189
+
2190
+ export interface MacUniversallyAdministeredAddressFromString extends refine<NetAddress_.UniversallyAdministeredAddress<NetAddress_.MacAddress>, MacAddressFromString> {
2191
+ readonly "Rebuild": MacUniversallyAdministeredAddressFromString;
2192
+ }
2193
+
2194
+ export declare const MacUniversallyAdministeredAddressFromString: MacUniversallyAdministeredAddressFromString;
2195
+
2196
+ export interface Ipv4Interface extends declare<IpInterface_.Ipv4Interface> {
2197
+ readonly "Rebuild": Ipv4Interface;
2198
+ }
2199
+
2200
+ export declare const Ipv4Interface: Ipv4Interface;
2201
+
2202
+ export interface Ipv4InterfaceFromString extends decodeTo<Ipv4Interface, String> {
2203
+ readonly "Rebuild": Ipv4InterfaceFromString;
2204
+ }
2205
+
2206
+ export declare const Ipv4InterfaceFromString: Ipv4InterfaceFromString;
2207
+
2208
+ export interface Ipv6Interface extends declare<IpInterface_.Ipv6Interface> {
2209
+ readonly "Rebuild": Ipv6Interface;
2210
+ }
2211
+
2212
+ export declare const Ipv6Interface: Ipv6Interface;
2213
+
2214
+ export interface Ipv6InterfaceFromString extends decodeTo<Ipv6Interface, String> {
2215
+ readonly "Rebuild": Ipv6InterfaceFromString;
2216
+ }
2217
+
2218
+ export declare const Ipv6InterfaceFromString: Ipv6InterfaceFromString;
2219
+
2220
+ export interface IpInterface extends declare<IpInterface_.IpInterface> {
2221
+ readonly "Rebuild": IpInterface;
2222
+ }
2223
+
2224
+ export declare const IpInterface: IpInterface;
2225
+
2226
+ export interface IpInterfaceFromString extends decodeTo<IpInterface, String> {
2227
+ readonly "Rebuild": IpInterfaceFromString;
2228
+ }
2229
+
2230
+ export declare const IpInterfaceFromString: IpInterfaceFromString;
2231
+
2232
+ export interface Ipv4Network extends declare<IpNetwork_.Ipv4Network> {
2233
+ readonly "Rebuild": Ipv4Network;
2234
+ }
2235
+
2236
+ export declare const Ipv4Network: Ipv4Network;
2237
+
2238
+ export interface Ipv4NetworkFromString extends decodeTo<Ipv4Network, String> {
2239
+ readonly "Rebuild": Ipv4NetworkFromString;
2240
+ }
2241
+
2242
+ export declare const Ipv4NetworkFromString: Ipv4NetworkFromString;
2243
+
2244
+ export interface Ipv6Network extends declare<IpNetwork_.Ipv6Network> {
2245
+ readonly "Rebuild": Ipv6Network;
2246
+ }
2247
+
2248
+ export declare const Ipv6Network: Ipv6Network;
2249
+
2250
+ export interface Ipv6NetworkFromString extends decodeTo<Ipv6Network, String> {
2251
+ readonly "Rebuild": Ipv6NetworkFromString;
2252
+ }
2253
+
2254
+ export declare const Ipv6NetworkFromString: Ipv6NetworkFromString;
2255
+
2256
+ export interface IpNetwork extends declare<IpNetwork_.IpNetwork> {
2257
+ readonly "Rebuild": IpNetwork;
2258
+ }
2259
+
2260
+ export declare const IpNetwork: IpNetwork;
2261
+
2262
+ export interface IpNetworkFromString extends decodeTo<IpNetwork, String> {
2263
+ readonly "Rebuild": IpNetworkFromString;
2264
+ }
2265
+
2266
+ export declare const IpNetworkFromString: IpNetworkFromString;
2267
+
2268
+ export interface InetAddressV4 extends declare<NetAddress_.InetAddressV4> {
2269
+ readonly "Rebuild": InetAddressV4;
2270
+ }
2271
+
2272
+ export declare const InetAddressV4: InetAddressV4;
2273
+
2274
+ export interface InetAddressV6 extends declare<NetAddress_.InetAddressV6> {
2275
+ readonly "Rebuild": InetAddressV6;
2276
+ }
2277
+
2278
+ export declare const InetAddressV6: InetAddressV6;
2279
+
2280
+ export interface InetAddress extends declare<NetAddress_.InetAddress> {
2281
+ readonly "Rebuild": InetAddress;
2282
+ }
2283
+
2284
+ export declare const InetAddress: InetAddress;
2285
+
2286
+ export interface InetAddressFromString extends decodeTo<InetAddress, String> {
2287
+ readonly "Rebuild": InetAddressFromString;
2288
+ }
2289
+
2290
+ export declare const InetAddressFromString: InetAddressFromString;
2291
+
2292
+ export interface UnixPathAddress extends declare<NetAddress_.UnixPathAddress> {
2293
+ readonly "Rebuild": UnixPathAddress;
2294
+ }
2295
+
2296
+ export declare const UnixPathAddress: UnixPathAddress;
2297
+
2298
+ export interface UnixPathAddressFromString extends decodeTo<UnixPathAddress, String> {
2299
+ readonly "Rebuild": UnixPathAddressFromString;
2300
+ }
2301
+
2302
+ export declare const UnixPathAddressFromString: UnixPathAddressFromString;
2303
+
2304
+ export interface SocketAddress extends declare<NetAddress_.SocketAddress> {
2305
+ readonly "Rebuild": SocketAddress;
2306
+ }
2307
+
2308
+ export declare const SocketAddress: SocketAddress;
2309
+
2310
+ export interface DomainName extends brand<String, "~effect/net/Host/DomainName"> {
2311
+ readonly "Rebuild": DomainName;
2312
+ }
2313
+
2314
+ export declare const DomainName: DomainName;
2315
+
2316
+ export interface DomainNameFromString extends decodeTo<DomainName, String> {
2317
+ readonly "Rebuild": DomainNameFromString;
2318
+ }
2319
+
2320
+ export declare const DomainNameFromString: DomainNameFromString;
2321
+
2322
+ export interface ScopedIpv6Literal extends brand<String, "~effect/net/NetAddress/ScopedIpv6Literal"> {
2323
+ readonly "Rebuild": ScopedIpv6Literal;
2324
+ }
2325
+
2326
+ export declare const ScopedIpv6Literal: ScopedIpv6Literal;
2327
+
2328
+ export interface ScopedIpv6LiteralFromString extends decodeTo<ScopedIpv6Literal, String> {
2329
+ readonly "Rebuild": ScopedIpv6LiteralFromString;
2330
+ }
2331
+
2332
+ export declare const ScopedIpv6LiteralFromString: ScopedIpv6LiteralFromString;
2333
+
2334
+ export interface Host extends Union<readonly [IpAddress, ScopedIpv6Literal, DomainName]> {
2335
+ readonly "Rebuild": Host;
2336
+ }
2337
+
2338
+ export declare const Host: Host;
2339
+
2340
+ export interface HostFromString extends Union<readonly [IpAddressFromString, ScopedIpv6LiteralFromString, DomainNameFromString]> {
2341
+ readonly "Rebuild": HostFromString;
2342
+ }
2343
+
2344
+ export declare const HostFromString: HostFromString;
2345
+
2346
+ export interface HostPort extends declare<Host_.HostPort> {
2347
+ readonly "Rebuild": HostPort;
2348
+ }
2349
+
2350
+ export declare const HostPort: HostPort;
2351
+
2352
+ export interface HostPortFromString extends decodeTo<HostPort, String> {
2353
+ readonly "Rebuild": HostPortFromString;
2354
+ }
2355
+
2356
+ export declare const HostPortFromString: HostPortFromString;
2357
+
2358
+ export interface Port extends Int {
2359
+ readonly "Rebuild": Port;
2360
+ }
2361
+
2362
+ export declare const Port: Port;
2363
+
2364
+ export interface Duration extends declare<Duration_.Duration> {
2365
+ readonly "Rebuild": Duration;
2366
+ }
2367
+
2368
+ export declare const Duration: Duration;
2369
+
2370
+ export interface DurationFromString extends decodeTo<Duration, String> {
2371
+ readonly "Rebuild": DurationFromString;
2372
+ }
2373
+
2374
+ export declare const DurationFromString: DurationFromString;
2375
+
2376
+ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
2377
+ readonly "Rebuild": DurationFromNanos;
2378
+ }
2379
+
2380
+ export declare const DurationFromNanos: DurationFromNanos;
2381
+
2382
+ export interface DurationFromMillis extends decodeTo<Duration, Number> {
2383
+ readonly "Rebuild": DurationFromMillis;
2384
+ }
2385
+
2386
+ export declare const DurationFromMillis: DurationFromMillis;
2387
+
2388
+ export interface DurationFromIsoString extends decodeTo<Duration, String> {
2389
+ readonly "Rebuild": DurationFromIsoString;
2390
+ }
2391
+
2392
+ export declare const DurationFromIsoString: DurationFromIsoString;
2393
+
2394
+ export interface DnsRecordType extends Literals<ReadonlyArray<Dns_.RecordType>> {
2395
+ }
2396
+
2397
+ export declare const DnsRecordType: DnsRecordType;
2398
+
2399
+ export interface DnsARecord extends declare<Dns_.A> {
2400
+ readonly "Rebuild": DnsARecord;
2401
+ }
2402
+
2403
+ export declare const DnsARecord: DnsARecord;
2404
+
2405
+ export interface DnsAaaaRecord extends declare<Dns_.Aaaa> {
2406
+ readonly "Rebuild": DnsAaaaRecord;
2407
+ }
2408
+
2409
+ export declare const DnsAaaaRecord: DnsAaaaRecord;
2410
+
2411
+ export interface DnsCaaRecord extends declare<Dns_.Caa> {
2412
+ readonly "Rebuild": DnsCaaRecord;
2413
+ }
2414
+
2415
+ export declare const DnsCaaRecord: DnsCaaRecord;
2416
+
2417
+ export interface DnsCnameRecord extends declare<Dns_.Cname> {
2418
+ readonly "Rebuild": DnsCnameRecord;
2419
+ }
2420
+
2421
+ export declare const DnsCnameRecord: DnsCnameRecord;
2422
+
2423
+ export interface DnsMxRecord extends declare<Dns_.Mx> {
2424
+ readonly "Rebuild": DnsMxRecord;
2425
+ }
2426
+
2427
+ export declare const DnsMxRecord: DnsMxRecord;
2428
+
2429
+ export interface DnsNaptrRecord extends declare<Dns_.Naptr> {
2430
+ readonly "Rebuild": DnsNaptrRecord;
2431
+ }
2432
+
2433
+ export declare const DnsNaptrRecord: DnsNaptrRecord;
2434
+
2435
+ export interface DnsNsRecord extends declare<Dns_.Ns> {
2436
+ readonly "Rebuild": DnsNsRecord;
2437
+ }
2438
+
2439
+ export declare const DnsNsRecord: DnsNsRecord;
2440
+
2441
+ export interface DnsPtrRecord extends declare<Dns_.Ptr> {
2442
+ readonly "Rebuild": DnsPtrRecord;
2443
+ }
2444
+
2445
+ export declare const DnsPtrRecord: DnsPtrRecord;
2446
+
2447
+ export interface DnsSoaRecord extends declare<Dns_.Soa> {
2448
+ readonly "Rebuild": DnsSoaRecord;
2449
+ }
2450
+
2451
+ export declare const DnsSoaRecord: DnsSoaRecord;
2452
+
2453
+ export interface DnsSrvRecord extends declare<Dns_.Srv> {
2454
+ readonly "Rebuild": DnsSrvRecord;
2455
+ }
2456
+
2457
+ export declare const DnsSrvRecord: DnsSrvRecord;
2458
+
2459
+ export interface DnsTlsaRecord extends declare<Dns_.Tlsa> {
2460
+ readonly "Rebuild": DnsTlsaRecord;
2461
+ }
2462
+
2463
+ export declare const DnsTlsaRecord: DnsTlsaRecord;
2464
+
2465
+ export interface DnsTxtRecord extends declare<Dns_.Txt> {
2466
+ readonly "Rebuild": DnsTxtRecord;
2467
+ }
2468
+
2469
+ export declare const DnsTxtRecord: DnsTxtRecord;
2470
+
2471
+ export interface DnsRecord extends Union<readonly [
2472
+ DnsARecord,
2473
+ DnsAaaaRecord,
2474
+ DnsCaaRecord,
2475
+ DnsCnameRecord,
2476
+ DnsMxRecord,
2477
+ DnsNaptrRecord,
2478
+ DnsNsRecord,
2479
+ DnsPtrRecord,
2480
+ DnsSoaRecord,
2481
+ DnsSrvRecord,
2482
+ DnsTlsaRecord,
2483
+ DnsTxtRecord
2484
+ ]> {
2485
+ readonly "Rebuild": DnsRecord;
2486
+ }
2487
+
2488
+ export declare const DnsRecord: DnsRecord;
2489
+ type CryptoKeyOptions = {
2490
+ readonly allowEncode?: boolean | undefined;
2491
+ };
2492
+
2493
+ export interface MacKey<A extends Mac_.Algorithm = Mac_.Algorithm> extends declare<Mac_.Key<A>> {
2494
+ readonly "Rebuild": MacKey<A>;
2495
+ }
2496
+
2497
+ export declare const MacKey: <A extends Mac_.Algorithm>(algorithm: A) => MacKey<A>;
2498
+
2499
+ export declare const MacKeyFromBytes: <A extends Mac_.Algorithm>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<MacKey<A>, Uint8Array>;
2500
+
2501
+ export declare const MacKeyFromFormat: <A extends Mac_.Algorithm, Data>(format: KeyFormat_.Format<"secret", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<MacKey<A>, Codec<Data>>;
2502
+
2503
+ export interface AeadKey<A extends Aead_.Algorithm = Aead_.Algorithm> extends declare<Aead_.Key<A>> {
2504
+ readonly "Rebuild": AeadKey<A>;
2505
+ }
2506
+
2507
+ export declare const AeadKey: <A extends Aead_.Algorithm>(algorithm: A) => AeadKey<A>;
2508
+
2509
+ export declare const AeadKeyFromBytes: <A extends Aead_.Algorithm>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<AeadKey<A>, Uint8Array>;
2510
+
2511
+ export declare const AeadKeyFromFormat: <A extends Aead_.Algorithm, Data>(format: KeyFormat_.Format<"secret", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<AeadKey<A>, Codec<Data>>;
2512
+
2513
+ export interface CipherKey<A extends Cipher_.Algorithm = Cipher_.Algorithm> extends declare<Cipher_.Key<A>> {
2514
+ readonly "Rebuild": CipherKey<A>;
2515
+ }
2516
+
2517
+ export declare const CipherKey: <A extends Cipher_.Algorithm>(algorithm: A) => CipherKey<A>;
2518
+
2519
+ export declare const CipherKeyFromBytes: <A extends Cipher_.Algorithm>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<CipherKey<A>, Uint8Array>;
2520
+
2521
+ export declare const CipherKeyFromFormat: <A extends Cipher_.Algorithm, Data>(format: KeyFormat_.Format<"secret", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<CipherKey<A>, Codec<Data>>;
2522
+
2523
+ export interface SignaturePublicKey<A extends Signature_.Algorithm = Signature_.Algorithm> extends declare<Signature_.PublicKey<A>> {
2524
+ readonly "Rebuild": SignaturePublicKey<A>;
2525
+ }
2526
+
2527
+ export declare const SignaturePublicKey: <A extends Signature_.Algorithm>(algorithm: A) => SignaturePublicKey<A>;
2528
+
2529
+ export declare const SignaturePublicKeyFromBytes: <A extends Signature_.Ed25519 | Signature_.Ecdsa>(algorithm: A) => decodeTo<SignaturePublicKey<A>, Uint8Array>;
2530
+
2531
+ export declare const SignaturePublicKeyFromFormat: <A extends Signature_.Algorithm, Data>(format: KeyFormat_.Format<"public", "decode", Data>, algorithm: A) => decodeTo<SignaturePublicKey<A>, Codec<Data>>;
2532
+
2533
+ export interface SignaturePrivateKey<A extends Signature_.Algorithm = Signature_.Algorithm> extends declare<Signature_.PrivateKey<A>> {
2534
+ readonly "Rebuild": SignaturePrivateKey<A>;
2535
+ }
2536
+
2537
+ export declare const SignaturePrivateKey: <A extends Signature_.Algorithm>(algorithm: A) => SignaturePrivateKey<A>;
2538
+
2539
+ export declare const SignaturePrivateKeyFromBytes: <A extends Signature_.Ed25519>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<SignaturePrivateKey<A>, Uint8Array>;
2540
+
2541
+ export declare const SignaturePrivateKeyFromFormat: <A extends Signature_.Algorithm, Data>(format: KeyFormat_.Format<"private", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<SignaturePrivateKey<A>, Codec<Data>>;
2542
+
2543
+ export interface KeyAgreementPublicKey<A extends KeyAgreement_.Algorithm = KeyAgreement_.Algorithm> extends declare<KeyAgreement_.PublicKey<A>> {
2544
+ readonly "Rebuild": KeyAgreementPublicKey<A>;
2545
+ }
2546
+
2547
+ export declare const KeyAgreementPublicKey: <A extends KeyAgreement_.Algorithm>(algorithm: A) => KeyAgreementPublicKey<A>;
2548
+
2549
+ export declare const KeyAgreementPublicKeyFromBytes: <A extends KeyAgreement_.Algorithm>(algorithm: A) => decodeTo<KeyAgreementPublicKey<A>, Uint8Array>;
2550
+
2551
+ export declare const KeyAgreementPublicKeyFromFormat: <A extends KeyAgreement_.Algorithm, Data>(format: KeyFormat_.Format<"public", "decode", Data>, algorithm: A) => decodeTo<KeyAgreementPublicKey<A>, Codec<Data>>;
2552
+
2553
+ export interface KeyAgreementPrivateKey<A extends KeyAgreement_.Algorithm = KeyAgreement_.Algorithm> extends declare<KeyAgreement_.PrivateKey<A>> {
2554
+ readonly "Rebuild": KeyAgreementPrivateKey<A>;
2555
+ }
2556
+
2557
+ export declare const KeyAgreementPrivateKey: <A extends KeyAgreement_.Algorithm>(algorithm: A) => KeyAgreementPrivateKey<A>;
2558
+
2559
+ export declare const KeyAgreementPrivateKeyFromBytes: <A extends KeyAgreement_.X25519>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<KeyAgreementPrivateKey<A>, Uint8Array>;
2560
+
2561
+ export declare const KeyAgreementPrivateKeyFromFormat: <A extends KeyAgreement_.Algorithm, Data>(format: KeyFormat_.Format<"private", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<KeyAgreementPrivateKey<A>, Codec<Data>>;
2562
+
2563
+ export interface KeyWrapKey<A extends KeyWrap_.AesKw = KeyWrap_.AesKw> extends declare<KeyWrap_.Key<A>> {
2564
+ readonly "Rebuild": KeyWrapKey<A>;
2565
+ }
2566
+
2567
+ export declare const KeyWrapKey: <A extends KeyWrap_.AesKw>(algorithm: A) => KeyWrapKey<A>;
2568
+
2569
+ export declare const KeyWrapKeyFromBytes: <A extends KeyWrap_.AesKw>(algorithm: A, options?: CryptoKeyOptions) => decodeTo<KeyWrapKey<A>, Uint8Array>;
2570
+
2571
+ export declare const KeyWrapKeyFromFormat: <A extends KeyWrap_.AesKw, Data>(format: KeyFormat_.Format<"secret", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<KeyWrapKey<A>, Codec<Data>>;
2572
+
2573
+ export interface KeyWrapPublicKey<A extends KeyWrap_.RsaOaep = KeyWrap_.RsaOaep> extends declare<KeyWrap_.PublicKey<A>> {
2574
+ readonly "Rebuild": KeyWrapPublicKey<A>;
2575
+ }
2576
+
2577
+ export declare const KeyWrapPublicKey: <A extends KeyWrap_.RsaOaep>(algorithm: A) => KeyWrapPublicKey<A>;
2578
+
2579
+ export declare const KeyWrapPublicKeyFromFormat: <A extends KeyWrap_.RsaOaep, Data>(format: KeyFormat_.Format<"public", "decode", Data>, algorithm: A) => decodeTo<KeyWrapPublicKey<A>, Codec<Data>>;
2580
+
2581
+ export interface KeyWrapPrivateKey<A extends KeyWrap_.RsaOaep = KeyWrap_.RsaOaep> extends declare<KeyWrap_.PrivateKey<A>> {
2582
+ readonly "Rebuild": KeyWrapPrivateKey<A>;
2583
+ }
2584
+
2585
+ export declare const KeyWrapPrivateKey: <A extends KeyWrap_.RsaOaep>(algorithm: A) => KeyWrapPrivateKey<A>;
2586
+
2587
+ export declare const KeyWrapPrivateKeyFromFormat: <A extends KeyWrap_.RsaOaep, Data>(format: KeyFormat_.Format<"private", "decode", Data>, algorithm: A, options?: CryptoKeyOptions) => decodeTo<KeyWrapPrivateKey<A>, Codec<Data>>;
2588
+
2589
+ export interface Exit<A extends Constraint, E extends Constraint, D extends Constraint> extends declareConstructor<Exit_.Exit<A["Type"], E["Type"]>, Exit_.Exit<A["Encoded"], E["Encoded"]>, readonly [A, E, D], ExitIso<A, E, D>> {
2590
+ readonly "Rebuild": Exit<A, E, D>;
2591
+ readonly value: A;
2592
+ readonly error: E;
2593
+ readonly defect: D;
2594
+ }
2595
+
2596
+ export type ExitIso<A extends Constraint, E extends Constraint, D extends Constraint> = {
2597
+ readonly _tag: "Success";
2598
+ readonly value: A["Iso"];
2599
+ } | {
2600
+ readonly _tag: "Failure";
2601
+ readonly cause: CauseIso<E, D>;
2602
+ };
2603
+
2604
+ export declare function Exit<A extends Constraint, E extends Constraint, D extends Constraint>(value: A, error: E, defect: D): Exit<A, E, D>;
2605
+
2606
+ export type EncodedGraph<N, E, T extends Graph_.Kind> = Graph_.Snapshot<N, E, T>;
2607
+
2608
+ export type GraphIso<T extends Graph_.Kind, Node extends Constraint, Edge extends Constraint> = EncodedGraph<Node["Iso"], Edge["Iso"], T>;
2609
+
2610
+ export interface Graph<T extends Graph_.Kind, Node extends Constraint, Edge extends Constraint> extends declareConstructor<Graph_.Graph<Node["Type"], Edge["Type"], T>, Graph_.Graph<Node["Encoded"], Edge["Encoded"], T>, readonly [Node, Edge], GraphIso<T, Node, Edge>> {
2611
+ readonly "Rebuild": Graph<T, Node, Edge>;
2612
+ readonly type: T;
2613
+ readonly node: Node;
2614
+ readonly edge: Edge;
2615
+ }
2616
+
2617
+ export declare function Graph<Node extends Constraint, Edge extends Constraint>(type: "directed", node: Node, edge: Edge): Graph<"directed", Node, Edge>;
2618
+ export declare function Graph<Node extends Constraint, Edge extends Constraint>(type: "undirected", node: Node, edge: Edge): Graph<"undirected", Node, Edge>;
2619
+ export declare function Graph<T extends Graph_.Kind, Node extends Constraint, Edge extends Constraint>(type: T, node: Node, edge: Edge): Graph<T, Node, Edge>;
2620
+
2621
+ export interface HashMap<Key extends Constraint, Value extends Constraint> extends declareConstructor<HashMap_.HashMap<Key["Type"], Value["Type"]>, HashMap_.HashMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], HashMapIso<Key, Value>> {
2622
+ readonly "Rebuild": HashMap<Key, Value>;
2623
+ readonly key: Key;
2624
+ readonly value: Value;
2625
+ }
2626
+
2627
+ export type HashMapIso<Key extends Constraint, Value extends Constraint> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
2628
+
2629
+ export declare function HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>;
2630
+
2631
+ export interface HashSet<Value extends Constraint> extends declareConstructor<HashSet_.HashSet<Value["Type"]>, HashSet_.HashSet<Value["Encoded"]>, readonly [Value], HashSetIso<Value>> {
2632
+ readonly "Rebuild": HashSet<Value>;
2633
+ readonly value: Value;
2634
+ }
2635
+
2636
+ export type HashSetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
2637
+
2638
+ export declare function HashSet<Value extends Constraint>(value: Value): HashSet<Value>;
2639
+
2640
+ export interface Option<A extends Constraint> extends declareConstructor<Option_.Option<A["Type"]>, Option_.Option<A["Encoded"]>, readonly [A], OptionIso<A>> {
2641
+ readonly "Rebuild": Option<A>;
2642
+ readonly value: A;
2643
+ }
2644
+
2645
+ export type OptionIso<A extends Constraint> = {
2646
+ readonly _tag: "None";
2647
+ } | {
2648
+ readonly _tag: "Some";
2649
+ readonly value: A["Iso"];
2650
+ };
2651
+
2652
+ export declare function Option<A extends Constraint>(value: A): Option<A>;
2653
+
2654
+ export interface OptionFromNullOr<S extends Constraint> extends decodeTo<Option<toType<S>>, NullOr<S>> {
2655
+ readonly "Rebuild": OptionFromNullOr<S>;
2656
+ }
2657
+
2658
+ export declare function OptionFromNullOr<S extends Constraint>(schema: S): OptionFromNullOr<S>;
2659
+
2660
+ export interface OptionFromUndefinedOr<S extends Constraint> extends decodeTo<Option<toType<S>>, UndefinedOr<S>> {
2661
+ readonly "Rebuild": OptionFromUndefinedOr<S>;
2662
+ }
2663
+
2664
+ export declare function OptionFromUndefinedOr<S extends Constraint>(schema: S): OptionFromUndefinedOr<S>;
2665
+
2666
+ export interface OptionFromNullishOr<S extends Constraint> extends decodeTo<Option<toType<S>>, NullishOr<S>> {
2667
+ readonly "Rebuild": OptionFromNullishOr<S>;
2668
+ }
2669
+
2670
+ export declare function OptionFromNullishOr<S extends Constraint>(schema: S, options?: {
2671
+ onNoneEncoding: null | undefined;
2672
+ }): OptionFromNullishOr<S>;
2673
+
2674
+ export interface Cookie extends declare<Cookies_.Cookie> {
2675
+ readonly "Rebuild": Cookie;
2676
+ }
2677
+
2678
+ export declare const Cookie: Cookie;
2679
+
2680
+ export interface Cookies extends declare<Cookies_.Cookies, Record_.ReadonlyRecord<string, Cookies_.Cookie>> {
2681
+ readonly "Rebuild": Cookies;
2682
+ }
2683
+
2684
+ export declare const Cookies: Cookies;
2685
+
2686
+ export interface RecordFromCookies extends decodeTo<$Record<String, String>, Cookies> {
2687
+ readonly "Rebuild": RecordFromCookies;
2688
+ }
2689
+
2690
+ export declare const RecordFromCookies: RecordFromCookies;
2691
+
2692
+ export interface Headers extends declare<Headers_.Headers, {
2693
+ readonly [x: string]: string;
2694
+ }> {
2695
+ readonly "Rebuild": Headers;
2696
+ }
2697
+
2698
+ export declare const Headers: Headers;
2699
+
2700
+ export interface RetryAfter extends Union<readonly [
2701
+ Struct<{
2702
+ readonly _tag: tag<"Duration">;
2703
+ readonly duration: Duration;
2704
+ }>,
2705
+ Struct<{
2706
+ readonly _tag: tag<"DateTime">;
2707
+ readonly dateTime: DateTimeUtc;
2708
+ }>
2709
+ ]> {
2710
+ readonly "Rebuild": RetryAfter;
2711
+ }
2712
+
2713
+ export declare const RetryAfter: RetryAfter;
2714
+
2715
+ export interface RetryAfterFromString extends decodeTo<RetryAfter, String> {
2716
+ readonly "Rebuild": RetryAfterFromString;
2717
+ }
2718
+
2719
+ export declare const RetryAfterFromString: RetryAfterFromString;
2720
+
2721
+ export interface UrlParams extends declare<UrlParams_.UrlParams, ReadonlyArray<readonly [string, string]>> {
2722
+ readonly "Rebuild": UrlParams;
2723
+ }
2724
+
2725
+ export declare const UrlParams: UrlParams;
2726
+
2727
+ export interface JsonFromUrlParamsField extends decodeTo<fromJsonString<Unknown>, UrlParams> {
2728
+ readonly "Rebuild": JsonFromUrlParamsField;
2729
+ }
2730
+
2731
+ export declare const JsonFromUrlParamsField: (field: string, options?: {
2732
+ readonly reviver?: Parameters<typeof JSON.parse>[1] | undefined;
2733
+ } | undefined) => JsonFromUrlParamsField;
2734
+
2735
+ export interface RecordFromUrlParams extends decodeTo<$Record<String, Union<readonly [String, NonEmptyArray<String>]>>, UrlParams, never, never> {
2736
+ readonly "Rebuild": RecordFromUrlParams;
2737
+ }
2738
+
2739
+ export declare const RecordFromUrlParams: RecordFromUrlParams;
2740
+
2741
+ export interface OptionFromOptionalKey<S extends Constraint> extends decodeTo<Option<toType<S>>, optionalKey<S>> {
2742
+ readonly "Rebuild": OptionFromOptionalKey<S>;
2743
+ }
2744
+
2745
+ export declare function OptionFromOptionalKey<S extends Constraint>(schema: S): OptionFromOptionalKey<S>;
2746
+
2747
+ export interface OptionFromOptional<S extends Constraint> extends decodeTo<Option<toType<S>>, optional<S>> {
2748
+ readonly "Rebuild": OptionFromOptional<S>;
2749
+ }
2750
+
2751
+ export declare function OptionFromOptional<S extends Constraint>(schema: S): OptionFromOptional<S>;
2752
+
2753
+ export interface OptionFromOptionalNullOr<S extends Constraint> extends decodeTo<Option<toType<S>>, optional<NullOr<S>>> {
2754
+ readonly "Rebuild": OptionFromOptionalNullOr<S>;
2755
+ }
2756
+
2757
+ export declare function OptionFromOptionalNullOr<S extends Constraint>(schema: S, options?: {
2758
+ readonly onNoneEncoding: "omit" | null | undefined;
2759
+ }): OptionFromOptionalNullOr<S>;
2760
+
2761
+ export interface Redacted<S extends Constraint> extends declareConstructor<Redacted_.Redacted<S["Type"]>, Redacted_.Redacted<S["Encoded"]>, readonly [S]> {
2762
+ readonly "Rebuild": Redacted<S>;
2763
+ readonly value: S;
2764
+ }
2765
+
2766
+ export declare function Redacted<S extends Constraint>(value: S, options?: {
2767
+ readonly label?: string | undefined;
2768
+ readonly disallowJsonEncode?: boolean | undefined;
2769
+ }): Redacted<S>;
2770
+
2771
+ export interface RedactedFromValue<S extends Constraint> extends decodeTo<Redacted<toType<S>>, S> {
2772
+ readonly "Rebuild": RedactedFromValue<S>;
2773
+ }
2774
+
2775
+ export declare function RedactedFromValue<S extends Constraint>(value: S, options?: {
2776
+ readonly label?: string | undefined;
2777
+ readonly disallowEncode?: boolean | undefined;
2778
+ }): RedactedFromValue<S>;
2779
+
2780
+ export interface Result<A extends Constraint, E extends Constraint> extends declareConstructor<Result_.Result<A["Type"], E["Type"]>, Result_.Result<A["Encoded"], E["Encoded"]>, readonly [A, E], ResultIso<A, E>> {
2781
+ readonly "Rebuild": Result<A, E>;
2782
+ readonly success: A;
2783
+ readonly failure: E;
2784
+ }
2785
+
2786
+ export type ResultIso<A extends Constraint, E extends Constraint> = {
2787
+ readonly _tag: "Success";
2788
+ readonly success: A["Iso"];
2789
+ } | {
2790
+ readonly _tag: "Failure";
2791
+ readonly failure: E["Iso"];
2792
+ };
2793
+
2794
+ export declare function Result<A extends Constraint, E extends Constraint>(success: A, failure: E): Result<A, E>;
2795
+
2796
+ export interface SemVer extends declare<SemVer_.SemVer> {
2797
+ readonly "Rebuild": SemVer;
2798
+ }
2799
+
2800
+ export declare const SemVer: SemVer;
2801
+
2802
+ export interface SemVerFromString extends decodeTo<SemVer, String> {
2803
+ readonly "Rebuild": SemVerFromString;
2804
+ }
2805
+
2806
+ export declare const SemVerFromString: SemVerFromString;
2807
+
2808
+ export interface SemVerRange extends declare<SemVerRange_.SemVerRange> {
2809
+ readonly "Rebuild": SemVerRange;
2810
+ }
2811
+
2812
+ export declare const SemVerRange: SemVerRange;
2813
+
2814
+ export interface SemVerRangeFromString extends decodeTo<SemVerRange, String> {
2815
+ readonly "Rebuild": SemVerRangeFromString;
2816
+ }
2817
+
2818
+ export declare const SemVerRangeFromString: SemVerRangeFromString;
2819
+
2820
+ export interface Class<Self, S extends Constraint & {
2821
+ readonly fields: Struct.Fields;
2822
+ }, Inherited> extends BottomLazyWithoutNew<SchemaAST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, readonly [S], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
2823
+
2824
+ readonly "Type": Self;
2825
+ readonly "Encoded": S["Encoded"];
2826
+ readonly "DecodingServices": S["DecodingServices"];
2827
+ readonly "EncodingServices": S["EncodingServices"];
2828
+ readonly "~type.make.in": RequiredKeys<S["~type.make.in"]> extends never ? void | S["~type.make.in"] : S["~type.make.in"];
2829
+ readonly "~type.make": Self;
2830
+ readonly "Iso": S["Iso"];
2831
+ new (...args: {} extends S["~type.make.in"] ? [props?: S["~type.make.in"], options?: MakeOptions] : [props: S["~type.make.in"], options?: MakeOptions]): S["Type"] & Inherited;
2832
+ readonly identifier: string;
2833
+ readonly fields: S["fields"];
2834
+
2835
+ mapFields<To extends Struct.Fields>(f: (fields: S["fields"]) => To, options?: {
2836
+ readonly unsafePreserveChecks?: boolean | undefined;
2837
+ } | undefined): Struct<Simplify<Readonly<To>>>;
2838
+
2839
+ extend<Extended = never, Static = {}, Brand = {}>(identifier: string): {
2840
+ <NewFields extends Struct.Fields>(fields: NewFields, annotations?: Annotations.Declaration<Extended, readonly [Struct<Simplify<Assign<S["fields"], NewFields>>>]>): [Extended] extends [never] ? MissingSelfGeneric<"Base.extend"> : InheritStaticMembers<Class<Extended, Struct<Simplify<Assign<S["fields"], NewFields>>>, Self & Brand>, Static>;
2841
+ <Extension extends Struct<Struct.Fields>>(schema: Extension, annotations?: Annotations.Declaration<Extended, readonly [Struct<Simplify<Assign<S["fields"], Extension["fields"]>>>]>): [Extended] extends [never] ? MissingSelfGeneric<"Base.extend"> : InheritStaticMembers<Class<Extended, Struct<Simplify<Assign<S["fields"], Extension["fields"]>>>, Self & Brand>, Static>;
2842
+ };
2843
+ }
2844
+ type InheritStaticMembers<C, Static> = C & Pick<Static, Exclude<keyof Static, keyof C>>;
2845
+ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use \`class Self extends ${Usage}<Self>(...)\``;
2846
+
2847
+ export declare const Class: {
2848
+
2849
+ <Self = never, Brand = {}>(identifier: string): {
2850
+ <const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Class"> : Class<Self, Struct<Fields>, Brand>;
2851
+ <S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Class"> : Class<Self, S, Brand>;
2852
+ };
2853
+ };
2854
+
2855
+ export declare const TaggedClass: {
2856
+
2857
+ <Self = never, Brand = {}>(identifier?: string): {
2858
+ <Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, TaggedStruct<Tag, Fields>, Brand>;
2859
+ <Tag extends string, S extends Struct<Struct.Fields>>(tag: Tag, schema: S, annotations?: Annotations.Declaration<Self, readonly [Struct<Simplify<{
2860
+ readonly _tag: tag<Tag>;
2861
+ } & S["fields"]>>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, Struct<Simplify<{
2862
+ readonly _tag: tag<Tag>;
2863
+ } & S["fields"]>>, Brand>;
2864
+ };
2865
+ };
2866
+
2867
+ export declare const Error: {
2868
+
2869
+ <Self = never, Brand = {}>(identifier: string): {
2870
+ <const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Error"> : Class<Self, Struct<Fields>, Cause_.YieldableError & Brand>;
2871
+ <S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Error"> : Class<Self, S, Cause_.YieldableError & Brand>;
2872
+ };
2873
+ };
2874
+
2875
+ export declare const TaggedError: {
2876
+
2877
+ <Self = never, Brand = {}>(identifier?: string): {
2878
+ <Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedError"> : Class<Self, TaggedStruct<Tag, Fields>, Cause_.YieldableError & Brand>;
2879
+ <Tag extends string, S extends Struct<Struct.Fields>>(tag: Tag, schema: S, annotations?: Annotations.Declaration<Self, readonly [Struct<Simplify<{
2880
+ readonly _tag: tag<Tag>;
2881
+ } & S["fields"]>>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedError"> : Class<Self, Struct<Simplify<{
2882
+ readonly _tag: tag<Tag>;
2883
+ } & S["fields"]>>, Cause_.YieldableError & Brand>;
2884
+ };
2885
+ };
2886
+
2887
+ export declare function overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"];
2888
+
2889
+ export declare function toFormatter<S extends Constraint>(schema: S, options?: {
2890
+ readonly onBefore?: ((ast: SchemaAST.AST, recur: (ast: SchemaAST.AST) => Formatter<any>) => Formatter<any> | undefined) | undefined;
2891
+ }): Formatter<S["Type"]>;
2892
+
2893
+ export declare function overrideToEquivalence<S extends Top>(toEquivalence: () => Equivalence.Equivalence<S["Type"]>): (self: S) => S["Rebuild"];
2894
+
2895
+ export declare function toEquivalence<T>(schema: Schema<T>): Equivalence.Equivalence<T>;
2896
+
2897
+ export declare function toRepresentation(schema: Constraint, options?: SchemaRepresentation.ToRepresentationOptions): SchemaRepresentation.Document;
2898
+
2899
+ export interface ToJsonSchemaOptions extends SchemaRepresentation.ToRepresentationOptions {
2900
+
2901
+ readonly onExcessProperty?: "ignore" | "error" | undefined;
2902
+
2903
+ readonly generateDescriptions?: boolean | undefined;
2904
+
2905
+ readonly includeAnnotationKey?: ((key: string) => boolean) | undefined;
2906
+ }
2907
+
2908
+ export declare function toJsonSchemaDocument(schema: Constraint, options?: ToJsonSchemaOptions): JsonSchema.Document<"draft-2020-12">;
2909
+
2910
+ export interface toCodecJson<S extends Constraint> extends BottomLazy<S["ast"], toCodecJson<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
2911
+ readonly "Type": S["Type"];
2912
+ readonly "Encoded": Json;
2913
+ readonly "DecodingServices": S["DecodingServices"];
2914
+ readonly "EncodingServices": S["EncodingServices"];
2915
+ readonly "~type.make.in": S["~type.make.in"];
2916
+ readonly "~type.make": S["~type.make"];
2917
+ readonly "Iso": S["Iso"];
2918
+ readonly schema: S;
2919
+ }
2920
+
2921
+ export declare const toCodecJson: {
2922
+
2923
+ <S extends Constraint>(schema: S): toCodecJson<S>;
2924
+ };
2925
+
2926
+ export declare const toCodecIso: {
2927
+
2928
+ <S extends Constraint>(schema: S): Codec<S["Type"], S["Iso"]>;
2929
+ };
2930
+
2931
+ export type StringTree = Tree<string | undefined>;
2932
+
2933
+ export interface toCodecStringTree<S extends Constraint> extends BottomLazy<S["ast"], toCodecStringTree<S>, ReadonlyArray<Constraint>, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
2934
+ readonly "Type": S["Type"];
2935
+ readonly "Encoded": StringTree;
2936
+ readonly "DecodingServices": S["DecodingServices"];
2937
+ readonly "EncodingServices": S["EncodingServices"];
2938
+ readonly "~type.make.in": S["~type.make.in"];
2939
+ readonly "~type.make": S["~type.make"];
2940
+ readonly "Iso": S["Iso"];
2941
+ readonly schema: S;
2942
+ }
2943
+
2944
+ export declare const toCodecStringTree: {
2945
+
2946
+ <S extends Constraint>(schema: S): toCodecStringTree<S>;
2947
+ };
2948
+
2949
+ export interface toCodecArrayFromSingle<S extends Constraint> extends BottomLazy<S["ast"], toCodecArrayFromSingle<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
2950
+ readonly "Type": S["Type"];
2951
+ readonly "Encoded": S["Encoded"];
2952
+ readonly "DecodingServices": S["DecodingServices"];
2953
+ readonly "EncodingServices": S["EncodingServices"];
2954
+ readonly "~type.make.in": S["~type.make.in"];
2955
+ readonly "~type.make": S["~type.make"];
2956
+ readonly "Iso": S["Iso"];
2957
+ }
2958
+
2959
+ export declare const toCodecArrayFromSingle: {
2960
+
2961
+ <S extends Constraint>(schema: S): toCodecArrayFromSingle<S>;
2962
+ };
2963
+
2964
+ export interface toCodecGoJson<S extends Constraint> extends BottomLazy<S["ast"], toCodecGoJson<S>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
2965
+ readonly "Type": S["Type"];
2966
+ readonly "Encoded": Json;
2967
+ readonly "DecodingServices": S["DecodingServices"];
2968
+ readonly "EncodingServices": S["EncodingServices"];
2969
+ readonly "~type.make.in": S["~type.make.in"];
2970
+ readonly "~type.make": S["~type.make"];
2971
+ readonly "Iso": S["Iso"];
2972
+ readonly schema: S;
2973
+ }
2974
+
2975
+ export declare const toCodecGoJson: {
2976
+
2977
+ <S extends Constraint>(schema: S): toCodecGoJson<S>;
2978
+ };
2979
+ type XmlEncoderOptions = {
2980
+
2981
+ readonly rootName?: string | undefined;
2982
+
2983
+ readonly arrayItemName?: string | undefined;
2984
+
2985
+ readonly pretty?: boolean | undefined;
2986
+
2987
+ readonly indent?: string | undefined;
2988
+
2989
+ readonly sortKeys?: boolean | undefined;
2990
+ };
2991
+
2992
+ export declare function toEncoderXml<T, RE>(codec: ConstraintCodec<T, unknown, unknown, RE>, options?: XmlEncoderOptions): (t: T) => Effect.Effect<string, SchemaIssue.Issue, RE>;
2993
+
2994
+ export declare function toIso<S extends Constraint>(schema: S): Optic_.Iso<S["Type"], S["Iso"]>;
2995
+
2996
+ export declare function toIsoSource<S extends Constraint>(schema: S): Optic_.Iso<S["Type"], S["Type"]>;
2997
+
2998
+ export declare function toIsoFocus<S extends Constraint>(schema: S): Optic_.Iso<S["Iso"], S["Iso"]>;
2999
+
3000
+ export interface overrideToCodecIso<S extends Constraint, Iso> extends BottomLazy<S["ast"], overrideToCodecIso<S, Iso>, S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
3001
+ readonly "Type": S["Type"];
3002
+ readonly "Encoded": S["Encoded"];
3003
+ readonly "DecodingServices": S["DecodingServices"];
3004
+ readonly "EncodingServices": S["EncodingServices"];
3005
+ readonly "~type.make.in": S["~type.make.in"];
3006
+ readonly "~type.make": S["~type.make"];
3007
+ readonly "Iso": Iso;
3008
+ readonly schema: S;
3009
+ }
3010
+
3011
+ export declare function overrideToCodecIso<S extends Constraint, Iso>(to: ConstraintCodec<Iso>, transformation: {
3012
+ readonly decode: SchemaGetter.Getter<S["Type"], Iso>;
3013
+ readonly encode: SchemaGetter.Getter<Iso, S["Type"]>;
3014
+ }): (schema: S) => overrideToCodecIso<S, Iso>;
3015
+
3016
+ export declare function toDifferJsonPatch<T>(schema: ConstraintCodec<T, unknown>): Differ<T, JsonPatch.JsonPatch>;
3017
+
3018
+ export type Tree<Node> = Node | TreeRecord<Node> | ReadonlyArray<Tree<Node>>;
3019
+
3020
+ export interface TreeRecord<A> {
3021
+ readonly [x: string]: Tree<A>;
3022
+ }
3023
+
3024
+ export declare function Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<String, suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>]>;
3025
+
3026
+ export type Json = null | number | boolean | string | JsonArray | JsonObject;
3027
+
3028
+ export interface JsonArray extends ReadonlyArray<Json> {
3029
+ }
3030
+
3031
+ export interface JsonObject {
3032
+ readonly [x: string]: Json;
3033
+ }
3034
+
3035
+ export declare const Json: Codec<Json>;
3036
+
3037
+ export declare const JsonObject: $Record<String, Codec<Json, Json, never, never>>;
3038
+
3039
+ export type MutableJson = null | number | boolean | string | MutableJsonArray | MutableJsonObject;
3040
+
3041
+ export interface MutableJsonArray extends Array<MutableJson> {
3042
+ }
3043
+
3044
+ export interface MutableJsonObject {
3045
+ [x: string]: MutableJson;
3046
+ }
3047
+
3048
+ export declare const MutableJson: Codec<MutableJson>;
3049
+
3050
+ export declare function resolveAnnotations<S extends Constraint>(schema: S): Annotations.Bottom<S["Type"], S["~type.parameters"]> | undefined;
3051
+
3052
+ export declare function resolveAnnotationsKey<S extends Constraint>(schema: S): Annotations.Key<S["Type"]> | undefined;
3053
+ interface DeclarationCodeGenerationAnnotations {
3054
+
3055
+ readonly toCode?: SchemaRepresentation.Generation.Declaration | undefined;
3056
+ }
3057
+ interface FilterCodeGenerationAnnotations {
3058
+
3059
+ readonly toCode?: SchemaRepresentation.Generation.Check | undefined;
3060
+ }
3061
+
3062
+ export declare namespace Annotations {
3063
+
3064
+ interface Annotations {
3065
+ readonly [x: string]: unknown;
3066
+ }
3067
+
3068
+ interface Augment extends Annotations {
3069
+
3070
+ readonly expected?: string | undefined;
3071
+ readonly title?: string | undefined;
3072
+ readonly description?: string | undefined;
3073
+ readonly documentation?: string | undefined;
3074
+ readonly readOnly?: boolean | undefined;
3075
+ readonly writeOnly?: boolean | undefined;
3076
+ readonly format?: string | undefined;
3077
+ readonly contentEncoding?: string | undefined;
3078
+ readonly contentMediaType?: string | undefined;
3079
+ readonly contentSchema?: Json | undefined;
3080
+ }
3081
+
3082
+ interface Documentation<T> extends Augment {
3083
+ readonly default?: T | undefined;
3084
+ readonly examples?: ReadonlyArray<T> | undefined;
3085
+ }
3086
+
3087
+ interface Key<T> extends Documentation<T> {
3088
+
3089
+ readonly messageMissingKey?: string | undefined;
3090
+ }
3091
+
3092
+ interface Bottom<T, TypeParameters extends ReadonlyArray<Constraint>> extends Documentation<T> {
3093
+
3094
+ readonly message?: string | undefined;
3095
+
3096
+ readonly messageUnexpectedKey?: string | undefined;
3097
+
3098
+ readonly identifier?: string | undefined;
3099
+ }
3100
+
3101
+ namespace TypeParameters {
3102
+
3103
+ type Type<TypeParameters extends ReadonlyArray<Constraint>> = {
3104
+ readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"]>;
3105
+ };
3106
+
3107
+ type Encoded<TypeParameters extends ReadonlyArray<Constraint>> = {
3108
+ readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Encoded"]>;
3109
+ };
3110
+ }
3111
+
3112
+ interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint> = readonly []> extends Bottom<T, TypeParameters>, DeclarationCodeGenerationAnnotations {
3113
+ readonly representation?: SchemaRepresentation.RepresentationAnnotation | undefined;
3114
+
3115
+ readonly toCodec?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link) | undefined;
3116
+
3117
+ readonly toCodecJson?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link | undefined) | undefined;
3118
+
3119
+ readonly toCodecStringTree?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link | undefined) | undefined;
3120
+
3121
+ readonly toCodecIso?: ((typeParameters: TypeParameters.Type<TypeParameters>) => SchemaAST.Link) | undefined;
3122
+
3123
+ readonly toCodecArbitrary?: ToArbitrary.Declaration<T, TypeParameters> | undefined;
3124
+ readonly toEquivalence?: ToEquivalence.Declaration<T, TypeParameters> | undefined;
3125
+ readonly toFormatter?: ToFormatter.Declaration<T, TypeParameters> | undefined;
3126
+ }
3127
+
3128
+ interface Filter extends Augment, FilterCodeGenerationAnnotations {
3129
+ readonly representation?: SchemaRepresentation.CheckRepresentationAnnotation<SchemaAST.AST> | undefined;
3130
+
3131
+ readonly toJsonSchema?: SchemaRepresentation.ToJsonSchema.Check | undefined;
3132
+
3133
+ readonly message?: string | undefined;
3134
+
3135
+ readonly identifier?: string | undefined;
3136
+
3137
+ readonly arbitraryConstraint?: ToArbitrary.FilterConstraint<any> | undefined;
3138
+
3139
+ readonly "~structural"?: boolean | undefined;
3140
+ }
3141
+
3142
+ namespace ToArbitrary {
3143
+
3144
+ interface Pattern {
3145
+ readonly source: string;
3146
+ readonly flags: string;
3147
+ }
3148
+
3149
+ interface GenerationConstraint<T = unknown> {
3150
+ readonly minimum?: T | undefined;
3151
+ readonly exclusiveMinimum?: true | undefined;
3152
+ readonly maximum?: T | undefined;
3153
+ readonly exclusiveMaximum?: true | undefined;
3154
+ readonly minLength?: number | undefined;
3155
+ readonly maxLength?: number | undefined;
3156
+ readonly minCodePoints?: number | undefined;
3157
+ readonly maxCodePoints?: number | undefined;
3158
+ readonly minSize?: number | undefined;
3159
+ readonly maxSize?: number | undefined;
3160
+ readonly minProperties?: number | undefined;
3161
+ readonly maxProperties?: number | undefined;
3162
+ readonly patterns?: readonly [Pattern, ...Array<Pattern>];
3163
+ readonly number?: "finite" | "integer" | undefined;
3164
+ readonly uniqueBy?: ((value: any) => unknown) | undefined;
3165
+ }
3166
+
3167
+ interface FilterConstraint<T = unknown> extends GenerationConstraint<T> {
3168
+ readonly order?: Order.Order<T> | undefined;
3169
+ }
3170
+
3171
+ interface DeclarationInput<T, Parameters extends ReadonlyArray<Constraint>> {
3172
+ readonly typeParameters: TypeParameters.Type<Parameters>;
3173
+ readonly constraint: GenerationConstraint<T> | undefined;
3174
+ }
3175
+
3176
+ interface Declaration<T, Parameters extends ReadonlyArray<Constraint>> {
3177
+ (input: DeclarationInput<T, Parameters>): SchemaAST.Link;
3178
+ }
3179
+ }
3180
+
3181
+ namespace ToFormatter {
3182
+
3183
+ interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint>> {
3184
+ (typeParameters: {
3185
+ readonly [K in keyof TypeParameters]: Formatter<TypeParameters[K]["Type"]>;
3186
+ }): Formatter<T>;
3187
+ }
3188
+ }
3189
+
3190
+ namespace ToEquivalence {
3191
+
3192
+ interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint>> {
3193
+ (typeParameters: {
3194
+ readonly [K in keyof TypeParameters]: Equivalence.Equivalence<TypeParameters[K]["Type"]>;
3195
+ }): Equivalence.Equivalence<T>;
3196
+ }
3197
+ }
3198
+
3199
+ interface Issue extends Annotations {
3200
+
3201
+ readonly expected?: string | undefined;
3202
+
3203
+ readonly message?: string | undefined;
3204
+ }
3205
+ }