effect 4.0.0-beta.74 → 4.0.0-beta.75

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 (796) hide show
  1. package/dist/Array.d.ts +729 -611
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +273 -213
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +37 -30
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +19 -16
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +34 -40
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +16 -16
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +8 -8
  14. package/dist/Boolean.js +4 -4
  15. package/dist/Brand.d.ts +13 -11
  16. package/dist/Brand.d.ts.map +1 -1
  17. package/dist/Brand.js +10 -8
  18. package/dist/Brand.js.map +1 -1
  19. package/dist/Cause.d.ts +21 -23
  20. package/dist/Cause.d.ts.map +1 -1
  21. package/dist/Cause.js +21 -23
  22. package/dist/Cause.js.map +1 -1
  23. package/dist/Channel.d.ts +219 -9
  24. package/dist/Channel.d.ts.map +1 -1
  25. package/dist/Channel.js +83 -3
  26. package/dist/Channel.js.map +1 -1
  27. package/dist/ChannelSchema.d.ts +11 -11
  28. package/dist/ChannelSchema.js +5 -5
  29. package/dist/Chunk.d.ts +69 -16
  30. package/dist/Chunk.d.ts.map +1 -1
  31. package/dist/Chunk.js +43 -8
  32. package/dist/Chunk.js.map +1 -1
  33. package/dist/Clock.d.ts +3 -3
  34. package/dist/Clock.js +3 -3
  35. package/dist/Combiner.d.ts +9 -13
  36. package/dist/Combiner.d.ts.map +1 -1
  37. package/dist/Combiner.js +9 -13
  38. package/dist/Combiner.js.map +1 -1
  39. package/dist/Config.d.ts +49 -56
  40. package/dist/Config.d.ts.map +1 -1
  41. package/dist/Config.js +40 -43
  42. package/dist/Config.js.map +1 -1
  43. package/dist/ConfigProvider.d.ts +34 -44
  44. package/dist/ConfigProvider.d.ts.map +1 -1
  45. package/dist/ConfigProvider.js +24 -32
  46. package/dist/ConfigProvider.js.map +1 -1
  47. package/dist/Console.d.ts +2 -2
  48. package/dist/Console.js +2 -2
  49. package/dist/Context.d.ts +60 -72
  50. package/dist/Context.d.ts.map +1 -1
  51. package/dist/Context.js +28 -32
  52. package/dist/Context.js.map +1 -1
  53. package/dist/Cron.d.ts +2 -2
  54. package/dist/Cron.js +2 -2
  55. package/dist/Crypto.d.ts +4 -4
  56. package/dist/Crypto.js +4 -4
  57. package/dist/Data.d.ts +21 -15
  58. package/dist/Data.d.ts.map +1 -1
  59. package/dist/Data.js +7 -7
  60. package/dist/Data.js.map +1 -1
  61. package/dist/DateTime.d.ts +35 -16
  62. package/dist/DateTime.d.ts.map +1 -1
  63. package/dist/DateTime.js +35 -8
  64. package/dist/DateTime.js.map +1 -1
  65. package/dist/Deferred.d.ts +24 -15
  66. package/dist/Deferred.d.ts.map +1 -1
  67. package/dist/Deferred.js +8 -5
  68. package/dist/Deferred.js.map +1 -1
  69. package/dist/Duration.d.ts +44 -31
  70. package/dist/Duration.d.ts.map +1 -1
  71. package/dist/Duration.js +22 -11
  72. package/dist/Duration.js.map +1 -1
  73. package/dist/Effect.d.ts +516 -416
  74. package/dist/Effect.d.ts.map +1 -1
  75. package/dist/Effect.js +234 -174
  76. package/dist/Effect.js.map +1 -1
  77. package/dist/Encoding.d.ts +5 -0
  78. package/dist/Encoding.d.ts.map +1 -1
  79. package/dist/Encoding.js +5 -0
  80. package/dist/Encoding.js.map +1 -1
  81. package/dist/Equal.d.ts +26 -39
  82. package/dist/Equal.d.ts.map +1 -1
  83. package/dist/Equal.js +10 -17
  84. package/dist/Equal.js.map +1 -1
  85. package/dist/Equivalence.d.ts +71 -99
  86. package/dist/Equivalence.d.ts.map +1 -1
  87. package/dist/Equivalence.js +53 -73
  88. package/dist/Equivalence.js.map +1 -1
  89. package/dist/ErrorReporter.d.ts +1 -1
  90. package/dist/ErrorReporter.js +1 -1
  91. package/dist/Exit.d.ts +79 -96
  92. package/dist/Exit.d.ts.map +1 -1
  93. package/dist/Exit.js +57 -64
  94. package/dist/Exit.js.map +1 -1
  95. package/dist/Fiber.d.ts +8 -6
  96. package/dist/Fiber.d.ts.map +1 -1
  97. package/dist/Fiber.js +8 -6
  98. package/dist/Fiber.js.map +1 -1
  99. package/dist/FiberHandle.d.ts +25 -0
  100. package/dist/FiberHandle.d.ts.map +1 -1
  101. package/dist/FiberHandle.js +15 -0
  102. package/dist/FiberHandle.js.map +1 -1
  103. package/dist/FiberMap.d.ts +35 -0
  104. package/dist/FiberMap.d.ts.map +1 -1
  105. package/dist/FiberMap.js +15 -0
  106. package/dist/FiberMap.js.map +1 -1
  107. package/dist/FiberSet.d.ts +20 -0
  108. package/dist/FiberSet.d.ts.map +1 -1
  109. package/dist/FiberSet.js +10 -0
  110. package/dist/FiberSet.js.map +1 -1
  111. package/dist/Filter.d.ts +4 -4
  112. package/dist/Filter.js +4 -4
  113. package/dist/Formatter.d.ts +14 -19
  114. package/dist/Formatter.d.ts.map +1 -1
  115. package/dist/Formatter.js +14 -19
  116. package/dist/Formatter.js.map +1 -1
  117. package/dist/Function.d.ts +15 -16
  118. package/dist/Function.d.ts.map +1 -1
  119. package/dist/Function.js +9 -10
  120. package/dist/Function.js.map +1 -1
  121. package/dist/Graph.d.ts +2 -2
  122. package/dist/Graph.js +2 -2
  123. package/dist/HKT.d.ts +2 -2
  124. package/dist/Hash.d.ts +2 -1
  125. package/dist/Hash.d.ts.map +1 -1
  126. package/dist/Hash.js +2 -1
  127. package/dist/Hash.js.map +1 -1
  128. package/dist/HashMap.d.ts +15 -0
  129. package/dist/HashMap.d.ts.map +1 -1
  130. package/dist/HashMap.js +5 -0
  131. package/dist/HashMap.js.map +1 -1
  132. package/dist/HashRing.d.ts +9 -9
  133. package/dist/HashRing.js +3 -3
  134. package/dist/Iterable.d.ts +24 -12
  135. package/dist/Iterable.d.ts.map +1 -1
  136. package/dist/Iterable.js +16 -6
  137. package/dist/Iterable.js.map +1 -1
  138. package/dist/JsonPatch.d.ts +2 -3
  139. package/dist/JsonPatch.d.ts.map +1 -1
  140. package/dist/JsonPatch.js +2 -3
  141. package/dist/JsonPatch.js.map +1 -1
  142. package/dist/JsonPointer.d.ts +2 -6
  143. package/dist/JsonPointer.d.ts.map +1 -1
  144. package/dist/JsonPointer.js +2 -6
  145. package/dist/JsonPointer.js.map +1 -1
  146. package/dist/JsonSchema.d.ts +17 -13
  147. package/dist/JsonSchema.d.ts.map +1 -1
  148. package/dist/JsonSchema.js +17 -13
  149. package/dist/JsonSchema.js.map +1 -1
  150. package/dist/Latch.d.ts +4 -3
  151. package/dist/Latch.d.ts.map +1 -1
  152. package/dist/Latch.js +4 -3
  153. package/dist/Latch.js.map +1 -1
  154. package/dist/Layer.d.ts +92 -114
  155. package/dist/Layer.d.ts.map +1 -1
  156. package/dist/Layer.js +38 -46
  157. package/dist/Layer.js.map +1 -1
  158. package/dist/Logger.d.ts +11 -14
  159. package/dist/Logger.d.ts.map +1 -1
  160. package/dist/Logger.js +11 -14
  161. package/dist/Logger.js.map +1 -1
  162. package/dist/Match.d.ts +2 -2
  163. package/dist/Match.js +2 -2
  164. package/dist/Metric.d.ts +89 -109
  165. package/dist/Metric.d.ts.map +1 -1
  166. package/dist/Metric.js +51 -61
  167. package/dist/Metric.js.map +1 -1
  168. package/dist/MutableHashMap.d.ts +21 -12
  169. package/dist/MutableHashMap.d.ts.map +1 -1
  170. package/dist/MutableHashMap.js +7 -4
  171. package/dist/MutableHashMap.js.map +1 -1
  172. package/dist/MutableList.d.ts +15 -0
  173. package/dist/MutableList.d.ts.map +1 -1
  174. package/dist/MutableList.js +15 -0
  175. package/dist/MutableList.js.map +1 -1
  176. package/dist/MutableRef.d.ts +56 -42
  177. package/dist/MutableRef.d.ts.map +1 -1
  178. package/dist/MutableRef.js +28 -22
  179. package/dist/MutableRef.js.map +1 -1
  180. package/dist/Newtype.d.ts +10 -7
  181. package/dist/Newtype.d.ts.map +1 -1
  182. package/dist/Newtype.js +10 -7
  183. package/dist/Newtype.js.map +1 -1
  184. package/dist/Number.d.ts +23 -11
  185. package/dist/Number.d.ts.map +1 -1
  186. package/dist/Number.js +9 -5
  187. package/dist/Number.js.map +1 -1
  188. package/dist/Optic.d.ts +16 -16
  189. package/dist/Optic.d.ts.map +1 -1
  190. package/dist/Optic.js +10 -9
  191. package/dist/Optic.js.map +1 -1
  192. package/dist/Option.d.ts +196 -168
  193. package/dist/Option.d.ts.map +1 -1
  194. package/dist/Option.js +96 -79
  195. package/dist/Option.js.map +1 -1
  196. package/dist/Order.d.ts +118 -179
  197. package/dist/Order.d.ts.map +1 -1
  198. package/dist/Order.js +92 -144
  199. package/dist/Order.js.map +1 -1
  200. package/dist/PartitionedSemaphore.d.ts +14 -14
  201. package/dist/PartitionedSemaphore.js +6 -6
  202. package/dist/Path.d.ts +2 -2
  203. package/dist/Path.js +2 -2
  204. package/dist/Pipeable.d.ts +2 -2
  205. package/dist/Pipeable.js +2 -2
  206. package/dist/PlatformError.d.ts +4 -4
  207. package/dist/PlatformError.js +4 -4
  208. package/dist/Pool.d.ts +7 -11
  209. package/dist/Pool.d.ts.map +1 -1
  210. package/dist/Pool.js +3 -5
  211. package/dist/Pool.js.map +1 -1
  212. package/dist/Predicate.d.ts +274 -263
  213. package/dist/Predicate.d.ts.map +1 -1
  214. package/dist/Predicate.js +128 -123
  215. package/dist/Predicate.js.map +1 -1
  216. package/dist/PubSub.d.ts +24 -14
  217. package/dist/PubSub.d.ts.map +1 -1
  218. package/dist/PubSub.js +16 -6
  219. package/dist/PubSub.js.map +1 -1
  220. package/dist/Pull.d.ts +4 -4
  221. package/dist/Pull.js +4 -4
  222. package/dist/Queue.d.ts +46 -7
  223. package/dist/Queue.d.ts.map +1 -1
  224. package/dist/Queue.js +46 -7
  225. package/dist/Queue.js.map +1 -1
  226. package/dist/RcRef.d.ts +0 -4
  227. package/dist/RcRef.d.ts.map +1 -1
  228. package/dist/RcRef.js.map +1 -1
  229. package/dist/Redactable.d.ts +2 -2
  230. package/dist/Redactable.js +2 -2
  231. package/dist/Redacted.d.ts +3 -3
  232. package/dist/Redacted.js +3 -3
  233. package/dist/Reducer.d.ts +2 -3
  234. package/dist/Reducer.d.ts.map +1 -1
  235. package/dist/Reducer.js +2 -3
  236. package/dist/Reducer.js.map +1 -1
  237. package/dist/Ref.d.ts +17 -16
  238. package/dist/Ref.d.ts.map +1 -1
  239. package/dist/Ref.js +15 -14
  240. package/dist/Ref.js.map +1 -1
  241. package/dist/References.d.ts +4 -4
  242. package/dist/References.js +4 -4
  243. package/dist/Request.d.ts +18 -18
  244. package/dist/Request.js +6 -6
  245. package/dist/Resource.d.ts +2 -2
  246. package/dist/Resource.js +2 -2
  247. package/dist/Result.d.ts +77 -33
  248. package/dist/Result.d.ts.map +1 -1
  249. package/dist/Result.js +42 -19
  250. package/dist/Result.js.map +1 -1
  251. package/dist/Runtime.d.ts +11 -8
  252. package/dist/Runtime.d.ts.map +1 -1
  253. package/dist/Runtime.js +11 -8
  254. package/dist/Runtime.js.map +1 -1
  255. package/dist/Schedule.d.ts +107 -45
  256. package/dist/Schedule.d.ts.map +1 -1
  257. package/dist/Schedule.js +41 -29
  258. package/dist/Schedule.js.map +1 -1
  259. package/dist/Scheduler.d.ts +6 -4
  260. package/dist/Scheduler.d.ts.map +1 -1
  261. package/dist/Scheduler.js +6 -4
  262. package/dist/Scheduler.js.map +1 -1
  263. package/dist/Schema.d.ts +443 -371
  264. package/dist/Schema.d.ts.map +1 -1
  265. package/dist/Schema.js +518 -427
  266. package/dist/Schema.js.map +1 -1
  267. package/dist/SchemaAST.d.ts +42 -21
  268. package/dist/SchemaAST.d.ts.map +1 -1
  269. package/dist/SchemaAST.js +80 -59
  270. package/dist/SchemaAST.js.map +1 -1
  271. package/dist/SchemaGetter.d.ts +126 -106
  272. package/dist/SchemaGetter.d.ts.map +1 -1
  273. package/dist/SchemaGetter.js +121 -101
  274. package/dist/SchemaGetter.js.map +1 -1
  275. package/dist/SchemaIssue.d.ts +37 -39
  276. package/dist/SchemaIssue.d.ts.map +1 -1
  277. package/dist/SchemaIssue.js +16 -17
  278. package/dist/SchemaIssue.js.map +1 -1
  279. package/dist/SchemaParser.d.ts +72 -153
  280. package/dist/SchemaParser.d.ts.map +1 -1
  281. package/dist/SchemaParser.js +72 -145
  282. package/dist/SchemaParser.js.map +1 -1
  283. package/dist/SchemaRepresentation.d.ts +30 -21
  284. package/dist/SchemaRepresentation.d.ts.map +1 -1
  285. package/dist/SchemaRepresentation.js +26 -22
  286. package/dist/SchemaRepresentation.js.map +1 -1
  287. package/dist/SchemaTransformation.d.ts +169 -145
  288. package/dist/SchemaTransformation.d.ts.map +1 -1
  289. package/dist/SchemaTransformation.js +183 -159
  290. package/dist/SchemaTransformation.js.map +1 -1
  291. package/dist/SchemaUtils.js +2 -2
  292. package/dist/SchemaUtils.js.map +1 -1
  293. package/dist/Scope.d.ts +15 -0
  294. package/dist/Scope.d.ts.map +1 -1
  295. package/dist/Scope.js +15 -0
  296. package/dist/Scope.js.map +1 -1
  297. package/dist/ScopedCache.d.ts +1 -1
  298. package/dist/ScopedCache.js +1 -1
  299. package/dist/ScopedRef.d.ts +14 -18
  300. package/dist/ScopedRef.d.ts.map +1 -1
  301. package/dist/ScopedRef.js +6 -8
  302. package/dist/ScopedRef.js.map +1 -1
  303. package/dist/Semaphore.d.ts +9 -9
  304. package/dist/Semaphore.js +3 -3
  305. package/dist/Sink.d.ts +13 -13
  306. package/dist/Sink.d.ts.map +1 -1
  307. package/dist/Sink.js +9 -9
  308. package/dist/Sink.js.map +1 -1
  309. package/dist/Stdio.d.ts +4 -5
  310. package/dist/Stdio.d.ts.map +1 -1
  311. package/dist/Stdio.js +4 -5
  312. package/dist/Stdio.js.map +1 -1
  313. package/dist/Stream.d.ts +321 -44
  314. package/dist/Stream.d.ts.map +1 -1
  315. package/dist/Stream.js +137 -22
  316. package/dist/Stream.js.map +1 -1
  317. package/dist/String.d.ts +6 -9
  318. package/dist/String.d.ts.map +1 -1
  319. package/dist/String.js +2 -3
  320. package/dist/String.js.map +1 -1
  321. package/dist/Struct.d.ts +15 -13
  322. package/dist/Struct.d.ts.map +1 -1
  323. package/dist/Struct.js +11 -9
  324. package/dist/Struct.js.map +1 -1
  325. package/dist/SubscriptionRef.d.ts +24 -19
  326. package/dist/SubscriptionRef.d.ts.map +1 -1
  327. package/dist/SubscriptionRef.js +12 -7
  328. package/dist/SubscriptionRef.js.map +1 -1
  329. package/dist/SynchronizedRef.d.ts +88 -63
  330. package/dist/SynchronizedRef.d.ts.map +1 -1
  331. package/dist/SynchronizedRef.js +32 -23
  332. package/dist/SynchronizedRef.js.map +1 -1
  333. package/dist/Tracer.d.ts +4 -4
  334. package/dist/Tracer.js +4 -4
  335. package/dist/Trie.d.ts +15 -0
  336. package/dist/Trie.d.ts.map +1 -1
  337. package/dist/Trie.js +5 -0
  338. package/dist/Trie.js.map +1 -1
  339. package/dist/Tuple.d.ts +25 -19
  340. package/dist/Tuple.d.ts.map +1 -1
  341. package/dist/Tuple.js +17 -13
  342. package/dist/Tuple.js.map +1 -1
  343. package/dist/TxReentrantLock.d.ts +6 -3
  344. package/dist/TxReentrantLock.d.ts.map +1 -1
  345. package/dist/TxReentrantLock.js +2 -1
  346. package/dist/TxReentrantLock.js.map +1 -1
  347. package/dist/TxRef.d.ts +16 -16
  348. package/dist/TxRef.js +8 -8
  349. package/dist/TxSubscriptionRef.d.ts +43 -27
  350. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  351. package/dist/TxSubscriptionRef.js +19 -13
  352. package/dist/TxSubscriptionRef.js.map +1 -1
  353. package/dist/Types.d.ts +12 -38
  354. package/dist/Types.d.ts.map +1 -1
  355. package/dist/Types.js +0 -2
  356. package/dist/UndefinedOr.d.ts +15 -14
  357. package/dist/UndefinedOr.d.ts.map +1 -1
  358. package/dist/UndefinedOr.js +11 -10
  359. package/dist/UndefinedOr.js.map +1 -1
  360. package/dist/Unify.d.ts +2 -2
  361. package/dist/internal/schema/annotations.js.map +1 -1
  362. package/dist/internal/schema/arbitrary.js +9 -9
  363. package/dist/internal/schema/arbitrary.js.map +1 -1
  364. package/dist/internal/schema/equivalence.js +9 -9
  365. package/dist/internal/schema/equivalence.js.map +1 -1
  366. package/dist/internal/schema/representation.js +14 -14
  367. package/dist/internal/schema/representation.js.map +1 -1
  368. package/dist/internal/schema/schema.js +11 -11
  369. package/dist/internal/schema/schema.js.map +1 -1
  370. package/dist/testing/TestSchema.d.ts +10 -10
  371. package/dist/testing/TestSchema.d.ts.map +1 -1
  372. package/dist/testing/TestSchema.js +9 -9
  373. package/dist/testing/TestSchema.js.map +1 -1
  374. package/dist/unstable/ai/AiError.d.ts +4 -2
  375. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  376. package/dist/unstable/ai/AiError.js +4 -2
  377. package/dist/unstable/ai/AiError.js.map +1 -1
  378. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +17 -20
  379. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  380. package/dist/unstable/ai/AnthropicStructuredOutput.js +36 -39
  381. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  382. package/dist/unstable/ai/Chat.d.ts +4 -5
  383. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  384. package/dist/unstable/ai/Chat.js +4 -5
  385. package/dist/unstable/ai/Chat.js.map +1 -1
  386. package/dist/unstable/ai/EmbeddingModel.d.ts +4 -4
  387. package/dist/unstable/ai/EmbeddingModel.js +4 -4
  388. package/dist/unstable/ai/IdGenerator.d.ts +2 -3
  389. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  390. package/dist/unstable/ai/IdGenerator.js +2 -3
  391. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  392. package/dist/unstable/ai/LanguageModel.d.ts +3 -2
  393. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  394. package/dist/unstable/ai/LanguageModel.js +5 -4
  395. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  396. package/dist/unstable/ai/McpSchema.d.ts +14 -12
  397. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  398. package/dist/unstable/ai/McpSchema.js +19 -17
  399. package/dist/unstable/ai/McpSchema.js.map +1 -1
  400. package/dist/unstable/ai/McpServer.d.ts +11 -4
  401. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  402. package/dist/unstable/ai/McpServer.js +8 -5
  403. package/dist/unstable/ai/McpServer.js.map +1 -1
  404. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +20 -18
  405. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  406. package/dist/unstable/ai/OpenAiStructuredOutput.js +45 -43
  407. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  408. package/dist/unstable/ai/Prompt.d.ts +2 -2
  409. package/dist/unstable/ai/Prompt.js +3 -3
  410. package/dist/unstable/ai/Prompt.js.map +1 -1
  411. package/dist/unstable/ai/ResponseIdTracker.d.ts +3 -2
  412. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  413. package/dist/unstable/ai/ResponseIdTracker.js +3 -2
  414. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  415. package/dist/unstable/ai/Telemetry.d.ts +21 -6
  416. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  417. package/dist/unstable/ai/Telemetry.js +7 -2
  418. package/dist/unstable/ai/Telemetry.js.map +1 -1
  419. package/dist/unstable/ai/Tool.d.ts +7 -6
  420. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  421. package/dist/unstable/ai/Tool.js +8 -7
  422. package/dist/unstable/ai/Tool.js.map +1 -1
  423. package/dist/unstable/ai/Toolkit.d.ts +2 -2
  424. package/dist/unstable/ai/Toolkit.js +2 -2
  425. package/dist/unstable/cli/Command.d.ts +37 -16
  426. package/dist/unstable/cli/Command.d.ts.map +1 -1
  427. package/dist/unstable/cli/Command.js +15 -8
  428. package/dist/unstable/cli/Command.js.map +1 -1
  429. package/dist/unstable/cli/Completions.d.ts +1 -1
  430. package/dist/unstable/cli/Completions.js +1 -1
  431. package/dist/unstable/cli/Flag.d.ts +7 -6
  432. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  433. package/dist/unstable/cli/Flag.js +7 -6
  434. package/dist/unstable/cli/Flag.js.map +1 -1
  435. package/dist/unstable/cli/GlobalFlag.d.ts +6 -1
  436. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  437. package/dist/unstable/cli/GlobalFlag.js +7 -2
  438. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  439. package/dist/unstable/cli/Param.d.ts +3 -3
  440. package/dist/unstable/cli/Param.d.ts.map +1 -1
  441. package/dist/unstable/cli/Param.js +13 -10
  442. package/dist/unstable/cli/Param.js.map +1 -1
  443. package/dist/unstable/cli/Primitive.d.ts +3 -2
  444. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  445. package/dist/unstable/cli/Primitive.js +3 -2
  446. package/dist/unstable/cli/Primitive.js.map +1 -1
  447. package/dist/unstable/cluster/ClusterCron.d.ts +1 -2
  448. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  449. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  450. package/dist/unstable/cluster/ClusterMetrics.d.ts +5 -0
  451. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  452. package/dist/unstable/cluster/ClusterMetrics.js +5 -0
  453. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  454. package/dist/unstable/cluster/ClusterSchema.d.ts +3 -3
  455. package/dist/unstable/cluster/ClusterSchema.js +3 -3
  456. package/dist/unstable/cluster/ClusterWorkflowEngine.js +15 -15
  457. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  458. package/dist/unstable/cluster/EntityResource.d.ts +10 -0
  459. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  460. package/dist/unstable/cluster/EntityResource.js +10 -0
  461. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  462. package/dist/unstable/cluster/Envelope.d.ts +2 -2
  463. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  464. package/dist/unstable/cluster/Envelope.js +2 -2
  465. package/dist/unstable/cluster/Envelope.js.map +1 -1
  466. package/dist/unstable/cluster/Reply.d.ts +2 -2
  467. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  468. package/dist/unstable/cluster/Reply.js +12 -12
  469. package/dist/unstable/cluster/Reply.js.map +1 -1
  470. package/dist/unstable/cluster/RunnerHealth.d.ts +2 -1
  471. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  472. package/dist/unstable/cluster/RunnerHealth.js +2 -1
  473. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  474. package/dist/unstable/cluster/RunnerServer.d.ts +2 -2
  475. package/dist/unstable/cluster/RunnerServer.js +2 -2
  476. package/dist/unstable/cluster/Runners.d.ts +3 -3
  477. package/dist/unstable/cluster/Runners.js +3 -3
  478. package/dist/unstable/cluster/ShardId.js +3 -3
  479. package/dist/unstable/cluster/ShardId.js.map +1 -1
  480. package/dist/unstable/cluster/Sharding.d.ts +3 -3
  481. package/dist/unstable/cluster/Sharding.js +3 -3
  482. package/dist/unstable/cluster/ShardingConfig.d.ts +4 -4
  483. package/dist/unstable/cluster/ShardingConfig.js +4 -4
  484. package/dist/unstable/cluster/Snowflake.d.ts +1 -1
  485. package/dist/unstable/cluster/Snowflake.js +3 -3
  486. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  487. package/dist/unstable/cluster/internal/entityManager.js +2 -2
  488. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  489. package/dist/unstable/encoding/Msgpack.d.ts +2 -2
  490. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  491. package/dist/unstable/encoding/Msgpack.js +5 -5
  492. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  493. package/dist/unstable/encoding/Ndjson.d.ts +5 -0
  494. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  495. package/dist/unstable/encoding/Ndjson.js +5 -0
  496. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  497. package/dist/unstable/encoding/Sse.d.ts +2 -2
  498. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  499. package/dist/unstable/encoding/Sse.js +2 -2
  500. package/dist/unstable/encoding/Sse.js.map +1 -1
  501. package/dist/unstable/eventlog/EventGroup.d.ts +2 -1
  502. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  503. package/dist/unstable/eventlog/EventGroup.js +2 -1
  504. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  505. package/dist/unstable/eventlog/EventJournal.d.ts +10 -0
  506. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  507. package/dist/unstable/eventlog/EventJournal.js +10 -0
  508. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  509. package/dist/unstable/eventlog/EventLog.d.ts +3 -3
  510. package/dist/unstable/eventlog/EventLog.js +3 -3
  511. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -3
  512. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  513. package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -3
  514. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  515. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -7
  516. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  517. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +5 -7
  518. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  519. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +4 -4
  520. package/dist/unstable/eventlog/EventLogSessionAuth.js +4 -4
  521. package/dist/unstable/http/Cookies.js +4 -4
  522. package/dist/unstable/http/Cookies.js.map +1 -1
  523. package/dist/unstable/http/Etag.d.ts +2 -3
  524. package/dist/unstable/http/Etag.d.ts.map +1 -1
  525. package/dist/unstable/http/Etag.js +2 -3
  526. package/dist/unstable/http/Etag.js.map +1 -1
  527. package/dist/unstable/http/Headers.js +2 -2
  528. package/dist/unstable/http/Headers.js.map +1 -1
  529. package/dist/unstable/http/HttpBody.js +2 -2
  530. package/dist/unstable/http/HttpBody.js.map +1 -1
  531. package/dist/unstable/http/HttpClient.d.ts +2 -2
  532. package/dist/unstable/http/HttpClient.js +2 -2
  533. package/dist/unstable/http/HttpClientRequest.d.ts +30 -3
  534. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  535. package/dist/unstable/http/HttpClientRequest.js +10 -1
  536. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  537. package/dist/unstable/http/HttpRouter.d.ts +1 -1
  538. package/dist/unstable/http/HttpRouter.js +1 -1
  539. package/dist/unstable/http/HttpServerResponse.d.ts +25 -20
  540. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  541. package/dist/unstable/http/HttpServerResponse.js +13 -8
  542. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  543. package/dist/unstable/http/Multipart.js +3 -3
  544. package/dist/unstable/http/Multipart.js.map +1 -1
  545. package/dist/unstable/http/UrlParams.d.ts +30 -0
  546. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  547. package/dist/unstable/http/UrlParams.js +16 -6
  548. package/dist/unstable/http/UrlParams.js.map +1 -1
  549. package/dist/unstable/httpapi/HttpApi.d.ts +3 -2
  550. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  551. package/dist/unstable/httpapi/HttpApi.js +3 -2
  552. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  553. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  554. package/dist/unstable/httpapi/HttpApiBuilder.js +10 -8
  555. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  556. package/dist/unstable/httpapi/HttpApiClient.js +15 -15
  557. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  558. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +3 -3
  559. package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -3
  560. package/dist/unstable/httpapi/HttpApiSchema.d.ts +2 -2
  561. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  562. package/dist/unstable/httpapi/HttpApiSchema.js +9 -9
  563. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  564. package/dist/unstable/httpapi/OpenApi.js +11 -11
  565. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  566. package/dist/unstable/observability/OtlpResource.d.ts +5 -0
  567. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  568. package/dist/unstable/observability/OtlpResource.js +5 -0
  569. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  570. package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -2
  571. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  572. package/dist/unstable/observability/PrometheusMetrics.js +4 -2
  573. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  574. package/dist/unstable/reactivity/Atom.d.ts +3 -3
  575. package/dist/unstable/reactivity/Atom.js +3 -3
  576. package/dist/unstable/rpc/RpcSchema.d.ts +2 -2
  577. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  578. package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
  579. package/dist/unstable/rpc/RpcSerialization.js +2 -2
  580. package/dist/unstable/schema/Model.js +5 -5
  581. package/dist/unstable/schema/Model.js.map +1 -1
  582. package/dist/unstable/schema/VariantSchema.d.ts +2 -2
  583. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  584. package/dist/unstable/sql/SqlSchema.d.ts +4 -4
  585. package/dist/unstable/sql/SqlSchema.js +4 -4
  586. package/dist/unstable/workers/Transferable.d.ts +2 -2
  587. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  588. package/dist/unstable/workers/Transferable.js +5 -5
  589. package/dist/unstable/workers/Transferable.js.map +1 -1
  590. package/dist/unstable/workflow/DurableDeferred.js +7 -7
  591. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  592. package/dist/unstable/workflow/DurableQueue.d.ts +1 -2
  593. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  594. package/dist/unstable/workflow/DurableQueue.js +1 -2
  595. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  596. package/dist/unstable/workflow/Workflow.d.ts +35 -15
  597. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  598. package/dist/unstable/workflow/Workflow.js +94 -72
  599. package/dist/unstable/workflow/Workflow.js.map +1 -1
  600. package/dist/unstable/workflow/WorkflowEngine.d.ts +10 -2
  601. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  602. package/dist/unstable/workflow/WorkflowEngine.js +16 -8
  603. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  604. package/dist/unstable/workflow/WorkflowProxy.d.ts +2 -4
  605. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  606. package/dist/unstable/workflow/WorkflowProxy.js +9 -11
  607. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  608. package/dist/unstable/workflow/WorkflowProxyServer.js +7 -7
  609. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  610. package/package.json +1 -1
  611. package/src/Array.ts +729 -611
  612. package/src/BigDecimal.ts +37 -30
  613. package/src/BigInt.ts +34 -40
  614. package/src/Boolean.ts +8 -8
  615. package/src/Brand.ts +16 -14
  616. package/src/Cause.ts +21 -23
  617. package/src/Channel.ts +249 -9
  618. package/src/ChannelSchema.ts +11 -11
  619. package/src/Chunk.ts +69 -16
  620. package/src/Clock.ts +3 -3
  621. package/src/Combiner.ts +9 -13
  622. package/src/Config.ts +60 -67
  623. package/src/ConfigProvider.ts +34 -44
  624. package/src/Console.ts +2 -2
  625. package/src/Context.ts +60 -72
  626. package/src/Cron.ts +2 -2
  627. package/src/Crypto.ts +4 -4
  628. package/src/Data.ts +21 -15
  629. package/src/DateTime.ts +35 -16
  630. package/src/Deferred.ts +24 -15
  631. package/src/Duration.ts +44 -31
  632. package/src/Effect.ts +516 -416
  633. package/src/Encoding.ts +5 -0
  634. package/src/Equal.ts +26 -39
  635. package/src/Equivalence.ts +71 -99
  636. package/src/ErrorReporter.ts +1 -1
  637. package/src/Exit.ts +79 -96
  638. package/src/Fiber.ts +8 -6
  639. package/src/FiberHandle.ts +25 -0
  640. package/src/FiberMap.ts +35 -0
  641. package/src/FiberSet.ts +20 -0
  642. package/src/Filter.ts +4 -4
  643. package/src/Formatter.ts +14 -19
  644. package/src/Function.ts +15 -16
  645. package/src/Graph.ts +2 -2
  646. package/src/HKT.ts +2 -2
  647. package/src/Hash.ts +2 -1
  648. package/src/HashMap.ts +15 -0
  649. package/src/HashRing.ts +9 -9
  650. package/src/Iterable.ts +24 -12
  651. package/src/JsonPatch.ts +2 -3
  652. package/src/JsonPointer.ts +2 -6
  653. package/src/JsonSchema.ts +17 -13
  654. package/src/Latch.ts +4 -3
  655. package/src/Layer.ts +92 -114
  656. package/src/Logger.ts +15 -18
  657. package/src/Match.ts +2 -2
  658. package/src/Metric.ts +109 -137
  659. package/src/MutableHashMap.ts +35 -20
  660. package/src/MutableList.ts +15 -0
  661. package/src/MutableRef.ts +56 -42
  662. package/src/Newtype.ts +10 -7
  663. package/src/Number.ts +23 -11
  664. package/src/Optic.ts +25 -22
  665. package/src/Option.ts +196 -168
  666. package/src/Order.ts +118 -179
  667. package/src/PartitionedSemaphore.ts +14 -14
  668. package/src/Path.ts +2 -2
  669. package/src/Pipeable.ts +2 -2
  670. package/src/PlatformError.ts +4 -4
  671. package/src/Pool.ts +7 -11
  672. package/src/Predicate.ts +274 -263
  673. package/src/PubSub.ts +24 -14
  674. package/src/Pull.ts +4 -4
  675. package/src/Queue.ts +46 -7
  676. package/src/RcRef.ts +0 -4
  677. package/src/Redactable.ts +2 -2
  678. package/src/Redacted.ts +3 -3
  679. package/src/Reducer.ts +2 -3
  680. package/src/Ref.ts +43 -40
  681. package/src/References.ts +4 -4
  682. package/src/Request.ts +18 -18
  683. package/src/Resource.ts +2 -2
  684. package/src/Result.ts +87 -33
  685. package/src/Runtime.ts +11 -8
  686. package/src/Schedule.ts +112 -45
  687. package/src/Scheduler.ts +6 -4
  688. package/src/Schema.ts +843 -649
  689. package/src/SchemaAST.ts +148 -117
  690. package/src/SchemaGetter.ts +142 -121
  691. package/src/SchemaIssue.ts +39 -41
  692. package/src/SchemaParser.ts +173 -229
  693. package/src/SchemaRepresentation.ts +38 -28
  694. package/src/SchemaTransformation.ts +233 -207
  695. package/src/SchemaUtils.ts +2 -2
  696. package/src/Scope.ts +15 -0
  697. package/src/ScopedCache.ts +1 -1
  698. package/src/ScopedRef.ts +14 -18
  699. package/src/Semaphore.ts +9 -9
  700. package/src/Sink.ts +13 -13
  701. package/src/Stdio.ts +4 -5
  702. package/src/Stream.ts +354 -57
  703. package/src/String.ts +6 -9
  704. package/src/Struct.ts +15 -13
  705. package/src/SubscriptionRef.ts +24 -19
  706. package/src/SynchronizedRef.ts +88 -63
  707. package/src/Tracer.ts +4 -4
  708. package/src/Trie.ts +15 -0
  709. package/src/Tuple.ts +25 -19
  710. package/src/TxReentrantLock.ts +6 -3
  711. package/src/TxRef.ts +16 -16
  712. package/src/TxSubscriptionRef.ts +43 -27
  713. package/src/Types.ts +12 -39
  714. package/src/UndefinedOr.ts +15 -14
  715. package/src/Unify.ts +2 -2
  716. package/src/internal/schema/annotations.ts +4 -4
  717. package/src/internal/schema/arbitrary.ts +16 -16
  718. package/src/internal/schema/equivalence.ts +11 -11
  719. package/src/internal/schema/representation.ts +23 -23
  720. package/src/internal/schema/schema.ts +17 -17
  721. package/src/testing/TestSchema.ts +20 -20
  722. package/src/unstable/ai/AiError.ts +4 -2
  723. package/src/unstable/ai/AnthropicStructuredOutput.ts +59 -56
  724. package/src/unstable/ai/Chat.ts +4 -5
  725. package/src/unstable/ai/EmbeddingModel.ts +4 -4
  726. package/src/unstable/ai/IdGenerator.ts +2 -3
  727. package/src/unstable/ai/LanguageModel.ts +5 -4
  728. package/src/unstable/ai/McpSchema.ts +19 -17
  729. package/src/unstable/ai/McpServer.ts +14 -7
  730. package/src/unstable/ai/OpenAiStructuredOutput.ts +72 -61
  731. package/src/unstable/ai/Prompt.ts +5 -5
  732. package/src/unstable/ai/ResponseIdTracker.ts +3 -2
  733. package/src/unstable/ai/Telemetry.ts +21 -6
  734. package/src/unstable/ai/Tool.ts +11 -10
  735. package/src/unstable/ai/Toolkit.ts +2 -2
  736. package/src/unstable/cli/Command.ts +37 -16
  737. package/src/unstable/cli/Completions.ts +1 -1
  738. package/src/unstable/cli/Flag.ts +7 -6
  739. package/src/unstable/cli/GlobalFlag.ts +7 -1
  740. package/src/unstable/cli/Param.ts +23 -18
  741. package/src/unstable/cli/Primitive.ts +3 -2
  742. package/src/unstable/cluster/ClusterCron.ts +1 -2
  743. package/src/unstable/cluster/ClusterMetrics.ts +5 -0
  744. package/src/unstable/cluster/ClusterSchema.ts +3 -3
  745. package/src/unstable/cluster/ClusterWorkflowEngine.ts +15 -15
  746. package/src/unstable/cluster/EntityResource.ts +10 -0
  747. package/src/unstable/cluster/Envelope.ts +3 -3
  748. package/src/unstable/cluster/Reply.ts +14 -12
  749. package/src/unstable/cluster/RunnerHealth.ts +2 -1
  750. package/src/unstable/cluster/RunnerServer.ts +2 -2
  751. package/src/unstable/cluster/Runners.ts +3 -3
  752. package/src/unstable/cluster/ShardId.ts +3 -3
  753. package/src/unstable/cluster/Sharding.ts +3 -3
  754. package/src/unstable/cluster/ShardingConfig.ts +4 -4
  755. package/src/unstable/cluster/Snowflake.ts +3 -3
  756. package/src/unstable/cluster/internal/entityManager.ts +2 -2
  757. package/src/unstable/encoding/Msgpack.ts +6 -6
  758. package/src/unstable/encoding/Ndjson.ts +5 -0
  759. package/src/unstable/encoding/Sse.ts +2 -2
  760. package/src/unstable/eventlog/EventGroup.ts +2 -1
  761. package/src/unstable/eventlog/EventJournal.ts +10 -0
  762. package/src/unstable/eventlog/EventLog.ts +3 -3
  763. package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -3
  764. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +5 -7
  765. package/src/unstable/eventlog/EventLogSessionAuth.ts +4 -4
  766. package/src/unstable/http/Cookies.ts +4 -4
  767. package/src/unstable/http/Etag.ts +2 -3
  768. package/src/unstable/http/Headers.ts +2 -2
  769. package/src/unstable/http/HttpBody.ts +2 -2
  770. package/src/unstable/http/HttpClient.ts +2 -2
  771. package/src/unstable/http/HttpClientRequest.ts +30 -3
  772. package/src/unstable/http/HttpRouter.ts +1 -1
  773. package/src/unstable/http/HttpServerResponse.ts +25 -20
  774. package/src/unstable/http/Multipart.ts +3 -3
  775. package/src/unstable/http/UrlParams.ts +36 -6
  776. package/src/unstable/httpapi/HttpApi.ts +5 -4
  777. package/src/unstable/httpapi/HttpApiBuilder.ts +14 -13
  778. package/src/unstable/httpapi/HttpApiClient.ts +16 -16
  779. package/src/unstable/httpapi/HttpApiMiddleware.ts +3 -3
  780. package/src/unstable/httpapi/HttpApiSchema.ts +15 -15
  781. package/src/unstable/httpapi/OpenApi.ts +18 -18
  782. package/src/unstable/observability/OtlpResource.ts +5 -0
  783. package/src/unstable/observability/PrometheusMetrics.ts +4 -2
  784. package/src/unstable/reactivity/Atom.ts +3 -3
  785. package/src/unstable/rpc/RpcSchema.ts +2 -2
  786. package/src/unstable/rpc/RpcSerialization.ts +2 -2
  787. package/src/unstable/schema/Model.ts +5 -5
  788. package/src/unstable/schema/VariantSchema.ts +2 -2
  789. package/src/unstable/sql/SqlSchema.ts +4 -4
  790. package/src/unstable/workers/Transferable.ts +6 -6
  791. package/src/unstable/workflow/DurableDeferred.ts +7 -7
  792. package/src/unstable/workflow/DurableQueue.ts +1 -2
  793. package/src/unstable/workflow/Workflow.ts +159 -114
  794. package/src/unstable/workflow/WorkflowEngine.ts +16 -8
  795. package/src/unstable/workflow/WorkflowProxy.ts +9 -11
  796. package/src/unstable/workflow/WorkflowProxyServer.ts +7 -7
package/dist/Schema.d.ts CHANGED
@@ -108,10 +108,10 @@ import * as Order from "./Order.ts";
108
108
  import * as Pipeable from "./Pipeable.ts";
109
109
  import * as Redacted_ from "./Redacted.ts";
110
110
  import * as Result_ from "./Result.ts";
111
- import * as AST from "./SchemaAST.ts";
112
- import * as Getter from "./SchemaGetter.ts";
113
- import * as Issue from "./SchemaIssue.ts";
114
- import * as Parser from "./SchemaParser.ts";
111
+ import * as SchemaAST from "./SchemaAST.ts";
112
+ import * as SchemaGetter from "./SchemaGetter.ts";
113
+ import * as SchemaIssue from "./SchemaIssue.ts";
114
+ import * as SchemaParser from "./SchemaParser.ts";
115
115
  import type * as SchemaRepresentation from "./SchemaRepresentation.ts";
116
116
  import type { Assign, Lambda, Mutable, Simplify } from "./Struct.ts";
117
117
  import * as Struct_ from "./Struct.ts";
@@ -166,7 +166,7 @@ export interface MakeOptions {
166
166
  /**
167
167
  * The parse options to use for the schema.
168
168
  */
169
- readonly parseOptions?: AST.ParseOptions | undefined;
169
+ readonly parseOptions?: SchemaAST.ParseOptions | undefined;
170
170
  /**
171
171
  * Whether to disable validation for the schema.
172
172
  */
@@ -191,7 +191,7 @@ export interface MakeOptions {
191
191
  * @category models
192
192
  * @since 4.0.0
193
193
  */
194
- export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Top> = 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 {
194
+ 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<Top> = 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 {
195
195
  readonly [TypeId]: typeof TypeId;
196
196
  readonly "ast": Ast;
197
197
  readonly "Rebuild": Rebuild;
@@ -210,7 +210,7 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
210
210
  readonly "~encoded.optionality": EncodedOptionality;
211
211
  annotate(annotations: Annotations.Bottom<this["Type"], this["~type.parameters"]>): this["Rebuild"];
212
212
  annotateKey(annotations: Annotations.Key<this["Type"]>): this["Rebuild"];
213
- check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["Rebuild"];
213
+ check(...checks: readonly [SchemaAST.Check<this["Type"]>, ...Array<SchemaAST.Check<this["Type"]>>]): this["Rebuild"];
214
214
  rebuild(ast: this["ast"]): this["Rebuild"];
215
215
  /**
216
216
  * Constructs a value from the make input representation synchronously.
@@ -272,13 +272,18 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
272
272
  * @category constructors
273
273
  * @since 4.0.0
274
274
  */
275
- export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<Top>, Iso = T> extends Bottom<T, E, TypeParameters[number]["DecodingServices"], TypeParameters[number]["EncodingServices"], AST.Declaration, declareConstructor<T, E, TypeParameters, Iso>, T, Iso, TypeParameters> {
275
+ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<Top>, Iso = T> extends Bottom<T, E, TypeParameters[number]["DecodingServices"], TypeParameters[number]["EncodingServices"], SchemaAST.Declaration, declareConstructor<T, E, TypeParameters, Iso>, T, Iso, TypeParameters> {
276
276
  }
277
277
  /**
278
278
  * Creates a schema for a **parametric** type (a generic container such as
279
279
  * `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
280
280
  * and a decoder factory.
281
281
  *
282
+ * **When to use**
283
+ *
284
+ * Use when you are defining a schema for a generic container whose validation
285
+ * depends on one or more type-parameter schemas.
286
+ *
282
287
  * **Details**
283
288
  *
284
289
  * The outer call `declareConstructor<T, E, Iso>()` fixes the decoded type `T`,
@@ -308,7 +313,7 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<T
308
313
  * ([itemCodec]) =>
309
314
  * (u, ast, options) => {
310
315
  * if (!isBox(u)) {
311
- * return Effect.fail(new Issue.InvalidType(ast, Option.some(u)))
316
+ * return Effect.fail(new SchemaIssue.InvalidType(ast, Option.some(u)))
312
317
  * }
313
318
  * return Effect.map(
314
319
  * SchemaParser.decodeUnknownEffect(itemCodec)(u.value, options),
@@ -323,7 +328,7 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<T
323
328
  * @category constructors
324
329
  * @since 4.0.0
325
330
  */
326
- export declare function declareConstructor<T, E = T, Iso = T>(): <const TypeParameters extends ReadonlyArray<Top>>(typeParameters: TypeParameters, run: (typeParameters: { readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"], TypeParameters[K]["Encoded"]>; }) => (u: unknown, self: AST.Declaration, options: AST.ParseOptions) => Effect.Effect<T, Issue.Issue>, annotations?: Annotations.Declaration<T, TypeParameters>) => declareConstructor<T, E, TypeParameters, Iso>;
331
+ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypeParameters extends ReadonlyArray<Top>>(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>;
327
332
  /**
328
333
  * Type-level representation returned by {@link declare}.
329
334
  *
@@ -338,10 +343,10 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
338
343
  * function. The schema accepts any unknown value and succeeds when `is` returns
339
344
  * `true`, failing with an `InvalidType` issue otherwise.
340
345
  *
341
- * **Details**
346
+ * **When to use**
342
347
  *
343
- * Use this when the type has no type parameters. For parametric types such as
344
- * `Option<A>` or `Array<A>`, use {@link declareConstructor} instead.
348
+ * Use when you are defining a schema for an opaque type with no type parameters
349
+ * and validation can be expressed as a type guard.
345
350
  *
346
351
  * **Example** (Schema for a custom `UserId` branded type)
347
352
  *
@@ -504,7 +509,7 @@ export declare function annotateKey<S extends Top>(annotations: Annotations.Key<
504
509
  * @category models
505
510
  * @since 4.0.0
506
511
  */
507
- export interface Top extends Bottom<unknown, unknown, unknown, unknown, AST.AST, Top, unknown, unknown, any, // this is because TypeParameters is invariant
512
+ export interface Top extends Bottom<unknown, unknown, unknown, unknown, SchemaAST.AST, Top, unknown, unknown, any, // this is because TypeParameters is invariant
508
513
  unknown, Mutability, Optionality, ConstructorDefault, Mutability, Optionality> {
509
514
  }
510
515
  /**
@@ -771,7 +776,7 @@ export {
771
776
  *
772
777
  * **Details**
773
778
  *
774
- * The `issue` field contains a structured {@link Issue.Issue} tree describing
779
+ * The `issue` field contains a structured {@link SchemaIssue.Issue} tree describing
775
780
  * every validation failure, including the path to the problematic value,
776
781
  * expected types, and actual values received. `message` renders the issue tree
777
782
  * as a human-readable string.
@@ -882,9 +887,9 @@ export declare function isSchemaError(u: unknown): u is SchemaError;
882
887
  * @since 4.0.0
883
888
  */
884
889
  export declare function toStandardSchemaV1<S extends Decoder<unknown>>(self: S, options?: {
885
- readonly leafHook?: Issue.LeafHook | undefined;
886
- readonly checkHook?: Issue.CheckHook | undefined;
887
- readonly parseOptions?: AST.ParseOptions | undefined;
890
+ readonly leafHook?: SchemaIssue.LeafHook | undefined;
891
+ readonly checkHook?: SchemaIssue.CheckHook | undefined;
892
+ readonly parseOptions?: SchemaAST.ParseOptions | undefined;
888
893
  }): StandardSchemaV1<S["Encoded"], S["Type"]> & S;
889
894
  /**
890
895
  * Converts a schema to an experimental Standard JSON Schema V1 representation.
@@ -928,7 +933,7 @@ export declare function toStandardJSONSchemaV1<S extends Top>(self: S): Standard
928
933
  * @category guards
929
934
  * @since 3.10.0
930
935
  */
931
- export declare const is: typeof Parser.is;
936
+ export declare const is: typeof SchemaParser.is;
932
937
  /**
933
938
  * Creates an assertion function that throws an error if the input doesn't match
934
939
  * the schema.
@@ -936,7 +941,7 @@ export declare const is: typeof Parser.is;
936
941
  * **When to use**
937
942
  *
938
943
  * Use to validate unknown input at runtime while narrowing the value with a
939
- * TypeScript `asserts` predicate.
944
+ * TypeScript assertion signature.
940
945
  *
941
946
  * **Details**
942
947
  *
@@ -973,7 +978,8 @@ export declare const asserts: <S extends Top, I>(schema: S, input: I) => asserts
973
978
  *
974
979
  * **When to use**
975
980
  *
976
- * Use when decoding input whose type is not statically known.
981
+ * Use when you need to decode unknown input in an `Effect` whose failure
982
+ * channel is `SchemaError`.
977
983
  *
978
984
  * **Details**
979
985
  *
@@ -982,10 +988,12 @@ export declare const asserts: <S extends Top, I>(schema: S, input: I) => asserts
982
988
  * Options may be provided either when creating the decoder or when applying it;
983
989
  * application options override creation options.
984
990
  *
991
+ * @see {@link SchemaParser.decodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
992
+ *
985
993
  * @category decoding
986
994
  * @since 4.0.0
987
995
  */
988
- export declare function decodeUnknownEffect<S extends Top>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
996
+ export declare function decodeUnknownEffect<S extends Top>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
989
997
  /**
990
998
  * Decodes a typed input (the schema's `Encoded` type) against a schema,
991
999
  * returning an `Effect` that succeeds with the decoded value or fails with a
@@ -993,7 +1001,8 @@ export declare function decodeUnknownEffect<S extends Top>(schema: S, options?:
993
1001
  *
994
1002
  * **When to use**
995
1003
  *
996
- * Use when the input is already typed as the schema's `Encoded` type.
1004
+ * Use when you need to decode input already typed as the schema's `Encoded`
1005
+ * type in an `Effect` whose failure channel is `SchemaError`.
997
1006
  *
998
1007
  * **Details**
999
1008
  *
@@ -1001,10 +1010,12 @@ export declare function decodeUnknownEffect<S extends Top>(schema: S, options?:
1001
1010
  * Options may be provided either when creating the decoder or when applying it;
1002
1011
  * application options override creation options.
1003
1012
  *
1013
+ * @see {@link SchemaParser.decodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
1014
+ *
1004
1015
  * @category decoding
1005
1016
  * @since 4.0.0
1006
1017
  */
1007
- export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
1018
+ export declare const decodeEffect: <S extends Top>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
1008
1019
  /**
1009
1020
  * Decodes an `unknown` input against a schema synchronously, returning an
1010
1021
  * `Exit` that is either a `Success` with the decoded value or a `Failure` with
@@ -1012,8 +1023,8 @@ export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.Pars
1012
1023
  *
1013
1024
  * **When to use**
1014
1025
  *
1015
- * Use when the input type is not statically known and decoding should return an
1016
- * `Exit` instead of failing or throwing.
1026
+ * Use when you need to decode unknown input into an `Exit` whose failure
1027
+ * contains `SchemaError`.
1017
1028
  *
1018
1029
  * **Details**
1019
1030
  *
@@ -1023,10 +1034,12 @@ export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.Pars
1023
1034
  * Options may be provided either when creating the decoder or when applying it;
1024
1035
  * application options override creation options.
1025
1036
  *
1037
+ * @see {@link SchemaParser.decodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
1038
+ *
1026
1039
  * @category decoding
1027
1040
  * @since 4.0.0
1028
1041
  */
1029
- export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
1042
+ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
1030
1043
  /**
1031
1044
  * Decodes a typed input (the schema's `Encoded` type) against a schema
1032
1045
  * synchronously, returning an `Exit` that is either a `Success` with the
@@ -1034,8 +1047,8 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
1034
1047
  *
1035
1048
  * **When to use**
1036
1049
  *
1037
- * Use when typed input should be decoded into an `Exit` instead of failing or
1038
- * throwing.
1050
+ * Use when you need to decode already typed `Encoded` input into an `Exit`
1051
+ * whose failure contains `SchemaError`.
1039
1052
  *
1040
1053
  * **Details**
1041
1054
  *
@@ -1044,30 +1057,33 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
1044
1057
  * Options may be provided either when creating the decoder or when applying it;
1045
1058
  * application options override creation options.
1046
1059
  *
1060
+ * @see {@link SchemaParser.decodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
1061
+ *
1047
1062
  * @category decoding
1048
1063
  * @since 4.0.0
1049
1064
  */
1050
- export declare const decodeExit: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
1065
+ export declare const decodeExit: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
1051
1066
  /**
1052
1067
  * Decodes an `unknown` input against a schema, returning an `Option` that is
1053
1068
  * `Some` with the decoded value on success or `None` on failure.
1054
1069
  *
1055
1070
  * **When to use**
1056
1071
  *
1057
- * Use when the input type is not statically known and you only need to know
1072
+ * Use when you do not know the input type statically and only need to know
1058
1073
  * whether decoding succeeded.
1059
1074
  *
1060
1075
  * **Details**
1061
1076
  *
1062
1077
  * Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect}
1063
- * when you don't need error details. For typed input use {@link decodeOption}.
1078
+ * when you don't need error details. For input already typed as the schema's
1079
+ * `Encoded` type use {@link decodeOption}.
1064
1080
  * Options may be provided either when creating the decoder or when applying it;
1065
1081
  * application options override creation options.
1066
1082
  *
1067
1083
  * @category decoding
1068
1084
  * @since 3.10.0
1069
1085
  */
1070
- export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
1086
+ export declare const decodeUnknownOption: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option<S["Type"]>;
1071
1087
  /**
1072
1088
  * Decodes a typed input (the schema's `Encoded` type) against a schema,
1073
1089
  * returning an `Option` that is `Some` with the decoded value on success or
@@ -1075,7 +1091,8 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
1075
1091
  *
1076
1092
  * **When to use**
1077
1093
  *
1078
- * Use when typed input should be decoded and only success or failure matters.
1094
+ * Use when you already have input typed as the schema's `Encoded` type and
1095
+ * only need to know whether decoding succeeded.
1079
1096
  *
1080
1097
  * **Details**
1081
1098
  *
@@ -1086,35 +1103,38 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
1086
1103
  * @category decoding
1087
1104
  * @since 3.10.0
1088
1105
  */
1089
- export declare const decodeOption: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option<S["Type"]>;
1106
+ export declare const decodeOption: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Option_.Option<S["Type"]>;
1090
1107
  /**
1091
1108
  * Decodes an `unknown` input against a schema, returning a `Result` that
1092
- * succeeds with the decoded value or fails with a schema issue.
1109
+ * succeeds with the decoded value or fails with a {@link SchemaError}.
1093
1110
  *
1094
1111
  * **When to use**
1095
1112
  *
1096
- * Use when the input type is not statically known and decoding should return a
1097
- * `Result` with structured issue data.
1113
+ * Use when you do not know the input type statically and want decoding to
1114
+ * return a `Result` with `SchemaError` failure data.
1098
1115
  *
1099
1116
  * **Details**
1100
1117
  *
1101
- * For typed input use {@link decodeResult}.
1118
+ * For input already typed as the schema's `Encoded` type use
1119
+ * {@link decodeResult}.
1102
1120
  * Options may be provided either when creating the decoder or when applying it;
1103
1121
  * application options override creation options.
1104
1122
  *
1123
+ * @see {@link SchemaParser.decodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
1124
+ *
1105
1125
  * @category decoding
1106
1126
  * @since 4.0.0
1107
1127
  */
1108
- export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
1128
+ export declare function decodeUnknownResult<S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result<S["Type"], SchemaError>;
1109
1129
  /**
1110
1130
  * Decodes a typed input (the schema's `Encoded` type) against a schema,
1111
1131
  * returning a `Result` that succeeds with the decoded value or fails with a
1112
- * schema issue.
1132
+ * {@link SchemaError}.
1113
1133
  *
1114
1134
  * **When to use**
1115
1135
  *
1116
- * Use when typed input should be decoded into a `Result` with structured issue
1117
- * data.
1136
+ * Use when you already have input typed as the schema's `Encoded` type and
1137
+ * want decoding to return a `Result` with `SchemaError` failure data.
1118
1138
  *
1119
1139
  * **Details**
1120
1140
  *
@@ -1122,36 +1142,44 @@ export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
1122
1142
  * Options may be provided either when creating the decoder or when applying it;
1123
1143
  * application options override creation options.
1124
1144
  *
1145
+ * @see {@link SchemaParser.decodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
1146
+ *
1125
1147
  * @category decoding
1126
1148
  * @since 4.0.0
1127
1149
  */
1128
- export declare const decodeResult: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result<S["Type"], Issue.Issue>;
1150
+ export declare const decodeResult: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Result_.Result<S["Type"], SchemaError>;
1129
1151
  /**
1130
1152
  * Decodes an `unknown` input against a schema, returning a `Promise` that
1131
- * resolves with the decoded value or rejects with a schema issue.
1153
+ * resolves with the decoded value or rejects with a {@link SchemaError}.
1132
1154
  *
1133
1155
  * **When to use**
1134
1156
  *
1135
- * Use when integrating unknown input validation with Promise-based APIs.
1157
+ * Use when you need decoding of unknown input to return a JavaScript `Promise`
1158
+ * that rejects with `SchemaError`.
1136
1159
  *
1137
1160
  * **Details**
1138
1161
  *
1139
- * For typed input use {@link decodePromise}.
1162
+ * For input already typed as the schema's `Encoded` type use
1163
+ * {@link decodePromise}.
1140
1164
  * Options may be provided either when creating the decoder or when applying it;
1141
1165
  * application options override creation options.
1142
1166
  *
1167
+ * @see {@link SchemaParser.decodeUnknownPromise} for the adapter that rejects with `SchemaIssue.Issue` directly
1168
+ *
1143
1169
  * @category decoding
1144
1170
  * @since 3.10.0
1145
1171
  */
1146
- export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
1172
+ export declare function decodeUnknownPromise<S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise<S["Type"]>;
1147
1173
  /**
1148
1174
  * Decodes a typed input (the schema's `Encoded` type) against a schema,
1149
1175
  * returning a `Promise` that resolves with the decoded value or rejects with a
1150
- * schema issue.
1176
+ * {@link SchemaError}.
1151
1177
  *
1152
1178
  * **When to use**
1153
1179
  *
1154
- * Use when integrating typed input decoding with Promise-based APIs.
1180
+ * Use when you already have input typed as the schema's `Encoded` type and
1181
+ * need decoding to return a JavaScript `Promise` that rejects with
1182
+ * `SchemaError`.
1155
1183
  *
1156
1184
  * **Details**
1157
1185
  *
@@ -1159,22 +1187,24 @@ export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
1159
1187
  * Options may be provided either when creating the decoder or when applying it;
1160
1188
  * application options override creation options.
1161
1189
  *
1190
+ * @see {@link SchemaParser.decodePromise} for the adapter that rejects with `SchemaIssue.Issue` directly
1191
+ *
1162
1192
  * @category decoding
1163
1193
  * @since 3.10.0
1164
1194
  */
1165
- export declare const decodePromise: typeof Parser.decodePromise;
1195
+ export declare const decodePromise: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Promise<S["Type"]>;
1166
1196
  /**
1167
1197
  * Decodes an `unknown` input against a schema synchronously, returning the
1168
- * decoded value or throwing an `Error` whose cause contains the schema issue.
1198
+ * decoded value or throwing a {@link SchemaError}.
1169
1199
  *
1170
1200
  * **When to use**
1171
1201
  *
1172
- * Use when validating unknown data at a boundary and treating schema mismatches
1173
- * as exceptions.
1202
+ * Use when you need to validate unknown data at a synchronous boundary and want
1203
+ * schema mismatches to throw `SchemaError`.
1174
1204
  *
1175
1205
  * **Details**
1176
1206
  *
1177
- * For typed input use `decodeSync`.
1207
+ * For input already typed as the schema's `Encoded` type use `decodeSync`.
1178
1208
  * Only service-free schemas can be decoded synchronously. For non-throwing
1179
1209
  * alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
1180
1210
  * `decodeUnknownEffect`. Options may be provided either when creating the
@@ -1197,19 +1227,20 @@ export declare const decodePromise: typeof Parser.decodePromise;
1197
1227
  * // └─ Expected a numeric string, actual "not a number"
1198
1228
  * ```
1199
1229
  *
1230
+ * @see {@link SchemaParser.decodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
1231
+ *
1200
1232
  * @category decoding
1201
1233
  * @since 4.0.0
1202
1234
  */
1203
- export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
1235
+ export declare function decodeUnknownSync<S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Type"];
1204
1236
  /**
1205
1237
  * Decodes a typed input (the schema's `Encoded` type) against a schema
1206
- * synchronously, returning the decoded value or throwing an `Error` whose cause
1207
- * contains the schema issue.
1238
+ * synchronously, returning the decoded value or throwing a {@link SchemaError}.
1208
1239
  *
1209
1240
  * **When to use**
1210
1241
  *
1211
- * Use when typed input should be decoded synchronously and schema mismatches
1212
- * should throw.
1242
+ * Use when you already have input typed as the schema's `Encoded` type and
1243
+ * want schema mismatches to throw `SchemaError` synchronously.
1213
1244
  *
1214
1245
  * **Details**
1215
1246
  *
@@ -1218,21 +1249,24 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
1218
1249
  * provided either when creating the decoder or when applying it; application
1219
1250
  * options override creation options.
1220
1251
  *
1252
+ * @see {@link SchemaParser.decodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
1253
+ *
1221
1254
  * @category decoding
1222
1255
  * @since 4.0.0
1223
1256
  */
1224
- export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"];
1257
+ export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => S["Type"];
1225
1258
  /**
1226
1259
  * Encodes an `unknown` input against a schema, returning an `Effect` that
1227
1260
  * succeeds with the encoded value or fails with a {@link SchemaError}.
1228
1261
  *
1229
1262
  * **When to use**
1230
1263
  *
1231
- * Use when encoding input whose type is not statically known.
1264
+ * Use when you need to encode unknown input in an `Effect` whose failure
1265
+ * channel is `SchemaError`.
1232
1266
  *
1233
1267
  * **Details**
1234
1268
  *
1235
- * Prefer {@link encodeEffect} when the input is already typed as the schema's
1269
+ * Prefer {@link encodeEffect} when the value is already typed as the schema's
1236
1270
  * `Type`.
1237
1271
  * Options may be provided either when creating the encoder or when applying it;
1238
1272
  * application options override creation options.
@@ -1248,10 +1282,12 @@ export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options
1248
1282
  * // Output: "42"
1249
1283
  * ```
1250
1284
  *
1285
+ * @see {@link SchemaParser.encodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
1286
+ *
1251
1287
  * @category encoding
1252
1288
  * @since 4.0.0
1253
1289
  */
1254
- export declare function encodeUnknownEffect<S extends Top>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
1290
+ export declare function encodeUnknownEffect<S extends Top>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
1255
1291
  /**
1256
1292
  * Encodes a typed input (the schema's `Type`) against a schema, returning an
1257
1293
  * `Effect` that succeeds with the encoded value or fails with a
@@ -1259,7 +1295,8 @@ export declare function encodeUnknownEffect<S extends Top>(schema: S, options?:
1259
1295
  *
1260
1296
  * **When to use**
1261
1297
  *
1262
- * Use when the input is already typed as the schema's `Type`.
1298
+ * Use when you need to encode input already typed as the schema's `Type` in
1299
+ * an `Effect` whose failure channel is `SchemaError`.
1263
1300
  *
1264
1301
  * **Details**
1265
1302
  *
@@ -1267,10 +1304,12 @@ export declare function encodeUnknownEffect<S extends Top>(schema: S, options?:
1267
1304
  * Options may be provided either when creating the encoder or when applying it;
1268
1305
  * application options override creation options.
1269
1306
  *
1307
+ * @see {@link SchemaParser.encodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
1308
+ *
1270
1309
  * @category encoding
1271
1310
  * @since 4.0.0
1272
1311
  */
1273
- export declare const encodeEffect: <S extends Top>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
1312
+ export declare const encodeEffect: <S extends Top>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
1274
1313
  /**
1275
1314
  * Encodes an `unknown` input against a schema synchronously, returning an
1276
1315
  * `Exit` that is either a `Success` with the encoded value or a `Failure` with
@@ -1278,20 +1317,22 @@ export declare const encodeEffect: <S extends Top>(schema: S, options?: AST.Pars
1278
1317
  *
1279
1318
  * **When to use**
1280
1319
  *
1281
- * Use when the input type is not statically known and encoding should return an
1282
- * `Exit` instead of failing or throwing.
1320
+ * Use when you need to encode unknown input into an `Exit` whose failure
1321
+ * contains `SchemaError`.
1283
1322
  *
1284
1323
  * **Details**
1285
1324
  *
1286
1325
  * Only usable with schemas that have no `EncodingServices` requirement. Prefer
1287
- * {@link encodeExit} when the input is already typed as the schema's `Type`.
1326
+ * {@link encodeExit} when the value is already typed as the schema's `Type`.
1288
1327
  * Options may be provided either when creating the encoder or when applying it;
1289
1328
  * application options override creation options.
1290
1329
  *
1330
+ * @see {@link SchemaParser.encodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
1331
+ *
1291
1332
  * @category encoding
1292
1333
  * @since 4.0.0
1293
1334
  */
1294
- export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
1335
+ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
1295
1336
  /**
1296
1337
  * Encodes a typed input (the schema's `Type`) against a schema synchronously,
1297
1338
  * returning an `Exit` that is either a `Success` with the encoded value or a
@@ -1299,8 +1340,8 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
1299
1340
  *
1300
1341
  * **When to use**
1301
1342
  *
1302
- * Use when typed input should be encoded into an `Exit` instead of failing or
1303
- * throwing.
1343
+ * Use when you need to encode already typed schema values into an `Exit` whose
1344
+ * failure contains `SchemaError`.
1304
1345
  *
1305
1346
  * **Details**
1306
1347
  *
@@ -1309,30 +1350,33 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
1309
1350
  * Options may be provided either when creating the encoder or when applying it;
1310
1351
  * application options override creation options.
1311
1352
  *
1353
+ * @see {@link SchemaParser.encodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
1354
+ *
1312
1355
  * @category encoding
1313
1356
  * @since 4.0.0
1314
1357
  */
1315
- export declare const encodeExit: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
1358
+ export declare const encodeExit: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
1316
1359
  /**
1317
1360
  * Encodes an `unknown` input against a schema, returning an `Option` that is
1318
1361
  * `Some` with the encoded value on success or `None` on failure.
1319
1362
  *
1320
1363
  * **When to use**
1321
1364
  *
1322
- * Use when the input type is not statically known and you only need to know
1365
+ * Use when you do not know the input type statically and only need to know
1323
1366
  * whether encoding succeeded.
1324
1367
  *
1325
1368
  * **Details**
1326
1369
  *
1327
1370
  * Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect}
1328
- * when you don't need error details. For typed input use {@link encodeOption}.
1371
+ * when you don't need error details. For values already typed as the schema's
1372
+ * `Type` use {@link encodeOption}.
1329
1373
  * Options may be provided either when creating the encoder or when applying it;
1330
1374
  * application options override creation options.
1331
1375
  *
1332
1376
  * @category encoding
1333
1377
  * @since 3.10.0
1334
1378
  */
1335
- export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
1379
+ export declare const encodeUnknownOption: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option<S["Encoded"]>;
1336
1380
  /**
1337
1381
  * Encodes a typed input (the schema's `Type`) against a schema, returning an
1338
1382
  * `Option` that is `Some` with the encoded value on success or `None` on
@@ -1340,7 +1384,8 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
1340
1384
  *
1341
1385
  * **When to use**
1342
1386
  *
1343
- * Use when typed input should be encoded and only success or failure matters.
1387
+ * Use when you already have a value typed as the schema's `Type` and only need
1388
+ * to know whether encoding succeeded.
1344
1389
  *
1345
1390
  * **Details**
1346
1391
  *
@@ -1351,34 +1396,37 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
1351
1396
  * @category encoding
1352
1397
  * @since 3.10.0
1353
1398
  */
1354
- export declare const encodeOption: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option<S["Encoded"]>;
1399
+ export declare const encodeOption: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Option_.Option<S["Encoded"]>;
1355
1400
  /**
1356
1401
  * Encodes an `unknown` input against a schema, returning a `Result` that
1357
- * succeeds with the encoded value or fails with a schema issue.
1402
+ * succeeds with the encoded value or fails with a {@link SchemaError}.
1358
1403
  *
1359
1404
  * **When to use**
1360
1405
  *
1361
- * Use when the input type is not statically known and encoding should return a
1362
- * `Result` with structured issue data.
1406
+ * Use when you do not know the input type statically and want encoding to
1407
+ * return a `Result` with `SchemaError` failure data.
1363
1408
  *
1364
1409
  * **Details**
1365
1410
  *
1366
- * For typed input use {@link encodeResult}.
1411
+ * For values already typed as the schema's `Type` use {@link encodeResult}.
1367
1412
  * Options may be provided either when creating the encoder or when applying it;
1368
1413
  * application options override creation options.
1369
1414
  *
1415
+ * @see {@link SchemaParser.encodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
1416
+ *
1370
1417
  * @category encoding
1371
1418
  * @since 4.0.0
1372
1419
  */
1373
- export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
1420
+ export declare function encodeUnknownResult<S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result<S["Encoded"], SchemaError>;
1374
1421
  /**
1375
1422
  * Encodes a typed input (the schema's `Type`) against a schema, returning a
1376
- * `Result` that succeeds with the encoded value or fails with a schema issue.
1423
+ * `Result` that succeeds with the encoded value or fails with a
1424
+ * {@link SchemaError}.
1377
1425
  *
1378
1426
  * **When to use**
1379
1427
  *
1380
- * Use when typed input should be encoded into a `Result` with structured issue
1381
- * data.
1428
+ * Use when you already have a value typed as the schema's `Type` and want
1429
+ * encoding to return a `Result` with `SchemaError` failure data.
1382
1430
  *
1383
1431
  * **Details**
1384
1432
  *
@@ -1386,28 +1434,33 @@ export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
1386
1434
  * Options may be provided either when creating the encoder or when applying it;
1387
1435
  * application options override creation options.
1388
1436
  *
1437
+ * @see {@link SchemaParser.encodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
1438
+ *
1389
1439
  * @category encoding
1390
1440
  * @since 4.0.0
1391
1441
  */
1392
- export declare const encodeResult: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result<S["Encoded"], Issue.Issue>;
1442
+ export declare const encodeResult: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Result_.Result<S["Encoded"], SchemaError>;
1393
1443
  /**
1394
1444
  * Encodes an `unknown` input against a schema, returning a `Promise` that
1395
- * resolves with the encoded value or rejects with a schema issue.
1445
+ * resolves with the encoded value or rejects with a {@link SchemaError}.
1396
1446
  *
1397
1447
  * **When to use**
1398
1448
  *
1399
- * Use when integrating unknown input serialization with Promise-based APIs.
1449
+ * Use when you need encoding of unknown input to return a JavaScript `Promise`
1450
+ * that rejects with `SchemaError`.
1400
1451
  *
1401
1452
  * **Details**
1402
1453
  *
1403
- * For typed input use {@link encodePromise}.
1454
+ * For values already typed as the schema's `Type` use {@link encodePromise}.
1404
1455
  * Options may be provided either when creating the encoder or when applying it;
1405
1456
  * application options override creation options.
1406
1457
  *
1458
+ * @see {@link SchemaParser.encodeUnknownPromise} for the adapter that rejects with `SchemaIssue.Issue` directly
1459
+ *
1407
1460
  * @category encoding
1408
1461
  * @since 3.10.0
1409
1462
  */
1410
- export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: unknown, options?: AST.ParseOptions) => Promise<S["Encoded"]>;
1463
+ export declare function encodeUnknownPromise<S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise<S["Encoded"]>;
1411
1464
  /**
1412
1465
  * Encodes a typed input (the schema's `Type`) against a schema, returning a
1413
1466
  * `Promise` that resolves with the encoded value or rejects with a
@@ -1415,7 +1468,8 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
1415
1468
  *
1416
1469
  * **When to use**
1417
1470
  *
1418
- * Use when integrating typed input serialization with Promise-based APIs.
1471
+ * Use when you already have a value typed as the schema's `Type` and need
1472
+ * encoding to return a JavaScript `Promise` that rejects with `SchemaError`.
1419
1473
  *
1420
1474
  * **Details**
1421
1475
  *
@@ -1423,39 +1477,43 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
1423
1477
  * Options may be provided either when creating the encoder or when applying it;
1424
1478
  * application options override creation options.
1425
1479
  *
1480
+ * @see {@link SchemaParser.encodePromise} for the adapter that rejects with `SchemaIssue.Issue` directly
1481
+ *
1426
1482
  * @category encoding
1427
1483
  * @since 3.10.0
1428
1484
  */
1429
- export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Promise<S["Encoded"]>;
1485
+ export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Promise<S["Encoded"]>;
1430
1486
  /**
1431
1487
  * Encodes an `unknown` input against a schema synchronously, throwing a
1432
1488
  * {@link SchemaError} on failure.
1433
1489
  *
1434
1490
  * **When to use**
1435
1491
  *
1436
- * Use when serializing unknown data at a boundary and treating schema
1437
- * mismatches as unrecoverable errors.
1492
+ * Use when you need to serialize unknown data at a synchronous boundary and
1493
+ * want schema mismatches to throw `SchemaError`.
1438
1494
  *
1439
1495
  * **Details**
1440
1496
  *
1441
1497
  * For non-throwing alternatives see {@link encodeUnknownOption},
1442
- * {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
1443
- * use {@link encodeSync}.
1498
+ * {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For values
1499
+ * already typed as the schema's `Type` use {@link encodeSync}.
1444
1500
  * Options may be provided either when creating the encoder or when applying it;
1445
1501
  * application options override creation options.
1446
1502
  *
1503
+ * @see {@link SchemaParser.encodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
1504
+ *
1447
1505
  * @category encoding
1448
1506
  * @since 4.0.0
1449
1507
  */
1450
- export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync;
1508
+ export declare function encodeUnknownSync<S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Encoded"];
1451
1509
  /**
1452
1510
  * Encodes a typed input (the schema's `Type`) against a schema synchronously,
1453
1511
  * throwing a {@link SchemaError} on failure.
1454
1512
  *
1455
1513
  * **When to use**
1456
1514
  *
1457
- * Use when typed input should be encoded synchronously and schema mismatches
1458
- * should throw.
1515
+ * Use when you already have a value typed as the schema's `Type` and want
1516
+ * schema mismatches to throw `SchemaError` synchronously.
1459
1517
  *
1460
1518
  * **Details**
1461
1519
  *
@@ -1463,10 +1521,12 @@ export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync;
1463
1521
  * Options may be provided either when creating the encoder or when applying it;
1464
1522
  * application options override creation options.
1465
1523
  *
1524
+ * @see {@link SchemaParser.encodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
1525
+ *
1466
1526
  * @category encoding
1467
1527
  * @since 4.0.0
1468
1528
  */
1469
- export declare const encodeSync: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => S["Encoded"];
1529
+ export declare const encodeSync: <S extends Encoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => S["Encoded"];
1470
1530
  /**
1471
1531
  * Creates a schema from an AST (Abstract Syntax Tree) node.
1472
1532
  *
@@ -1694,7 +1754,7 @@ export declare const toType: toTypeLambda;
1694
1754
  * @category transforming
1695
1755
  * @since 4.0.0
1696
1756
  */
1697
- export interface toEncoded<S extends Top> extends Bottom<S["Encoded"], S["Encoded"], never, never, AST.AST, toEncoded<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1757
+ export interface toEncoded<S extends Top> extends Bottom<S["Encoded"], S["Encoded"], never, never, SchemaAST.AST, toEncoded<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
1698
1758
  }
1699
1759
  interface toEncodedLambda extends Lambda {
1700
1760
  <S extends Top>(self: S): toEncoded<S>;
@@ -1715,7 +1775,7 @@ declare const FlipTypeId = "~effect/Schema/flip";
1715
1775
  * @category transforming
1716
1776
  * @since 4.0.0
1717
1777
  */
1718
- export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["EncodingServices"], S["DecodingServices"], AST.AST, flip<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> {
1778
+ export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["EncodingServices"], S["DecodingServices"], SchemaAST.AST, flip<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> {
1719
1779
  readonly [FlipTypeId]: typeof FlipTypeId;
1720
1780
  readonly schema: S;
1721
1781
  }
@@ -1750,9 +1810,9 @@ export declare function flip<S extends Top>(schema: S): S extends flip<infer F>
1750
1810
  * @category models
1751
1811
  * @since 3.10.0
1752
1812
  */
1753
- export interface Literal<L extends AST.LiteralValue> extends Bottom<L, L, never, never, AST.Literal, Literal<L>> {
1813
+ export interface Literal<L extends SchemaAST.LiteralValue> extends Bottom<L, L, never, never, SchemaAST.Literal, Literal<L>> {
1754
1814
  readonly literal: L;
1755
- transform<L2 extends AST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>>;
1815
+ transform<L2 extends SchemaAST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>>;
1756
1816
  }
1757
1817
  /**
1758
1818
  * Creates a schema for a single literal value (string, number, bigint, boolean, or null).
@@ -1772,7 +1832,7 @@ export interface Literal<L extends AST.LiteralValue> extends Bottom<L, L, never,
1772
1832
  * @category constructors
1773
1833
  * @since 3.10.0
1774
1834
  */
1775
- export declare function Literal<L extends AST.LiteralValue>(literal: L): Literal<L>;
1835
+ export declare function Literal<L extends SchemaAST.LiteralValue>(literal: L): Literal<L>;
1776
1836
  /**
1777
1837
  * Namespace for {@link TemplateLiteral} helper types.
1778
1838
  *
@@ -1831,13 +1891,18 @@ export declare namespace TemplateLiteral {
1831
1891
  * @category models
1832
1892
  * @since 3.10.0
1833
1893
  */
1834
- export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteral.Encoded<Parts>, TemplateLiteral.Encoded<Parts>, never, never, AST.TemplateLiteral, TemplateLiteral<Parts>> {
1894
+ export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteral.Encoded<Parts>, TemplateLiteral.Encoded<Parts>, never, never, SchemaAST.TemplateLiteral, TemplateLiteral<Parts>> {
1835
1895
  readonly parts: Parts;
1836
1896
  }
1837
1897
  /**
1838
1898
  * Creates a schema that validates strings matching a template literal pattern. Each part can be
1839
1899
  * a literal string/number/bigint or a schema whose encoded type is a string, number, or bigint.
1840
1900
  *
1901
+ * **When to use**
1902
+ *
1903
+ * Use when the decoded value should remain the matched string and you do not
1904
+ * need the individual template parts parsed into a tuple.
1905
+ *
1841
1906
  * **Example** (URL path pattern)
1842
1907
  *
1843
1908
  * ```ts
@@ -1880,7 +1945,7 @@ export declare namespace TemplateLiteralParser {
1880
1945
  * @category models
1881
1946
  * @since 3.10.0
1882
1947
  */
1883
- export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteralParser.Type<Parts>, TemplateLiteral.Encoded<Parts>, never, never, AST.Arrays, TemplateLiteralParser<Parts>> {
1948
+ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteralParser.Type<Parts>, TemplateLiteral.Encoded<Parts>, never, never, SchemaAST.Arrays, TemplateLiteralParser<Parts>> {
1884
1949
  readonly parts: Parts;
1885
1950
  }
1886
1951
  /**
@@ -1918,7 +1983,7 @@ export declare function TemplateLiteralParser<const Parts extends TemplateLitera
1918
1983
  */
1919
1984
  export interface Enum<A extends {
1920
1985
  [x: string]: string | number;
1921
- }> extends Bottom<A[keyof A], A[keyof A], never, never, AST.Enum, Enum<A>> {
1986
+ }> extends Bottom<A[keyof A], A[keyof A], never, never, SchemaAST.Enum, Enum<A>> {
1922
1987
  readonly enums: A;
1923
1988
  }
1924
1989
  /**
@@ -1950,7 +2015,7 @@ export declare function Enum<A extends {
1950
2015
  * @category models
1951
2016
  * @since 3.10.0
1952
2017
  */
1953
- export interface Never extends Bottom<never, never, never, never, AST.Never, Never> {
2018
+ export interface Never extends Bottom<never, never, never, never, SchemaAST.Never, Never> {
1954
2019
  }
1955
2020
  /**
1956
2021
  * Schema for the `never` type. Always fails validation — no value satisfies it.
@@ -1965,7 +2030,7 @@ export declare const Never: Never;
1965
2030
  * @category models
1966
2031
  * @since 3.10.0
1967
2032
  */
1968
- export interface Any extends Bottom<any, any, never, never, AST.Any, Any> {
2033
+ export interface Any extends Bottom<any, any, never, never, SchemaAST.Any, Any> {
1969
2034
  }
1970
2035
  /**
1971
2036
  * Schema for the `any` type. Accepts any value without validation.
@@ -1981,11 +2046,16 @@ export declare const Any: Any;
1981
2046
  * @category models
1982
2047
  * @since 3.10.0
1983
2048
  */
1984
- export interface Unknown extends Bottom<unknown, unknown, never, never, AST.Unknown, Unknown> {
2049
+ export interface Unknown extends Bottom<unknown, unknown, never, never, SchemaAST.Unknown, Unknown> {
1985
2050
  }
1986
2051
  /**
1987
2052
  * Schema for the `unknown` type. Accepts any value without validation.
1988
2053
  *
2054
+ * **When to use**
2055
+ *
2056
+ * Use as a top schema when you need to accept any input while preserving
2057
+ * TypeScript's `unknown` safety at use sites.
2058
+ *
1989
2059
  * @see {@link Any} for the `any` variant.
1990
2060
  * @category schemas
1991
2061
  * @since 3.10.0
@@ -1997,7 +2067,7 @@ export declare const Unknown: Unknown;
1997
2067
  * @category models
1998
2068
  * @since 3.10.0
1999
2069
  */
2000
- export interface Null extends Bottom<null, null, never, never, AST.Null, Null> {
2070
+ export interface Null extends Bottom<null, null, never, never, SchemaAST.Null, Null> {
2001
2071
  }
2002
2072
  /**
2003
2073
  * Schema for the `null` literal. Validates that the input is strictly `null`.
@@ -2013,7 +2083,7 @@ export declare const Null: Null;
2013
2083
  * @category models
2014
2084
  * @since 3.10.0
2015
2085
  */
2016
- export interface Undefined extends Bottom<undefined, undefined, never, never, AST.Undefined, Undefined> {
2086
+ export interface Undefined extends Bottom<undefined, undefined, never, never, SchemaAST.Undefined, Undefined> {
2017
2087
  }
2018
2088
  /**
2019
2089
  * Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
@@ -2029,7 +2099,7 @@ export declare const Undefined: Undefined;
2029
2099
  * @category models
2030
2100
  * @since 4.0.0
2031
2101
  */
2032
- export interface String extends Bottom<string, string, never, never, AST.String, String> {
2102
+ export interface String extends Bottom<string, string, never, never, SchemaAST.String, String> {
2033
2103
  }
2034
2104
  /**
2035
2105
  * Schema for `string` values. Validates that the input is `typeof` `"string"`.
@@ -2044,7 +2114,7 @@ export declare const String: String;
2044
2114
  * @category models
2045
2115
  * @since 4.0.0
2046
2116
  */
2047
- export interface Number extends Bottom<number, number, never, never, AST.Number, Number> {
2117
+ export interface Number extends Bottom<number, number, never, never, SchemaAST.Number, Number> {
2048
2118
  }
2049
2119
  /**
2050
2120
  * Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
@@ -2067,7 +2137,7 @@ export declare const Number: Number;
2067
2137
  * @category models
2068
2138
  * @since 4.0.0
2069
2139
  */
2070
- export interface Boolean extends Bottom<boolean, boolean, never, never, AST.Boolean, Boolean> {
2140
+ export interface Boolean extends Bottom<boolean, boolean, never, never, SchemaAST.Boolean, Boolean> {
2071
2141
  }
2072
2142
  /**
2073
2143
  * Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
@@ -2088,7 +2158,7 @@ export declare const Boolean: Boolean;
2088
2158
  * @category models
2089
2159
  * @since 4.0.0
2090
2160
  */
2091
- export interface Symbol extends Bottom<symbol, symbol, never, never, AST.Symbol, Symbol> {
2161
+ export interface Symbol extends Bottom<symbol, symbol, never, never, SchemaAST.Symbol, Symbol> {
2092
2162
  }
2093
2163
  /**
2094
2164
  * Schema for `symbol` values. Validates that the input is `typeof` `"symbol"`.
@@ -2104,7 +2174,7 @@ export declare const Symbol: Symbol;
2104
2174
  * @category models
2105
2175
  * @since 4.0.0
2106
2176
  */
2107
- export interface BigInt extends Bottom<bigint, bigint, never, never, AST.BigInt, BigInt> {
2177
+ export interface BigInt extends Bottom<bigint, bigint, never, never, SchemaAST.BigInt, BigInt> {
2108
2178
  }
2109
2179
  /**
2110
2180
  * Schema for `bigint` values. Validates that the input is `typeof` `"bigint"`.
@@ -2126,7 +2196,7 @@ export declare const BigInt: BigInt;
2126
2196
  * @category models
2127
2197
  * @since 3.10.0
2128
2198
  */
2129
- export interface Void extends Bottom<void, void, never, never, AST.Void, Void> {
2199
+ export interface Void extends Bottom<void, void, never, never, SchemaAST.Void, Void> {
2130
2200
  }
2131
2201
  /**
2132
2202
  * Schema for the `void` type. Accepts `undefined` as the encoded value.
@@ -2141,7 +2211,7 @@ export declare const Void: Void;
2141
2211
  * @category models
2142
2212
  * @since 4.0.0
2143
2213
  */
2144
- export interface ObjectKeyword extends Bottom<object, object, never, never, AST.ObjectKeyword, ObjectKeyword> {
2214
+ export interface ObjectKeyword extends Bottom<object, object, never, never, SchemaAST.ObjectKeyword, ObjectKeyword> {
2145
2215
  }
2146
2216
  /**
2147
2217
  * Schema for the `object` type. Validates that the input is a non-null object or function
@@ -2157,7 +2227,7 @@ export declare const ObjectKeyword: ObjectKeyword;
2157
2227
  * @category models
2158
2228
  * @since 4.0.0
2159
2229
  */
2160
- export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never, never, AST.UniqueSymbol, UniqueSymbol<sym>> {
2230
+ export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never, never, SchemaAST.UniqueSymbol, UniqueSymbol<sym>> {
2161
2231
  }
2162
2232
  /**
2163
2233
  * Creates a schema for a specific symbol. Only that exact symbol satisfies the schema.
@@ -2337,7 +2407,7 @@ export declare namespace Struct {
2337
2407
  * @category models
2338
2408
  * @since 3.10.0
2339
2409
  */
2340
- export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type<Fields>, Struct.Encoded<Fields>, Struct.DecodingServices<Fields>, Struct.EncodingServices<Fields>, AST.Objects, Struct<Fields>, Struct.MakeIn<Fields>, Struct.Iso<Fields>> {
2410
+ export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type<Fields>, Struct.Encoded<Fields>, Struct.DecodingServices<Fields>, Struct.EncodingServices<Fields>, SchemaAST.Objects, Struct<Fields>, Struct.MakeIn<Fields>, Struct.Iso<Fields>> {
2341
2411
  /**
2342
2412
  * The field definitions of this struct. Spread them into a new struct to
2343
2413
  * reuse fields across schemas.
@@ -2423,8 +2493,8 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
2423
2493
  *
2424
2494
  * **When to use**
2425
2495
  *
2426
- * Use to add the same fields to an existing struct or to every struct member of
2427
- * a union.
2496
+ * Use to add the same fields to an existing struct or every struct member of a
2497
+ * union.
2428
2498
  *
2429
2499
  * **Details**
2430
2500
  *
@@ -2683,7 +2753,7 @@ export declare namespace Record {
2683
2753
  * @category models
2684
2754
  * @since 4.0.0
2685
2755
  */
2686
- export interface $Record<Key extends Record.Key, Value extends Top> extends Bottom<Record.Type<Key, Value>, Record.Encoded<Key, Value>, Record.DecodingServices<Key, Value>, Record.EncodingServices<Key, Value>, AST.Objects, $Record<Key, Value>, Simplify<Record.MakeIn<Key, Value>>, Record.Iso<Key, Value>> {
2756
+ export interface $Record<Key extends Record.Key, Value extends Top> extends Bottom<Record.Type<Key, Value>, Record.Encoded<Key, Value>, Record.DecodingServices<Key, Value>, Record.EncodingServices<Key, Value>, SchemaAST.Objects, $Record<Key, Value>, Simplify<Record.MakeIn<Key, Value>>, Record.Iso<Key, Value>> {
2687
2757
  readonly key: Key;
2688
2758
  readonly value: Value;
2689
2759
  }
@@ -2733,7 +2803,7 @@ export declare namespace StructWithRest {
2733
2803
  * @since 4.0.0
2734
2804
  */
2735
2805
  type Objects = Top & {
2736
- readonly ast: AST.Objects;
2806
+ readonly ast: SchemaAST.Objects;
2737
2807
  };
2738
2808
  /**
2739
2809
  * Readonly list of record schemas that provide the additional index signatures
@@ -2744,6 +2814,9 @@ export declare namespace StructWithRest {
2744
2814
  */
2745
2815
  type Records = ReadonlyArray<$Record<Record.Key, Top>>;
2746
2816
  type MergeTuple<T extends ReadonlyArray<unknown>> = T extends readonly [infer Head, ...infer Tail] ? Head & MergeTuple<Tail> : {};
2817
+ type Intersect<S extends Objects, Records extends StructWithRest.Records, Side extends "Type" | "Iso" | "Encoded" | "~type.make"> = S[Side] & MergeTuple<{
2818
+ readonly [K in keyof Records]: Records[K][Side];
2819
+ }>;
2747
2820
  /**
2748
2821
  * Computes the decoded type for `StructWithRest` by intersecting the base object
2749
2822
  * schema's decoded `Type` with the decoded types of all rest record schemas.
@@ -2751,9 +2824,7 @@ export declare namespace StructWithRest {
2751
2824
  * @category utility types
2752
2825
  * @since 3.10.0
2753
2826
  */
2754
- type Type<S extends Objects, Records extends StructWithRest.Records> = S["Type"] & MergeTuple<{
2755
- readonly [K in keyof Records]: Records[K]["Type"];
2756
- }>;
2827
+ type Type<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Type">;
2757
2828
  /**
2758
2829
  * Computes the iso type for `StructWithRest` by intersecting the base object
2759
2830
  * schema's `Iso` type with the `Iso` types of all rest record schemas.
@@ -2761,9 +2832,7 @@ export declare namespace StructWithRest {
2761
2832
  * @category utility types
2762
2833
  * @since 4.0.0
2763
2834
  */
2764
- type Iso<S extends Objects, Records extends StructWithRest.Records> = S["Iso"] & MergeTuple<{
2765
- readonly [K in keyof Records]: Records[K]["Iso"];
2766
- }>;
2835
+ type Iso<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Iso">;
2767
2836
  /**
2768
2837
  * Computes the encoded type for `StructWithRest` by intersecting the base object
2769
2838
  * schema's encoded type with the encoded types of all rest record schemas.
@@ -2771,9 +2840,19 @@ export declare namespace StructWithRest {
2771
2840
  * @category utility types
2772
2841
  * @since 3.10.0
2773
2842
  */
2774
- type Encoded<S extends Objects, Records extends StructWithRest.Records> = S["Encoded"] & MergeTuple<{
2775
- readonly [K in keyof Records]: Records[K]["Encoded"];
2776
- }>;
2843
+ type Encoded<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "Encoded">;
2844
+ /**
2845
+ * Computes the input type accepted when constructing a `StructWithRest` value by
2846
+ * intersecting the base object's make input with the make inputs of all rest
2847
+ * record schemas.
2848
+ *
2849
+ * @category utility types
2850
+ * @since 4.0.0
2851
+ */
2852
+ type MakeIn<S extends Objects, Records extends StructWithRest.Records> = Intersect<S, Records, "~type.make">;
2853
+ type Services<S extends Objects, Records extends StructWithRest.Records, Side extends "DecodingServices" | "EncodingServices"> = S[Side] | {
2854
+ [K in keyof Records]: Records[K][Side];
2855
+ }[number];
2777
2856
  /**
2778
2857
  * Union of the decoding service requirements of the base object schema and all
2779
2858
  * rest record schemas.
@@ -2781,9 +2860,7 @@ export declare namespace StructWithRest {
2781
2860
  * @category utility types
2782
2861
  * @since 4.0.0
2783
2862
  */
2784
- type DecodingServices<S extends Objects, Records extends StructWithRest.Records> = S["DecodingServices"] | {
2785
- [K in keyof Records]: Records[K]["DecodingServices"];
2786
- }[number];
2863
+ type DecodingServices<S extends Objects, Records extends StructWithRest.Records> = Services<S, Records, "DecodingServices">;
2787
2864
  /**
2788
2865
  * Union of the encoding service requirements of the base object schema and all
2789
2866
  * rest record schemas.
@@ -2791,20 +2868,24 @@ export declare namespace StructWithRest {
2791
2868
  * @category utility types
2792
2869
  * @since 4.0.0
2793
2870
  */
2794
- type EncodingServices<S extends Objects, Records extends StructWithRest.Records> = S["EncodingServices"] | {
2795
- [K in keyof Records]: Records[K]["EncodingServices"];
2871
+ type EncodingServices<S extends Objects, Records extends StructWithRest.Records> = Services<S, Records, "EncodingServices">;
2872
+ type IncompatibleKeys<A, B, OK extends (keyof A & keyof B) = Extract<keyof A, keyof B>> = {
2873
+ [K in OK]: Required<Pick<A, K>>[K] extends B[K] ? never : K;
2874
+ }[OK];
2875
+ type IncompatibleSideKeys<S extends Objects, Records extends StructWithRest.Records, Side extends "Type" | "Encoded" | "Iso" | "~type.make"> = {
2876
+ [I in keyof Records]: Records[I][Side] extends object ? IncompatibleKeys<S[Side], Records[I][Side]> : never;
2796
2877
  }[number];
2797
2878
  /**
2798
- * Computes the input type accepted when constructing a `StructWithRest` value by
2799
- * intersecting the base object's make input with the make inputs of all rest
2800
- * record schemas.
2879
+ * Validates that the records are compatible with the struct.
2801
2880
  *
2802
2881
  * @category utility types
2803
2882
  * @since 4.0.0
2804
2883
  */
2805
- type MakeIn<S extends Objects, Records extends StructWithRest.Records> = S["~type.make"] & MergeTuple<{
2806
- readonly [K in keyof Records]: Records[K]["~type.make"];
2807
- }>;
2884
+ type ValidateRecords<S extends Objects, Records extends StructWithRest.Records> = [
2885
+ IncompatibleSideKeys<S, Records, "Type"> | IncompatibleSideKeys<S, Records, "Encoded"> | IncompatibleSideKeys<S, Records, "Iso"> | IncompatibleSideKeys<S, Records, "~type.make">
2886
+ ] extends [never] ? unknown : {
2887
+ "incompatible index signatures": IncompatibleSideKeys<S, Records, "Type"> | IncompatibleSideKeys<S, Records, "Encoded"> | IncompatibleSideKeys<S, Records, "Iso"> | IncompatibleSideKeys<S, Records, "~type.make">;
2888
+ };
2808
2889
  }
2809
2890
  /**
2810
2891
  * Type-level representation returned by {@link StructWithRest}.
@@ -2812,7 +2893,7 @@ export declare namespace StructWithRest {
2812
2893
  * @category models
2813
2894
  * @since 4.0.0
2814
2895
  */
2815
- export interface StructWithRest<S extends StructWithRest.Objects, Records extends StructWithRest.Records> extends Bottom<Simplify<StructWithRest.Type<S, Records>>, Simplify<StructWithRest.Encoded<S, Records>>, StructWithRest.DecodingServices<S, Records>, StructWithRest.EncodingServices<S, Records>, AST.Objects, StructWithRest<S, Records>, Simplify<StructWithRest.MakeIn<S, Records>>, Simplify<StructWithRest.Iso<S, Records>>> {
2896
+ export interface StructWithRest<S extends StructWithRest.Objects, Records extends StructWithRest.Records> extends Bottom<Simplify<StructWithRest.Type<S, Records>>, Simplify<StructWithRest.Encoded<S, Records>>, StructWithRest.DecodingServices<S, Records>, StructWithRest.EncodingServices<S, Records>, SchemaAST.Objects, StructWithRest<S, Records>, Simplify<StructWithRest.MakeIn<S, Records>>, Simplify<StructWithRest.Iso<S, Records>>> {
2816
2897
  readonly schema: S;
2817
2898
  readonly records: Records;
2818
2899
  }
@@ -2827,17 +2908,17 @@ export interface StructWithRest<S extends StructWithRest.Objects, Records extend
2827
2908
  *
2828
2909
  * const schema = Schema.StructWithRest(
2829
2910
  * Schema.Struct({ id: Schema.Number }),
2830
- * [Schema.Record(Schema.String, Schema.String)]
2911
+ * [Schema.Record(Schema.String, Schema.Number)]
2831
2912
  * )
2832
2913
  *
2833
- * // { readonly id: number } & { readonly [x: string]: string }
2914
+ * // { readonly id: number, readonly [x: string]: number }
2834
2915
  * type T = typeof schema.Type
2835
2916
  * ```
2836
2917
  *
2837
2918
  * @category constructors
2838
2919
  * @since 4.0.0
2839
2920
  */
2840
- export declare function StructWithRest<const S extends StructWithRest.Objects, const Records extends StructWithRest.Records>(schema: S, records: Records): StructWithRest<S, Records>;
2921
+ export declare function StructWithRest<const S extends StructWithRest.Objects, const Records extends StructWithRest.Records>(schema: S, records: Records & StructWithRest.ValidateRecords<S, Records>): StructWithRest<S, Records>;
2841
2922
  /**
2842
2923
  * Namespace for `Tuple` type utilities.
2843
2924
  *
@@ -2948,7 +3029,7 @@ export declare namespace Tuple {
2948
3029
  * @category models
2949
3030
  * @since 3.10.0
2950
3031
  */
2951
- export interface Tuple<Elements extends Tuple.Elements> extends Bottom<Tuple.Type<Elements>, Tuple.Encoded<Elements>, Tuple.DecodingServices<Elements>, Tuple.EncodingServices<Elements>, AST.Arrays, Tuple<Elements>, Tuple.MakeIn<Elements>, Tuple.Iso<Elements>> {
3032
+ export interface Tuple<Elements extends Tuple.Elements> extends Bottom<Tuple.Type<Elements>, Tuple.Encoded<Elements>, Tuple.DecodingServices<Elements>, Tuple.EncodingServices<Elements>, SchemaAST.Arrays, Tuple<Elements>, Tuple.MakeIn<Elements>, Tuple.Iso<Elements>> {
2952
3033
  readonly elements: Elements;
2953
3034
  /**
2954
3035
  * Returns a new tuple with the elements modified by the provided function.
@@ -3012,7 +3093,7 @@ export declare namespace TupleWithRest {
3012
3093
  type TupleType = Top & {
3013
3094
  readonly Type: ReadonlyArray<unknown>;
3014
3095
  readonly Encoded: ReadonlyArray<unknown>;
3015
- readonly ast: AST.Arrays;
3096
+ readonly ast: SchemaAST.Arrays;
3016
3097
  readonly "~type.make": ReadonlyArray<unknown>;
3017
3098
  readonly "Iso": ReadonlyArray<unknown>;
3018
3099
  };
@@ -3111,7 +3192,7 @@ export declare namespace TupleWithRest {
3111
3192
  * @category models
3112
3193
  * @since 4.0.0
3113
3194
  */
3114
- export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends TupleWithRest.Rest> extends Bottom<TupleWithRest.Type<S["Type"], Rest>, TupleWithRest.Encoded<S["Encoded"], Rest>, S["DecodingServices"] | Rest[number]["DecodingServices"], S["EncodingServices"] | Rest[number]["EncodingServices"], AST.Arrays, TupleWithRest<S, Rest>, TupleWithRest.MakeIn<S["~type.make"], Rest>, TupleWithRest.Iso<S["Iso"], Rest>> {
3195
+ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends TupleWithRest.Rest> extends Bottom<TupleWithRest.Type<S["Type"], Rest>, TupleWithRest.Encoded<S["Encoded"], Rest>, S["DecodingServices"] | Rest[number]["DecodingServices"], S["EncodingServices"] | Rest[number]["EncodingServices"], SchemaAST.Arrays, TupleWithRest<S, Rest>, TupleWithRest.MakeIn<S["~type.make"], Rest>, TupleWithRest.Iso<S["Iso"], Rest>> {
3115
3196
  readonly schema: S;
3116
3197
  readonly rest: Rest;
3117
3198
  }
@@ -3152,7 +3233,7 @@ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Res
3152
3233
  * @category models
3153
3234
  * @since 4.0.0
3154
3235
  */
3155
- export interface $Array<S extends Top> extends Bottom<ReadonlyArray<S["Type"]>, ReadonlyArray<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], AST.Arrays, $Array<S>, ReadonlyArray<S["~type.make"]>, ReadonlyArray<S["Iso"]>> {
3236
+ export interface $Array<S extends Top> extends Bottom<ReadonlyArray<S["Type"]>, ReadonlyArray<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], SchemaAST.Arrays, $Array<S>, ReadonlyArray<S["~type.make"]>, ReadonlyArray<S["Iso"]>> {
3156
3237
  readonly value: S;
3157
3238
  }
3158
3239
  interface ArrayLambda extends Lambda {
@@ -3190,7 +3271,7 @@ ArraySchema as Array };
3190
3271
  * @category models
3191
3272
  * @since 3.10.0
3192
3273
  */
3193
- export interface NonEmptyArray<S extends Top> extends Bottom<readonly [S["Type"], ...Array<S["Type"]>], readonly [S["Encoded"], ...Array<S["Encoded"]>], S["DecodingServices"], S["EncodingServices"], AST.Arrays, NonEmptyArray<S>, readonly [S["~type.make"], ...Array<S["~type.make"]>], readonly [S["Iso"], ...Array<S["Iso"]>]> {
3274
+ export interface NonEmptyArray<S extends Top> extends Bottom<readonly [S["Type"], ...Array<S["Type"]>], readonly [S["Encoded"], ...Array<S["Encoded"]>], S["DecodingServices"], S["EncodingServices"], SchemaAST.Arrays, NonEmptyArray<S>, readonly [S["~type.make"], ...Array<S["~type.make"]>], readonly [S["Iso"], ...Array<S["Iso"]>]> {
3194
3275
  readonly value: S;
3195
3276
  }
3196
3277
  interface NonEmptyArrayLambda extends Lambda {
@@ -3280,16 +3361,16 @@ export declare function UniqueArray<S extends Top>(item: S): UniqueArray<S>;
3280
3361
  * @since 3.10.0
3281
3362
  */
3282
3363
  export interface mutable<S extends Top & {
3283
- readonly "ast": AST.Arrays;
3364
+ readonly "ast": SchemaAST.Arrays;
3284
3365
  }> extends Bottom<Mutable<S["Type"]>, Mutable<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], S["ast"], mutable<S>, 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"]> {
3285
3366
  readonly schema: S;
3286
3367
  }
3287
3368
  interface mutableLambda extends Lambda {
3288
3369
  <S extends Top & {
3289
- readonly "ast": AST.Arrays;
3370
+ readonly "ast": SchemaAST.Arrays;
3290
3371
  }>(self: S): mutable<S>;
3291
3372
  readonly "~lambda.out": this["~lambda.in"] extends Top & {
3292
- readonly "ast": AST.Arrays;
3373
+ readonly "ast": SchemaAST.Arrays;
3293
3374
  } ? mutable<this["~lambda.in"]> : "Error: schema not eligible for mutable";
3294
3375
  }
3295
3376
  /**
@@ -3324,7 +3405,7 @@ export interface Union<Members extends ReadonlyArray<Top>> extends Bottom<{
3324
3405
  [K in keyof Members]: Members[K]["DecodingServices"];
3325
3406
  }[number], {
3326
3407
  [K in keyof Members]: Members[K]["EncodingServices"];
3327
- }[number], AST.Union<{
3408
+ }[number], SchemaAST.Union<{
3328
3409
  [K in keyof Members]: Members[K]["ast"];
3329
3410
  }[number]>, Union<Members>, {
3330
3411
  [K in keyof Members]: Members[K]["~type.make"];
@@ -3385,7 +3466,7 @@ export declare function Union<const Members extends ReadonlyArray<Top>>(members:
3385
3466
  * @category models
3386
3467
  * @since 4.0.0
3387
3468
  */
3388
- export interface Literals<L extends ReadonlyArray<AST.LiteralValue>> extends Bottom<L[number], L[number], never, never, AST.Union<AST.Literal>, Literals<L>> {
3469
+ export interface Literals<L extends ReadonlyArray<SchemaAST.LiteralValue>> extends Bottom<L[number], L[number], never, never, SchemaAST.Union<SchemaAST.Literal>, Literals<L>> {
3389
3470
  readonly literals: L;
3390
3471
  readonly members: {
3391
3472
  readonly [K in keyof L]: Literal<L[K]>;
@@ -3396,7 +3477,7 @@ export interface Literals<L extends ReadonlyArray<AST.LiteralValue>> extends Bot
3396
3477
  mapMembers<To extends ReadonlyArray<Top>>(f: (members: this["members"]) => To): Union<Simplify<Readonly<To>>>;
3397
3478
  pick<const L2 extends ReadonlyArray<L[number]>>(literals: L2): Literals<L2>;
3398
3479
  transform<const L2 extends {
3399
- readonly [I in keyof L]: AST.LiteralValue;
3480
+ readonly [I in keyof L]: SchemaAST.LiteralValue;
3400
3481
  }>(to: L2): Union<{
3401
3482
  [I in keyof L]: decodeTo<Literal<L2[I]>, Literal<L[I]>>;
3402
3483
  }>;
@@ -3417,7 +3498,7 @@ export interface Literals<L extends ReadonlyArray<AST.LiteralValue>> extends Bot
3417
3498
  * @category constructors
3418
3499
  * @since 4.0.0
3419
3500
  */
3420
- export declare function Literals<const L extends ReadonlyArray<AST.LiteralValue>>(literals: L): Literals<L>;
3501
+ export declare function Literals<const L extends ReadonlyArray<SchemaAST.LiteralValue>>(literals: L): Literals<L>;
3421
3502
  /**
3422
3503
  * Type-level representation returned by {@link NullOr}.
3423
3504
  *
@@ -3484,7 +3565,7 @@ export declare const NullishOr: NullishOrLambda;
3484
3565
  * @category models
3485
3566
  * @since 3.10.0
3486
3567
  */
3487
- export interface suspend<S extends Top> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], AST.Suspend, suspend<S>, 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"]> {
3568
+ export interface suspend<S extends Top> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], SchemaAST.Suspend, suspend<S>, 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"]> {
3488
3569
  }
3489
3570
  /**
3490
3571
  * Creates a suspended schema that defers evaluation until needed. This is
@@ -3528,7 +3609,7 @@ export declare function suspend<S extends Top>(f: () => S): suspend<S>;
3528
3609
  * @category filtering
3529
3610
  * @since 4.0.0
3530
3611
  */
3531
- export declare function check<S extends Top>(...checks: readonly [AST.Check<S["Type"]>, ...Array<AST.Check<S["Type"]>>]): (self: S) => S["Rebuild"];
3612
+ export declare function check<S extends Top>(...checks: readonly [SchemaAST.Check<S["Type"]>, ...Array<SchemaAST.Check<S["Type"]>>]): (self: S) => S["Rebuild"];
3532
3613
  /**
3533
3614
  * Type-level representation returned by {@link refine}.
3534
3615
  *
@@ -3629,7 +3710,7 @@ export interface middlewareDecoding<S extends Top, RD> extends Bottom<S["Type"],
3629
3710
  * @category decoding
3630
3711
  * @since 4.0.0
3631
3712
  */
3632
- export declare function middlewareDecoding<S extends Top, RD>(decode: (effect: Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue, S["DecodingServices"]>, options: AST.ParseOptions) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue, RD>): (schema: S) => middlewareDecoding<S, RD>;
3713
+ export declare function middlewareDecoding<S extends Top, 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>;
3633
3714
  /**
3634
3715
  * Type-level representation returned by {@link middlewareEncoding}.
3635
3716
  *
@@ -3664,7 +3745,7 @@ export interface middlewareEncoding<S extends Top, RE> extends Bottom<S["Type"],
3664
3745
  * @category encoding
3665
3746
  * @since 4.0.0
3666
3747
  */
3667
- export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue, S["EncodingServices"]>, options: AST.ParseOptions) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue, RE>): (schema: S) => middlewareEncoding<S, RE>;
3748
+ export declare function middlewareEncoding<S extends Top, 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>;
3668
3749
  /**
3669
3750
  * Recovers from a decoding error by providing a fallback value.
3670
3751
  *
@@ -3687,13 +3768,14 @@ export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: E
3687
3768
  * @category error handling
3688
3769
  * @since 4.0.0
3689
3770
  */
3690
- export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue>): (self: S) => S["Rebuild"];
3771
+ export declare function catchDecoding<S extends Top>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue>): (self: S) => S["Rebuild"];
3691
3772
  /**
3692
3773
  * Recovers from a decoding error with a handler that may require Effect services.
3693
3774
  *
3694
3775
  * **When to use**
3695
3776
  *
3696
- * Use when decoding fallback logic needs services from the Effect context.
3777
+ * Use when you need decoding fallback logic to require services from the Effect
3778
+ * context.
3697
3779
  *
3698
3780
  * **Details**
3699
3781
  *
@@ -3707,7 +3789,7 @@ export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) =>
3707
3789
  * @category error handling
3708
3790
  * @since 4.0.0
3709
3791
  */
3710
- export declare function catchDecodingWithContext<S extends Top, R = never>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue, R>): (self: S) => middlewareDecoding<S, S["DecodingServices"] | R>;
3792
+ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, R>): (self: S) => middlewareDecoding<S, S["DecodingServices"] | R>;
3711
3793
  /**
3712
3794
  * Recovers from an encoding error by providing a fallback value.
3713
3795
  *
@@ -3720,13 +3802,14 @@ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (i
3720
3802
  * @category error handling
3721
3803
  * @since 4.0.0
3722
3804
  */
3723
- export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue>): (self: S) => S["Rebuild"];
3805
+ export declare function catchEncoding<S extends Top>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue>): (self: S) => S["Rebuild"];
3724
3806
  /**
3725
3807
  * Recovers from an encoding error with a handler that may require Effect services.
3726
3808
  *
3727
3809
  * **When to use**
3728
3810
  *
3729
- * Use when encoding fallback logic needs services from the Effect context.
3811
+ * Use when you need encoding fallback logic to require services from the Effect
3812
+ * context.
3730
3813
  *
3731
3814
  * **Details**
3732
3815
  *
@@ -3740,7 +3823,7 @@ export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) =>
3740
3823
  * @category error handling
3741
3824
  * @since 4.0.0
3742
3825
  */
3743
- export declare function catchEncodingWithContext<S extends Top, R = never>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue, R>): (self: S) => middlewareEncoding<S, S["EncodingServices"] | R>;
3826
+ export declare function catchEncodingWithContext<S extends Top, R = never>(f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, SchemaIssue.Issue, R>): (self: S) => middlewareEncoding<S, S["EncodingServices"] | R>;
3744
3827
  /**
3745
3828
  * Type-level representation returned by {@link decodeTo}.
3746
3829
  *
@@ -3762,25 +3845,28 @@ export interface compose<To extends Top, From extends Top> extends decodeTo<To,
3762
3845
  /**
3763
3846
  * Creates a schema that transforms from a source schema to a target schema.
3764
3847
  *
3848
+ * **When to use**
3849
+ *
3850
+ * Use when decoding should change the schema's decoded type or encoded shape,
3851
+ * with an optional custom bidirectional transformation.
3852
+ *
3765
3853
  * **Details**
3766
3854
  *
3767
- * This is a curried function: call it with the target schema `to` (and optionally a transformation),
3768
- * then call the returned function with the source schema `from`. The resulting schema decodes from
3769
- * `From["Encoded"]` to `To["Type"]` and encodes from `To["Type"]` back to `From["Encoded"]`.
3855
+ * Call it with the target schema `to` and then pipe the source schema `from`
3856
+ * into the returned function. The resulting schema decodes from
3857
+ * `From["Encoded"]` to `To["Type"]` and encodes from `To["Type"]` back to
3858
+ * `From["Encoded"]`.
3770
3859
  *
3771
- * Key guarantees:
3772
- * - Resulting schema has `Type = To["Type"]` and `Encoded = From["Encoded"]`
3773
- * - When `transformation` is omitted, uses `Transformation.passthrough()` (schema composition)
3774
- * - Combines decoding/encoding services from both `from` and `to` schemas
3775
- * - Transformation `decode` maps `From["Type"]` → `To["Encoded"]` (used during encoding)
3776
- * - Transformation `encode` maps `To["Encoded"]` → `From["Type"]` (used during decoding)
3860
+ * When no transformation is provided, `SchemaTransformation.passthrough()` is
3861
+ * used, so `From["Type"]` must already be compatible with `To["Encoded"]`.
3862
+ * The resulting schema combines decoding and encoding services from both
3863
+ * schemas and any custom transformation.
3777
3864
  *
3778
- * Common mistakes:
3779
- * - **Direction confusion**: Remember `to` is the target (what you decode TO), `from` is the source (what you decode FROM)
3780
- * - **Currying**: This is curried - must use pipe: `from.pipe(Schema.decodeTo(to))`
3781
- * - **Transformation direction**: `decode` goes `From["Type"]` `To["Encoded"]`, `encode` goes `To["Encoded"]` → `From["Type"]`
3782
- * - **Passthrough assumption**: Without transformation, schemas must satisfy `To["Encoded"] === From["Type"]` or use passthrough helpers
3783
- * - **Service dependencies**: Resulting schema requires services from both schemas; use `Schema.provideService` if needed
3865
+ * **Gotchas**
3866
+ *
3867
+ * In a custom transformation, `decode` maps `From["Type"]` to `To["Encoded"]`
3868
+ * and is used on the encoding path, while `encode` maps `To["Encoded"]` to
3869
+ * `From["Type"]` and is used on the decoding path.
3784
3870
  *
3785
3871
  * **Example** (String to Number with transformation)
3786
3872
  *
@@ -3806,29 +3892,32 @@ export interface compose<To extends Top, From extends Top> extends decodeTo<To,
3806
3892
  */
3807
3893
  export declare function decodeTo<To extends Top>(to: To): <From extends Top>(from: From) => compose<To, From>;
3808
3894
  export declare function decodeTo<To extends Top, From extends Top, RD = never, RE = never>(to: To, transformation: {
3809
- readonly decode: Getter.Getter<NoInfer<To["Encoded"]>, NoInfer<From["Type"]>, RD>;
3810
- readonly encode: Getter.Getter<NoInfer<From["Type"]>, NoInfer<To["Encoded"]>, RE>;
3895
+ readonly decode: SchemaGetter.Getter<NoInfer<To["Encoded"]>, NoInfer<From["Type"]>, RD>;
3896
+ readonly encode: SchemaGetter.Getter<NoInfer<From["Type"]>, NoInfer<To["Encoded"]>, RE>;
3811
3897
  }): (from: From) => decodeTo<To, From, RD, RE>;
3812
3898
  /**
3813
3899
  * Applies a transformation to a schema, creating a new schema with the same type but transformed encoding/decoding.
3814
3900
  *
3901
+ * **When to use**
3902
+ *
3903
+ * Use when the decoded type stays the same and the transformation only
3904
+ * normalizes values during encoding and decoding.
3905
+ *
3815
3906
  * **Details**
3816
3907
  *
3817
- * This is a curried function: call it with a transformation object, then call the returned function with a schema.
3818
- * The resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`, with the transformation applied during
3819
- * encoding and decoding operations.
3908
+ * Call it with a transformation object and then pipe a schema into the returned
3909
+ * function. The resulting schema keeps the same `Type` and `Encoded` types as
3910
+ * the source schema, while applying the transformation during both decoding and
3911
+ * encoding.
3820
3912
  *
3821
- * Key guarantees:
3822
- * - Resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`
3823
- * - Uses `toType(self)` as the target schema internally (creates a schema where both Type and Encoded are `S["Type"]`)
3824
- * - Combines decoding/encoding services from the source schema and transformation
3825
- * - Transformation `decode` maps `S["Type"]` → `S["Type"]` (used during encoding)
3826
- * - Transformation `encode` maps `S["Type"]` → `S["Type"]` (used during decoding)
3913
+ * Internally this uses `toType(self)` as the target schema and combines service
3914
+ * requirements from the source schema and the transformation.
3827
3915
  *
3828
- * Common mistakes:
3829
- * - **Currying**: This is curried - must use pipe: `schema.pipe(Schema.decode(transformation))`
3830
- * - **Transformation direction**: `decode` and `encode` both operate on `S["Type"]` (same type, different values)
3831
- * - **Service dependencies**: Resulting schema requires services from the source schema and transformation; use `Schema.provideService` if needed
3916
+ * **Gotchas**
3917
+ *
3918
+ * Use {@link decodeTo} instead when the transformation should change the
3919
+ * decoded type. For this helper, both transformation getters operate on
3920
+ * `S["Type"]` values.
3832
3921
  *
3833
3922
  * **Example** (Trimming string values during encoding/decoding)
3834
3923
  *
@@ -3850,8 +3939,8 @@ export declare function decodeTo<To extends Top, From extends Top, RD = never, R
3850
3939
  * @since 3.10.0
3851
3940
  */
3852
3941
  export declare function decode<S extends Top, RD = never, RE = never>(transformation: {
3853
- readonly decode: Getter.Getter<S["Type"], S["Type"], RD>;
3854
- readonly encode: Getter.Getter<S["Type"], S["Type"], RE>;
3942
+ readonly decode: SchemaGetter.Getter<S["Type"], S["Type"], RD>;
3943
+ readonly encode: SchemaGetter.Getter<S["Type"], S["Type"], RE>;
3855
3944
  }): (self: S) => decodeTo<toType<S>, S, RD, RE>;
3856
3945
  /**
3857
3946
  * Reverses a schema transformation so the encoded schema is supplied first.
@@ -3884,8 +3973,8 @@ export declare function decode<S extends Top, RD = never, RE = never>(transforma
3884
3973
  */
3885
3974
  export declare function encodeTo<To extends Top>(to: To): <From extends Top>(from: From) => decodeTo<From, To>;
3886
3975
  export declare function encodeTo<To extends Top, From extends Top, RD = never, RE = never>(to: To, transformation: {
3887
- readonly decode: Getter.Getter<NoInfer<From["Encoded"]>, NoInfer<To["Type"]>, RD>;
3888
- readonly encode: Getter.Getter<NoInfer<To["Type"]>, NoInfer<From["Encoded"]>, RE>;
3976
+ readonly decode: SchemaGetter.Getter<NoInfer<From["Encoded"]>, NoInfer<To["Type"]>, RD>;
3977
+ readonly encode: SchemaGetter.Getter<NoInfer<To["Type"]>, NoInfer<From["Encoded"]>, RE>;
3889
3978
  }): (from: From) => decodeTo<From, To, RD, RE>;
3890
3979
  /**
3891
3980
  * Applies a transformation to a schema's encoded type, creating a new schema where encoding/decoding
@@ -3913,8 +4002,8 @@ export declare function encodeTo<To extends Top, From extends Top, RD = never, R
3913
4002
  * @since 3.10.0
3914
4003
  */
3915
4004
  export declare function encode<S extends Top, RD = never, RE = never>(transformation: {
3916
- readonly decode: Getter.Getter<S["Encoded"], S["Encoded"], RD>;
3917
- readonly encode: Getter.Getter<S["Encoded"], S["Encoded"], RE>;
4005
+ readonly decode: SchemaGetter.Getter<S["Encoded"], S["Encoded"], RD>;
4006
+ readonly encode: SchemaGetter.Getter<S["Encoded"], S["Encoded"], RE>;
3918
4007
  }): (self: S) => decodeTo<S, toEncoded<S>, RD, RE>;
3919
4008
  /**
3920
4009
  * Constraint used to ensure a schema field does not already have a constructor default.
@@ -4071,6 +4160,11 @@ export interface withDecodingDefault<S extends Top, R = never> extends decodeTo<
4071
4160
  * and provides a default `Encoded` value when the field is missing or
4072
4161
  * `undefined` during decoding.
4073
4162
  *
4163
+ * **When to use**
4164
+ *
4165
+ * Use when the default is expressed in the encoded representation, before the
4166
+ * field's decoding transformation runs.
4167
+ *
4074
4168
  * **Details**
4075
4169
  *
4076
4170
  * The default value is specified in terms of the `Encoded` type (before any
@@ -4115,6 +4209,11 @@ export interface withDecodingDefaultType<S extends Top, R = never> extends decod
4115
4209
  * and provides a default `Type` value when the field is missing or
4116
4210
  * `undefined` during decoding.
4117
4211
  *
4212
+ * **When to use**
4213
+ *
4214
+ * Use when the default is already in the decoded representation and should not
4215
+ * pass through the field's decoding transformation.
4216
+ *
4118
4217
  * **Details**
4119
4218
  *
4120
4219
  * Unlike {@link withDecodingDefault}, the default value is specified in terms
@@ -4139,7 +4238,7 @@ export declare function withDecodingDefaultType<S extends Top, R = never>(defaul
4139
4238
  * @category constructors
4140
4239
  * @since 3.10.0
4141
4240
  */
4142
- export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefault<Literal<Tag>> {
4241
+ export interface tag<Tag extends SchemaAST.LiteralValue> extends withConstructorDefault<Literal<Tag>> {
4143
4242
  }
4144
4243
  /**
4145
4244
  * Combines a {@link Literal} schema with {@link withConstructorDefault}, making it ideal
@@ -4163,7 +4262,7 @@ export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefaul
4163
4262
  * @category constructors
4164
4263
  * @since 3.10.0
4165
4264
  */
4166
- export declare function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag>;
4265
+ export declare function tag<Tag extends SchemaAST.LiteralValue>(literal: Tag): tag<Tag>;
4167
4266
  /**
4168
4267
  * Creates a literal `_tag` schema that is omitted from encoded output.
4169
4268
  *
@@ -4196,14 +4295,14 @@ export declare function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag
4196
4295
  * @category constructors
4197
4296
  * @since 4.0.0
4198
4297
  */
4199
- export declare function tagDefaultOmit<Tag extends AST.LiteralValue>(literal: Tag): withDecodingDefaultKey<tag<Tag>, never>;
4298
+ export declare function tagDefaultOmit<Tag extends SchemaAST.LiteralValue>(literal: Tag): withDecodingDefaultKey<tag<Tag>, never>;
4200
4299
  /**
4201
4300
  * Type-level representation returned by {@link TaggedStruct}.
4202
4301
  *
4203
4302
  * @category models
4204
4303
  * @since 3.10.0
4205
4304
  */
4206
- export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fields> = Struct<Simplify<{
4305
+ export type TaggedStruct<Tag extends SchemaAST.LiteralValue, Fields extends Struct.Fields> = Struct<Simplify<{
4207
4306
  readonly _tag: tag<Tag>;
4208
4307
  } & Fields>>;
4209
4308
  /**
@@ -4252,7 +4351,7 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
4252
4351
  * @category constructors
4253
4352
  * @since 3.10.0
4254
4353
  */
4255
- export declare function TaggedStruct<const Tag extends AST.LiteralValue, const Fields extends Struct.Fields>(value: Tag, fields: Fields): TaggedStruct<Tag, Fields>;
4354
+ export declare function TaggedStruct<const Tag extends SchemaAST.LiteralValue, const Fields extends Struct.Fields>(value: Tag, fields: Fields): TaggedStruct<Tag, Fields>;
4256
4355
  /**
4257
4356
  * Recursively flatten any nested Schema.Union members into a single tuple of leaf schemas.
4258
4357
  */
@@ -4336,7 +4435,7 @@ export interface TaggedUnion<Cases extends Record<string, Top>> extends Bottom<{
4336
4435
  [K in keyof Cases]: Cases[K]["DecodingServices"];
4337
4436
  }[keyof Cases], {
4338
4437
  [K in keyof Cases]: Cases[K]["EncodingServices"];
4339
- }[keyof Cases], AST.Union<AST.Objects>, TaggedUnion<Cases>, {
4438
+ }[keyof Cases], SchemaAST.Union<SchemaAST.Objects>, TaggedUnion<Cases>, {
4340
4439
  [K in keyof Cases]: Cases[K]["~type.make"];
4341
4440
  }[keyof Cases]> {
4342
4441
  readonly cases: Cases;
@@ -4447,16 +4546,16 @@ export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
4447
4546
  */
4448
4547
  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>;
4449
4548
  /**
4450
- * Constructs an `AST.Link` that describes how a value of type `T` encodes to and decodes from a `To` schema.
4549
+ * Constructs an `SchemaAST.Link` that describes how a value of type `T` encodes to and decodes from a `To` schema.
4451
4550
  * Used when building low-level AST transformations that bridge two schema types.
4452
4551
  *
4453
4552
  * @category transforming
4454
4553
  * @since 4.0.0
4455
4554
  */
4456
4555
  export declare function link<T>(): <To extends Top>(encodeTo: To, transformation: {
4457
- readonly decode: Getter.Getter<T, NoInfer<To["Type"]>>;
4458
- readonly encode: Getter.Getter<NoInfer<To["Type"]>, T>;
4459
- }) => AST.Link;
4556
+ readonly decode: SchemaGetter.Getter<T, NoInfer<To["Type"]>>;
4557
+ readonly encode: SchemaGetter.Getter<NoInfer<To["Type"]>, T>;
4558
+ }) => SchemaAST.Link;
4460
4559
  /**
4461
4560
  * Creates a custom validation filter from a predicate function.
4462
4561
  *
@@ -4515,7 +4614,7 @@ export declare function link<T>(): <To extends Top>(encodeTo: To, transformation
4515
4614
  * @category constructors
4516
4615
  * @since 4.0.0
4517
4616
  */
4518
- export declare const makeFilter: <T>(filter: (input: T, ast: AST.AST, options: AST.ParseOptions) => FilterOutput, annotations?: Annotations.Filter | undefined, abort?: boolean) => AST.Filter<T>;
4617
+ export declare const makeFilter: <T>(filter: (input: T, ast: SchemaAST.AST, options: SchemaAST.ParseOptions) => FilterOutput, annotations?: Annotations.Filter | undefined, abort?: boolean) => SchemaAST.Filter<T>;
4519
4618
  /**
4520
4619
  * A single failure reported by a filter predicate. Used as the element type
4521
4620
  * of the array arm of {@link FilterOutput}, and also accepted on its own.
@@ -4523,53 +4622,53 @@ export declare const makeFilter: <T>(filter: (input: T, ast: AST.AST, options: A
4523
4622
  * **Details**
4524
4623
  *
4525
4624
  * - `string`: failure with that string as the message. Produces an
4526
- * {@link Issue.InvalidValue} wrapping the input, with the string used as
4625
+ * {@link SchemaIssue.InvalidValue} wrapping the input, with the string used as
4527
4626
  * the issue's `message` annotation.
4528
- * - {@link Issue.Issue}: a fully-formed issue, returned as-is.
4627
+ * - {@link SchemaIssue.Issue}: a fully-formed issue, returned as-is.
4529
4628
  * - `{ path, issue }`: failure attached to a nested path. `issue` is either
4530
- * a `string` (wrapped in an {@link Issue.InvalidValue}) or a full
4531
- * {@link Issue.Issue}; the result is wrapped in an {@link Issue.Pointer}
4629
+ * a `string` (wrapped in an {@link SchemaIssue.InvalidValue}) or a full
4630
+ * {@link SchemaIssue.Issue}; the result is wrapped in an {@link SchemaIssue.Pointer}
4532
4631
  * at the given `path`.
4533
4632
  *
4534
4633
  * @category models
4535
4634
  * @since 3.10.0
4536
4635
  */
4537
- export type FilterIssue = string | Issue.Issue | {
4636
+ export type FilterIssue = string | SchemaIssue.Issue | {
4538
4637
  readonly path: ReadonlyArray<PropertyKey>;
4539
- readonly issue: string | Issue.Issue;
4638
+ readonly issue: string | SchemaIssue.Issue;
4540
4639
  };
4541
4640
  /**
4542
4641
  * The value a filter predicate (see {@link makeFilter}) may return.
4543
4642
  *
4544
4643
  * **Details**
4545
4644
  *
4546
- * Each shape is normalized into an {@link Issue.Issue} (or `undefined` for
4645
+ * Each shape is normalized into an {@link SchemaIssue.Issue} (or `undefined` for
4547
4646
  * success) before being attached to the parse result:
4548
4647
  *
4549
4648
  * - `undefined`: success. The input satisfies the filter.
4550
4649
  * - `true`: success. Equivalent to `undefined`, useful when the predicate is
4551
4650
  * a plain boolean expression.
4552
- * - `false`: generic failure. Produces an {@link Issue.InvalidValue} wrapping
4651
+ * - `false`: generic failure. Produces an {@link SchemaIssue.InvalidValue} wrapping
4553
4652
  * the input, with no custom message.
4554
4653
  * - {@link FilterIssue}: a single failure. See {@link FilterIssue} for the
4555
- * shapes (`string`, {@link Issue.Issue}, or `{ path, issue }`).
4654
+ * shapes (`string`, {@link SchemaIssue.Issue}, or `{ path, issue }`).
4556
4655
  * - `ReadonlyArray<FilterIssue>`: several failures reported together. An
4557
4656
  * empty array is treated as success; a single-element array is equivalent
4558
4657
  * to returning that element directly; otherwise the entries are grouped
4559
- * into an {@link Issue.Composite}.
4658
+ * into an {@link SchemaIssue.Composite}.
4560
4659
  *
4561
4660
  * @category models
4562
4661
  * @since 3.10.0
4563
4662
  */
4564
4663
  export type FilterOutput = undefined | boolean | FilterIssue | ReadonlyArray<FilterIssue>;
4565
4664
  /**
4566
- * Groups multiple checks into a single {@link AST.FilterGroup}, applying
4665
+ * Groups multiple checks into a single {@link SchemaAST.FilterGroup}, applying
4567
4666
  * optional shared annotations to the group as a whole.
4568
4667
  *
4569
4668
  * @category constructors
4570
4669
  * @since 4.0.0
4571
4670
  */
4572
- export declare function makeFilterGroup<T>(checks: readonly [AST.Check<T>, ...Array<AST.Check<T>>], annotations?: Annotations.Filter | undefined): AST.FilterGroup<T>;
4671
+ export declare function makeFilterGroup<T>(checks: readonly [SchemaAST.Check<T>, ...Array<SchemaAST.Check<T>>], annotations?: Annotations.Filter | undefined): SchemaAST.FilterGroup<T>;
4573
4672
  /**
4574
4673
  * Validates that a string has no leading or trailing whitespace.
4575
4674
  *
@@ -4588,7 +4687,7 @@ export declare function makeFilterGroup<T>(checks: readonly [AST.Check<T>, ...Ar
4588
4687
  * @category String checks
4589
4688
  * @since 4.0.0
4590
4689
  */
4591
- export declare function isTrimmed(annotations?: Annotations.Filter): AST.Filter<string>;
4690
+ export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4592
4691
  /**
4593
4692
  * Validates that a string matches the specified regular expression pattern.
4594
4693
  *
@@ -4606,7 +4705,7 @@ export declare function isTrimmed(annotations?: Annotations.Filter): AST.Filter<
4606
4705
  * @category String checks
4607
4706
  * @since 4.0.0
4608
4707
  */
4609
- export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annotations.Filter) => AST.Filter<string>;
4708
+ export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annotations.Filter) => SchemaAST.Filter<string>;
4610
4709
  /**
4611
4710
  * Validates that a string represents a finite number.
4612
4711
  *
@@ -4625,7 +4724,7 @@ export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annota
4625
4724
  * @category String checks
4626
4725
  * @since 4.0.0
4627
4726
  */
4628
- export declare const isStringFinite: (annotations?: Annotations.Filter) => AST.Filter<string>;
4727
+ export declare const isStringFinite: (annotations?: Annotations.Filter) => SchemaAST.Filter<string>;
4629
4728
  /**
4630
4729
  * Validates that a string is a signed base-10 integer literal for Effect's
4631
4730
  * BigInt string encoding.
@@ -4643,7 +4742,7 @@ export declare const isStringFinite: (annotations?: Annotations.Filter) => AST.F
4643
4742
  * @category String checks
4644
4743
  * @since 4.0.0
4645
4744
  */
4646
- export declare const isStringBigInt: (annotations?: Annotations.Filter) => AST.Filter<string>;
4745
+ export declare const isStringBigInt: (annotations?: Annotations.Filter) => SchemaAST.Filter<string>;
4647
4746
  /**
4648
4747
  * Validates that a string has the `Symbol(description)` format used by Effect's
4649
4748
  * symbol string encoding.
@@ -4656,7 +4755,7 @@ export declare const isStringBigInt: (annotations?: Annotations.Filter) => AST.F
4656
4755
  * @category String checks
4657
4756
  * @since 4.0.0
4658
4757
  */
4659
- export declare const isStringSymbol: (annotations?: Annotations.Filter) => AST.Filter<string>;
4758
+ export declare const isStringSymbol: (annotations?: Annotations.Filter) => SchemaAST.Filter<string>;
4660
4759
  /**
4661
4760
  * Validates that a string is a valid Universally Unique Identifier (UUID).
4662
4761
  * Optionally specify a version (1-8) to validate against a specific UUID version.
@@ -4677,7 +4776,7 @@ export declare const isStringSymbol: (annotations?: Annotations.Filter) => AST.F
4677
4776
  * @category String checks
4678
4777
  * @since 4.0.0
4679
4778
  */
4680
- export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotations?: Annotations.Filter): AST.Filter<string>;
4779
+ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4681
4780
  /**
4682
4781
  * Validates that a string is a valid ULID (Universally Unique Lexicographically
4683
4782
  * Sortable Identifier).
@@ -4697,7 +4796,7 @@ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotati
4697
4796
  * @category String checks
4698
4797
  * @since 4.0.0
4699
4798
  */
4700
- export declare function isULID(annotations?: Annotations.Filter): AST.Filter<string>;
4799
+ export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4701
4800
  /**
4702
4801
  * Validates that a string is valid Base64 encoded data.
4703
4802
  *
@@ -4716,7 +4815,7 @@ export declare function isULID(annotations?: Annotations.Filter): AST.Filter<str
4716
4815
  * @category String checks
4717
4816
  * @since 4.0.0
4718
4817
  */
4719
- export declare function isBase64(annotations?: Annotations.Filter): AST.Filter<string>;
4818
+ export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4720
4819
  /**
4721
4820
  * Validates that a string is valid Base64URL encoded data (Base64 with URL-safe
4722
4821
  * characters).
@@ -4736,7 +4835,7 @@ export declare function isBase64(annotations?: Annotations.Filter): AST.Filter<s
4736
4835
  * @category String checks
4737
4836
  * @since 4.0.0
4738
4837
  */
4739
- export declare function isBase64Url(annotations?: Annotations.Filter): AST.Filter<string>;
4838
+ export declare function isBase64Url(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4740
4839
  /**
4741
4840
  * Validates at runtime that a string starts with the specified literal prefix.
4742
4841
  *
@@ -4750,7 +4849,7 @@ export declare function isBase64Url(annotations?: Annotations.Filter): AST.Filte
4750
4849
  * @category String checks
4751
4850
  * @since 4.0.0
4752
4851
  */
4753
- export declare function isStartsWith(startsWith: string, annotations?: Annotations.Filter): AST.Filter<string>;
4852
+ export declare function isStartsWith(startsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4754
4853
  /**
4755
4854
  * Validates at runtime that a string ends with the specified literal suffix.
4756
4855
  *
@@ -4764,7 +4863,7 @@ export declare function isStartsWith(startsWith: string, annotations?: Annotatio
4764
4863
  * @category String checks
4765
4864
  * @since 4.0.0
4766
4865
  */
4767
- export declare function isEndsWith(endsWith: string, annotations?: Annotations.Filter): AST.Filter<string>;
4866
+ export declare function isEndsWith(endsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4768
4867
  /**
4769
4868
  * Validates at runtime that a string contains the specified literal substring.
4770
4869
  *
@@ -4778,7 +4877,7 @@ export declare function isEndsWith(endsWith: string, annotations?: Annotations.F
4778
4877
  * @category String checks
4779
4878
  * @since 4.0.0
4780
4879
  */
4781
- export declare function isIncludes(includes: string, annotations?: Annotations.Filter): AST.Filter<string>;
4880
+ export declare function isIncludes(includes: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4782
4881
  /**
4783
4882
  * Validates that a string is unchanged by JavaScript's `toUpperCase()`.
4784
4883
  *
@@ -4791,7 +4890,7 @@ export declare function isIncludes(includes: string, annotations?: Annotations.F
4791
4890
  * @category String checks
4792
4891
  * @since 4.0.0
4793
4892
  */
4794
- export declare function isUppercased(annotations?: Annotations.Filter): AST.Filter<string>;
4893
+ export declare function isUppercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4795
4894
  /**
4796
4895
  * Validates that a string is unchanged by JavaScript's `toLowerCase()`.
4797
4896
  *
@@ -4804,7 +4903,7 @@ export declare function isUppercased(annotations?: Annotations.Filter): AST.Filt
4804
4903
  * @category String checks
4805
4904
  * @since 4.0.0
4806
4905
  */
4807
- export declare function isLowercased(annotations?: Annotations.Filter): AST.Filter<string>;
4906
+ export declare function isLowercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4808
4907
  /**
4809
4908
  * Validates that the first character of a string is unchanged by
4810
4909
  * `toUpperCase()`.
@@ -4817,7 +4916,7 @@ export declare function isLowercased(annotations?: Annotations.Filter): AST.Filt
4817
4916
  * @category String checks
4818
4917
  * @since 4.0.0
4819
4918
  */
4820
- export declare function isCapitalized(annotations?: Annotations.Filter): AST.Filter<string>;
4919
+ export declare function isCapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4821
4920
  /**
4822
4921
  * Validates that the first character of a string is unchanged by
4823
4922
  * `toLowerCase()`.
@@ -4830,7 +4929,7 @@ export declare function isCapitalized(annotations?: Annotations.Filter): AST.Fil
4830
4929
  * @category String checks
4831
4930
  * @since 4.0.0
4832
4931
  */
4833
- export declare function isUncapitalized(annotations?: Annotations.Filter): AST.Filter<string>;
4932
+ export declare function isUncapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
4834
4933
  /**
4835
4934
  * Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
4836
4935
  *
@@ -4849,7 +4948,7 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): AST.F
4849
4948
  * @category Number checks
4850
4949
  * @since 4.0.0
4851
4950
  */
4852
- export declare function isFinite(annotations?: Annotations.Filter): AST.Filter<number>;
4951
+ export declare function isFinite(annotations?: Annotations.Filter): SchemaAST.Filter<number>;
4853
4952
  /**
4854
4953
  * Creates a greater-than (`>`) check for any ordered type from an
4855
4954
  * `Order.Order` instance.
@@ -4861,7 +4960,7 @@ export declare function makeIsGreaterThan<T>(options: {
4861
4960
  readonly order: Order.Order<T>;
4862
4961
  readonly annotate?: ((exclusiveMinimum: T) => Annotations.Filter) | undefined;
4863
4962
  readonly formatter?: Formatter<T> | undefined;
4864
- }): (exclusiveMinimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
4963
+ }): (exclusiveMinimum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4865
4964
  /**
4866
4965
  * Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
4867
4966
  * `Order.Order` instance.
@@ -4873,7 +4972,7 @@ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
4873
4972
  readonly order: Order.Order<T>;
4874
4973
  readonly annotate?: ((exclusiveMinimum: T) => Annotations.Filter) | undefined;
4875
4974
  readonly formatter?: Formatter<T> | undefined;
4876
- }): (minimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
4975
+ }): (minimum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4877
4976
  /**
4878
4977
  * Creates a less-than (`<`) check for any ordered type from an `Order.Order`
4879
4978
  * instance.
@@ -4885,7 +4984,7 @@ export declare function makeIsLessThan<T>(options: {
4885
4984
  readonly order: Order.Order<T>;
4886
4985
  readonly annotate?: ((exclusiveMaximum: T) => Annotations.Filter) | undefined;
4887
4986
  readonly formatter?: Formatter<T> | undefined;
4888
- }): (exclusiveMaximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
4987
+ }): (exclusiveMaximum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4889
4988
  /**
4890
4989
  * Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
4891
4990
  * `Order.Order` instance.
@@ -4897,7 +4996,7 @@ export declare function makeIsLessThanOrEqualTo<T>(options: {
4897
4996
  readonly order: Order.Order<T>;
4898
4997
  readonly annotate?: ((exclusiveMaximum: T) => Annotations.Filter) | undefined;
4899
4998
  readonly formatter?: Formatter<T> | undefined;
4900
- }): (maximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
4999
+ }): (maximum: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4901
5000
  /**
4902
5001
  * Creates an inclusive or exclusive range check for any ordered type from an
4903
5002
  * `Order.Order` instance.
@@ -4919,7 +5018,7 @@ export declare function makeIsBetween<T>(deriveOptions: {
4919
5018
  readonly maximum: T;
4920
5019
  readonly exclusiveMinimum?: boolean | undefined;
4921
5020
  readonly exclusiveMaximum?: boolean | undefined;
4922
- }, annotations?: Annotations.Filter) => AST.Filter<T>;
5021
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4923
5022
  /**
4924
5023
  * Creates a divisibility check for any numeric type from a remainder function
4925
5024
  * and a zero value.
@@ -4932,7 +5031,7 @@ export declare function makeIsMultipleOf<T>(options: {
4932
5031
  readonly zero: NoInfer<T>;
4933
5032
  readonly annotate?: ((divisor: T) => Annotations.Filter) | undefined;
4934
5033
  readonly formatter?: Formatter<T> | undefined;
4935
- }): (divisor: T, annotations?: Annotations.Filter) => AST.Filter<T>;
5034
+ }): (divisor: T, annotations?: Annotations.Filter) => SchemaAST.Filter<T>;
4936
5035
  /**
4937
5036
  * Validates that a number is greater than the specified value (exclusive).
4938
5037
  *
@@ -4951,7 +5050,7 @@ export declare function makeIsMultipleOf<T>(options: {
4951
5050
  * @category Number checks
4952
5051
  * @since 4.0.0
4953
5052
  */
4954
- export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Annotations.Filter) => AST.Filter<number>;
5053
+ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
4955
5054
  /**
4956
5055
  * Validates that a number is greater than or equal to the specified value
4957
5056
  * (inclusive).
@@ -4970,7 +5069,7 @@ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Ann
4970
5069
  * @category Number checks
4971
5070
  * @since 4.0.0
4972
5071
  */
4973
- export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Annotations.Filter) => AST.Filter<number>;
5072
+ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
4974
5073
  /**
4975
5074
  * Validates that a number is less than the specified value (exclusive).
4976
5075
  *
@@ -4989,7 +5088,7 @@ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Ann
4989
5088
  * @category Number checks
4990
5089
  * @since 4.0.0
4991
5090
  */
4992
- export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annotations.Filter) => AST.Filter<number>;
5091
+ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
4993
5092
  /**
4994
5093
  * Validates that a number is less than or equal to the specified value
4995
5094
  * (inclusive).
@@ -5008,7 +5107,7 @@ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annota
5008
5107
  * @category Number checks
5009
5108
  * @since 4.0.0
5010
5109
  */
5011
- export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annotations.Filter) => AST.Filter<number>;
5110
+ export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
5012
5111
  /**
5013
5112
  * Validates that a number is within a specified range. The range boundaries can
5014
5113
  * be inclusive or exclusive based on the provided options.
@@ -5034,7 +5133,7 @@ export declare const isBetween: (options: {
5034
5133
  readonly maximum: number;
5035
5134
  readonly exclusiveMinimum?: boolean | undefined;
5036
5135
  readonly exclusiveMaximum?: boolean | undefined;
5037
- }, annotations?: Annotations.Filter) => AST.Filter<number>;
5136
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
5038
5137
  /**
5039
5138
  * Validates that a number is a multiple of the specified divisor.
5040
5139
  *
@@ -5052,7 +5151,7 @@ export declare const isBetween: (options: {
5052
5151
  * @category Number checks
5053
5152
  * @since 4.0.0
5054
5153
  */
5055
- export declare const isMultipleOf: (divisor: number, annotations?: Annotations.Filter) => AST.Filter<number>;
5154
+ export declare const isMultipleOf: (divisor: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
5056
5155
  /**
5057
5156
  * Validates that a number is a safe integer (within the safe integer range
5058
5157
  * that can be exactly represented in JavaScript).
@@ -5071,7 +5170,7 @@ export declare const isMultipleOf: (divisor: number, annotations?: Annotations.F
5071
5170
  * @category Integer checks
5072
5171
  * @since 4.0.0
5073
5172
  */
5074
- export declare function isInt(annotations?: Annotations.Filter): AST.Filter<number>;
5173
+ export declare function isInt(annotations?: Annotations.Filter): SchemaAST.Filter<number>;
5075
5174
  /**
5076
5175
  * Validates that a number is a 32-bit signed integer (range: -2,147,483,648 to
5077
5176
  * 2,147,483,647).
@@ -5091,7 +5190,7 @@ export declare function isInt(annotations?: Annotations.Filter): AST.Filter<numb
5091
5190
  * @category Integer checks
5092
5191
  * @since 4.0.0
5093
5192
  */
5094
- export declare function isInt32(annotations?: Annotations.Filter): AST.FilterGroup<number>;
5193
+ export declare function isInt32(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>;
5095
5194
  /**
5096
5195
  * Validates that a number is a 32-bit unsigned integer (range: 0 to
5097
5196
  * 4,294,967,295).
@@ -5111,7 +5210,7 @@ export declare function isInt32(annotations?: Annotations.Filter): AST.FilterGro
5111
5210
  * @category Integer checks
5112
5211
  * @since 4.0.0
5113
5212
  */
5114
- export declare function isUint32(annotations?: Annotations.Filter): AST.FilterGroup<number>;
5213
+ export declare function isUint32(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>;
5115
5214
  /**
5116
5215
  * Validates that a Date object represents a valid date (not an invalid date
5117
5216
  * like `new Date("invalid")`).
@@ -5131,7 +5230,7 @@ export declare function isUint32(annotations?: Annotations.Filter): AST.FilterGr
5131
5230
  * @category Date checks
5132
5231
  * @since 4.0.0
5133
5232
  */
5134
- export declare function isDateValid(annotations?: Annotations.Filter): AST.Filter<globalThis.Date>;
5233
+ export declare function isDateValid(annotations?: Annotations.Filter): SchemaAST.Filter<globalThis.Date>;
5135
5234
  /**
5136
5235
  * Validates that a Date is greater than the specified value (exclusive).
5137
5236
  *
@@ -5146,7 +5245,7 @@ export declare function isDateValid(annotations?: Annotations.Filter): AST.Filte
5146
5245
  * @category Date checks
5147
5246
  * @since 4.0.0
5148
5247
  */
5149
- export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, annotations?: Annotations.Filter) => AST.Filter<globalThis.Date>;
5248
+ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
5150
5249
  /**
5151
5250
  * Validates that a Date is greater than or equal to the specified date
5152
5251
  * (inclusive).
@@ -5167,7 +5266,7 @@ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, anno
5167
5266
  * @category Date checks
5168
5267
  * @since 4.0.0
5169
5268
  */
5170
- export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, annotations?: Annotations.Filter) => AST.Filter<globalThis.Date>;
5269
+ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
5171
5270
  /**
5172
5271
  * Validates that a Date is less than the specified value (exclusive).
5173
5272
  *
@@ -5182,7 +5281,7 @@ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, anno
5182
5281
  * @category Date checks
5183
5282
  * @since 4.0.0
5184
5283
  */
5185
- export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotations?: Annotations.Filter) => AST.Filter<globalThis.Date>;
5284
+ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
5186
5285
  /**
5187
5286
  * Validates that a Date is less than or equal to the specified date
5188
5287
  * (inclusive).
@@ -5203,7 +5302,7 @@ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotat
5203
5302
  * @category Date checks
5204
5303
  * @since 4.0.0
5205
5304
  */
5206
- export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotations?: Annotations.Filter) => AST.Filter<globalThis.Date>;
5305
+ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
5207
5306
  /**
5208
5307
  * Validates that a Date is within a specified range. The range boundaries can
5209
5308
  * be inclusive or exclusive based on the provided options.
@@ -5229,7 +5328,7 @@ export declare const isBetweenDate: (options: {
5229
5328
  readonly maximum: globalThis.Date;
5230
5329
  readonly exclusiveMinimum?: boolean | undefined;
5231
5330
  readonly exclusiveMaximum?: boolean | undefined;
5232
- }, annotations?: Annotations.Filter) => AST.Filter<globalThis.Date>;
5331
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<globalThis.Date>;
5233
5332
  /**
5234
5333
  * Validates that a BigInt is greater than the specified value (exclusive).
5235
5334
  *
@@ -5244,7 +5343,7 @@ export declare const isBetweenDate: (options: {
5244
5343
  * @category BigInt checks
5245
5344
  * @since 4.0.0
5246
5345
  */
5247
- export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations?: Annotations.Filter) => AST.Filter<bigint>;
5346
+ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
5248
5347
  /**
5249
5348
  * Validates that a BigInt is greater than or equal to the specified value
5250
5349
  * (inclusive).
@@ -5260,7 +5359,7 @@ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations
5260
5359
  * @category BigInt checks
5261
5360
  * @since 4.0.0
5262
5361
  */
5263
- export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations?: Annotations.Filter) => AST.Filter<bigint>;
5362
+ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
5264
5363
  /**
5265
5364
  * Validates that a BigInt is less than the specified value (exclusive).
5266
5365
  *
@@ -5275,7 +5374,7 @@ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations
5275
5374
  * @category BigInt checks
5276
5375
  * @since 4.0.0
5277
5376
  */
5278
- export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?: Annotations.Filter) => AST.Filter<bigint>;
5377
+ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
5279
5378
  /**
5280
5379
  * Validates that a BigInt is less than or equal to the specified value
5281
5380
  * (inclusive).
@@ -5291,7 +5390,7 @@ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?:
5291
5390
  * @category BigInt checks
5292
5391
  * @since 4.0.0
5293
5392
  */
5294
- export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?: Annotations.Filter) => AST.Filter<bigint>;
5393
+ export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
5295
5394
  /**
5296
5395
  * Validates that a BigInt is within a specified range. The range boundaries can
5297
5396
  * be inclusive or exclusive based on the provided options.
@@ -5312,14 +5411,14 @@ export declare const isBetweenBigInt: (options: {
5312
5411
  readonly maximum: bigint;
5313
5412
  readonly exclusiveMinimum?: boolean | undefined;
5314
5413
  readonly exclusiveMaximum?: boolean | undefined;
5315
- }, annotations?: Annotations.Filter) => AST.Filter<bigint>;
5414
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<bigint>;
5316
5415
  /**
5317
5416
  * Validates that a BigDecimal is greater than the specified value (exclusive).
5318
5417
  *
5319
5418
  * @category BigDecimal checks
5320
5419
  * @since 4.0.0
5321
5420
  */
5322
- export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
5421
+ export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
5323
5422
  /**
5324
5423
  * Validates that a BigDecimal is greater than or equal to the specified value
5325
5424
  * (inclusive).
@@ -5327,14 +5426,14 @@ export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.Big
5327
5426
  * @category BigDecimal checks
5328
5427
  * @since 4.0.0
5329
5428
  */
5330
- export declare const isGreaterThanOrEqualToBigDecimal: (minimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
5429
+ export declare const isGreaterThanOrEqualToBigDecimal: (minimum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
5331
5430
  /**
5332
5431
  * Validates that a BigDecimal is less than the specified value (exclusive).
5333
5432
  *
5334
5433
  * @category BigDecimal checks
5335
5434
  * @since 4.0.0
5336
5435
  */
5337
- export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
5436
+ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
5338
5437
  /**
5339
5438
  * Validates that a BigDecimal is less than or equal to the specified value
5340
5439
  * (inclusive).
@@ -5342,7 +5441,7 @@ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDec
5342
5441
  * @category BigDecimal checks
5343
5442
  * @since 4.0.0
5344
5443
  */
5345
- export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
5444
+ export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
5346
5445
  /**
5347
5446
  * Validates that a `BigDecimal` is within a specified range.
5348
5447
  *
@@ -5359,7 +5458,7 @@ export declare const isBetweenBigDecimal: (options: {
5359
5458
  readonly maximum: BigDecimal_.BigDecimal;
5360
5459
  readonly exclusiveMinimum?: boolean | undefined;
5361
5460
  readonly exclusiveMaximum?: boolean | undefined;
5362
- }, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
5461
+ }, annotations?: Annotations.Filter) => SchemaAST.Filter<BigDecimal_.BigDecimal>;
5363
5462
  /**
5364
5463
  * Validates that a value has at least the specified length. Works with strings
5365
5464
  * and arrays.
@@ -5389,7 +5488,7 @@ export declare const isBetweenBigDecimal: (options: {
5389
5488
  * @category Length checks
5390
5489
  * @since 4.0.0
5391
5490
  */
5392
- export declare function isMinLength(minLength: number, annotations?: Annotations.Filter): AST.Filter<{
5491
+ export declare function isMinLength(minLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5393
5492
  readonly length: number;
5394
5493
  }>;
5395
5494
  /**
@@ -5411,7 +5510,7 @@ export declare function isMinLength(minLength: number, annotations?: Annotations
5411
5510
  * @category Length checks
5412
5511
  * @since 4.0.0
5413
5512
  */
5414
- export declare function isNonEmpty(annotations?: Annotations.Filter): AST.Filter<{
5513
+ export declare function isNonEmpty(annotations?: Annotations.Filter): SchemaAST.Filter<{
5415
5514
  readonly length: number;
5416
5515
  }>;
5417
5516
  /**
@@ -5434,7 +5533,7 @@ export declare function isNonEmpty(annotations?: Annotations.Filter): AST.Filter
5434
5533
  * @category Length checks
5435
5534
  * @since 4.0.0
5436
5535
  */
5437
- export declare function isMaxLength(maxLength: number, annotations?: Annotations.Filter): AST.Filter<{
5536
+ export declare function isMaxLength(maxLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5438
5537
  readonly length: number;
5439
5538
  }>;
5440
5539
  /**
@@ -5457,7 +5556,7 @@ export declare function isMaxLength(maxLength: number, annotations?: Annotations
5457
5556
  * @category Length checks
5458
5557
  * @since 4.0.0
5459
5558
  */
5460
- export declare function isLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): AST.Filter<{
5559
+ export declare function isLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5461
5560
  readonly length: number;
5462
5561
  }>;
5463
5562
  /**
@@ -5480,7 +5579,7 @@ export declare function isLengthBetween(minimum: number, maximum: number, annota
5480
5579
  * @category Size checks
5481
5580
  * @since 4.0.0
5482
5581
  */
5483
- export declare function isMinSize(minSize: number, annotations?: Annotations.Filter): AST.Filter<{
5582
+ export declare function isMinSize(minSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5484
5583
  readonly size: number;
5485
5584
  }>;
5486
5585
  /**
@@ -5503,7 +5602,7 @@ export declare function isMinSize(minSize: number, annotations?: Annotations.Fil
5503
5602
  * @category Size checks
5504
5603
  * @since 4.0.0
5505
5604
  */
5506
- export declare function isMaxSize(maxSize: number, annotations?: Annotations.Filter): AST.Filter<{
5605
+ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5507
5606
  readonly size: number;
5508
5607
  }>;
5509
5608
  /**
@@ -5526,7 +5625,7 @@ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Fil
5526
5625
  * @category Size checks
5527
5626
  * @since 4.0.0
5528
5627
  */
5529
- export declare function isSizeBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): AST.Filter<{
5628
+ export declare function isSizeBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
5530
5629
  readonly size: number;
5531
5630
  }>;
5532
5631
  /**
@@ -5550,7 +5649,7 @@ export declare function isSizeBetween(minimum: number, maximum: number, annotati
5550
5649
  * @category Object checks
5551
5650
  * @since 4.0.0
5552
5651
  */
5553
- export declare function isMinProperties(minProperties: number, annotations?: Annotations.Filter): AST.Filter<object>;
5652
+ export declare function isMinProperties(minProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
5554
5653
  /**
5555
5654
  * Validates that an object contains at most the specified number of properties.
5556
5655
  * This includes both string and symbol keys when counting properties.
@@ -5571,7 +5670,7 @@ export declare function isMinProperties(minProperties: number, annotations?: Ann
5571
5670
  * @category Object checks
5572
5671
  * @since 4.0.0
5573
5672
  */
5574
- export declare function isMaxProperties(maxProperties: number, annotations?: Annotations.Filter): AST.Filter<object>;
5673
+ export declare function isMaxProperties(maxProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
5575
5674
  /**
5576
5675
  * Validates that an object contains between `minimum` and `maximum` properties (inclusive).
5577
5676
  * This includes both string and symbol keys when counting properties.
@@ -5592,7 +5691,7 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
5592
5691
  * @category Object checks
5593
5692
  * @since 4.0.0
5594
5693
  */
5595
- export declare function isPropertiesLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): AST.Filter<object>;
5694
+ export declare function isPropertiesLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
5596
5695
  /**
5597
5696
  * Validates that every own property key of an object satisfies the encoded side
5598
5697
  * of the provided key schema.
@@ -5609,7 +5708,7 @@ export declare function isPropertiesLengthBetween(minimum: number, maximum: numb
5609
5708
  * @category Object checks
5610
5709
  * @since 4.0.0
5611
5710
  */
5612
- export declare function isPropertyNames(keySchema: Top, annotations?: Annotations.Filter): AST.Filter<object>;
5711
+ export declare function isPropertyNames(keySchema: Top, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
5613
5712
  /**
5614
5713
  * Validates that all items in an array are unique according to Effect equality.
5615
5714
  *
@@ -5625,7 +5724,7 @@ export declare function isPropertyNames(keySchema: Top, annotations?: Annotation
5625
5724
  * @category Array checks
5626
5725
  * @since 4.0.0
5627
5726
  */
5628
- export declare function isUnique<T>(annotations?: Annotations.Filter): AST.Filter<readonly T[]>;
5727
+ export declare function isUnique<T>(annotations?: Annotations.Filter): SchemaAST.Filter<readonly T[]>;
5629
5728
  /**
5630
5729
  * Type-level representation of {@link NonEmptyString}.
5631
5730
  *
@@ -5720,13 +5819,8 @@ export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<
5720
5819
  *
5721
5820
  * **Details**
5722
5821
  *
5723
- * Decoding:
5724
- * - `null` is decoded as `None`
5725
- * - other values are decoded as `Some`
5726
- *
5727
- * Encoding:
5728
- * - `None` is encoded as `null`
5729
- * - `Some` is encoded as the value
5822
+ * Decoding maps `null` to `None` and all other values to `Some`. Encoding maps
5823
+ * `None` to `null` and maps `Some` to its value.
5730
5824
  *
5731
5825
  * @category Option
5732
5826
  * @since 3.10.0
@@ -5742,17 +5836,13 @@ export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<to
5742
5836
  readonly "Rebuild": OptionFromUndefinedOr<S>;
5743
5837
  }
5744
5838
  /**
5745
- * Decodes an undefined-or value `T` to a required `Option<T>` value.
5839
+ * Decodes a required value that may be `undefined` to a required `Option<T>`
5840
+ * value.
5746
5841
  *
5747
5842
  * **Details**
5748
5843
  *
5749
- * Decoding:
5750
- * - `undefined` is decoded as `None`
5751
- * - other values are decoded as `Some`
5752
- *
5753
- * Encoding:
5754
- * - `None` is encoded as `undefined`
5755
- * - `Some` is encoded as the value
5844
+ * Decoding maps `undefined` to `None` and all other values to `Some`. Encoding
5845
+ * maps `None` to `undefined` and maps `Some` to its value.
5756
5846
  *
5757
5847
  * @category Option
5758
5848
  * @since 3.10.0
@@ -5772,13 +5862,10 @@ export interface OptionFromNullishOr<S extends Top> extends decodeTo<Option<toTy
5772
5862
  *
5773
5863
  * **Details**
5774
5864
  *
5775
- * Decoding:
5776
- * - `null` and `undefined` are decoded as `None`
5777
- * - other values are decoded as `Some`
5778
- *
5779
- * Encoding:
5780
- * - `None` is encoded as `null` or `undefined` depending on the provided `options.onNoneEncoding` (defaults to `undefined`)
5781
- * - `Some` is encoded as the value
5865
+ * Decoding maps `null` and `undefined` to `None` and all other values to
5866
+ * `Some`. Encoding maps `None` to `null` or `undefined` depending on
5867
+ * `options.onNoneEncoding`, which defaults to `undefined`, and maps `Some` to
5868
+ * its value.
5782
5869
  *
5783
5870
  * @category Option
5784
5871
  * @since 3.10.0
@@ -5800,13 +5887,8 @@ export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<to
5800
5887
  *
5801
5888
  * **Details**
5802
5889
  *
5803
- * Decoding:
5804
- * - a missing key is decoded as `None`
5805
- * - a present value is decoded as `Some`
5806
- *
5807
- * Encoding:
5808
- * - `None` is encoded as missing key
5809
- * - `Some` is encoded as the value
5890
+ * Decoding maps a missing key to `None` and a present value to `Some`.
5891
+ * Encoding maps `None` to a missing key and maps `Some` to its value.
5810
5892
  *
5811
5893
  * @category Option
5812
5894
  * @since 4.0.0
@@ -5822,19 +5904,14 @@ export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toTyp
5822
5904
  readonly "Rebuild": OptionFromOptional<S>;
5823
5905
  }
5824
5906
  /**
5825
- * Decodes an optional or `undefined` value `A` to an required `Option<A>`
5907
+ * Decodes an optional or `undefined` value `A` to a required `Option<A>`
5826
5908
  * value.
5827
5909
  *
5828
5910
  * **Details**
5829
5911
  *
5830
- * Decoding:
5831
- * - a missing key is decoded as `None`
5832
- * - a present key with an `undefined` value is decoded as `None`
5833
- * - all other values are decoded as `Some`
5834
- *
5835
- * Encoding:
5836
- * - `None` is encoded as missing key
5837
- * - `Some` is encoded as the value
5912
+ * Decoding maps a missing key or a present `undefined` value to `None`, and
5913
+ * maps all other values to `Some`. Encoding maps `None` to a missing key and
5914
+ * maps `Some` to its value.
5838
5915
  *
5839
5916
  * @category Option
5840
5917
  * @since 4.0.0
@@ -5855,17 +5932,10 @@ export interface OptionFromOptionalNullOr<S extends Top> extends decodeTo<Option
5855
5932
  *
5856
5933
  * **Details**
5857
5934
  *
5858
- * Decoding:
5859
- * - a missing key is decoded as `None`
5860
- * - a present key with an `undefined` value is decoded as `None`
5861
- * - a present key with a `null` value is decoded as `None`
5862
- * - all other values are decoded as `Some`
5863
- *
5864
- * Encoding (controlled by `options.onNoneEncoding`):
5865
- * - `"omit"` (default): `None` is encoded as a missing key
5866
- * - `null`: `None` is encoded as `null`
5867
- * - `undefined`: `None` is encoded as `undefined`
5868
- * - `Some` is always encoded as the value
5935
+ * Decoding maps a missing key, `undefined`, or `null` to `None`, and maps all
5936
+ * other values to `Some`. Encoding maps `Some` to its value. `None` is encoded
5937
+ * according to `options.onNoneEncoding`: `"omit"` encodes a missing key,
5938
+ * `null` encodes `null`, and `undefined` encodes `undefined`.
5869
5939
  *
5870
5940
  * @category Option
5871
5941
  * @since 4.0.0
@@ -6013,8 +6083,8 @@ export type CauseReasonIso<E extends Top, D extends Top> = {
6013
6083
  *
6014
6084
  * **When to use**
6015
6085
  *
6016
- * Use to validate, transform, or serialize individual `Cause.Reason` values
6017
- * when typed failures and unexpected defects need separate schemas.
6086
+ * Use when serializing or decoding individual cause reasons separately from a
6087
+ * full failure cause, with distinct schemas for typed errors and defects.
6018
6088
  *
6019
6089
  * **Details**
6020
6090
  *
@@ -6185,6 +6255,11 @@ export type ExitIso<A extends Top, E extends Top, D extends Top> = {
6185
6255
  * Creates a schema for `Exit` values using schemas for the success value, typed
6186
6256
  * failure, and unexpected defect channels.
6187
6257
  *
6258
+ * **When to use**
6259
+ *
6260
+ * Use when serializing or validating an effect outcome where success, typed
6261
+ * failure, and defects each need their own schema.
6262
+ *
6188
6263
  * @category Exit
6189
6264
  * @since 3.10.0
6190
6265
  */
@@ -6404,8 +6479,8 @@ export interface Date extends instanceOf<globalThis.Date> {
6404
6479
  *
6405
6480
  * **When to use**
6406
6481
  *
6407
- * Use to validate in-memory values that must already be JavaScript `Date`
6408
- * instances.
6482
+ * Use to validate in-memory values that must already be JavaScript date
6483
+ * objects.
6409
6484
  *
6410
6485
  * **Details**
6411
6486
  *
@@ -6611,7 +6686,7 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
6611
6686
  *
6612
6687
  * **When to use**
6613
6688
  *
6614
- * Use when values are already Effect decimal instances and need schema
6689
+ * Use when you already have Effect decimal instances and need schema
6615
6690
  * validation, formatting, equivalence, and JSON string serialization.
6616
6691
  *
6617
6692
  * **Details**
@@ -7499,8 +7574,8 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
7499
7574
  *
7500
7575
  * **When to use**
7501
7576
  *
7502
- * Use when a boundary provides valid JavaScript `Date` objects but the decoded
7503
- * model should use `DateTime.Utc`.
7577
+ * Use when you need to decode valid JavaScript `Date` objects into
7578
+ * `DateTime.Utc` values.
7504
7579
  *
7505
7580
  * **Details**
7506
7581
  *
@@ -7742,7 +7817,7 @@ export declare const DateTimeZonedFromString: DateTimeZonedFromString;
7742
7817
  */
7743
7818
  export interface Class<Self, S extends Top & {
7744
7819
  readonly fields: Struct.Fields;
7745
- }, Inherited> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], AST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, RequiredKeys<S["~type.make.in"]> extends never ? void | S["~type.make.in"] : S["~type.make.in"], S["Iso"], readonly [S], Self, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
7820
+ }, Inherited> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], SchemaAST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, RequiredKeys<S["~type.make.in"]> extends never ? void | S["~type.make.in"] : S["~type.make.in"], S["Iso"], readonly [S], Self, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
7746
7821
  new (...args: {} extends S["~type.make.in"] ? [props?: S["~type.make.in"], options?: MakeOptions] : [props: S["~type.make.in"], options?: MakeOptions]): S["Type"] & Inherited;
7747
7822
  readonly identifier: string;
7748
7823
  readonly fields: S["fields"];
@@ -7776,9 +7851,8 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
7776
7851
  *
7777
7852
  * **When to use**
7778
7853
  *
7779
- * Use to define a schema-backed data class when you want validated
7780
- * construction, schema-derived decoding/encoding, and class-style methods or
7781
- * inheritance.
7854
+ * Use when you need a schema-backed data class with validated construction,
7855
+ * schema-derived decoding/encoding, and class-style methods or inheritance.
7782
7856
  *
7783
7857
  * **Details**
7784
7858
  *
@@ -7837,9 +7911,8 @@ export declare const Class: {
7837
7911
  *
7838
7912
  * **When to use**
7839
7913
  *
7840
- * Use to define a schema-backed data class when you want validated
7841
- * construction, schema-derived decoding/encoding, and class-style methods or
7842
- * inheritance.
7914
+ * Use when you need a schema-backed data class with validated construction,
7915
+ * schema-derived decoding/encoding, and class-style methods or inheritance.
7843
7916
  *
7844
7917
  * **Details**
7845
7918
  *
@@ -7898,9 +7971,8 @@ export declare const Class: {
7898
7971
  *
7899
7972
  * **When to use**
7900
7973
  *
7901
- * Use to define a schema-backed data class when you want validated
7902
- * construction, schema-derived decoding/encoding, and class-style methods or
7903
- * inheritance.
7974
+ * Use when you need a schema-backed data class with validated construction,
7975
+ * schema-derived decoding/encoding, and class-style methods or inheritance.
7904
7976
  *
7905
7977
  * **Details**
7906
7978
  *
@@ -7959,9 +8031,8 @@ export declare const Class: {
7959
8031
  *
7960
8032
  * **When to use**
7961
8033
  *
7962
- * Use to define a schema-backed data class when you want validated
7963
- * construction, schema-derived decoding/encoding, and class-style methods or
7964
- * inheritance.
8034
+ * Use when you need a schema-backed data class with validated construction,
8035
+ * schema-derived decoding/encoding, and class-style methods or inheritance.
7965
8036
  *
7966
8037
  * **Details**
7967
8038
  *
@@ -8428,7 +8499,7 @@ export declare function overrideToFormatter<S extends Top>(toFormatter: () => Fo
8428
8499
  * @since 4.0.0
8429
8500
  */
8430
8501
  export declare function toFormatter<T>(schema: Schema<T>, options?: {
8431
- readonly onBefore?: ((ast: AST.AST, recur: (ast: AST.AST) => Formatter<any>) => Formatter<any> | undefined) | undefined;
8502
+ readonly onBefore?: ((ast: SchemaAST.AST, recur: (ast: SchemaAST.AST) => Formatter<any>) => Formatter<any> | undefined) | undefined;
8432
8503
  }): Formatter<T>;
8433
8504
  /**
8434
8505
  * Overrides the equivalence derivation for a schema by supplying a custom
@@ -8436,8 +8507,8 @@ export declare function toFormatter<T>(schema: Schema<T>, options?: {
8436
8507
  *
8437
8508
  * **When to use**
8438
8509
  *
8439
- * Use when the default structural equivalence derived by {@link toEquivalence}
8440
- * is not appropriate for a type.
8510
+ * Use when you need a custom equivalence instead of the default structural
8511
+ * equivalence derived by {@link toEquivalence}.
8441
8512
  *
8442
8513
  * @category instances
8443
8514
  * @since 4.0.0
@@ -8680,8 +8751,8 @@ export interface overrideToCodecIso<S extends Top, Iso> extends Bottom<S["Type"]
8680
8751
  * @since 4.0.0
8681
8752
  */
8682
8753
  export declare function overrideToCodecIso<S extends Top, Iso>(to: Codec<Iso>, transformation: {
8683
- readonly decode: Getter.Getter<S["Type"], Iso>;
8684
- readonly encode: Getter.Getter<Iso, S["Type"]>;
8754
+ readonly decode: SchemaGetter.Getter<S["Type"], Iso>;
8755
+ readonly encode: SchemaGetter.Getter<Iso, S["Type"]>;
8685
8756
  }): (schema: S) => overrideToCodecIso<S, Iso>;
8686
8757
  /**
8687
8758
  * Derives a JSON Patch differ from a codec. Serializes values to JSON (via
@@ -8967,7 +9038,7 @@ export declare namespace Annotations {
8967
9038
  * filter/refinement instead.
8968
9039
  */
8969
9040
  readonly identifier?: string | undefined;
8970
- readonly parseOptions?: AST.ParseOptions | undefined;
9041
+ readonly parseOptions?: SchemaAST.ParseOptions | undefined;
8971
9042
  /**
8972
9043
  * Optional metadata used to identify or extend the filter with custom data.
8973
9044
  */
@@ -9016,14 +9087,15 @@ export declare namespace Annotations {
9016
9087
  * @since 4.0.0
9017
9088
  */
9018
9089
  interface Declaration<T, TypeParameters extends ReadonlyArray<Top> = readonly []> extends Bottom<T, TypeParameters> {
9019
- readonly toCodec?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => AST.Link) | undefined;
9020
- readonly toCodecJson?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => AST.Link) | undefined;
9021
- readonly toCodecIso?: ((typeParameters: TypeParameters.Type<TypeParameters>) => AST.Link) | undefined;
9090
+ readonly toCodec?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link) | undefined;
9091
+ readonly toCodecJson?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link) | undefined;
9092
+ readonly toCodecIso?: ((typeParameters: TypeParameters.Type<TypeParameters>) => SchemaAST.Link) | undefined;
9022
9093
  readonly toArbitrary?: ToArbitrary.Declaration<T, TypeParameters> | undefined;
9023
9094
  readonly toEquivalence?: ToEquivalence.Declaration<T, TypeParameters> | undefined;
9024
9095
  readonly toFormatter?: ToFormatter.Declaration<T, TypeParameters> | undefined;
9025
9096
  readonly typeConstructor?: {
9026
9097
  readonly _tag: string;
9098
+ readonly [key: string]: unknown;
9027
9099
  } | undefined;
9028
9100
  readonly generation?: {
9029
9101
  readonly runtime: string;
@@ -9429,7 +9501,7 @@ export declare namespace Annotations {
9429
9501
  };
9430
9502
  readonly isPropertyNames: {
9431
9503
  readonly _tag: "isPropertyNames";
9432
- readonly propertyNames: AST.AST;
9504
+ readonly propertyNames: SchemaAST.AST;
9433
9505
  };
9434
9506
  readonly isUnique: {
9435
9507
  readonly _tag: "isUnique";