effect 4.0.0-beta.102 → 4.0.0-beta.103

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 (1451) hide show
  1. package/dist/Array.d.ts +971 -1037
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +381 -407
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +433 -756
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +200 -325
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +207 -267
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +107 -135
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +146 -188
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +64 -84
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.js.map +1 -1
  18. package/dist/Cache.d.ts +405 -254
  19. package/dist/Cache.d.ts.map +1 -1
  20. package/dist/Cache.js +166 -101
  21. package/dist/Cache.js.map +1 -1
  22. package/dist/Cause.d.ts +167 -277
  23. package/dist/Cause.d.ts.map +1 -1
  24. package/dist/Cause.js +122 -176
  25. package/dist/Cause.js.map +1 -1
  26. package/dist/Channel.d.ts +729 -768
  27. package/dist/Channel.d.ts.map +1 -1
  28. package/dist/Channel.js +514 -440
  29. package/dist/Channel.js.map +1 -1
  30. package/dist/ChannelSchema.d.ts +1 -1
  31. package/dist/ChannelSchema.d.ts.map +1 -1
  32. package/dist/ChannelSchema.js.map +1 -1
  33. package/dist/Chunk.d.ts +834 -1173
  34. package/dist/Chunk.d.ts.map +1 -1
  35. package/dist/Chunk.js +326 -439
  36. package/dist/Chunk.js.map +1 -1
  37. package/dist/Clock.d.ts +180 -49
  38. package/dist/Clock.d.ts.map +1 -1
  39. package/dist/Clock.js +96 -31
  40. package/dist/Clock.js.map +1 -1
  41. package/dist/Combiner.d.ts +20 -33
  42. package/dist/Combiner.d.ts.map +1 -1
  43. package/dist/Combiner.js +18 -30
  44. package/dist/Combiner.js.map +1 -1
  45. package/dist/Config.d.ts +225 -173
  46. package/dist/Config.d.ts.map +1 -1
  47. package/dist/Config.js +336 -265
  48. package/dist/Config.js.map +1 -1
  49. package/dist/ConfigProvider.d.ts +194 -68
  50. package/dist/ConfigProvider.d.ts.map +1 -1
  51. package/dist/ConfigProvider.js +115 -80
  52. package/dist/ConfigProvider.js.map +1 -1
  53. package/dist/Console.d.ts +233 -33
  54. package/dist/Console.d.ts.map +1 -1
  55. package/dist/Console.js +232 -32
  56. package/dist/Console.js.map +1 -1
  57. package/dist/Context.d.ts +151 -274
  58. package/dist/Context.d.ts.map +1 -1
  59. package/dist/Context.js +171 -214
  60. package/dist/Context.js.map +1 -1
  61. package/dist/Cron.d.ts +68 -77
  62. package/dist/Cron.d.ts.map +1 -1
  63. package/dist/Cron.js +57 -66
  64. package/dist/Cron.js.map +1 -1
  65. package/dist/Crypto.d.ts +13 -15
  66. package/dist/Crypto.d.ts.map +1 -1
  67. package/dist/Crypto.js +9 -10
  68. package/dist/Crypto.js.map +1 -1
  69. package/dist/Data.d.ts +60 -80
  70. package/dist/Data.d.ts.map +1 -1
  71. package/dist/Data.js +16 -23
  72. package/dist/Data.js.map +1 -1
  73. package/dist/DateTime.d.ts +562 -660
  74. package/dist/DateTime.d.ts.map +1 -1
  75. package/dist/DateTime.js +307 -362
  76. package/dist/DateTime.js.map +1 -1
  77. package/dist/Deferred.d.ts +253 -256
  78. package/dist/Deferred.d.ts.map +1 -1
  79. package/dist/Deferred.js +104 -96
  80. package/dist/Deferred.js.map +1 -1
  81. package/dist/Duration.d.ts +216 -308
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +132 -186
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2841 -3247
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +1322 -1546
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.js.map +1 -1
  90. package/dist/Encoding.d.ts +22 -40
  91. package/dist/Encoding.d.ts.map +1 -1
  92. package/dist/Encoding.js +22 -40
  93. package/dist/Encoding.js.map +1 -1
  94. package/dist/Equal.d.ts +33 -37
  95. package/dist/Equal.d.ts.map +1 -1
  96. package/dist/Equal.js +29 -21
  97. package/dist/Equal.js.map +1 -1
  98. package/dist/Equivalence.d.ts +103 -105
  99. package/dist/Equivalence.d.ts.map +1 -1
  100. package/dist/Equivalence.js +77 -79
  101. package/dist/Equivalence.js.map +1 -1
  102. package/dist/ErrorReporter.d.ts +51 -27
  103. package/dist/ErrorReporter.d.ts.map +1 -1
  104. package/dist/ErrorReporter.js +50 -26
  105. package/dist/ErrorReporter.js.map +1 -1
  106. package/dist/ExecutionPlan.d.ts +13 -55
  107. package/dist/ExecutionPlan.d.ts.map +1 -1
  108. package/dist/ExecutionPlan.js +7 -28
  109. package/dist/ExecutionPlan.js.map +1 -1
  110. package/dist/Exit.d.ts +116 -192
  111. package/dist/Exit.d.ts.map +1 -1
  112. package/dist/Exit.js +82 -130
  113. package/dist/Exit.js.map +1 -1
  114. package/dist/Fiber.d.ts +82 -146
  115. package/dist/Fiber.d.ts.map +1 -1
  116. package/dist/Fiber.js +48 -87
  117. package/dist/Fiber.js.map +1 -1
  118. package/dist/FiberHandle.d.ts +152 -105
  119. package/dist/FiberHandle.d.ts.map +1 -1
  120. package/dist/FiberHandle.js +106 -73
  121. package/dist/FiberHandle.js.map +1 -1
  122. package/dist/FiberMap.d.ts +213 -168
  123. package/dist/FiberMap.d.ts.map +1 -1
  124. package/dist/FiberMap.js +114 -89
  125. package/dist/FiberMap.js.map +1 -1
  126. package/dist/FiberSet.d.ts +123 -81
  127. package/dist/FiberSet.d.ts.map +1 -1
  128. package/dist/FiberSet.js +85 -59
  129. package/dist/FiberSet.js.map +1 -1
  130. package/dist/FileSystem.d.ts +153 -264
  131. package/dist/FileSystem.d.ts.map +1 -1
  132. package/dist/FileSystem.js +42 -147
  133. package/dist/FileSystem.js.map +1 -1
  134. package/dist/Filter.d.ts +61 -33
  135. package/dist/Filter.d.ts.map +1 -1
  136. package/dist/Filter.js +26 -15
  137. package/dist/Filter.js.map +1 -1
  138. package/dist/Formatter.d.ts +25 -33
  139. package/dist/Formatter.d.ts.map +1 -1
  140. package/dist/Formatter.js +48 -49
  141. package/dist/Formatter.js.map +1 -1
  142. package/dist/Function.d.ts +76 -145
  143. package/dist/Function.d.ts.map +1 -1
  144. package/dist/Function.js +40 -57
  145. package/dist/Function.js.map +1 -1
  146. package/dist/Graph.d.ts +360 -714
  147. package/dist/Graph.d.ts.map +1 -1
  148. package/dist/Graph.js +168 -297
  149. package/dist/Graph.js.map +1 -1
  150. package/dist/HKT.d.ts +12 -6
  151. package/dist/HKT.d.ts.map +1 -1
  152. package/dist/Hash.d.ts +47 -83
  153. package/dist/Hash.d.ts.map +1 -1
  154. package/dist/Hash.js +46 -68
  155. package/dist/Hash.js.map +1 -1
  156. package/dist/HashMap.d.ts +319 -411
  157. package/dist/HashMap.d.ts.map +1 -1
  158. package/dist/HashMap.js +122 -166
  159. package/dist/HashMap.js.map +1 -1
  160. package/dist/HashRing.d.ts.map +1 -1
  161. package/dist/HashRing.js +1 -0
  162. package/dist/HashRing.js.map +1 -1
  163. package/dist/HashSet.d.ts +177 -284
  164. package/dist/HashSet.d.ts.map +1 -1
  165. package/dist/HashSet.js +68 -109
  166. package/dist/HashSet.js.map +1 -1
  167. package/dist/Inspectable.d.ts +12 -12
  168. package/dist/Inspectable.js +8 -8
  169. package/dist/Inspectable.js.map +1 -1
  170. package/dist/Iterable.d.ts +620 -786
  171. package/dist/Iterable.d.ts.map +1 -1
  172. package/dist/Iterable.js +228 -306
  173. package/dist/Iterable.js.map +1 -1
  174. package/dist/JsonPatch.d.ts +11 -13
  175. package/dist/JsonPatch.d.ts.map +1 -1
  176. package/dist/JsonPatch.js +44 -102
  177. package/dist/JsonPatch.js.map +1 -1
  178. package/dist/JsonPointer.d.ts +8 -8
  179. package/dist/JsonPointer.js +8 -8
  180. package/dist/JsonPointer.js.map +1 -1
  181. package/dist/JsonSchema.d.ts +98 -44
  182. package/dist/JsonSchema.d.ts.map +1 -1
  183. package/dist/JsonSchema.js +297 -234
  184. package/dist/JsonSchema.js.map +1 -1
  185. package/dist/Latch.d.ts +23 -35
  186. package/dist/Latch.d.ts.map +1 -1
  187. package/dist/Latch.js +16 -28
  188. package/dist/Latch.js.map +1 -1
  189. package/dist/Layer.d.ts +359 -260
  190. package/dist/Layer.d.ts.map +1 -1
  191. package/dist/Layer.js +195 -175
  192. package/dist/Layer.js.map +1 -1
  193. package/dist/LayerMap.d.ts +42 -29
  194. package/dist/LayerMap.d.ts.map +1 -1
  195. package/dist/LayerMap.js +31 -21
  196. package/dist/LayerMap.js.map +1 -1
  197. package/dist/LayerRef.d.ts +6 -2
  198. package/dist/LayerRef.d.ts.map +1 -1
  199. package/dist/LayerRef.js +6 -2
  200. package/dist/LayerRef.js.map +1 -1
  201. package/dist/LogLevel.d.ts +114 -214
  202. package/dist/LogLevel.d.ts.map +1 -1
  203. package/dist/LogLevel.js +41 -76
  204. package/dist/LogLevel.js.map +1 -1
  205. package/dist/Logger.d.ts +218 -467
  206. package/dist/Logger.d.ts.map +1 -1
  207. package/dist/Logger.js +204 -450
  208. package/dist/Logger.js.map +1 -1
  209. package/dist/ManagedRuntime.d.ts +7 -5
  210. package/dist/ManagedRuntime.d.ts.map +1 -1
  211. package/dist/ManagedRuntime.js +7 -5
  212. package/dist/ManagedRuntime.js.map +1 -1
  213. package/dist/Match.d.ts +217 -252
  214. package/dist/Match.d.ts.map +1 -1
  215. package/dist/Match.js +150 -183
  216. package/dist/Match.js.map +1 -1
  217. package/dist/Metric.d.ts +442 -993
  218. package/dist/Metric.d.ts.map +1 -1
  219. package/dist/Metric.js +198 -642
  220. package/dist/Metric.js.map +1 -1
  221. package/dist/MutableHashMap.d.ts +144 -173
  222. package/dist/MutableHashMap.d.ts.map +1 -1
  223. package/dist/MutableHashMap.js +68 -79
  224. package/dist/MutableHashMap.js.map +1 -1
  225. package/dist/MutableHashSet.d.ts +84 -89
  226. package/dist/MutableHashSet.d.ts.map +1 -1
  227. package/dist/MutableHashSet.js +44 -47
  228. package/dist/MutableHashSet.js.map +1 -1
  229. package/dist/MutableList.d.ts +71 -370
  230. package/dist/MutableList.d.ts.map +1 -1
  231. package/dist/MutableList.js +59 -284
  232. package/dist/MutableList.js.map +1 -1
  233. package/dist/MutableRef.d.ts +420 -243
  234. package/dist/MutableRef.d.ts.map +1 -1
  235. package/dist/MutableRef.js +209 -120
  236. package/dist/MutableRef.js.map +1 -1
  237. package/dist/Newtype.d.ts +21 -14
  238. package/dist/Newtype.d.ts.map +1 -1
  239. package/dist/Newtype.js +15 -13
  240. package/dist/Newtype.js.map +1 -1
  241. package/dist/NonEmptyIterable.d.ts +7 -137
  242. package/dist/NonEmptyIterable.d.ts.map +1 -1
  243. package/dist/NonEmptyIterable.js +5 -93
  244. package/dist/NonEmptyIterable.js.map +1 -1
  245. package/dist/Number.d.ts +196 -233
  246. package/dist/Number.d.ts.map +1 -1
  247. package/dist/Number.js +90 -109
  248. package/dist/Number.js.map +1 -1
  249. package/dist/Optic.d.ts +97 -189
  250. package/dist/Optic.d.ts.map +1 -1
  251. package/dist/Optic.js +187 -290
  252. package/dist/Optic.js.map +1 -1
  253. package/dist/Option.d.ts +447 -812
  254. package/dist/Option.d.ts.map +1 -1
  255. package/dist/Option.js +211 -392
  256. package/dist/Option.js.map +1 -1
  257. package/dist/Order.d.ts +109 -109
  258. package/dist/Order.js +91 -91
  259. package/dist/Order.js.map +1 -1
  260. package/dist/Ordering.d.ts +20 -23
  261. package/dist/Ordering.d.ts.map +1 -1
  262. package/dist/Ordering.js +8 -9
  263. package/dist/Ordering.js.map +1 -1
  264. package/dist/PartitionedSemaphore.js.map +1 -1
  265. package/dist/Path.d.ts +38 -41
  266. package/dist/Path.d.ts.map +1 -1
  267. package/dist/Path.js +3 -4
  268. package/dist/Path.js.map +1 -1
  269. package/dist/Pipeable.d.ts +6 -5
  270. package/dist/Pipeable.d.ts.map +1 -1
  271. package/dist/Pipeable.js +2 -2
  272. package/dist/Pipeable.js.map +1 -1
  273. package/dist/PlatformError.d.ts +4 -4
  274. package/dist/PlatformError.js +3 -3
  275. package/dist/PlatformError.js.map +1 -1
  276. package/dist/Pool.d.ts +4 -2
  277. package/dist/Pool.d.ts.map +1 -1
  278. package/dist/Pool.js +4 -2
  279. package/dist/Pool.js.map +1 -1
  280. package/dist/Predicate.d.ts +200 -181
  281. package/dist/Predicate.d.ts.map +1 -1
  282. package/dist/Predicate.js +100 -108
  283. package/dist/Predicate.js.map +1 -1
  284. package/dist/PrimaryKey.d.ts +7 -7
  285. package/dist/PrimaryKey.js +5 -5
  286. package/dist/PrimaryKey.js.map +1 -1
  287. package/dist/PubSub.d.ts +425 -494
  288. package/dist/PubSub.d.ts.map +1 -1
  289. package/dist/PubSub.js +373 -362
  290. package/dist/PubSub.js.map +1 -1
  291. package/dist/Pull.d.ts +24 -18
  292. package/dist/Pull.d.ts.map +1 -1
  293. package/dist/Pull.js +11 -9
  294. package/dist/Pull.js.map +1 -1
  295. package/dist/Queue.d.ts +200 -159
  296. package/dist/Queue.d.ts.map +1 -1
  297. package/dist/Queue.js +162 -132
  298. package/dist/Queue.js.map +1 -1
  299. package/dist/Random.d.ts +49 -74
  300. package/dist/Random.d.ts.map +1 -1
  301. package/dist/Random.js +35 -54
  302. package/dist/Random.js.map +1 -1
  303. package/dist/RcMap.d.ts +121 -63
  304. package/dist/RcMap.d.ts.map +1 -1
  305. package/dist/RcMap.js +42 -21
  306. package/dist/RcMap.js.map +1 -1
  307. package/dist/RcRef.d.ts +24 -13
  308. package/dist/RcRef.d.ts.map +1 -1
  309. package/dist/RcRef.js +15 -9
  310. package/dist/RcRef.js.map +1 -1
  311. package/dist/Record.d.ts +291 -488
  312. package/dist/Record.d.ts.map +1 -1
  313. package/dist/Record.js +111 -202
  314. package/dist/Record.js.map +1 -1
  315. package/dist/Redactable.d.ts +6 -2
  316. package/dist/Redactable.d.ts.map +1 -1
  317. package/dist/Redactable.js +7 -2
  318. package/dist/Redactable.js.map +1 -1
  319. package/dist/Redacted.d.ts +25 -25
  320. package/dist/Redacted.d.ts.map +1 -1
  321. package/dist/Redacted.js +19 -20
  322. package/dist/Redacted.js.map +1 -1
  323. package/dist/Reducer.d.ts +8 -15
  324. package/dist/Reducer.d.ts.map +1 -1
  325. package/dist/Reducer.js +6 -12
  326. package/dist/Reducer.js.map +1 -1
  327. package/dist/Ref.d.ts +95 -165
  328. package/dist/Ref.d.ts.map +1 -1
  329. package/dist/Ref.js +75 -122
  330. package/dist/Ref.js.map +1 -1
  331. package/dist/References.d.ts +102 -168
  332. package/dist/References.d.ts.map +1 -1
  333. package/dist/References.js +102 -168
  334. package/dist/References.js.map +1 -1
  335. package/dist/RegExp.d.ts +10 -14
  336. package/dist/RegExp.d.ts.map +1 -1
  337. package/dist/RegExp.js +10 -14
  338. package/dist/RegExp.js.map +1 -1
  339. package/dist/Request.d.ts +31 -21
  340. package/dist/Request.d.ts.map +1 -1
  341. package/dist/Request.js +16 -13
  342. package/dist/Request.js.map +1 -1
  343. package/dist/RequestResolver.d.ts +201 -90
  344. package/dist/RequestResolver.d.ts.map +1 -1
  345. package/dist/RequestResolver.js +87 -41
  346. package/dist/RequestResolver.js.map +1 -1
  347. package/dist/Resource.js.map +1 -1
  348. package/dist/Result.d.ts +302 -470
  349. package/dist/Result.d.ts.map +1 -1
  350. package/dist/Result.js +133 -217
  351. package/dist/Result.js.map +1 -1
  352. package/dist/Runtime.d.ts +50 -75
  353. package/dist/Runtime.d.ts.map +1 -1
  354. package/dist/Runtime.js +39 -60
  355. package/dist/Runtime.js.map +1 -1
  356. package/dist/Schedule.d.ts +290 -1636
  357. package/dist/Schedule.d.ts.map +1 -1
  358. package/dist/Schedule.js +162 -803
  359. package/dist/Schedule.js.map +1 -1
  360. package/dist/Scheduler.d.ts +5 -5
  361. package/dist/Scheduler.d.ts.map +1 -1
  362. package/dist/Scheduler.js +18 -6
  363. package/dist/Scheduler.js.map +1 -1
  364. package/dist/Schema.d.ts +644 -642
  365. package/dist/Schema.d.ts.map +1 -1
  366. package/dist/Schema.js +491 -527
  367. package/dist/Schema.js.map +1 -1
  368. package/dist/SchemaAST.d.ts +27 -50
  369. package/dist/SchemaAST.d.ts.map +1 -1
  370. package/dist/SchemaAST.js +366 -279
  371. package/dist/SchemaAST.js.map +1 -1
  372. package/dist/SchemaError.d.ts +7 -6
  373. package/dist/SchemaError.d.ts.map +1 -1
  374. package/dist/SchemaError.js +7 -6
  375. package/dist/SchemaError.js.map +1 -1
  376. package/dist/SchemaGetter.d.ts +217 -174
  377. package/dist/SchemaGetter.d.ts.map +1 -1
  378. package/dist/SchemaGetter.js +218 -185
  379. package/dist/SchemaGetter.js.map +1 -1
  380. package/dist/SchemaIssue.d.ts +62 -190
  381. package/dist/SchemaIssue.d.ts.map +1 -1
  382. package/dist/SchemaIssue.js +73 -265
  383. package/dist/SchemaIssue.js.map +1 -1
  384. package/dist/SchemaParser.d.ts +2 -2
  385. package/dist/SchemaParser.d.ts.map +1 -1
  386. package/dist/SchemaParser.js +123 -75
  387. package/dist/SchemaParser.js.map +1 -1
  388. package/dist/SchemaRepresentation.d.ts +22 -36
  389. package/dist/SchemaRepresentation.d.ts.map +1 -1
  390. package/dist/SchemaRepresentation.js +20 -26
  391. package/dist/SchemaRepresentation.js.map +1 -1
  392. package/dist/SchemaTransformation.d.ts +114 -74
  393. package/dist/SchemaTransformation.d.ts.map +1 -1
  394. package/dist/SchemaTransformation.js +120 -85
  395. package/dist/SchemaTransformation.js.map +1 -1
  396. package/dist/Scope.d.ts +123 -151
  397. package/dist/Scope.d.ts.map +1 -1
  398. package/dist/Scope.js +72 -92
  399. package/dist/Scope.js.map +1 -1
  400. package/dist/ScopedCache.js.map +1 -1
  401. package/dist/ScopedRef.d.ts +3 -3
  402. package/dist/ScopedRef.js +2 -2
  403. package/dist/ScopedRef.js.map +1 -1
  404. package/dist/Semaphore.d.ts +96 -10
  405. package/dist/Semaphore.d.ts.map +1 -1
  406. package/dist/Semaphore.js +78 -39
  407. package/dist/Semaphore.js.map +1 -1
  408. package/dist/Sink.d.ts +117 -107
  409. package/dist/Sink.d.ts.map +1 -1
  410. package/dist/Sink.js +107 -100
  411. package/dist/Sink.js.map +1 -1
  412. package/dist/Stdio.d.ts +1 -1
  413. package/dist/Stdio.js.map +1 -1
  414. package/dist/Stream.d.ts +2415 -2949
  415. package/dist/Stream.d.ts.map +1 -1
  416. package/dist/Stream.js +1078 -1381
  417. package/dist/Stream.js.map +1 -1
  418. package/dist/String.d.ts +262 -308
  419. package/dist/String.d.ts.map +1 -1
  420. package/dist/String.js +184 -215
  421. package/dist/String.js.map +1 -1
  422. package/dist/Struct.d.ts +109 -114
  423. package/dist/Struct.d.ts.map +1 -1
  424. package/dist/Struct.js +41 -50
  425. package/dist/Struct.js.map +1 -1
  426. package/dist/SubscriptionRef.d.ts +282 -250
  427. package/dist/SubscriptionRef.d.ts.map +1 -1
  428. package/dist/SubscriptionRef.js +104 -92
  429. package/dist/SubscriptionRef.js.map +1 -1
  430. package/dist/Symbol.d.ts +3 -3
  431. package/dist/Symbol.js +3 -3
  432. package/dist/Symbol.js.map +1 -1
  433. package/dist/SynchronizedRef.js.map +1 -1
  434. package/dist/Take.js.map +1 -1
  435. package/dist/Terminal.d.ts +2 -2
  436. package/dist/Terminal.js +1 -1
  437. package/dist/Terminal.js.map +1 -1
  438. package/dist/Tracer.d.ts +100 -54
  439. package/dist/Tracer.d.ts.map +1 -1
  440. package/dist/Tracer.js +41 -24
  441. package/dist/Tracer.js.map +1 -1
  442. package/dist/Trie.d.ts +287 -679
  443. package/dist/Trie.d.ts.map +1 -1
  444. package/dist/Trie.js +109 -251
  445. package/dist/Trie.js.map +1 -1
  446. package/dist/Tuple.d.ts +92 -127
  447. package/dist/Tuple.d.ts.map +1 -1
  448. package/dist/Tuple.js +42 -57
  449. package/dist/Tuple.js.map +1 -1
  450. package/dist/TxChunk.d.ts +201 -121
  451. package/dist/TxChunk.d.ts.map +1 -1
  452. package/dist/TxChunk.js +85 -56
  453. package/dist/TxChunk.js.map +1 -1
  454. package/dist/TxDeferred.d.ts +62 -46
  455. package/dist/TxDeferred.d.ts.map +1 -1
  456. package/dist/TxDeferred.js +30 -22
  457. package/dist/TxDeferred.js.map +1 -1
  458. package/dist/TxHashMap.d.ts +631 -779
  459. package/dist/TxHashMap.d.ts.map +1 -1
  460. package/dist/TxHashMap.js +268 -330
  461. package/dist/TxHashMap.js.map +1 -1
  462. package/dist/TxHashSet.d.ts +297 -236
  463. package/dist/TxHashSet.d.ts.map +1 -1
  464. package/dist/TxHashSet.js +130 -100
  465. package/dist/TxHashSet.js.map +1 -1
  466. package/dist/TxPriorityQueue.d.ts +126 -95
  467. package/dist/TxPriorityQueue.d.ts.map +1 -1
  468. package/dist/TxPriorityQueue.js +74 -56
  469. package/dist/TxPriorityQueue.js.map +1 -1
  470. package/dist/TxPubSub.d.ts +101 -88
  471. package/dist/TxPubSub.d.ts.map +1 -1
  472. package/dist/TxPubSub.js +87 -66
  473. package/dist/TxPubSub.js.map +1 -1
  474. package/dist/TxQueue.d.ts +200 -180
  475. package/dist/TxQueue.d.ts.map +1 -1
  476. package/dist/TxQueue.js +160 -136
  477. package/dist/TxQueue.js.map +1 -1
  478. package/dist/TxReentrantLock.d.ts +97 -66
  479. package/dist/TxReentrantLock.d.ts.map +1 -1
  480. package/dist/TxReentrantLock.js +67 -45
  481. package/dist/TxReentrantLock.js.map +1 -1
  482. package/dist/TxRef.d.ts +51 -32
  483. package/dist/TxRef.d.ts.map +1 -1
  484. package/dist/TxRef.js +23 -15
  485. package/dist/TxRef.js.map +1 -1
  486. package/dist/TxSemaphore.d.ts +129 -95
  487. package/dist/TxSemaphore.d.ts.map +1 -1
  488. package/dist/TxSemaphore.js +85 -70
  489. package/dist/TxSemaphore.js.map +1 -1
  490. package/dist/TxSubscriptionRef.d.ts +97 -70
  491. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  492. package/dist/TxSubscriptionRef.js +44 -34
  493. package/dist/TxSubscriptionRef.js.map +1 -1
  494. package/dist/Types.d.ts +126 -67
  495. package/dist/Types.d.ts.map +1 -1
  496. package/dist/UndefinedOr.js.map +1 -1
  497. package/dist/Unify.d.ts +45 -65
  498. package/dist/Unify.d.ts.map +1 -1
  499. package/dist/Unify.js +6 -9
  500. package/dist/Unify.js.map +1 -1
  501. package/dist/Utils.d.ts +23 -16
  502. package/dist/Utils.d.ts.map +1 -1
  503. package/dist/Utils.js +3 -7
  504. package/dist/Utils.js.map +1 -1
  505. package/dist/index.js.map +1 -1
  506. package/dist/internal/array.js.map +1 -1
  507. package/dist/internal/core.js +1 -1
  508. package/dist/internal/core.js.map +1 -1
  509. package/dist/internal/dateTime.js +4 -0
  510. package/dist/internal/dateTime.js.map +1 -1
  511. package/dist/internal/doNotation.js.map +1 -1
  512. package/dist/internal/effect.js +77 -40
  513. package/dist/internal/effect.js.map +1 -1
  514. package/dist/internal/equal.js.map +1 -1
  515. package/dist/internal/errors.js.map +1 -1
  516. package/dist/internal/executionPlan.js.map +1 -1
  517. package/dist/internal/hashMap.js.map +1 -1
  518. package/dist/internal/hashSet.js.map +1 -1
  519. package/dist/internal/layer.js.map +1 -1
  520. package/dist/internal/matcher.js.map +1 -1
  521. package/dist/internal/metric.js.map +1 -1
  522. package/dist/internal/option.js.map +1 -1
  523. package/dist/internal/persistence.d.ts +2 -0
  524. package/dist/internal/persistence.d.ts.map +1 -0
  525. package/dist/internal/persistence.js +3 -0
  526. package/dist/internal/persistence.js.map +1 -0
  527. package/dist/internal/random.js.map +1 -1
  528. package/dist/internal/rcRef.js.map +1 -1
  529. package/dist/internal/record.js.map +1 -1
  530. package/dist/internal/redacted.js.map +1 -1
  531. package/dist/internal/references.js +3 -0
  532. package/dist/internal/references.js.map +1 -1
  533. package/dist/internal/request.js.map +1 -1
  534. package/dist/internal/result.js.map +1 -1
  535. package/dist/internal/schedule.js.map +1 -1
  536. package/dist/internal/schema/annotations.js.map +1 -1
  537. package/dist/internal/schema/cause.js.map +1 -1
  538. package/dist/internal/schema/fromJsonSchemaDocument.js +13 -11
  539. package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
  540. package/dist/internal/schema/fromRepresentation.js +8 -15
  541. package/dist/internal/schema/fromRepresentation.js.map +1 -1
  542. package/dist/internal/schema/parser.d.ts +14 -0
  543. package/dist/internal/schema/parser.d.ts.map +1 -0
  544. package/dist/internal/schema/parser.js +13 -0
  545. package/dist/internal/schema/parser.js.map +1 -0
  546. package/dist/internal/schema/schema.js.map +1 -1
  547. package/dist/internal/schema/toArbitrary.js.map +1 -1
  548. package/dist/internal/schema/toCodeDocument.js.map +1 -1
  549. package/dist/internal/schema/toEquivalence.js.map +1 -1
  550. package/dist/internal/schema/toJsonSchemaDocument.js +48 -6
  551. package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
  552. package/dist/internal/schema/toRepresentation.js +87 -107
  553. package/dist/internal/schema/toRepresentation.js.map +1 -1
  554. package/dist/internal/stackTraceLimit.js.map +1 -1
  555. package/dist/internal/stream.js.map +1 -1
  556. package/dist/internal/tracer.js.map +1 -1
  557. package/dist/internal/trie.js +13 -9
  558. package/dist/internal/trie.js.map +1 -1
  559. package/dist/testing/FastCheck.d.ts +8 -7
  560. package/dist/testing/FastCheck.d.ts.map +1 -1
  561. package/dist/testing/FastCheck.js +8 -7
  562. package/dist/testing/FastCheck.js.map +1 -1
  563. package/dist/testing/TestClock.d.ts +57 -28
  564. package/dist/testing/TestClock.d.ts.map +1 -1
  565. package/dist/testing/TestClock.js +50 -18
  566. package/dist/testing/TestClock.js.map +1 -1
  567. package/dist/testing/TestConsole.d.ts +32 -31
  568. package/dist/testing/TestConsole.d.ts.map +1 -1
  569. package/dist/testing/TestConsole.js +24 -22
  570. package/dist/testing/TestConsole.js.map +1 -1
  571. package/dist/testing/TestSchema.d.ts +29 -29
  572. package/dist/testing/TestSchema.js +25 -25
  573. package/dist/testing/TestSchema.js.map +1 -1
  574. package/dist/testing/index.js.map +1 -1
  575. package/dist/unstable/ai/AiError.d.ts +95 -118
  576. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  577. package/dist/unstable/ai/AiError.js +94 -117
  578. package/dist/unstable/ai/AiError.js.map +1 -1
  579. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  580. package/dist/unstable/ai/AnthropicStructuredOutput.js +1 -1
  581. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  582. package/dist/unstable/ai/Chat.d.ts +132 -97
  583. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  584. package/dist/unstable/ai/Chat.js +55 -51
  585. package/dist/unstable/ai/Chat.js.map +1 -1
  586. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  587. package/dist/unstable/ai/IdGenerator.d.ts +32 -28
  588. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  589. package/dist/unstable/ai/IdGenerator.js +26 -21
  590. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  591. package/dist/unstable/ai/LanguageModel.d.ts +107 -67
  592. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  593. package/dist/unstable/ai/LanguageModel.js +104 -64
  594. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  595. package/dist/unstable/ai/McpProtocol.d.ts +30 -0
  596. package/dist/unstable/ai/McpProtocol.d.ts.map +1 -0
  597. package/dist/unstable/ai/McpProtocol.js +20 -0
  598. package/dist/unstable/ai/McpProtocol.js.map +1 -0
  599. package/dist/unstable/ai/McpSchema.d.ts +141 -75
  600. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  601. package/dist/unstable/ai/McpSchema.js +58 -50
  602. package/dist/unstable/ai/McpSchema.js.map +1 -1
  603. package/dist/unstable/ai/McpServer.d.ts +68 -59
  604. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  605. package/dist/unstable/ai/McpServer.js +694 -241
  606. package/dist/unstable/ai/McpServer.js.map +1 -1
  607. package/dist/unstable/ai/Model.d.ts +8 -19
  608. package/dist/unstable/ai/Model.d.ts.map +1 -1
  609. package/dist/unstable/ai/Model.js +9 -20
  610. package/dist/unstable/ai/Model.js.map +1 -1
  611. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  612. package/dist/unstable/ai/OpenAiStructuredOutput.js +1 -1
  613. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  614. package/dist/unstable/ai/Prompt.d.ts +112 -38
  615. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  616. package/dist/unstable/ai/Prompt.js +53 -17
  617. package/dist/unstable/ai/Prompt.js.map +1 -1
  618. package/dist/unstable/ai/Response.d.ts +28 -14
  619. package/dist/unstable/ai/Response.d.ts.map +1 -1
  620. package/dist/unstable/ai/Response.js +9 -4
  621. package/dist/unstable/ai/Response.js.map +1 -1
  622. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  623. package/dist/unstable/ai/Telemetry.d.ts +46 -13
  624. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  625. package/dist/unstable/ai/Telemetry.js +18 -7
  626. package/dist/unstable/ai/Telemetry.js.map +1 -1
  627. package/dist/unstable/ai/Tokenizer.d.ts +14 -3
  628. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  629. package/dist/unstable/ai/Tokenizer.js +10 -2
  630. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  631. package/dist/unstable/ai/Tool.d.ts +59 -44
  632. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  633. package/dist/unstable/ai/Tool.js +48 -39
  634. package/dist/unstable/ai/Tool.js.map +1 -1
  635. package/dist/unstable/ai/Toolkit.d.ts +26 -8
  636. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  637. package/dist/unstable/ai/Toolkit.js +18 -4
  638. package/dist/unstable/ai/Toolkit.js.map +1 -1
  639. package/dist/unstable/ai/index.d.ts +4 -0
  640. package/dist/unstable/ai/index.d.ts.map +1 -1
  641. package/dist/unstable/ai/index.js +4 -0
  642. package/dist/unstable/ai/index.js.map +1 -1
  643. package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
  644. package/dist/unstable/ai/internal/mcpProtocol.d.ts +21 -0
  645. package/dist/unstable/ai/internal/mcpProtocol.d.ts.map +1 -0
  646. package/dist/unstable/ai/internal/mcpProtocol.js +22 -0
  647. package/dist/unstable/ai/internal/mcpProtocol.js.map +1 -0
  648. package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts +2 -0
  649. package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts.map +1 -0
  650. package/dist/unstable/ai/internal/mcpProtocolRegistry.js +32 -0
  651. package/dist/unstable/ai/internal/mcpProtocolRegistry.js.map +1 -0
  652. package/dist/unstable/ai/internal/structured-output.js +14 -15
  653. package/dist/unstable/ai/internal/structured-output.js.map +1 -1
  654. package/dist/unstable/cli/Argument.d.ts +273 -69
  655. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  656. package/dist/unstable/cli/Argument.js +111 -33
  657. package/dist/unstable/cli/Argument.js.map +1 -1
  658. package/dist/unstable/cli/CliConfig.js.map +1 -1
  659. package/dist/unstable/cli/CliError.d.ts +69 -76
  660. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  661. package/dist/unstable/cli/CliError.js +57 -61
  662. package/dist/unstable/cli/CliError.js.map +1 -1
  663. package/dist/unstable/cli/CliOutput.d.ts +35 -54
  664. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  665. package/dist/unstable/cli/CliOutput.js +26 -42
  666. package/dist/unstable/cli/CliOutput.js.map +1 -1
  667. package/dist/unstable/cli/Command.d.ts +705 -107
  668. package/dist/unstable/cli/Command.d.ts.map +1 -1
  669. package/dist/unstable/cli/Command.js +238 -42
  670. package/dist/unstable/cli/Command.js.map +1 -1
  671. package/dist/unstable/cli/Completions.js.map +1 -1
  672. package/dist/unstable/cli/Flag.d.ts +418 -138
  673. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  674. package/dist/unstable/cli/Flag.js +197 -71
  675. package/dist/unstable/cli/Flag.js.map +1 -1
  676. package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
  677. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  678. package/dist/unstable/cli/HelpDoc.d.ts +12 -4
  679. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  680. package/dist/unstable/cli/Param.d.ts +292 -78
  681. package/dist/unstable/cli/Param.d.ts.map +1 -1
  682. package/dist/unstable/cli/Param.js +128 -46
  683. package/dist/unstable/cli/Param.js.map +1 -1
  684. package/dist/unstable/cli/Primitive.d.ts +370 -149
  685. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  686. package/dist/unstable/cli/Primitive.js +344 -136
  687. package/dist/unstable/cli/Primitive.js.map +1 -1
  688. package/dist/unstable/cli/Prompt.d.ts +23 -14
  689. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  690. package/dist/unstable/cli/Prompt.js +23 -14
  691. package/dist/unstable/cli/Prompt.js.map +1 -1
  692. package/dist/unstable/cli/index.js.map +1 -1
  693. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  694. package/dist/unstable/cli/internal/auto-suggest.js.map +1 -1
  695. package/dist/unstable/cli/internal/command.js.map +1 -1
  696. package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
  697. package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
  698. package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
  699. package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
  700. package/dist/unstable/cli/internal/config.js.map +1 -1
  701. package/dist/unstable/cli/internal/help.js.map +1 -1
  702. package/dist/unstable/cli/internal/lexer.js +17 -7
  703. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  704. package/dist/unstable/cli/internal/parser.js +2 -2
  705. package/dist/unstable/cli/internal/parser.js.map +1 -1
  706. package/dist/unstable/cli/internal/wizard.js.map +1 -1
  707. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  708. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  709. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  710. package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
  711. package/dist/unstable/cluster/ClusterSchema.js +8 -8
  712. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  713. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  714. package/dist/unstable/cluster/ClusterWorkflowEngine.js +5 -1
  715. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  716. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  717. package/dist/unstable/cluster/Entity.d.ts +10 -10
  718. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  719. package/dist/unstable/cluster/Entity.js +8 -8
  720. package/dist/unstable/cluster/Entity.js.map +1 -1
  721. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  722. package/dist/unstable/cluster/EntityId.js.map +1 -1
  723. package/dist/unstable/cluster/EntityProxy.d.ts +4 -2
  724. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  725. package/dist/unstable/cluster/EntityProxy.js +4 -2
  726. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  727. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  728. package/dist/unstable/cluster/EntityResource.d.ts +2 -2
  729. package/dist/unstable/cluster/EntityResource.js +2 -2
  730. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  731. package/dist/unstable/cluster/EntityType.js.map +1 -1
  732. package/dist/unstable/cluster/Envelope.d.ts +3 -3
  733. package/dist/unstable/cluster/Envelope.js +3 -3
  734. package/dist/unstable/cluster/Envelope.js.map +1 -1
  735. package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
  736. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  737. package/dist/unstable/cluster/HttpRunner.js +6 -4
  738. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  739. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  740. package/dist/unstable/cluster/MachineId.js.map +1 -1
  741. package/dist/unstable/cluster/Message.d.ts +9 -9
  742. package/dist/unstable/cluster/Message.js +6 -6
  743. package/dist/unstable/cluster/Message.js.map +1 -1
  744. package/dist/unstable/cluster/MessageStorage.d.ts +15 -15
  745. package/dist/unstable/cluster/MessageStorage.js +5 -5
  746. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  747. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  748. package/dist/unstable/cluster/Reply.js +4 -4
  749. package/dist/unstable/cluster/Reply.js.map +1 -1
  750. package/dist/unstable/cluster/Runner.js.map +1 -1
  751. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  752. package/dist/unstable/cluster/RunnerHealth.d.ts +1 -1
  753. package/dist/unstable/cluster/RunnerHealth.js +1 -1
  754. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  755. package/dist/unstable/cluster/RunnerServer.d.ts +2 -1
  756. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  757. package/dist/unstable/cluster/RunnerServer.js +16 -16
  758. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  759. package/dist/unstable/cluster/RunnerStorage.d.ts +2 -2
  760. package/dist/unstable/cluster/RunnerStorage.js +1 -1
  761. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  762. package/dist/unstable/cluster/Runners.d.ts +6 -6
  763. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  764. package/dist/unstable/cluster/Runners.js +19 -10
  765. package/dist/unstable/cluster/Runners.js.map +1 -1
  766. package/dist/unstable/cluster/ShardId.js.map +1 -1
  767. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  768. package/dist/unstable/cluster/Sharding.js +3 -2
  769. package/dist/unstable/cluster/Sharding.js.map +1 -1
  770. package/dist/unstable/cluster/ShardingConfig.d.ts +3 -3
  771. package/dist/unstable/cluster/ShardingConfig.js +3 -3
  772. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  773. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  774. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  775. package/dist/unstable/cluster/Singleton.js.map +1 -1
  776. package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
  777. package/dist/unstable/cluster/SingletonAddress.js +1 -1
  778. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  779. package/dist/unstable/cluster/Snowflake.d.ts +8 -8
  780. package/dist/unstable/cluster/Snowflake.js +8 -8
  781. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  782. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  783. package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
  784. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  785. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  786. package/dist/unstable/cluster/SqlRunnerStorage.js +20 -5
  787. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  788. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  789. package/dist/unstable/cluster/index.js.map +1 -1
  790. package/dist/unstable/cluster/internal/entityManager.js +5 -5
  791. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  792. package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
  793. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  794. package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
  795. package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
  796. package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
  797. package/dist/unstable/cluster/internal/shardLock.js.map +1 -1
  798. package/dist/unstable/devtools/DevTools.js.map +1 -1
  799. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  800. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  801. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  802. package/dist/unstable/devtools/index.js.map +1 -1
  803. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  804. package/dist/unstable/encoding/Msgpack.js +6 -8
  805. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  806. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  807. package/dist/unstable/encoding/Sse.d.ts +72 -8
  808. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  809. package/dist/unstable/encoding/Sse.js +58 -8
  810. package/dist/unstable/encoding/Sse.js.map +1 -1
  811. package/dist/unstable/encoding/index.js.map +1 -1
  812. package/dist/unstable/eventlog/Event.d.ts +20 -20
  813. package/dist/unstable/eventlog/Event.js.map +1 -1
  814. package/dist/unstable/eventlog/EventGroup.d.ts +4 -4
  815. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  816. package/dist/unstable/eventlog/EventJournal.d.ts +15 -15
  817. package/dist/unstable/eventlog/EventJournal.js +13 -13
  818. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  819. package/dist/unstable/eventlog/EventLog.d.ts +3 -3
  820. package/dist/unstable/eventlog/EventLog.js +3 -3
  821. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  822. package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
  823. package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
  824. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  825. package/dist/unstable/eventlog/EventLogMessage.d.ts +2 -2
  826. package/dist/unstable/eventlog/EventLogMessage.js +1 -1
  827. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  828. package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
  829. package/dist/unstable/eventlog/EventLogRemote.js +1 -1
  830. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  831. package/dist/unstable/eventlog/EventLogServer.d.ts +11 -2
  832. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  833. package/dist/unstable/eventlog/EventLogServer.js +45 -21
  834. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  835. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +4 -4
  836. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  837. package/dist/unstable/eventlog/EventLogServerEncrypted.js +13 -5
  838. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  839. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -5
  840. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  841. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +14 -6
  842. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  843. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
  844. package/dist/unstable/eventlog/EventLogSessionAuth.js +1 -1
  845. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  846. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  847. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  848. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  849. package/dist/unstable/eventlog/index.js.map +1 -1
  850. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
  851. package/dist/unstable/http/Cookies.d.ts +2 -2
  852. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  853. package/dist/unstable/http/Cookies.js +30 -18
  854. package/dist/unstable/http/Cookies.js.map +1 -1
  855. package/dist/unstable/http/Etag.d.ts +1 -1
  856. package/dist/unstable/http/Etag.js +1 -1
  857. package/dist/unstable/http/Etag.js.map +1 -1
  858. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  859. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  860. package/dist/unstable/http/Headers.d.ts +2 -2
  861. package/dist/unstable/http/Headers.js +2 -2
  862. package/dist/unstable/http/Headers.js.map +1 -1
  863. package/dist/unstable/http/HttpBody.d.ts +5 -3
  864. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  865. package/dist/unstable/http/HttpBody.js +11 -5
  866. package/dist/unstable/http/HttpBody.js.map +1 -1
  867. package/dist/unstable/http/HttpClient.d.ts +51 -44
  868. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  869. package/dist/unstable/http/HttpClient.js +46 -17
  870. package/dist/unstable/http/HttpClient.js.map +1 -1
  871. package/dist/unstable/http/HttpClientError.js.map +1 -1
  872. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  873. package/dist/unstable/http/HttpClientRequest.js +2 -0
  874. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  875. package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
  876. package/dist/unstable/http/HttpClientResponse.js +2 -2
  877. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  878. package/dist/unstable/http/HttpEffect.d.ts +6 -6
  879. package/dist/unstable/http/HttpEffect.js +3 -3
  880. package/dist/unstable/http/HttpEffect.js.map +1 -1
  881. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  882. package/dist/unstable/http/HttpMethod.d.ts +6 -9
  883. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  884. package/dist/unstable/http/HttpMethod.js +6 -9
  885. package/dist/unstable/http/HttpMethod.js.map +1 -1
  886. package/dist/unstable/http/HttpMiddleware.d.ts +75 -9
  887. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  888. package/dist/unstable/http/HttpMiddleware.js +164 -39
  889. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  890. package/dist/unstable/http/HttpPlatform.d.ts +76 -0
  891. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  892. package/dist/unstable/http/HttpPlatform.js +32 -0
  893. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  894. package/dist/unstable/http/HttpRouter.d.ts +88 -89
  895. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  896. package/dist/unstable/http/HttpRouter.js +78 -79
  897. package/dist/unstable/http/HttpRouter.js.map +1 -1
  898. package/dist/unstable/http/HttpServer.d.ts +13 -13
  899. package/dist/unstable/http/HttpServer.js +6 -6
  900. package/dist/unstable/http/HttpServer.js.map +1 -1
  901. package/dist/unstable/http/HttpServerError.d.ts +2 -2
  902. package/dist/unstable/http/HttpServerError.js +2 -2
  903. package/dist/unstable/http/HttpServerError.js.map +1 -1
  904. package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
  905. package/dist/unstable/http/HttpServerRequest.js +4 -4
  906. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  907. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  908. package/dist/unstable/http/HttpServerResponse.d.ts +22 -0
  909. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  910. package/dist/unstable/http/HttpServerResponse.js +10 -0
  911. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  912. package/dist/unstable/http/HttpStaticServer.d.ts +35 -7
  913. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  914. package/dist/unstable/http/HttpStaticServer.js +35 -7
  915. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  916. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  917. package/dist/unstable/http/Multipart.d.ts +6 -6
  918. package/dist/unstable/http/Multipart.js +5 -5
  919. package/dist/unstable/http/Multipart.js.map +1 -1
  920. package/dist/unstable/http/Template.js.map +1 -1
  921. package/dist/unstable/http/Url.d.ts +33 -63
  922. package/dist/unstable/http/Url.d.ts.map +1 -1
  923. package/dist/unstable/http/Url.js +14 -28
  924. package/dist/unstable/http/Url.js.map +1 -1
  925. package/dist/unstable/http/UrlParams.d.ts +10 -18
  926. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  927. package/dist/unstable/http/UrlParams.js +9 -17
  928. package/dist/unstable/http/UrlParams.js.map +1 -1
  929. package/dist/unstable/http/index.js.map +1 -1
  930. package/dist/unstable/http/internal/compression.d.ts +2 -0
  931. package/dist/unstable/http/internal/compression.d.ts.map +1 -0
  932. package/dist/unstable/http/internal/compression.js +155 -0
  933. package/dist/unstable/http/internal/compression.js.map +1 -0
  934. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
  935. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  936. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
  937. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  938. package/dist/unstable/httpapi/HttpApiBuilder.js +10 -11
  939. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  940. package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -5
  941. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  942. package/dist/unstable/httpapi/HttpApiClient.js +11 -13
  943. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  944. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +42 -42
  945. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  946. package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
  947. package/dist/unstable/httpapi/HttpApiError.js +13 -13
  948. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  949. package/dist/unstable/httpapi/HttpApiGroup.d.ts +15 -15
  950. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  951. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +71 -24
  952. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  953. package/dist/unstable/httpapi/HttpApiMiddleware.js +57 -10
  954. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  955. package/dist/unstable/httpapi/HttpApiScalar.d.ts +0 -12
  956. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  957. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  958. package/dist/unstable/httpapi/HttpApiSchema.d.ts +6 -6
  959. package/dist/unstable/httpapi/HttpApiSchema.js +4 -4
  960. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  961. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  962. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  963. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  964. package/dist/unstable/httpapi/OpenApi.d.ts +13 -13
  965. package/dist/unstable/httpapi/OpenApi.js +13 -13
  966. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  967. package/dist/unstable/httpapi/index.js.map +1 -1
  968. package/dist/unstable/httpapi/internal/html.js.map +1 -1
  969. package/dist/unstable/httpapi/internal/httpApiScalar.js.map +1 -1
  970. package/dist/unstable/httpapi/internal/httpApiSwagger.js.map +1 -1
  971. package/dist/unstable/httpapi/internal/mediaType.js.map +1 -1
  972. package/dist/unstable/observability/Otlp.js.map +1 -1
  973. package/dist/unstable/observability/OtlpExporter.d.ts +12 -14
  974. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  975. package/dist/unstable/observability/OtlpExporter.js +17 -4
  976. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  977. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  978. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -1
  979. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  980. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  981. package/dist/unstable/observability/OtlpResource.d.ts +16 -7
  982. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  983. package/dist/unstable/observability/OtlpResource.js +21 -12
  984. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  985. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  986. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  987. package/dist/unstable/observability/PrometheusMetrics.d.ts +13 -4
  988. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  989. package/dist/unstable/observability/PrometheusMetrics.js +10 -3
  990. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  991. package/dist/unstable/observability/index.js.map +1 -1
  992. package/dist/unstable/observability/internal/otlpEnv.js +1 -1
  993. package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
  994. package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
  995. package/dist/unstable/observability/internal/protobuf.js +3 -0
  996. package/dist/unstable/observability/internal/protobuf.js.map +1 -1
  997. package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
  998. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  999. package/dist/unstable/persistence/KeyValueStore.js +22 -13
  1000. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1001. package/dist/unstable/persistence/Persistable.d.ts +8 -8
  1002. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1003. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1004. package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
  1005. package/dist/unstable/persistence/PersistedQueue.js +6 -6
  1006. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1007. package/dist/unstable/persistence/Persistence.d.ts +3 -3
  1008. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1009. package/dist/unstable/persistence/Persistence.js +91 -15
  1010. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1011. package/dist/unstable/persistence/RateLimiter.d.ts +26 -15
  1012. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1013. package/dist/unstable/persistence/RateLimiter.js +24 -13
  1014. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1015. package/dist/unstable/persistence/Redis.d.ts +2 -2
  1016. package/dist/unstable/persistence/Redis.js +1 -1
  1017. package/dist/unstable/persistence/Redis.js.map +1 -1
  1018. package/dist/unstable/persistence/index.js.map +1 -1
  1019. package/dist/unstable/process/ChildProcess.d.ts +64 -21
  1020. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1021. package/dist/unstable/process/ChildProcess.js +14 -5
  1022. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1023. package/dist/unstable/process/ChildProcessSpawner.d.ts +21 -10
  1024. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1025. package/dist/unstable/process/ChildProcessSpawner.js +1 -1
  1026. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1027. package/dist/unstable/process/index.js.map +1 -1
  1028. package/dist/unstable/reactivity/AsyncResult.d.ts +8 -8
  1029. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1030. package/dist/unstable/reactivity/AsyncResult.js +10 -10
  1031. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1032. package/dist/unstable/reactivity/Atom.d.ts +25 -22
  1033. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1034. package/dist/unstable/reactivity/Atom.js +14 -13
  1035. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1036. package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
  1037. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1038. package/dist/unstable/reactivity/AtomHttpApi.js +4 -1
  1039. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1040. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1041. package/dist/unstable/reactivity/AtomRegistry.js +24 -3
  1042. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1043. package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
  1044. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1045. package/dist/unstable/reactivity/AtomRpc.js +4 -1
  1046. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1047. package/dist/unstable/reactivity/Hydration.d.ts +1 -1
  1048. package/dist/unstable/reactivity/Hydration.js +1 -1
  1049. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1050. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1051. package/dist/unstable/reactivity/index.js.map +1 -1
  1052. package/dist/unstable/rpc/Rpc.d.ts +35 -33
  1053. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1054. package/dist/unstable/rpc/Rpc.js +4 -2
  1055. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1056. package/dist/unstable/rpc/RpcClient.d.ts +12 -12
  1057. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1058. package/dist/unstable/rpc/RpcClient.js +12 -11
  1059. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1060. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1061. package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
  1062. package/dist/unstable/rpc/RpcGroup.js +1 -1
  1063. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1064. package/dist/unstable/rpc/RpcMessage.d.ts +31 -30
  1065. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1066. package/dist/unstable/rpc/RpcMessage.js +6 -6
  1067. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1068. package/dist/unstable/rpc/RpcMiddleware.d.ts +10 -10
  1069. package/dist/unstable/rpc/RpcMiddleware.js +1 -1
  1070. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1071. package/dist/unstable/rpc/RpcSchema.d.ts +4 -4
  1072. package/dist/unstable/rpc/RpcSchema.js +3 -3
  1073. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1074. package/dist/unstable/rpc/RpcSerialization.d.ts +58 -7
  1075. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1076. package/dist/unstable/rpc/RpcSerialization.js +175 -96
  1077. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1078. package/dist/unstable/rpc/RpcServer.d.ts +13 -13
  1079. package/dist/unstable/rpc/RpcServer.js +17 -13
  1080. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1081. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1082. package/dist/unstable/rpc/RpcWorker.d.ts +5 -5
  1083. package/dist/unstable/rpc/RpcWorker.js +4 -4
  1084. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1085. package/dist/unstable/rpc/Utils.js.map +1 -1
  1086. package/dist/unstable/rpc/index.js.map +1 -1
  1087. package/dist/unstable/schema/Model.d.ts +52 -50
  1088. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1089. package/dist/unstable/schema/Model.js +35 -33
  1090. package/dist/unstable/schema/Model.js.map +1 -1
  1091. package/dist/unstable/schema/VariantSchema.d.ts +5 -5
  1092. package/dist/unstable/schema/VariantSchema.js +2 -2
  1093. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1094. package/dist/unstable/schema/index.js.map +1 -1
  1095. package/dist/unstable/socket/Socket.d.ts +11 -3
  1096. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1097. package/dist/unstable/socket/Socket.js +9 -4
  1098. package/dist/unstable/socket/Socket.js.map +1 -1
  1099. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1100. package/dist/unstable/socket/index.js.map +1 -1
  1101. package/dist/unstable/sql/Migrator.js.map +1 -1
  1102. package/dist/unstable/sql/SqlClient.d.ts +1 -1
  1103. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1104. package/dist/unstable/sql/SqlClient.js +2 -2
  1105. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1106. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1107. package/dist/unstable/sql/SqlError.js.map +1 -1
  1108. package/dist/unstable/sql/SqlModel.d.ts +2 -2
  1109. package/dist/unstable/sql/SqlModel.js +2 -2
  1110. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1111. package/dist/unstable/sql/SqlResolver.d.ts +5 -5
  1112. package/dist/unstable/sql/SqlResolver.js +2 -2
  1113. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1114. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1115. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1116. package/dist/unstable/sql/Statement.d.ts +6 -6
  1117. package/dist/unstable/sql/Statement.js +15 -15
  1118. package/dist/unstable/sql/Statement.js.map +1 -1
  1119. package/dist/unstable/sql/index.js.map +1 -1
  1120. package/dist/unstable/workers/Transferable.d.ts +1 -1
  1121. package/dist/unstable/workers/Transferable.js +1 -1
  1122. package/dist/unstable/workers/Transferable.js.map +1 -1
  1123. package/dist/unstable/workers/Worker.d.ts +2 -2
  1124. package/dist/unstable/workers/Worker.js +2 -2
  1125. package/dist/unstable/workers/Worker.js.map +1 -1
  1126. package/dist/unstable/workers/WorkerError.d.ts +7 -7
  1127. package/dist/unstable/workers/WorkerError.js +6 -6
  1128. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1129. package/dist/unstable/workers/WorkerRunner.d.ts +1 -1
  1130. package/dist/unstable/workers/WorkerRunner.js +1 -1
  1131. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1132. package/dist/unstable/workers/index.js.map +1 -1
  1133. package/dist/unstable/workflow/Activity.d.ts +2 -2
  1134. package/dist/unstable/workflow/Activity.js +2 -2
  1135. package/dist/unstable/workflow/Activity.js.map +1 -1
  1136. package/dist/unstable/workflow/DurableClock.d.ts +1 -1
  1137. package/dist/unstable/workflow/DurableClock.js +1 -1
  1138. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1139. package/dist/unstable/workflow/DurableDeferred.d.ts +10 -10
  1140. package/dist/unstable/workflow/DurableDeferred.js +5 -5
  1141. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1142. package/dist/unstable/workflow/DurableQueue.d.ts +22 -20
  1143. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1144. package/dist/unstable/workflow/DurableQueue.js +22 -20
  1145. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1146. package/dist/unstable/workflow/Workflow.d.ts +21 -21
  1147. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1148. package/dist/unstable/workflow/Workflow.js +13 -14
  1149. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1150. package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
  1151. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1152. package/dist/unstable/workflow/WorkflowProxy.d.ts +4 -2
  1153. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1154. package/dist/unstable/workflow/WorkflowProxy.js +4 -2
  1155. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1156. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1157. package/dist/unstable/workflow/index.js.map +1 -1
  1158. package/dist/unstable/workflow/internal/crypto.js.map +1 -1
  1159. package/package.json +5 -6
  1160. package/src/Array.ts +982 -1045
  1161. package/src/BigDecimal.ts +433 -756
  1162. package/src/BigInt.ts +213 -269
  1163. package/src/Boolean.ts +146 -188
  1164. package/src/Cache.ts +409 -255
  1165. package/src/Cause.ts +167 -277
  1166. package/src/Channel.ts +891 -816
  1167. package/src/ChannelSchema.ts +1 -1
  1168. package/src/Chunk.ts +841 -1181
  1169. package/src/Clock.ts +181 -49
  1170. package/src/Combiner.ts +20 -33
  1171. package/src/Config.ts +615 -332
  1172. package/src/ConfigProvider.ts +214 -120
  1173. package/src/Console.ts +289 -39
  1174. package/src/Context.ts +319 -378
  1175. package/src/Cron.ts +68 -77
  1176. package/src/Crypto.ts +13 -15
  1177. package/src/Data.ts +60 -80
  1178. package/src/DateTime.ts +564 -660
  1179. package/src/Deferred.ts +253 -256
  1180. package/src/Duration.ts +216 -308
  1181. package/src/Effect.ts +2893 -3279
  1182. package/src/Encoding.ts +22 -40
  1183. package/src/Equal.ts +49 -39
  1184. package/src/Equivalence.ts +103 -105
  1185. package/src/ErrorReporter.ts +51 -27
  1186. package/src/ExecutionPlan.ts +13 -55
  1187. package/src/Exit.ts +116 -192
  1188. package/src/Fiber.ts +81 -148
  1189. package/src/FiberHandle.ts +152 -105
  1190. package/src/FiberMap.ts +225 -174
  1191. package/src/FiberSet.ts +124 -82
  1192. package/src/FileSystem.ts +155 -263
  1193. package/src/Filter.ts +61 -33
  1194. package/src/Formatter.ts +54 -56
  1195. package/src/Function.ts +76 -145
  1196. package/src/Graph.ts +416 -770
  1197. package/src/HKT.ts +12 -6
  1198. package/src/Hash.ts +52 -83
  1199. package/src/HashMap.ts +319 -411
  1200. package/src/HashRing.ts +1 -0
  1201. package/src/HashSet.ts +177 -284
  1202. package/src/Inspectable.ts +12 -12
  1203. package/src/Iterable.ts +620 -786
  1204. package/src/JsonPatch.ts +58 -112
  1205. package/src/JsonPointer.ts +8 -8
  1206. package/src/JsonSchema.ts +402 -244
  1207. package/src/Latch.ts +23 -35
  1208. package/src/Layer.ts +359 -260
  1209. package/src/LayerMap.ts +49 -29
  1210. package/src/LayerRef.ts +6 -2
  1211. package/src/LogLevel.ts +114 -214
  1212. package/src/Logger.ts +344 -697
  1213. package/src/ManagedRuntime.ts +7 -5
  1214. package/src/Match.ts +217 -252
  1215. package/src/Metric.ts +516 -1089
  1216. package/src/MutableHashMap.ts +218 -255
  1217. package/src/MutableHashSet.ts +84 -89
  1218. package/src/MutableList.ts +73 -370
  1219. package/src/MutableRef.ts +420 -243
  1220. package/src/Newtype.ts +21 -14
  1221. package/src/NonEmptyIterable.ts +7 -137
  1222. package/src/Number.ts +196 -233
  1223. package/src/Optic.ts +243 -383
  1224. package/src/Option.ts +447 -812
  1225. package/src/Order.ts +109 -109
  1226. package/src/Ordering.ts +20 -23
  1227. package/src/Path.ts +38 -41
  1228. package/src/Pipeable.ts +6 -5
  1229. package/src/PlatformError.ts +4 -4
  1230. package/src/Pool.ts +4 -2
  1231. package/src/Predicate.ts +200 -181
  1232. package/src/PrimaryKey.ts +7 -7
  1233. package/src/PubSub.ts +526 -552
  1234. package/src/Pull.ts +24 -18
  1235. package/src/Queue.ts +200 -159
  1236. package/src/Random.ts +49 -74
  1237. package/src/RcMap.ts +121 -63
  1238. package/src/RcRef.ts +24 -13
  1239. package/src/Record.ts +291 -488
  1240. package/src/Redactable.ts +10 -3
  1241. package/src/Redacted.ts +25 -25
  1242. package/src/Reducer.ts +8 -15
  1243. package/src/Ref.ts +221 -361
  1244. package/src/References.ts +102 -168
  1245. package/src/RegExp.ts +10 -14
  1246. package/src/Request.ts +31 -21
  1247. package/src/RequestResolver.ts +202 -91
  1248. package/src/Result.ts +312 -484
  1249. package/src/Runtime.ts +50 -75
  1250. package/src/Schedule.ts +308 -1734
  1251. package/src/Scheduler.ts +20 -7
  1252. package/src/Schema.ts +716 -745
  1253. package/src/SchemaAST.ts +466 -358
  1254. package/src/SchemaError.ts +7 -6
  1255. package/src/SchemaGetter.ts +242 -190
  1256. package/src/SchemaIssue.ts +89 -275
  1257. package/src/SchemaParser.ts +180 -93
  1258. package/src/SchemaRepresentation.ts +22 -40
  1259. package/src/SchemaTransformation.ts +129 -88
  1260. package/src/Scope.ts +123 -151
  1261. package/src/ScopedRef.ts +4 -4
  1262. package/src/Semaphore.ts +152 -51
  1263. package/src/Sink.ts +128 -113
  1264. package/src/Stdio.ts +1 -1
  1265. package/src/Stream.ts +2602 -3123
  1266. package/src/String.ts +275 -312
  1267. package/src/Struct.ts +109 -114
  1268. package/src/SubscriptionRef.ts +284 -252
  1269. package/src/Symbol.ts +3 -3
  1270. package/src/Terminal.ts +2 -2
  1271. package/src/Tracer.ts +102 -55
  1272. package/src/Trie.ts +287 -679
  1273. package/src/Tuple.ts +92 -127
  1274. package/src/TxChunk.ts +201 -121
  1275. package/src/TxDeferred.ts +62 -46
  1276. package/src/TxHashMap.ts +645 -799
  1277. package/src/TxHashSet.ts +443 -356
  1278. package/src/TxPriorityQueue.ts +130 -98
  1279. package/src/TxPubSub.ts +107 -80
  1280. package/src/TxQueue.ts +214 -183
  1281. package/src/TxReentrantLock.ts +97 -66
  1282. package/src/TxRef.ts +51 -32
  1283. package/src/TxSemaphore.ts +129 -95
  1284. package/src/TxSubscriptionRef.ts +97 -70
  1285. package/src/Types.ts +126 -67
  1286. package/src/Unify.ts +45 -65
  1287. package/src/Utils.ts +23 -16
  1288. package/src/internal/core.ts +2 -2
  1289. package/src/internal/dateTime.ts +6 -0
  1290. package/src/internal/effect.ts +93 -48
  1291. package/src/internal/persistence.ts +2 -0
  1292. package/src/internal/references.ts +3 -2
  1293. package/src/internal/schema/fromJsonSchemaDocument.ts +15 -13
  1294. package/src/internal/schema/fromRepresentation.ts +10 -16
  1295. package/src/internal/schema/parser.ts +22 -0
  1296. package/src/internal/schema/toJsonSchemaDocument.ts +60 -6
  1297. package/src/internal/schema/toRepresentation.ts +104 -119
  1298. package/src/internal/trie.ts +10 -11
  1299. package/src/testing/FastCheck.ts +8 -7
  1300. package/src/testing/TestClock.ts +72 -30
  1301. package/src/testing/TestConsole.ts +32 -31
  1302. package/src/testing/TestSchema.ts +29 -29
  1303. package/src/unstable/ai/AiError.ts +95 -118
  1304. package/src/unstable/ai/AnthropicStructuredOutput.ts +1 -1
  1305. package/src/unstable/ai/Chat.ts +132 -97
  1306. package/src/unstable/ai/IdGenerator.ts +32 -28
  1307. package/src/unstable/ai/LanguageModel.ts +107 -67
  1308. package/src/unstable/ai/McpProtocol.ts +48 -0
  1309. package/src/unstable/ai/McpSchema.ts +60 -50
  1310. package/src/unstable/ai/McpServer.ts +930 -304
  1311. package/src/unstable/ai/Model.ts +9 -20
  1312. package/src/unstable/ai/OpenAiStructuredOutput.ts +1 -1
  1313. package/src/unstable/ai/Prompt.ts +145 -43
  1314. package/src/unstable/ai/Response.ts +28 -14
  1315. package/src/unstable/ai/Telemetry.ts +46 -13
  1316. package/src/unstable/ai/Tokenizer.ts +14 -3
  1317. package/src/unstable/ai/Tool.ts +59 -44
  1318. package/src/unstable/ai/Toolkit.ts +26 -8
  1319. package/src/unstable/ai/index.ts +5 -0
  1320. package/src/unstable/ai/internal/mcpProtocol.ts +85 -0
  1321. package/src/unstable/ai/internal/mcpProtocolRegistry.ts +70 -0
  1322. package/src/unstable/ai/internal/structured-output.ts +13 -18
  1323. package/src/unstable/cli/Argument.ts +273 -69
  1324. package/src/unstable/cli/CliError.ts +69 -76
  1325. package/src/unstable/cli/CliOutput.ts +44 -58
  1326. package/src/unstable/cli/Command.ts +705 -107
  1327. package/src/unstable/cli/Flag.ts +418 -138
  1328. package/src/unstable/cli/GlobalFlag.ts +1 -1
  1329. package/src/unstable/cli/HelpDoc.ts +12 -4
  1330. package/src/unstable/cli/Param.ts +292 -78
  1331. package/src/unstable/cli/Primitive.ts +370 -149
  1332. package/src/unstable/cli/Prompt.ts +28 -14
  1333. package/src/unstable/cli/internal/lexer.ts +8 -2
  1334. package/src/unstable/cli/internal/parser.ts +2 -2
  1335. package/src/unstable/cluster/ClusterSchema.ts +8 -8
  1336. package/src/unstable/cluster/ClusterWorkflowEngine.ts +5 -1
  1337. package/src/unstable/cluster/Entity.ts +15 -16
  1338. package/src/unstable/cluster/EntityProxy.ts +4 -2
  1339. package/src/unstable/cluster/EntityResource.ts +2 -2
  1340. package/src/unstable/cluster/Envelope.ts +3 -3
  1341. package/src/unstable/cluster/HttpRunner.ts +6 -4
  1342. package/src/unstable/cluster/Message.ts +9 -9
  1343. package/src/unstable/cluster/MessageStorage.ts +15 -15
  1344. package/src/unstable/cluster/Reply.ts +4 -6
  1345. package/src/unstable/cluster/RunnerHealth.ts +1 -1
  1346. package/src/unstable/cluster/RunnerServer.ts +41 -8
  1347. package/src/unstable/cluster/RunnerStorage.ts +2 -2
  1348. package/src/unstable/cluster/Runners.ts +23 -12
  1349. package/src/unstable/cluster/Sharding.ts +7 -8
  1350. package/src/unstable/cluster/ShardingConfig.ts +3 -3
  1351. package/src/unstable/cluster/SingletonAddress.ts +1 -1
  1352. package/src/unstable/cluster/Snowflake.ts +8 -8
  1353. package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
  1354. package/src/unstable/cluster/SqlRunnerStorage.ts +21 -5
  1355. package/src/unstable/cluster/internal/entityManager.ts +11 -15
  1356. package/src/unstable/encoding/Msgpack.ts +6 -8
  1357. package/src/unstable/encoding/Sse.ts +98 -16
  1358. package/src/unstable/eventlog/Event.ts +20 -20
  1359. package/src/unstable/eventlog/EventGroup.ts +4 -4
  1360. package/src/unstable/eventlog/EventJournal.ts +15 -15
  1361. package/src/unstable/eventlog/EventLog.ts +3 -3
  1362. package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
  1363. package/src/unstable/eventlog/EventLogMessage.ts +2 -2
  1364. package/src/unstable/eventlog/EventLogRemote.ts +1 -1
  1365. package/src/unstable/eventlog/EventLogServer.ts +41 -7
  1366. package/src/unstable/eventlog/EventLogServerEncrypted.ts +13 -5
  1367. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +14 -6
  1368. package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
  1369. package/src/unstable/http/Cookies.ts +35 -21
  1370. package/src/unstable/http/Etag.ts +1 -1
  1371. package/src/unstable/http/FetchHttpClient.ts +3 -1
  1372. package/src/unstable/http/Headers.ts +2 -2
  1373. package/src/unstable/http/HttpBody.ts +20 -5
  1374. package/src/unstable/http/HttpClient.ts +83 -55
  1375. package/src/unstable/http/HttpClientRequest.ts +2 -0
  1376. package/src/unstable/http/HttpClientResponse.ts +4 -4
  1377. package/src/unstable/http/HttpEffect.ts +8 -8
  1378. package/src/unstable/http/HttpMethod.ts +6 -9
  1379. package/src/unstable/http/HttpMiddleware.ts +202 -39
  1380. package/src/unstable/http/HttpPlatform.ts +95 -0
  1381. package/src/unstable/http/HttpRouter.ts +102 -98
  1382. package/src/unstable/http/HttpServer.ts +13 -13
  1383. package/src/unstable/http/HttpServerError.ts +2 -2
  1384. package/src/unstable/http/HttpServerRequest.ts +4 -4
  1385. package/src/unstable/http/HttpServerResponse.ts +30 -0
  1386. package/src/unstable/http/HttpStaticServer.ts +35 -7
  1387. package/src/unstable/http/Multipart.ts +6 -6
  1388. package/src/unstable/http/Url.ts +33 -63
  1389. package/src/unstable/http/UrlParams.ts +10 -18
  1390. package/src/unstable/http/internal/compression.ts +196 -0
  1391. package/src/unstable/httpapi/HttpApiBuilder.ts +10 -9
  1392. package/src/unstable/httpapi/HttpApiClient.ts +14 -14
  1393. package/src/unstable/httpapi/HttpApiEndpoint.ts +42 -42
  1394. package/src/unstable/httpapi/HttpApiError.ts +13 -13
  1395. package/src/unstable/httpapi/HttpApiGroup.ts +15 -15
  1396. package/src/unstable/httpapi/HttpApiMiddleware.ts +71 -24
  1397. package/src/unstable/httpapi/HttpApiScalar.ts +0 -12
  1398. package/src/unstable/httpapi/HttpApiSchema.ts +6 -6
  1399. package/src/unstable/httpapi/OpenApi.ts +13 -13
  1400. package/src/unstable/observability/OtlpExporter.ts +31 -19
  1401. package/src/unstable/observability/OtlpMetrics.ts +4 -1
  1402. package/src/unstable/observability/OtlpResource.ts +26 -17
  1403. package/src/unstable/observability/PrometheusMetrics.ts +13 -4
  1404. package/src/unstable/observability/internal/otlpEnv.ts +1 -1
  1405. package/src/unstable/observability/internal/protobuf.ts +3 -0
  1406. package/src/unstable/persistence/KeyValueStore.ts +72 -49
  1407. package/src/unstable/persistence/Persistable.ts +8 -8
  1408. package/src/unstable/persistence/PersistedQueue.ts +6 -6
  1409. package/src/unstable/persistence/Persistence.ts +126 -19
  1410. package/src/unstable/persistence/RateLimiter.ts +26 -15
  1411. package/src/unstable/persistence/Redis.ts +2 -2
  1412. package/src/unstable/process/ChildProcess.ts +64 -21
  1413. package/src/unstable/process/ChildProcessSpawner.ts +21 -10
  1414. package/src/unstable/reactivity/AsyncResult.ts +12 -13
  1415. package/src/unstable/reactivity/Atom.ts +28 -25
  1416. package/src/unstable/reactivity/AtomHttpApi.ts +5 -4
  1417. package/src/unstable/reactivity/AtomRegistry.ts +24 -3
  1418. package/src/unstable/reactivity/AtomRpc.ts +5 -4
  1419. package/src/unstable/reactivity/Hydration.ts +1 -1
  1420. package/src/unstable/rpc/Rpc.ts +35 -33
  1421. package/src/unstable/rpc/RpcClient.ts +16 -15
  1422. package/src/unstable/rpc/RpcGroup.ts +8 -8
  1423. package/src/unstable/rpc/RpcMessage.ts +31 -30
  1424. package/src/unstable/rpc/RpcMiddleware.ts +10 -10
  1425. package/src/unstable/rpc/RpcSchema.ts +4 -4
  1426. package/src/unstable/rpc/RpcSerialization.ts +167 -68
  1427. package/src/unstable/rpc/RpcServer.ts +18 -15
  1428. package/src/unstable/rpc/RpcWorker.ts +5 -5
  1429. package/src/unstable/schema/Model.ts +52 -50
  1430. package/src/unstable/schema/VariantSchema.ts +5 -5
  1431. package/src/unstable/socket/Socket.ts +17 -4
  1432. package/src/unstable/sql/SqlClient.ts +5 -6
  1433. package/src/unstable/sql/SqlModel.ts +2 -2
  1434. package/src/unstable/sql/SqlResolver.ts +5 -5
  1435. package/src/unstable/sql/Statement.ts +24 -23
  1436. package/src/unstable/workers/Transferable.ts +1 -1
  1437. package/src/unstable/workers/Worker.ts +2 -2
  1438. package/src/unstable/workers/WorkerError.ts +7 -7
  1439. package/src/unstable/workers/WorkerRunner.ts +1 -1
  1440. package/src/unstable/workflow/Activity.ts +2 -2
  1441. package/src/unstable/workflow/DurableClock.ts +1 -1
  1442. package/src/unstable/workflow/DurableDeferred.ts +10 -10
  1443. package/src/unstable/workflow/DurableQueue.ts +22 -20
  1444. package/src/unstable/workflow/Workflow.ts +23 -23
  1445. package/src/unstable/workflow/WorkflowEngine.ts +1 -1
  1446. package/src/unstable/workflow/WorkflowProxy.ts +4 -2
  1447. package/dist/internal/version.d.ts +0 -3
  1448. package/dist/internal/version.d.ts.map +0 -1
  1449. package/dist/internal/version.js +0 -2
  1450. package/dist/internal/version.js.map +0 -1
  1451. package/src/internal/version.ts +0 -2
package/dist/Schema.js CHANGED
@@ -80,8 +80,8 @@ const TypeId = InternalSchema.TypeId;
80
80
  *
81
81
  * **Example** (Schema for a parametric `Box<A>` type)
82
82
  *
83
- * ```ts
84
- * import { Effect, Option, Schema, SchemaIssue as Issue, SchemaParser } from "effect"
83
+ * ```ts import.meta.vitest
84
+ * import { Effect, Schema, SchemaIssue as Issue, SchemaParser } from "effect"
85
85
  *
86
86
  * interface Box<A> {
87
87
  * readonly value: A
@@ -96,7 +96,7 @@ const TypeId = InternalSchema.TypeId;
96
96
  * ([itemCodec]) =>
97
97
  * (u, ast, options) => {
98
98
  * if (!isBox(u)) {
99
- * return Effect.fail(new SchemaIssue.InvalidType(ast, Option.some(u)))
99
+ * return Effect.fail(new SchemaIssue.InvalidType(ast))
100
100
  * }
101
101
  * return Effect.map(
102
102
  * SchemaParser.decodeUnknownEffect(itemCodec)(u.value, options),
@@ -106,6 +106,7 @@ const TypeId = InternalSchema.TypeId;
106
106
  * )
107
107
  *
108
108
  * const schema = Box(Schema.Number)
109
+ * Effect.runSync(Schema.decodeUnknownEffect(schema)({ value: 1 })) // => { value: 1 }
109
110
  * ```
110
111
  *
111
112
  * @category constructors
@@ -128,7 +129,7 @@ export function declareConstructor() {
128
129
  *
129
130
  * **Example** (Defining a schema for a custom `UserId` branded type)
130
131
  *
131
- * ```ts
132
+ * ```ts import.meta.vitest
132
133
  * import { Schema } from "effect"
133
134
  *
134
135
  * type UserId = string & { readonly _tag: "UserId" }
@@ -140,6 +141,7 @@ export function declareConstructor() {
140
141
  * title: "UserId",
141
142
  * description: "A user identifier starting with 'user_'"
142
143
  * })
144
+ * Schema.decodeUnknownSync(UserId)("user_123") // => "user_123"
143
145
  * ```
144
146
  *
145
147
  * @see {@link declareConstructor} for creating schemas for parametric types.
@@ -148,7 +150,7 @@ export function declareConstructor() {
148
150
  * @since 3.10.0
149
151
  */
150
152
  export function declare(is, annotations) {
151
- return declareConstructor()([], () => (input, ast) => is(input) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input))), annotations);
153
+ return declareConstructor()([], () => (input, ast) => is(input) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast)), annotations);
152
154
  }
153
155
  /**
154
156
  * Returns a schema widened to the fully-parameterized {@link Bottom} interface,
@@ -162,7 +164,7 @@ export function declare(is, annotations) {
162
164
  *
163
165
  * **Example** (Inspecting all type parameters of a schema)
164
166
  *
165
- * ```ts
167
+ * ```ts import.meta.vitest
166
168
  * import { Schema } from "effect"
167
169
  *
168
170
  * const schema = Schema.String
@@ -194,7 +196,7 @@ export function revealBottom(bottom) {
194
196
  *
195
197
  * **Example** (Adding a title and description)
196
198
  *
197
- * ```ts
199
+ * ```ts import.meta.vitest
198
200
  * import { Schema } from "effect"
199
201
  *
200
202
  * const Age = Schema.Natural.pipe(
@@ -203,6 +205,7 @@ export function revealBottom(bottom) {
203
205
  * description: "A non-negative integer representing age in years"
204
206
  * })
205
207
  * )
208
+ * Schema.resolveAnnotations(Age)?.title // => "Age"
206
209
  * ```
207
210
  *
208
211
  * @see {@link annotateEncoded} to annotate the encoded side instead.
@@ -225,7 +228,7 @@ export function annotate(annotations) {
225
228
  *
226
229
  * **Example** (Adding a title to the encoded representation)
227
230
  *
228
- * ```ts
231
+ * ```ts import.meta.vitest
229
232
  * import { Schema } from "effect"
230
233
  *
231
234
  * const schema = Schema.NumberFromString.pipe(
@@ -234,8 +237,7 @@ export function annotate(annotations) {
234
237
  * })
235
238
  * )
236
239
  *
237
- * console.log(Schema.toEncoded(schema).ast.annotations?.title)
238
- * // "my title"
240
+ * Schema.toEncoded(schema).ast.annotations?.title // => "my title"
239
241
  * ```
240
242
  *
241
243
  * @see {@link annotate} to annotate the type side instead.
@@ -260,7 +262,7 @@ export function annotateEncoded(annotations) {
260
262
  *
261
263
  * **Example** (Customizing the missing-key message for a required field)
262
264
  *
263
- * ```ts
265
+ * ```ts import.meta.vitest
264
266
  * import { Schema } from "effect"
265
267
  *
266
268
  * const schema = Schema.Struct({
@@ -271,6 +273,7 @@ export function annotateEncoded(annotations) {
271
273
  * })
272
274
  * )
273
275
  * })
276
+ * schema.fields.username.ast.context?.annotations?.messageMissingKey // => "Username is required"
274
277
  * ```
275
278
  *
276
279
  * @category annotations
@@ -293,7 +296,7 @@ export function annotateKey(annotations) {
293
296
  *
294
297
  * **Example** (Recovering encoded type from a schema variable)
295
298
  *
296
- * ```ts
299
+ * ```ts import.meta.vitest
297
300
  * import { Schema } from "effect"
298
301
  *
299
302
  * const schema: Schema.Schema<number> = Schema.NumberFromString
@@ -313,18 +316,14 @@ export {
313
316
  /**
314
317
  * Returns `true` if `u` is a {@link SchemaError}.
315
318
  *
316
- * **Example** (Narrowing Schema errors in a catch block)
319
+ * **Example** (Narrowing Schema errors)
317
320
  *
318
- * ```ts
319
- * import { Schema } from "effect"
321
+ * ```ts import.meta.vitest
322
+ * import { Result, Schema } from "effect"
320
323
  *
321
- * try {
322
- * Schema.decodeUnknownSync(Schema.Number)("oops")
323
- * } catch (err) {
324
- * if (Schema.isSchemaError(err)) {
325
- * console.log(err._tag) // "SchemaError"
326
- * }
327
- * }
324
+ * const result = Result.try(() => Schema.decodeUnknownSync(Schema.Number)("oops"))
325
+ * const error: unknown = Result.isFailure(result) ? result.failure : undefined
326
+ * Schema.isSchemaError(error) // => true
328
327
  * ```
329
328
  *
330
329
  * @category guards
@@ -338,25 +337,22 @@ isSchemaError,
338
337
  * **Details**
339
338
  *
340
339
  * The `issue` field contains a structured {@link SchemaIssue.Issue} tree describing
341
- * every validation failure, including the path to the problematic value,
342
- * expected types, and actual values received. `message` renders the issue tree
343
- * as a human-readable string.
340
+ * every validation failure, including the path to the problematic value and
341
+ * the expected type or constraint. Built-in issues have no `actual` field,
342
+ * and built-in messages do not include the rejected value. Other Issue fields
343
+ * and custom annotations or messages are not sanitized. `message` renders the
344
+ * issue tree as a human-readable string.
344
345
  *
345
346
  * Use {@link isSchemaError} to narrow an unknown value to `SchemaError`.
346
347
  *
347
- * **Example** (Catching a SchemaError)
348
+ * **Example** (Inspecting a SchemaError)
348
349
  *
349
- * ```ts
350
- * import { Schema } from "effect"
350
+ * ```ts import.meta.vitest
351
+ * import { Result, Schema } from "effect"
351
352
  *
352
- * try {
353
- * Schema.decodeUnknownSync(Schema.Number)("not a number")
354
- * } catch (err) {
355
- * if (Schema.isSchemaError(err)) {
356
- * console.log(err.message)
357
- * // Expected number, actual "not a number"
358
- * }
359
- * }
353
+ * const result = Schema.decodeUnknownResult(Schema.Number)("not a number")
354
+ * const message = Result.isFailure(result) ? result.failure.message : ""
355
+ * message // => "Expected number"
360
356
  * ```
361
357
  *
362
358
  * @category errors
@@ -383,7 +379,7 @@ function makeStandardResult(exit) {
383
379
  *
384
380
  * **Example** (Creating a standard schema from a regular schema)
385
381
  *
386
- * ```ts
382
+ * ```ts import.meta.vitest
387
383
  * import { Schema } from "effect"
388
384
  *
389
385
  * // Define custom hook functions for error formatting
@@ -421,16 +417,21 @@ function makeStandardResult(exit) {
421
417
  * name: "Alice",
422
418
  * age: 30
423
419
  * })
424
- * console.log(validResult) // { value: { name: "Alice", age: 30 } }
425
- *
426
420
  * const invalidResult = standardSchema["~standard"].validate({
427
421
  * name: "",
428
422
  * age: 200
429
423
  * })
430
- * console.log(invalidResult) // { issues: [{ path: ["name"], message: "..." }, { path: ["age"], message: "..." }] }
424
+ *
425
+ * if (validResult instanceof Promise || invalidResult instanceof Promise) {
426
+ * throw new Error("Expected synchronous validation")
427
+ * }
428
+ * if ("value" in validResult) {
429
+ * validResult.value // => { name: "Alice", age: 30 }
430
+ * }
431
+ * invalidResult.issues?.map((issue) => issue.path) // => [["name"], ["age"]]
431
432
  * ```
432
433
  *
433
- * @category Standard Schema
434
+ * @category converting
434
435
  * @since 4.0.0
435
436
  */
436
437
  export function toStandardSchemaV1(self, options) {
@@ -441,7 +442,7 @@ export function toStandardSchemaV1(self, options) {
441
442
  };
442
443
  const formatter = SchemaIssue.makeFormatterStandardSchemaV1(options);
443
444
  const validate = value => {
444
- const scheduler = new Scheduler.MixedScheduler();
445
+ const scheduler = new Scheduler.MixedScheduler("sync");
445
446
  const fiber = Effect.runFork(Effect.match(decodeUnknownEffect(value, parseOptions), {
446
447
  onFailure: formatter,
447
448
  onSuccess: value => ({
@@ -503,7 +504,7 @@ function toBaseStandardJSONSchemaV1(self, target) {
503
504
  *
504
505
  * https://github.com/standard-schema/standard-schema/pull/134
505
506
  *
506
- * @category Standard Schema
507
+ * @category converting
507
508
  * @since 4.0.0
508
509
  */
509
510
  export function toStandardJSONSchemaV1(self) {
@@ -550,19 +551,19 @@ export function toStandardJSONSchemaV1(self) {
550
551
  *
551
552
  * **Example** (Defining a basic type guard)
552
553
  *
553
- * ```ts
554
+ * ```ts import.meta.vitest
554
555
  * import { Schema } from "effect"
555
556
  *
556
557
  * const isString = Schema.is(Schema.String)
557
558
  *
558
- * console.log(isString("hello")) // true
559
- * console.log(isString(42)) // false
559
+ * isString("hello") // => true
560
+ * isString(42) // => false
560
561
  *
561
562
  * // Type narrowing in action
562
563
  * const value: unknown = "hello"
563
564
  * if (isString(value)) {
564
565
  * // value is now typed as string
565
- * console.log(value.toUpperCase()) // "HELLO"
566
+ * value.toUpperCase() // => "HELLO"
566
567
  * }
567
568
  * ```
568
569
  *
@@ -592,21 +593,23 @@ export const is = SchemaParser.is;
592
593
  *
593
594
  * **Example** (Asserting and narrowing an input)
594
595
  *
595
- * ```ts
596
- * import { Schema } from "effect"
596
+ * ```ts import.meta.vitest
597
+ * import { Schema, SchemaIssue } from "effect"
597
598
  *
598
599
  * const input: unknown = "hello"
599
600
  *
600
601
  * // This will pass silently (no return value) and narrow input to string
601
602
  * Schema.asserts(Schema.String, input)
602
- * console.log(input.toUpperCase())
603
+ * input.toUpperCase() // => "HELLO"
603
604
  *
604
605
  * // This will throw an error
605
606
  * try {
606
607
  * const invalid: unknown = 123
607
608
  * Schema.asserts(Schema.String, invalid)
608
609
  * } catch (error) {
609
- * console.log("Non-string assertion failed as expected")
610
+ * if (error instanceof Error) {
611
+ * SchemaIssue.isIssue(error.cause) // => true
612
+ * }
610
613
  * }
611
614
  * ```
612
615
  *
@@ -732,7 +735,7 @@ export function decodeUnknownExit(schema, options) {
732
735
  };
733
736
  }
734
737
  function fromIssueExit(exit) {
735
- return Exit_.isSuccess(exit) ? Exit_.succeed(exit.value) : Exit_.failCause(Cause_.map(exit.cause, issue => new SchemaError(issue)));
738
+ return Exit_.isSuccess(exit) ? exit : Exit_.failCause(Cause_.map(exit.cause, issue => new SchemaError(issue)));
736
739
  }
737
740
  /**
738
741
  * Decodes a typed input (the schema's `Encoded` type) against a schema
@@ -967,19 +970,12 @@ export const decodePromise = decodeUnknownPromise;
967
970
  *
968
971
  * **Example** (Decoding with a transformation schema)
969
972
  *
970
- * ```ts
973
+ * ```ts import.meta.vitest
971
974
  * import { Schema } from "effect"
972
975
  *
973
976
  * const NumberFromString = Schema.NumberFromString
974
977
  *
975
- * console.log(Schema.decodeUnknownSync(NumberFromString)("42"))
976
- * // Output: 42
977
- *
978
- * Schema.decodeUnknownSync(NumberFromString)("not a number")
979
- * // throws SchemaError: NumberFromString
980
- * // └─ Encoded side transformation failure
981
- * // └─ NumberFromString
982
- * // └─ Expected a numeric string, actual "not a number"
978
+ * Schema.decodeUnknownSync(NumberFromString)("42") // => 42
983
979
  * ```
984
980
  *
985
981
  * @see {@link SchemaParser.decodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
@@ -1038,13 +1034,12 @@ export const decodeSync = decodeUnknownSync;
1038
1034
  *
1039
1035
  * **Example** (Encoding a value to a string)
1040
1036
  *
1041
- * ```ts
1037
+ * ```ts import.meta.vitest
1042
1038
  * import { Effect, Schema } from "effect"
1043
1039
  *
1044
1040
  * const NumberFromString = Schema.NumberFromString
1045
1041
  *
1046
- * Effect.runPromise(Schema.encodeUnknownEffect(NumberFromString)(42)).then(console.log)
1047
- * // Output: "42"
1042
+ * await Effect.runPromise(Schema.encodeUnknownEffect(NumberFromString)(42)) // => "42"
1048
1043
  * ```
1049
1044
  *
1050
1045
  * @see {@link SchemaParser.encodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
@@ -1413,7 +1408,7 @@ export function isSchema(u) {
1413
1408
  *
1414
1409
  * **Example** (Creating a struct with optional key)
1415
1410
  *
1416
- * ```ts
1411
+ * ```ts import.meta.vitest
1417
1412
  * import { Schema } from "effect"
1418
1413
  *
1419
1414
  * const schema = Schema.Struct({
@@ -1457,7 +1452,7 @@ export const requiredKey = /*#__PURE__*/Struct_.lambda(self => self.schema);
1457
1452
  *
1458
1453
  * **Example** (Defining an optional field accepting undefined)
1459
1454
  *
1460
- * ```ts
1455
+ * ```ts import.meta.vitest
1461
1456
  * import { Schema } from "effect"
1462
1457
  *
1463
1458
  * const schema = Schema.Struct({
@@ -1549,11 +1544,12 @@ export function flip(schema) {
1549
1544
  *
1550
1545
  * **Example** (Defining a string literal)
1551
1546
  *
1552
- * ```ts
1547
+ * ```ts import.meta.vitest
1553
1548
  * import { Schema } from "effect"
1554
1549
  *
1555
1550
  * const schema = Schema.Literal("hello")
1556
1551
  * // Type: Schema.Literal<"hello">
1552
+ * Schema.decodeSync(schema)("hello") // => "hello"
1557
1553
  * ```
1558
1554
  *
1559
1555
  * @see {@link Literals} for a schema that represents a union of literals.
@@ -1594,11 +1590,11 @@ function templateLiteralFromParts(parts) {
1594
1590
  *
1595
1591
  * **Example** (Defining a URL path pattern)
1596
1592
  *
1597
- * ```ts
1593
+ * ```ts import.meta.vitest
1598
1594
  * import { Schema } from "effect"
1599
1595
  *
1600
1596
  * const schema = Schema.TemplateLiteral(["/user/", Schema.Number])
1601
- * // matches strings like "/user/123", "/user/42", etc.
1597
+ * Schema.is(schema)("/user/123") // => true
1602
1598
  * ```
1603
1599
  *
1604
1600
  * @see {@link TemplateLiteralParser} for a schema that also parses matched parts into a tuple.
@@ -1626,11 +1622,11 @@ export function TemplateLiteral(parts) {
1626
1622
  *
1627
1623
  * **Example** (Parsing path parameters)
1628
1624
  *
1629
- * ```ts
1625
+ * ```ts import.meta.vitest
1630
1626
  * import { Schema } from "effect"
1631
1627
  *
1632
1628
  * const schema = Schema.TemplateLiteralParser(["/user/", Schema.NumberFromString])
1633
- * // decodes "/user/42" => readonly ["/user/", 42]
1629
+ * Schema.decodeSync(schema)("/user/42") // => ["/user/", 42]
1634
1630
  * ```
1635
1631
  *
1636
1632
  * @see {@link TemplateLiteral} for a validation-only version that keeps the string encoded.
@@ -1647,7 +1643,7 @@ export function TemplateLiteralParser(parts) {
1647
1643
  *
1648
1644
  * **Example** (Defining a direction enum)
1649
1645
  *
1650
- * ```ts
1646
+ * ```ts import.meta.vitest
1651
1647
  * import { Schema } from "effect"
1652
1648
  *
1653
1649
  * enum Direction {
@@ -1656,7 +1652,7 @@ export function TemplateLiteralParser(parts) {
1656
1652
  * }
1657
1653
  *
1658
1654
  * const schema = Schema.Enum(Direction)
1659
- * // accepts "Up" or "Down"
1655
+ * Schema.decodeSync(schema)(Direction.Up) // => "Up"
1660
1656
  * ```
1661
1657
  *
1662
1658
  * @category constructors
@@ -1742,7 +1738,7 @@ export const Number = /*#__PURE__*/make(SchemaAST.number);
1742
1738
  *
1743
1739
  * @see {@link BooleanFromBit} for a schema that decodes bit literals `0` or `1` into a boolean
1744
1740
  *
1745
- * @category boolean
1741
+ * @category schemas
1746
1742
  * @since 4.0.0
1747
1743
  */
1748
1744
  export const Boolean = /*#__PURE__*/make(SchemaAST.boolean);
@@ -1801,11 +1797,12 @@ export const ObjectKeyword = /*#__PURE__*/make(SchemaAST.objectKeyword);
1801
1797
  *
1802
1798
  * **Example** (Defining a specific symbol)
1803
1799
  *
1804
- * ```ts
1800
+ * ```ts import.meta.vitest
1805
1801
  * import { Schema } from "effect"
1806
1802
  *
1807
1803
  * const mySymbol = Symbol.for("mySymbol")
1808
1804
  * const schema = Schema.UniqueSymbol(mySymbol)
1805
+ * Schema.decodeSync(schema)(mySymbol) === mySymbol // => true
1809
1806
  * ```
1810
1807
  *
1811
1808
  * @see {@link Symbol} for a schema that accepts any symbol.
@@ -1837,7 +1834,7 @@ function makeStruct(ast, fields) {
1837
1834
  *
1838
1835
  * **Example** (Defining a basic struct)
1839
1836
  *
1840
- * ```ts
1837
+ * ```ts import.meta.vitest
1841
1838
  * import { Schema } from "effect"
1842
1839
  *
1843
1840
  * const Person = Schema.Struct({
@@ -1849,9 +1846,7 @@ function makeStruct(ast, fields) {
1849
1846
  * // { readonly name: string; readonly age: number; readonly email?: string }
1850
1847
  * type Person = typeof Person.Type
1851
1848
  *
1852
- * const alice = Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 })
1853
- * console.log(alice)
1854
- * // { name: 'Alice', age: 30 }
1849
+ * Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
1855
1850
  * ```
1856
1851
  *
1857
1852
  * @category constructors
@@ -1874,7 +1869,7 @@ export function Struct(fields) {
1874
1869
  *
1875
1870
  * **Example** (Adding fields to a union of structs)
1876
1871
  *
1877
- * ```ts
1872
+ * ```ts import.meta.vitest
1878
1873
  * import { Schema, Tuple } from "effect"
1879
1874
  *
1880
1875
  * // Add a new field to all members of a union of structs
@@ -1882,6 +1877,7 @@ export function Struct(fields) {
1882
1877
  * Schema.Struct({ a: Schema.String }),
1883
1878
  * Schema.Struct({ b: Schema.Number })
1884
1879
  * ]).mapMembers(Tuple.map(Schema.fieldsAssign({ c: Schema.Number })))
1880
+ * Schema.decodeSync(schema)({ a: "a", c: 1 }) // => { a: "a", c: 1 }
1885
1881
  * ```
1886
1882
  *
1887
1883
  * @category combinators
@@ -1904,16 +1900,14 @@ const canonicalPropertyKey = key => typeof key === "symbol" ? key : globalThis.S
1904
1900
  *
1905
1901
  * **Example** (Renaming `name` to `full_name` in the encoded form)
1906
1902
  *
1907
- * ```ts
1903
+ * ```ts import.meta.vitest
1908
1904
  * import { Schema } from "effect"
1909
1905
  *
1910
1906
  * const Person = Schema.Struct({ name: Schema.String, age: Schema.Number })
1911
1907
  * const Encoded = Person.pipe(Schema.encodeKeys({ name: "full_name" }))
1912
1908
  *
1913
1909
  * // Decodes { full_name: "Alice", age: 30 } → { name: "Alice", age: 30 }
1914
- * const alice = Schema.decodeUnknownSync(Encoded)({ full_name: "Alice", age: 30 })
1915
- * console.log(alice)
1916
- * // { name: 'Alice', age: 30 }
1910
+ * Schema.decodeUnknownSync(Encoded)({ full_name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
1917
1911
  * ```
1918
1912
  *
1919
1913
  * @category transforming
@@ -1958,7 +1952,7 @@ export function encodeKeys(mapping) {
1958
1952
  *
1959
1953
  * **Example** (Adding a computed `fullName` field)
1960
1954
  *
1961
- * ```ts
1955
+ * ```ts import.meta.vitest
1962
1956
  * import { Option, Schema } from "effect"
1963
1957
  *
1964
1958
  * const Person = Schema.Struct({ first: Schema.String, last: Schema.String })
@@ -1970,8 +1964,7 @@ export function encodeKeys(mapping) {
1970
1964
  * )
1971
1965
  *
1972
1966
  * const alice = Schema.decodeUnknownSync(Extended)({ first: "Alice", last: "Smith" })
1973
- * console.log(alice.fullName)
1974
- * // Alice Smith
1967
+ * alice.fullName // => "Alice Smith"
1975
1968
  * ```
1976
1969
  *
1977
1970
  * @category transforming
@@ -2026,9 +2019,16 @@ derive) {
2026
2019
  * For transformed key schemas, property selection is based on encoded property
2027
2020
  * names before the selected key is decoded.
2028
2021
  *
2022
+ * **Gotchas**
2023
+ *
2024
+ * When decoded or encoded key transformations produce the same property key,
2025
+ * sequential parsing applies selected own properties in selection order, so
2026
+ * the later selected property overwrites the earlier value. With concurrency
2027
+ * greater than `1`, completion order determines which value is retained.
2028
+ *
2029
2029
  * **Example** (Defining a string-keyed record of numbers)
2030
2030
  *
2031
- * ```ts
2031
+ * ```ts import.meta.vitest
2032
2032
  * import { Schema } from "effect"
2033
2033
  *
2034
2034
  * const schema = Schema.Record(Schema.String, Schema.Number)
@@ -2036,17 +2036,14 @@ derive) {
2036
2036
  * // { readonly [x: string]: number }
2037
2037
  * type R = typeof schema.Type
2038
2038
  *
2039
- * const result = Schema.decodeUnknownSync(schema)({ a: 1, b: 2 })
2040
- * console.log(result)
2041
- * // { a: 1, b: 2 }
2039
+ * Schema.decodeUnknownSync(schema)({ a: 1, b: 2 }) // => { a: 1, b: 2 }
2042
2040
  * ```
2043
2041
  *
2044
2042
  * @category constructors
2045
2043
  * @since 3.10.0
2046
2044
  */
2047
- export function Record(key, value, options) {
2048
- const keyValueCombiner = options?.keyValueCombiner?.decode || options?.keyValueCombiner?.encode ? new SchemaAST.KeyValueCombiner(options.keyValueCombiner.decode, options.keyValueCombiner.encode) : undefined;
2049
- return make(SchemaAST.record(key.ast, value.ast, keyValueCombiner), {
2045
+ export function Record(key, value) {
2046
+ return make(SchemaAST.record(key.ast, value.ast), {
2050
2047
  key,
2051
2048
  value
2052
2049
  });
@@ -2064,7 +2061,7 @@ export function Record(key, value, options) {
2064
2061
  *
2065
2062
  * **Example** (Defining structs with string-indexed extra keys)
2066
2063
  *
2067
- * ```ts
2064
+ * ```ts import.meta.vitest
2068
2065
  * import { Schema } from "effect"
2069
2066
  *
2070
2067
  * const schema = Schema.StructWithRest(
@@ -2099,14 +2096,12 @@ function makeTuple(ast, elements) {
2099
2096
  *
2100
2097
  * **Example** (Defining a pair of string and number)
2101
2098
  *
2102
- * ```ts
2099
+ * ```ts import.meta.vitest
2103
2100
  * import { Schema } from "effect"
2104
2101
  *
2105
2102
  * const schema = Schema.Tuple([Schema.String, Schema.Number])
2106
2103
  *
2107
- * const pair = Schema.decodeUnknownSync(schema)(["hello", 42])
2108
- * console.log(pair)
2109
- * // [ 'hello', 42 ]
2104
+ * Schema.decodeUnknownSync(schema)(["hello", 42]) // => ["hello", 42]
2110
2105
  * ```
2111
2106
  *
2112
2107
  * @category constructors
@@ -2128,7 +2123,7 @@ export function Tuple(elements) {
2128
2123
  *
2129
2124
  * **Example** (Defining tuples with rest elements)
2130
2125
  *
2131
- * ```ts
2126
+ * ```ts import.meta.vitest
2132
2127
  * import { Schema } from "effect"
2133
2128
  *
2134
2129
  * // [string, number, ...boolean[]]
@@ -2137,9 +2132,7 @@ export function Tuple(elements) {
2137
2132
  * [Schema.Boolean]
2138
2133
  * )
2139
2134
  *
2140
- * const result = Schema.decodeUnknownSync(schema)(["hello", 1, true, false])
2141
- * console.log(result)
2142
- * // [ 'hello', 1, true, false ]
2135
+ * Schema.decodeUnknownSync(schema)(["hello", 1, true, false]) // => ["hello", 1, true, false]
2143
2136
  * ```
2144
2137
  *
2145
2138
  * @category constructors
@@ -2164,14 +2157,12 @@ export {
2164
2157
  *
2165
2158
  * **Example** (Defining an array of strings)
2166
2159
  *
2167
- * ```ts
2160
+ * ```ts import.meta.vitest
2168
2161
  * import { Schema } from "effect"
2169
2162
  *
2170
2163
  * const schema = Schema.Array(Schema.String)
2171
2164
  *
2172
- * const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
2173
- * console.log(result)
2174
- * // [ 'a', 'b', 'c' ]
2165
+ * Schema.decodeUnknownSync(schema)(["a", "b", "c"]) // => ["a", "b", "c"]
2175
2166
  * ```
2176
2167
  *
2177
2168
  * @category constructors
@@ -2184,13 +2175,12 @@ ArraySchema as Array };
2184
2175
  *
2185
2176
  * **Example** (Defining a non-empty array of numbers)
2186
2177
  *
2187
- * ```ts
2178
+ * ```ts import.meta.vitest
2188
2179
  * import { Schema } from "effect"
2189
2180
  *
2190
2181
  * const schema = Schema.NonEmptyArray(Schema.Number)
2191
2182
  *
2192
- * Schema.decodeUnknownSync(schema)([1, 2, 3]) // ok
2193
- * Schema.decodeUnknownSync(schema)([]) // throws
2183
+ * Schema.decodeUnknownSync(schema)([1, 2, 3]) // => [1, 2, 3]
2194
2184
  * ```
2195
2185
  *
2196
2186
  * @category constructors
@@ -2250,13 +2240,16 @@ export function UniqueArray(item) {
2250
2240
  *
2251
2241
  * **Example** (Defining mutable arrays)
2252
2242
  *
2253
- * ```ts
2243
+ * ```ts import.meta.vitest
2254
2244
  * import { Schema } from "effect"
2255
2245
  *
2256
2246
  * const schema = Schema.mutable(Schema.Array(Schema.Number))
2257
2247
  *
2258
2248
  * // number[] (mutable)
2259
2249
  * type T = typeof schema.Type
2250
+ * const value: T = [1, 2]
2251
+ * value.push(3)
2252
+ * value // => [1, 2, 3]
2260
2253
  * ```
2261
2254
  *
2262
2255
  * @category transforming
@@ -2288,13 +2281,13 @@ function makeUnion(ast, members) {
2288
2281
  *
2289
2282
  * **Example** (Defining a string or number union)
2290
2283
  *
2291
- * ```ts
2284
+ * ```ts import.meta.vitest
2292
2285
  * import { Schema } from "effect"
2293
2286
  *
2294
2287
  * const schema = Schema.Union([Schema.String, Schema.Number])
2295
2288
  *
2296
- * Schema.decodeUnknownSync(schema)("hello") // "hello"
2297
- * Schema.decodeUnknownSync(schema)(42) // 42
2289
+ * Schema.decodeUnknownSync(schema)("hello") // => "hello"
2290
+ * Schema.decodeUnknownSync(schema)(42) // => 42
2298
2291
  * ```
2299
2292
  *
2300
2293
  * @category constructors
@@ -2308,11 +2301,11 @@ export function Union(members, options) {
2308
2301
  *
2309
2302
  * **Example** (Defining status codes)
2310
2303
  *
2311
- * ```ts
2304
+ * ```ts import.meta.vitest
2312
2305
  * import { Schema } from "effect"
2313
2306
  *
2314
2307
  * const schema = Schema.Literals(["active", "inactive", "pending"])
2315
- * // accepts "active", "inactive", or "pending"
2308
+ * Schema.decodeSync(schema)("active") // => "active"
2316
2309
  * ```
2317
2310
  *
2318
2311
  * @see {@link Literal} for a schema that represents a single literal.
@@ -2363,7 +2356,7 @@ export const NullishOr = /*#__PURE__*/Struct_.lambda(self => Union([self, Null,
2363
2356
  *
2364
2357
  * **Example** (Defining recursive tree schemas)
2365
2358
  *
2366
- * ```ts
2359
+ * ```ts import.meta.vitest
2367
2360
  * import { Schema } from "effect"
2368
2361
  *
2369
2362
  * interface Tree {
@@ -2375,6 +2368,7 @@ export const NullishOr = /*#__PURE__*/Struct_.lambda(self => Union([self, Null,
2375
2368
  * value: Schema.Number,
2376
2369
  * children: Schema.Array(Schema.suspend((): Schema.Codec<Tree> => Tree))
2377
2370
  * })
2371
+ * Schema.decodeSync(Tree)({ value: 1, children: [] }) // => { value: 1, children: [] }
2378
2372
  * ```
2379
2373
  *
2380
2374
  * @category constructors
@@ -2389,12 +2383,14 @@ export function suspend(f) {
2389
2383
  *
2390
2384
  * **Example** (Adding checks to a schema)
2391
2385
  *
2392
- * ```ts
2386
+ * ```ts import.meta.vitest
2393
2387
  * import { Schema } from "effect"
2394
2388
  *
2395
2389
  * const AgeSchema = Schema.Finite.pipe(
2396
2390
  * Schema.check(Schema.isGreaterThanOrEqualTo(0), Schema.isLessThanOrEqualTo(120))
2397
2391
  * )
2392
+ * Schema.is(AgeSchema)(42) // => true
2393
+ * Schema.is(AgeSchema)(121) // => false
2398
2394
  * ```
2399
2395
  *
2400
2396
  * @category filtering
@@ -2471,14 +2467,17 @@ export function fromBrand(identifier, ctor) {
2471
2467
  *
2472
2468
  * **Example** (Logging decode failures)
2473
2469
  *
2474
- * ```ts
2470
+ * ```ts import.meta.vitest
2475
2471
  * import { Effect, Schema } from "effect"
2476
2472
  *
2473
+ * const events: Array<string> = []
2477
2474
  * const Logged = Schema.String.pipe(
2478
2475
  * Schema.middlewareDecoding((effect) =>
2479
- * Effect.tapError(effect, (issue) => Effect.log("decode failed", issue))
2476
+ * Effect.tapError(effect, () => Effect.sync(() => events.push("decode failed")))
2480
2477
  * )
2481
2478
  * )
2479
+ * Effect.runSync(Effect.result(Schema.decodeUnknownEffect(Logged)(42)))
2480
+ * events // => ["decode failed"]
2482
2481
  * ```
2483
2482
  *
2484
2483
  * @see {@link catchDecoding} for a simpler error-recovery variant
@@ -2501,14 +2500,17 @@ export function middlewareDecoding(decode) {
2501
2500
  *
2502
2501
  * **Example** (Logging encode failures)
2503
2502
  *
2504
- * ```ts
2503
+ * ```ts import.meta.vitest
2505
2504
  * import { Effect, Schema } from "effect"
2506
2505
  *
2506
+ * const events: Array<string> = []
2507
2507
  * const Logged = Schema.String.pipe(
2508
2508
  * Schema.middlewareEncoding((effect) =>
2509
- * Effect.tapError(effect, (issue) => Effect.log("encode failed", issue))
2509
+ * Effect.tapError(effect, () => Effect.sync(() => events.push("encode failed")))
2510
2510
  * )
2511
2511
  * )
2512
+ * Effect.runSync(Effect.result(Schema.encodeUnknownEffect(Logged)(42)))
2513
+ * events // => ["encode failed"]
2512
2514
  * ```
2513
2515
  *
2514
2516
  * @see {@link catchEncoding} for a simpler error-recovery variant
@@ -2530,12 +2532,13 @@ export function middlewareEncoding(encode) {
2530
2532
  *
2531
2533
  * **Example** (Returning a default on decode failure)
2532
2534
  *
2533
- * ```ts
2535
+ * ```ts import.meta.vitest
2534
2536
  * import { Effect, Option, Schema } from "effect"
2535
2537
  *
2536
2538
  * const schema = Schema.Number.pipe(
2537
2539
  * Schema.catchDecoding((_issue) => Effect.succeed(Option.some(0)))
2538
2540
  * )
2541
+ * Effect.runSync(Schema.decodeUnknownEffect(schema)("invalid")) // => 0
2539
2542
  * ```
2540
2543
  *
2541
2544
  * @see {@link catchDecodingWithContext} to add service requirements to the handler
@@ -2640,7 +2643,7 @@ export function decodeTo(to, transformation) {
2640
2643
  *
2641
2644
  * **Example** (Trimming string values during encoding/decoding)
2642
2645
  *
2643
- * ```ts
2646
+ * ```ts import.meta.vitest
2644
2647
  * import { Schema, SchemaGetter } from "effect"
2645
2648
  *
2646
2649
  * const Trimmed = Schema.String.pipe(
@@ -2650,8 +2653,7 @@ export function decodeTo(to, transformation) {
2650
2653
  * })
2651
2654
  * )
2652
2655
  *
2653
- * const result = Schema.decodeUnknownSync(Trimmed)(" hello ")
2654
- * // result: "hello"
2656
+ * Schema.decodeUnknownSync(Trimmed)(" hello ") // => "hello"
2655
2657
  * ```
2656
2658
  *
2657
2659
  * @category transforming
@@ -2678,7 +2680,7 @@ export function encodeTo(to, transformation) {
2678
2680
  *
2679
2681
  * **Example** (Upper-casing encoded strings)
2680
2682
  *
2681
- * ```ts
2683
+ * ```ts import.meta.vitest
2682
2684
  * import { Schema, SchemaGetter } from "effect"
2683
2685
  *
2684
2686
  * const UpperFromLower = Schema.String.pipe(
@@ -2687,6 +2689,7 @@ export function encodeTo(to, transformation) {
2687
2689
  * encode: SchemaGetter.transform((s: string) => s.toUpperCase())
2688
2690
  * })
2689
2691
  * )
2692
+ * Schema.encodeSync(UpperFromLower)("hello") // => "HELLO"
2690
2693
  * ```
2691
2694
  *
2692
2695
  * @category transforming
@@ -2707,7 +2710,7 @@ export function encode(transformation) {
2707
2710
  *
2708
2711
  * **Example** (Defining an optional field with a static default)
2709
2712
  *
2710
- * ```ts
2713
+ * ```ts import.meta.vitest
2711
2714
  * import { Effect, Schema } from "effect"
2712
2715
  *
2713
2716
  * const MySchema = Schema.Struct({
@@ -2717,8 +2720,7 @@ export function encode(transformation) {
2717
2720
  * )
2718
2721
  * })
2719
2722
  *
2720
- * const value = MySchema.make({})
2721
- * // value: { name: "anonymous" }
2723
+ * MySchema.make({}).name // => "anonymous"
2722
2724
  * ```
2723
2725
  *
2724
2726
  * @category constructors
@@ -2753,15 +2755,14 @@ function toIssueEffect(self) {
2753
2755
  *
2754
2756
  * **Example** (Providing a default for a missing struct key)
2755
2757
  *
2756
- * ```ts
2758
+ * ```ts import.meta.vitest
2757
2759
  * import { Effect, Schema } from "effect"
2758
2760
  *
2759
2761
  * const MySchema = Schema.Struct({
2760
2762
  * name: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed("anonymous")))
2761
2763
  * })
2762
2764
  *
2763
- * const result = Schema.decodeUnknownSync(MySchema)({})
2764
- * // result: { name: "anonymous" }
2765
+ * Schema.decodeUnknownSync(MySchema)({}).name // => "anonymous"
2765
2766
  * ```
2766
2767
  *
2767
2768
  * @see {@link withDecodingDefault} for the value-level variant (key absent **or** `undefined`)
@@ -2828,15 +2829,14 @@ export function withDecodingDefaultTypeKey(defaultValue, options) {
2828
2829
  *
2829
2830
  * **Example** (Providing a default for an optional field value)
2830
2831
  *
2831
- * ```ts
2832
+ * ```ts import.meta.vitest
2832
2833
  * import { Effect, Schema } from "effect"
2833
2834
  *
2834
2835
  * const MySchema = Schema.Struct({
2835
2836
  * name: Schema.String.pipe(Schema.optional, Schema.withDecodingDefault(Effect.succeed("anonymous")))
2836
2837
  * })
2837
2838
  *
2838
- * const result = Schema.decodeUnknownSync(MySchema)({ name: undefined })
2839
- * // result: { name: "anonymous" }
2839
+ * Schema.decodeUnknownSync(MySchema)({ name: undefined }).name // => "anonymous"
2840
2840
  * ```
2841
2841
  *
2842
2842
  * @see {@link withDecodingDefaultKey} for the key-level variant (key absent only, not `undefined`)
@@ -2892,14 +2892,14 @@ export function withDecodingDefaultType(defaultValue, options) {
2892
2892
  *
2893
2893
  * **Example** (Defining a discriminated union tag)
2894
2894
  *
2895
- * ```ts
2895
+ * ```ts import.meta.vitest
2896
2896
  * import { Schema } from "effect"
2897
2897
  *
2898
2898
  * const A = Schema.Struct({ _tag: Schema.tag("A"), value: Schema.Number })
2899
2899
  *
2900
2900
  * // _tag is optional in make, auto-filled to "A"
2901
2901
  * const a = A.make({ value: 42 })
2902
- * // a: { _tag: "A", value: 42 }
2902
+ * a // => { _tag: "A", value: 42 }
2903
2903
  * ```
2904
2904
  *
2905
2905
  * @see {@link tagDefaultOmit} to also omit the tag during encoding
@@ -2925,7 +2925,7 @@ export function tag(literal) {
2925
2925
  *
2926
2926
  * **Example** (Omitting tags during encoding)
2927
2927
  *
2928
- * ```ts
2928
+ * ```ts import.meta.vitest
2929
2929
  * import { Schema } from "effect"
2930
2930
  *
2931
2931
  * const A = Schema.Struct({
@@ -2934,8 +2934,7 @@ export function tag(literal) {
2934
2934
  * })
2935
2935
  *
2936
2936
  * // Encode strips the _tag field
2937
- * const encoded = Schema.encodeUnknownSync(A)({ _tag: "A", value: 1 })
2938
- * // encoded: { value: 1 }
2937
+ * Schema.encodeUnknownSync(A)({ _tag: "A", value: 1 }) // => { value: 1 }
2939
2938
  * ```
2940
2939
  *
2941
2940
  * @see {@link tag} for the variant that keeps the tag during encoding
@@ -2962,7 +2961,7 @@ export function tagDefaultOmit(literal) {
2962
2961
  *
2963
2962
  * **Example** (Defining a tagged struct shorthand)
2964
2963
  *
2965
- * ```ts
2964
+ * ```ts import.meta.vitest
2966
2965
  * import { Schema } from "effect"
2967
2966
  *
2968
2967
  * // Defines a struct with a fixed `_tag` field
@@ -2975,19 +2974,20 @@ export function tagDefaultOmit(literal) {
2975
2974
  * _tag: Schema.tag("A"),
2976
2975
  * a: Schema.String
2977
2976
  * })
2977
+ * void tagged
2978
+ * void equivalent
2978
2979
  * ```
2979
2980
  *
2980
2981
  * **Example** (Accessing the literal value of the tag)
2981
2982
  *
2982
- * ```ts
2983
+ * ```ts import.meta.vitest
2983
2984
  * import { Schema } from "effect"
2984
2985
  *
2985
2986
  * const tagged = Schema.TaggedStruct("A", {
2986
2987
  * a: Schema.String
2987
2988
  * })
2988
2989
  *
2989
- * // literal: "A"
2990
- * const literal = tagged.fields._tag.schema.literal
2990
+ * tagged.fields._tag.schema.literal // => "A"
2991
2991
  * ```
2992
2992
  *
2993
2993
  * @category constructors
@@ -3009,7 +3009,7 @@ export function TaggedStruct(value, fields) {
3009
3009
  *
3010
3010
  * **Example** (Adding tagged-union utilities to an existing union)
3011
3011
  *
3012
- * ```ts
3012
+ * ```ts import.meta.vitest
3013
3013
  * import { Schema } from "effect"
3014
3014
  *
3015
3015
  * const A = Schema.TaggedStruct("A", { value: Schema.Number })
@@ -3022,6 +3022,7 @@ export function TaggedStruct(value, fields) {
3022
3022
  * A: (a) => `number: ${a.value}`,
3023
3023
  * B: (b) => `name: ${b.name}`
3024
3024
  * })
3025
+ * result // => "number: 1"
3025
3026
  * ```
3026
3027
  *
3027
3028
  * @see {@link TaggedUnion} for a shorthand that builds the union from scratch
@@ -3089,7 +3090,7 @@ export function toTaggedUnion(tag) {
3089
3090
  *
3090
3091
  * **Example** (Pattern matching a discriminated union)
3091
3092
  *
3092
- * ```ts
3093
+ * ```ts import.meta.vitest
3093
3094
  * import { Schema } from "effect"
3094
3095
  *
3095
3096
  * const Shape = Schema.TaggedUnion({
@@ -3102,6 +3103,7 @@ export function toTaggedUnion(tag) {
3102
3103
  * Circle: (c) => Math.PI * c.radius ** 2,
3103
3104
  * Rectangle: (r) => r.width * r.height
3104
3105
  * })
3106
+ * Math.round(area * 100) / 100 // => 78.54
3105
3107
  * ```
3106
3108
  *
3107
3109
  * @see {@link toTaggedUnion} to augment an existing union instead
@@ -3136,7 +3138,7 @@ export function TaggedUnion(casesByTag) {
3136
3138
  *
3137
3139
  * **Example** (Defining opaque structs)
3138
3140
  *
3139
- * ```ts
3141
+ * ```ts import.meta.vitest
3140
3142
  * import { Schema } from "effect"
3141
3143
  *
3142
3144
  * class Person extends Schema.Opaque<Person>()(
@@ -3147,7 +3149,7 @@ export function TaggedUnion(casesByTag) {
3147
3149
  *
3148
3150
  * // Decoded value is Person, not { name: string }
3149
3151
  * const person = Schema.decodeUnknownSync(Person)({ name: "Alice" })
3150
- * // person: Person
3152
+ * person.name // => "Alice"
3151
3153
  * ```
3152
3154
  *
3153
3155
  * @category constructors
@@ -3164,13 +3166,13 @@ export function Opaque() {
3164
3166
  *
3165
3167
  * **Example** (Defining a schema for a built-in class)
3166
3168
  *
3167
- * ```ts
3169
+ * ```ts import.meta.vitest
3168
3170
  * import { Schema } from "effect"
3169
3171
  *
3170
3172
  * const DateSchema = Schema.instanceOf(Date)
3171
3173
  *
3172
3174
  * const decoded = Schema.decodeUnknownSync(DateSchema)(new Date("2024-01-01"))
3173
- * // decoded: Date
3175
+ * decoded.toISOString() // => "2024-01-01T00:00:00.000Z"
3174
3176
  * ```
3175
3177
  *
3176
3178
  * @category constructors
@@ -3210,8 +3212,8 @@ export function link() {
3210
3212
  *
3211
3213
  * **Example** (Reporting failure at a nested path)
3212
3214
  *
3213
- * ```ts
3214
- * import { Schema } from "effect"
3215
+ * ```ts import.meta.vitest
3216
+ * import { Result, Schema } from "effect"
3215
3217
  *
3216
3218
  * const schema = Schema.Struct({ password: Schema.String, confirmPassword: Schema.String }).check(
3217
3219
  * Schema.makeFilter((o) =>
@@ -3221,15 +3223,16 @@ export function link() {
3221
3223
  * )
3222
3224
  * )
3223
3225
  *
3224
- * console.log(String(Schema.decodeUnknownExit(schema)({ password: "123456", confirmPassword: "1234567" })))
3225
- * // Failure(Cause([Fail(SchemaError: password and confirmPassword must match
3226
- * // at ["password"])]))
3226
+ * const result = Schema.decodeUnknownResult(schema)({ password: "123456", confirmPassword: "1234567" })
3227
+ * if (Result.isFailure(result) && result.failure.issue._tag === "Filter" && result.failure.issue.issue._tag === "Pointer") {
3228
+ * result.failure.issue.issue.path // => ["password"]
3229
+ * }
3227
3230
  * ```
3228
3231
  *
3229
3232
  * **Example** (Reporting multiple failures at once)
3230
3233
  *
3231
- * ```ts
3232
- * import { Schema } from "effect"
3234
+ * ```ts import.meta.vitest
3235
+ * import { Result, Schema } from "effect"
3233
3236
  *
3234
3237
  * const schema = Schema.Struct({ a: Schema.Finite, b: Schema.Finite, c: Schema.Finite }).check(
3235
3238
  * Schema.makeFilter((o) => {
@@ -3242,11 +3245,10 @@ export function link() {
3242
3245
  * })
3243
3246
  * )
3244
3247
  *
3245
- * console.log(String(Schema.decodeUnknownExit(schema)({ a: 1, b: 0, c: 0 })))
3246
- * // Failure(Cause([Fail(SchemaError: b must be greater than 0
3247
- * // at ["b"]
3248
- * // c must be greater than 0
3249
- * // at ["c"])]))
3248
+ * const result = Schema.decodeUnknownResult(schema)({ a: 1, b: 0, c: 0 })
3249
+ * if (Result.isFailure(result) && result.failure.issue._tag === "Filter" && result.failure.issue.issue._tag === "Composite") {
3250
+ * result.failure.issue.issue.issues.map((issue) => issue._tag === "Pointer" ? issue.path : []) // => [["b"], ["c"]]
3251
+ * }
3250
3252
  * ```
3251
3253
  *
3252
3254
  * @category constructors
@@ -3284,7 +3286,7 @@ const TRIMMED_PATTERN = "^\\S[\\s\\S]*\\S$|^\\S$|^$";
3284
3286
  * When generating test data with fast-check, this applies a `patterns`
3285
3287
  * constraint to ensure generated strings match the trimmed pattern.
3286
3288
  *
3287
- * @category String checks
3289
+ * @category validation
3288
3290
  * @since 4.0.0
3289
3291
  */
3290
3292
  export function isTrimmed(annotations) {
@@ -3318,7 +3320,7 @@ export function isTrimmed(annotations) {
3318
3320
  *
3319
3321
  * @see {@link isTrimmed} for creating the corresponding check
3320
3322
  *
3321
- * @category String checks
3323
+ * @category validation
3322
3324
  * @since 4.0.0
3323
3325
  */
3324
3326
  export const isTrimmedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isTrimmed", Null, ({
@@ -3338,7 +3340,7 @@ export const isTrimmedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("e
3338
3340
  * When generating test data with fast-check, this applies a `patterns`
3339
3341
  * constraint to ensure generated strings match the specified RegExp pattern.
3340
3342
  *
3341
- * @category String checks
3343
+ * @category validation
3342
3344
  * @since 4.0.0
3343
3345
  */
3344
3346
  export function isPattern(regExp, annotations) {
@@ -3368,7 +3370,7 @@ const IsPatternPayload = /*#__PURE__*/Struct({
3368
3370
  *
3369
3371
  * @see {@link isPattern} for creating the corresponding check
3370
3372
  *
3371
- * @category String checks
3373
+ * @category validation
3372
3374
  * @since 4.0.0
3373
3375
  */
3374
3376
  export const isPatternReviver = {
@@ -3394,7 +3396,7 @@ export const isPatternReviver = {
3394
3396
  * When generating test data with fast-check, this applies a `patterns`
3395
3397
  * constraint to ensure generated strings match the number string pattern.
3396
3398
  *
3397
- * @category String checks
3399
+ * @category validation
3398
3400
  * @since 4.0.0
3399
3401
  */
3400
3402
  export function isStringFinite(annotations) {
@@ -3414,7 +3416,7 @@ export function isStringFinite(annotations) {
3414
3416
  *
3415
3417
  * @see {@link isStringFinite} for creating the corresponding check
3416
3418
  *
3417
- * @category String checks
3419
+ * @category validation
3418
3420
  * @since 4.0.0
3419
3421
  */
3420
3422
  export const isStringFiniteReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isStringFinite", Null, ({
@@ -3434,7 +3436,7 @@ export const isStringFiniteReviver = /*#__PURE__*/InternalSchema.makeFilterReviv
3434
3436
  * This check corresponds to a `pattern` constraint with the same signed
3435
3437
  * base-10 integer pattern.
3436
3438
  *
3437
- * @category String checks
3439
+ * @category validation
3438
3440
  * @since 4.0.0
3439
3441
  */
3440
3442
  export function isStringBigInt(annotations) {
@@ -3454,7 +3456,7 @@ export function isStringBigInt(annotations) {
3454
3456
  *
3455
3457
  * @see {@link isStringBigInt} for creating the corresponding check
3456
3458
  *
3457
- * @category String checks
3459
+ * @category validation
3458
3460
  * @since 4.0.0
3459
3461
  */
3460
3462
  export const isStringBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isStringBigInt", Null, ({
@@ -3469,7 +3471,7 @@ export const isStringBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviv
3469
3471
  * The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
3470
3472
  * whether a string can be passed to JavaScript's `Symbol()` function.
3471
3473
  *
3472
- * @category String checks
3474
+ * @category validation
3473
3475
  * @since 4.0.0
3474
3476
  */
3475
3477
  export function isStringSymbol(annotations) {
@@ -3489,7 +3491,7 @@ export function isStringSymbol(annotations) {
3489
3491
  *
3490
3492
  * @see {@link isStringSymbol} for creating the corresponding check
3491
3493
  *
3492
- * @category String checks
3494
+ * @category validation
3493
3495
  * @since 4.0.0
3494
3496
  */
3495
3497
  export const isStringSymbolReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isStringSymbol", Null, ({
@@ -3533,7 +3535,7 @@ const getUUIDRegExp = version => {
3533
3535
  * constraint to ensure generated strings match the UUID pattern.
3534
3536
  *
3535
3537
  * @see {@link isGUID} for shape-only GUID validation.
3536
- * @category String checks
3538
+ * @category validation
3537
3539
  * @since 4.0.0
3538
3540
  */
3539
3541
  export function isUUID(version, annotations) {
@@ -3565,7 +3567,7 @@ export function isUUID(version, annotations) {
3565
3567
  *
3566
3568
  * @see {@link isUUID} for creating the corresponding check
3567
3569
  *
3568
- * @category String checks
3570
+ * @category validation
3569
3571
  * @since 4.0.0
3570
3572
  */
3571
3573
  export const isUUIDReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isUUID", /*#__PURE__*/Struct({
@@ -3596,7 +3598,7 @@ const GUID_REGEXP = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{
3596
3598
  * constraint to ensure generated strings match the GUID pattern.
3597
3599
  *
3598
3600
  * @see {@link isUUID} for strict UUID validation.
3599
- * @category String checks
3601
+ * @category validation
3600
3602
  * @since 4.0.0
3601
3603
  */
3602
3604
  export function isGUID(annotations) {
@@ -3624,7 +3626,7 @@ export function isGUID(annotations) {
3624
3626
  *
3625
3627
  * @see {@link isGUID} for creating the corresponding check
3626
3628
  *
3627
- * @category String checks
3629
+ * @category validation
3628
3630
  * @since 4.0.0
3629
3631
  */
3630
3632
  export const isGUIDReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGUID", Null, ({
@@ -3646,7 +3648,7 @@ export const isGUIDReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effe
3646
3648
  * When generating test data with fast-check, this applies a `patterns`
3647
3649
  * constraint to ensure generated strings match the ULID pattern.
3648
3650
  *
3649
- * @category String checks
3651
+ * @category validation
3650
3652
  * @since 4.0.0
3651
3653
  */
3652
3654
  export function isULID(annotations) {
@@ -3674,7 +3676,7 @@ export function isULID(annotations) {
3674
3676
  *
3675
3677
  * @see {@link isULID} for creating the corresponding check
3676
3678
  *
3677
- * @category String checks
3679
+ * @category validation
3678
3680
  * @since 4.0.0
3679
3681
  */
3680
3682
  export const isULIDReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isULID", Null, ({
@@ -3695,7 +3697,7 @@ export const isULIDReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effe
3695
3697
  * When generating test data with fast-check, this applies a `patterns`
3696
3698
  * constraint to ensure generated strings match the Base64 pattern.
3697
3699
  *
3698
- * @category String checks
3700
+ * @category validation
3699
3701
  * @since 4.0.0
3700
3702
  */
3701
3703
  export function isBase64(annotations) {
@@ -3724,7 +3726,7 @@ export function isBase64(annotations) {
3724
3726
  *
3725
3727
  * @see {@link isBase64} for creating the corresponding check
3726
3728
  *
3727
- * @category String checks
3729
+ * @category validation
3728
3730
  * @since 4.0.0
3729
3731
  */
3730
3732
  export const isBase64Reviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isBase64", Null, ({
@@ -3746,7 +3748,7 @@ export const isBase64Reviver = /*#__PURE__*/InternalSchema.makeFilterReviver("ef
3746
3748
  * When generating test data with fast-check, this applies a `patterns`
3747
3749
  * constraint to ensure generated strings match the Base64URL pattern.
3748
3750
  *
3749
- * @category String checks
3751
+ * @category validation
3750
3752
  * @since 4.0.0
3751
3753
  */
3752
3754
  export function isBase64Url(annotations) {
@@ -3775,7 +3777,7 @@ export function isBase64Url(annotations) {
3775
3777
  *
3776
3778
  * @see {@link isBase64Url} for creating the corresponding check
3777
3779
  *
3778
- * @category String checks
3780
+ * @category validation
3779
3781
  * @since 4.0.0
3780
3782
  */
3781
3783
  export const isBase64UrlReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isBase64Url", Null, ({
@@ -3789,7 +3791,7 @@ export const isBase64UrlReviver = /*#__PURE__*/InternalSchema.makeFilterReviver(
3789
3791
  * RegExp metacharacters in the prefix are escaped in JSON Schema and arbitrary
3790
3792
  * metadata so that the generated patterns retain literal `startsWith` semantics.
3791
3793
  *
3792
- * @category String checks
3794
+ * @category validation
3793
3795
  * @since 4.0.0
3794
3796
  */
3795
3797
  export function isStartsWith(startsWith, annotations) {
@@ -3826,7 +3828,7 @@ export function isStartsWith(startsWith, annotations) {
3826
3828
  *
3827
3829
  * @see {@link isStartsWith} for creating the corresponding check
3828
3830
  *
3829
- * @category String checks
3831
+ * @category validation
3830
3832
  * @since 4.0.0
3831
3833
  */
3832
3834
  export const isStartsWithReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isStartsWith", /*#__PURE__*/Struct({
@@ -3843,7 +3845,7 @@ export const isStartsWithReviver = /*#__PURE__*/InternalSchema.makeFilterReviver
3843
3845
  * RegExp metacharacters in the suffix are escaped in JSON Schema and arbitrary
3844
3846
  * metadata so that the generated patterns retain literal `endsWith` semantics.
3845
3847
  *
3846
- * @category String checks
3848
+ * @category validation
3847
3849
  * @since 4.0.0
3848
3850
  */
3849
3851
  export function isEndsWith(endsWith, annotations) {
@@ -3880,7 +3882,7 @@ export function isEndsWith(endsWith, annotations) {
3880
3882
  *
3881
3883
  * @see {@link isEndsWith} for creating the corresponding check
3882
3884
  *
3883
- * @category String checks
3885
+ * @category validation
3884
3886
  * @since 4.0.0
3885
3887
  */
3886
3888
  export const isEndsWithReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isEndsWith", /*#__PURE__*/Struct({
@@ -3898,7 +3900,7 @@ export const isEndsWithReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("
3898
3900
  * arbitrary metadata so that the generated patterns retain literal `includes`
3899
3901
  * semantics.
3900
3902
  *
3901
- * @category String checks
3903
+ * @category validation
3902
3904
  * @since 4.0.0
3903
3905
  */
3904
3906
  export function isIncludes(includes, annotations) {
@@ -3935,7 +3937,7 @@ export function isIncludes(includes, annotations) {
3935
3937
  *
3936
3938
  * @see {@link isIncludes} for creating the corresponding check
3937
3939
  *
3938
- * @category String checks
3940
+ * @category validation
3939
3941
  * @since 4.0.0
3940
3942
  */
3941
3943
  export const isIncludesReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isIncludes", /*#__PURE__*/Struct({
@@ -3954,7 +3956,7 @@ const UPPERCASED_PATTERN = "^[^a-z]*$";
3954
3956
  * such as digits, punctuation, and whitespace. It rejects strings that would
3955
3957
  * change when uppercased.
3956
3958
  *
3957
- * @category String checks
3959
+ * @category validation
3958
3960
  * @since 4.0.0
3959
3961
  */
3960
3962
  export function isUppercased(annotations) {
@@ -3988,7 +3990,7 @@ export function isUppercased(annotations) {
3988
3990
  *
3989
3991
  * @see {@link isUppercased} for creating the corresponding check
3990
3992
  *
3991
- * @category String checks
3993
+ * @category validation
3992
3994
  * @since 4.0.0
3993
3995
  */
3994
3996
  export const isUppercasedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isUppercased", Null, ({
@@ -4004,7 +4006,7 @@ const LOWERCASED_PATTERN = "^[^A-Z]*$";
4004
4006
  * such as digits, punctuation, and whitespace. It rejects strings that would
4005
4007
  * change when lowercased.
4006
4008
  *
4007
- * @category String checks
4009
+ * @category validation
4008
4010
  * @since 4.0.0
4009
4011
  */
4010
4012
  export function isLowercased(annotations) {
@@ -4038,7 +4040,7 @@ export function isLowercased(annotations) {
4038
4040
  *
4039
4041
  * @see {@link isLowercased} for creating the corresponding check
4040
4042
  *
4041
- * @category String checks
4043
+ * @category validation
4042
4044
  * @since 4.0.0
4043
4045
  */
4044
4046
  export const isLowercasedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLowercased", Null, ({
@@ -4054,7 +4056,7 @@ const CAPITALIZED_PATTERN = "^[^a-z]?.*$";
4054
4056
  * Empty strings pass. Strings whose first character has no lowercase form, such
4055
4057
  * as a digit, punctuation mark, or whitespace, also pass.
4056
4058
  *
4057
- * @category String checks
4059
+ * @category validation
4058
4060
  * @since 4.0.0
4059
4061
  */
4060
4062
  export function isCapitalized(annotations) {
@@ -4088,7 +4090,7 @@ export function isCapitalized(annotations) {
4088
4090
  *
4089
4091
  * @see {@link isCapitalized} for creating the corresponding check
4090
4092
  *
4091
- * @category String checks
4093
+ * @category validation
4092
4094
  * @since 4.0.0
4093
4095
  */
4094
4096
  export const isCapitalizedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isCapitalized", Null, ({
@@ -4104,7 +4106,7 @@ const UNCAPITALIZED_PATTERN = "^[^A-Z]?.*$";
4104
4106
  * Empty strings pass. Strings whose first character has no uppercase form, such
4105
4107
  * as a digit, punctuation mark, or whitespace, also pass.
4106
4108
  *
4107
- * @category String checks
4109
+ * @category validation
4108
4110
  * @since 4.0.0
4109
4111
  */
4110
4112
  export function isUncapitalized(annotations) {
@@ -4138,7 +4140,7 @@ export function isUncapitalized(annotations) {
4138
4140
  *
4139
4141
  * @see {@link isUncapitalized} for creating the corresponding check
4140
4142
  *
4141
- * @category String checks
4143
+ * @category validation
4142
4144
  * @since 4.0.0
4143
4145
  */
4144
4146
  export const isUncapitalizedReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isUncapitalized", Null, ({
@@ -4147,7 +4149,7 @@ export const isUncapitalizedReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
4147
4149
  /**
4148
4150
  * Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
4149
4151
  *
4150
- * @category Number
4152
+ * @category schemas
4151
4153
  * @since 3.10.0
4152
4154
  */
4153
4155
  export const Finite = /*#__PURE__*/make(SchemaAST.finite);
@@ -4166,7 +4168,7 @@ export const Finite = /*#__PURE__*/make(SchemaAST.finite);
4166
4168
  * When generating test data with fast-check, this applies `noNaN: true` and
4167
4169
  * `noInfinity: true` constraints to ensure generated numbers are finite.
4168
4170
  *
4169
- * @category Number checks
4171
+ * @category validation
4170
4172
  * @since 4.0.0
4171
4173
  */
4172
4174
  export const isFinite = SchemaAST.isFinite;
@@ -4179,7 +4181,7 @@ export const isFinite = SchemaAST.isFinite;
4179
4181
  *
4180
4182
  * @see {@link isFinite} for creating the corresponding check
4181
4183
  *
4182
- * @category Number checks
4184
+ * @category validation
4183
4185
  * @since 4.0.0
4184
4186
  */
4185
4187
  export const isFiniteReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isFinite", Null, ({
@@ -4189,7 +4191,7 @@ export const isFiniteReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("ef
4189
4191
  * Creates a greater-than (`>`) check for any ordered type from an
4190
4192
  * `Order.Order` instance.
4191
4193
  *
4192
- * @category Order checks
4194
+ * @category validation
4193
4195
  * @since 4.0.0
4194
4196
  */
4195
4197
  export function makeIsGreaterThan(options) {
@@ -4216,7 +4218,7 @@ export function makeIsGreaterThan(options) {
4216
4218
  * Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
4217
4219
  * `Order.Order` instance.
4218
4220
  *
4219
- * @category Order checks
4221
+ * @category validation
4220
4222
  * @since 4.0.0
4221
4223
  */
4222
4224
  export function makeIsGreaterThanOrEqualTo(options) {
@@ -4242,7 +4244,7 @@ export function makeIsGreaterThanOrEqualTo(options) {
4242
4244
  * Creates a less-than (`<`) check for any ordered type from an `Order.Order`
4243
4245
  * instance.
4244
4246
  *
4245
- * @category Order checks
4247
+ * @category validation
4246
4248
  * @since 4.0.0
4247
4249
  */
4248
4250
  export function makeIsLessThan(options) {
@@ -4269,7 +4271,7 @@ export function makeIsLessThan(options) {
4269
4271
  * Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
4270
4272
  * `Order.Order` instance.
4271
4273
  *
4272
- * @category Order checks
4274
+ * @category validation
4273
4275
  * @since 4.0.0
4274
4276
  */
4275
4277
  export function makeIsLessThanOrEqualTo(options) {
@@ -4295,7 +4297,7 @@ export function makeIsLessThanOrEqualTo(options) {
4295
4297
  * Creates an inclusive or exclusive range check for any ordered type from an
4296
4298
  * `Order.Order` instance.
4297
4299
  *
4298
- * @category Order checks
4300
+ * @category validation
4299
4301
  * @since 4.0.0
4300
4302
  */
4301
4303
  export function makeIsBetween(deriveOptions) {
@@ -4333,7 +4335,7 @@ export function makeIsBetween(deriveOptions) {
4333
4335
  * Creates a divisibility check for any numeric type from a remainder function
4334
4336
  * and a zero value.
4335
4337
  *
4336
- * @category Numeric checks
4338
+ * @category validation
4337
4339
  * @since 4.0.0
4338
4340
  */
4339
4341
  export function makeIsMultipleOf(options) {
@@ -4367,7 +4369,7 @@ function encodeNumberPayload(number) {
4367
4369
  * `exclusiveMinimum` constraint to ensure generated numbers are greater than
4368
4370
  * the specified value.
4369
4371
  *
4370
- * @category Number checks
4372
+ * @category validation
4371
4373
  * @since 4.0.0
4372
4374
  */
4373
4375
  export const isGreaterThan = /*#__PURE__*/makeIsGreaterThan({
@@ -4396,7 +4398,7 @@ export const isGreaterThan = /*#__PURE__*/makeIsGreaterThan({
4396
4398
  *
4397
4399
  * @see {@link isGreaterThan} for creating the corresponding check
4398
4400
  *
4399
- * @category Number checks
4401
+ * @category validation
4400
4402
  * @since 4.0.0
4401
4403
  */
4402
4404
  export const isGreaterThanReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThan", /*#__PURE__*/Struct({
@@ -4420,7 +4422,7 @@ export const isGreaterThanReviver = /*#__PURE__*/InternalSchema.makeFilterRevive
4420
4422
  * When generating test data with fast-check, this applies a `minimum` constraint
4421
4423
  * to ensure generated numbers are greater than or equal to the specified value.
4422
4424
  *
4423
- * @category Number checks
4425
+ * @category validation
4424
4426
  * @since 4.0.0
4425
4427
  */
4426
4428
  export const isGreaterThanOrEqualTo = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
@@ -4449,7 +4451,7 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
4449
4451
  *
4450
4452
  * @see {@link isGreaterThanOrEqualTo} for creating the corresponding check
4451
4453
  *
4452
- * @category Number checks
4454
+ * @category validation
4453
4455
  * @since 4.0.0
4454
4456
  */
4455
4457
  export const isGreaterThanOrEqualToReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThanOrEqualTo", /*#__PURE__*/Struct({
@@ -4473,7 +4475,7 @@ export const isGreaterThanOrEqualToReviver = /*#__PURE__*/InternalSchema.makeFil
4473
4475
  * `exclusiveMaximum` constraint to ensure generated numbers are less than the
4474
4476
  * specified value.
4475
4477
  *
4476
- * @category Number checks
4478
+ * @category validation
4477
4479
  * @since 4.0.0
4478
4480
  */
4479
4481
  export const isLessThan = /*#__PURE__*/makeIsLessThan({
@@ -4502,7 +4504,7 @@ export const isLessThan = /*#__PURE__*/makeIsLessThan({
4502
4504
  *
4503
4505
  * @see {@link isLessThan} for creating the corresponding check
4504
4506
  *
4505
- * @category Number checks
4507
+ * @category validation
4506
4508
  * @since 4.0.0
4507
4509
  */
4508
4510
  export const isLessThanReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThan", /*#__PURE__*/Struct({
@@ -4526,7 +4528,7 @@ export const isLessThanReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("
4526
4528
  * When generating test data with fast-check, this applies a `maximum` constraint
4527
4529
  * to ensure generated numbers are less than or equal to the specified value.
4528
4530
  *
4529
- * @category Number checks
4531
+ * @category validation
4530
4532
  * @since 4.0.0
4531
4533
  */
4532
4534
  export const isLessThanOrEqualTo = /*#__PURE__*/makeIsLessThanOrEqualTo({
@@ -4555,7 +4557,7 @@ export const isLessThanOrEqualTo = /*#__PURE__*/makeIsLessThanOrEqualTo({
4555
4557
  *
4556
4558
  * @see {@link isLessThanOrEqualTo} for creating the corresponding check
4557
4559
  *
4558
- * @category Number checks
4560
+ * @category validation
4559
4561
  * @since 4.0.0
4560
4562
  */
4561
4563
  export const isLessThanOrEqualToReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThanOrEqualTo", /*#__PURE__*/Struct({
@@ -4582,7 +4584,7 @@ export const isLessThanOrEqualToReviver = /*#__PURE__*/InternalSchema.makeFilter
4582
4584
  * `exclusiveMaximum` flags to ensure generated numbers fall within the
4583
4585
  * specified range.
4584
4586
  *
4585
- * @category Number checks
4587
+ * @category validation
4586
4588
  * @since 4.0.0
4587
4589
  */
4588
4590
  export const isBetween = /*#__PURE__*/makeIsBetween({
@@ -4624,7 +4626,7 @@ export const isBetween = /*#__PURE__*/makeIsBetween({
4624
4626
  *
4625
4627
  * @see {@link isBetween} for creating the corresponding check
4626
4628
  *
4627
- * @category Number checks
4629
+ * @category validation
4628
4630
  * @since 4.0.0
4629
4631
  */
4630
4632
  export const isBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isBetween", /*#__PURE__*/Struct({
@@ -4650,7 +4652,7 @@ export const isBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("e
4650
4652
  * When generating test data with fast-check, this applies constraints to ensure
4651
4653
  * generated numbers are multiples of the specified divisor.
4652
4654
  *
4653
- * @category Number checks
4655
+ * @category validation
4654
4656
  * @since 4.0.0
4655
4657
  */
4656
4658
  export const isMultipleOf = /*#__PURE__*/makeIsMultipleOf({
@@ -4681,7 +4683,7 @@ export const isMultipleOf = /*#__PURE__*/makeIsMultipleOf({
4681
4683
  *
4682
4684
  * @see {@link isMultipleOf} for creating the corresponding check
4683
4685
  *
4684
- * @category Number checks
4686
+ * @category validation
4685
4687
  * @since 4.0.0
4686
4688
  */
4687
4689
  export const isMultipleOfReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMultipleOf", /*#__PURE__*/Struct({
@@ -4705,7 +4707,7 @@ export const isMultipleOfReviver = /*#__PURE__*/InternalSchema.makeFilterReviver
4705
4707
  * When generating test data with fast-check, this applies an `integer: true`
4706
4708
  * constraint to ensure generated numbers are integers.
4707
4709
  *
4708
- * @category Integer checks
4710
+ * @category validation
4709
4711
  * @since 4.0.0
4710
4712
  */
4711
4713
  export function isInt(annotations) {
@@ -4738,7 +4740,7 @@ export function isInt(annotations) {
4738
4740
  *
4739
4741
  * @see {@link isInt} for creating the corresponding check
4740
4742
  *
4741
- * @category Integer checks
4743
+ * @category validation
4742
4744
  * @since 4.0.0
4743
4745
  */
4744
4746
  export const isIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isInt", Null, ({
@@ -4747,7 +4749,7 @@ export const isIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effec
4747
4749
  /**
4748
4750
  * Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
4749
4751
  *
4750
- * @category Number
4752
+ * @category schemas
4751
4753
  * @since 3.10.0
4752
4754
  */
4753
4755
  export const Int = /*#__PURE__*/Number.check(/*#__PURE__*/isInt());
@@ -4760,7 +4762,7 @@ export const Int = /*#__PURE__*/Number.check(/*#__PURE__*/isInt());
4760
4762
  *
4761
4763
  * @see {@link Int} for safe integers that may be negative
4762
4764
  *
4763
- * @category Number
4765
+ * @category schemas
4764
4766
  * @since 4.0.0
4765
4767
  */
4766
4768
  export const Natural = /*#__PURE__*/Int.check(/*#__PURE__*/isGreaterThanOrEqualTo(0));
@@ -4780,7 +4782,7 @@ export const Natural = /*#__PURE__*/Int.check(/*#__PURE__*/isGreaterThanOrEqualT
4780
4782
  * When generating test data with fast-check, this applies integer and range
4781
4783
  * constraints to ensure generated numbers are 32-bit signed integers.
4782
4784
  *
4783
- * @category Integer checks
4785
+ * @category validation
4784
4786
  * @since 4.0.0
4785
4787
  */
4786
4788
  export function isInt32(annotations) {
@@ -4808,7 +4810,7 @@ export function isInt32(annotations) {
4808
4810
  * When generating test data with fast-check, this applies integer and range
4809
4811
  * constraints to ensure generated numbers are 32-bit unsigned integers.
4810
4812
  *
4811
- * @category Integer checks
4813
+ * @category validation
4812
4814
  * @since 4.0.0
4813
4815
  */
4814
4816
  export function isUint32(annotations) {
@@ -4840,7 +4842,7 @@ function formatDateRuntime(date) {
4840
4842
  * one millisecond after the specified value to ensure generated Date objects are
4841
4843
  * greater than it.
4842
4844
  *
4843
- * @category Date checks
4845
+ * @category validation
4844
4846
  * @since 4.0.0
4845
4847
  */
4846
4848
  export const isGreaterThanDate = /*#__PURE__*/makeIsGreaterThan({
@@ -4878,7 +4880,7 @@ export const isGreaterThanDate = /*#__PURE__*/makeIsGreaterThan({
4878
4880
  * to ensure generated Date objects are greater than or equal to the specified
4879
4881
  * date.
4880
4882
  *
4881
- * @category Date checks
4883
+ * @category validation
4882
4884
  * @since 4.0.0
4883
4885
  */
4884
4886
  export const isGreaterThanOrEqualToDate = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
@@ -4910,7 +4912,7 @@ export const isGreaterThanOrEqualToDate = /*#__PURE__*/makeIsGreaterThanOrEqualT
4910
4912
  * one millisecond before the specified value to ensure generated Date objects
4911
4913
  * are less than it.
4912
4914
  *
4913
- * @category Date checks
4915
+ * @category validation
4914
4916
  * @since 4.0.0
4915
4917
  */
4916
4918
  export const isLessThanDate = /*#__PURE__*/makeIsLessThan({
@@ -4948,7 +4950,7 @@ export const isLessThanDate = /*#__PURE__*/makeIsLessThan({
4948
4950
  * to ensure generated Date objects are less than or equal to the specified
4949
4951
  * date.
4950
4952
  *
4951
- * @category Date checks
4953
+ * @category validation
4952
4954
  * @since 4.0.0
4953
4955
  */
4954
4956
  export const isLessThanOrEqualToDate = /*#__PURE__*/makeIsLessThanOrEqualTo({
@@ -4986,7 +4988,7 @@ export const isLessThanOrEqualToDate = /*#__PURE__*/makeIsLessThanOrEqualTo({
4986
4988
  * constraints to ensure generated Date objects fall within the specified range,
4987
4989
  * shifting exclusive bounds by one millisecond.
4988
4990
  *
4989
- * @category Date checks
4991
+ * @category validation
4990
4992
  * @since 4.0.0
4991
4993
  */
4992
4994
  export const isBetweenDate = /*#__PURE__*/makeIsBetween({
@@ -5027,7 +5029,7 @@ export const isBetweenDate = /*#__PURE__*/makeIsBetween({
5027
5029
  * `exclusiveMinimum + 1n` to ensure generated BigInts are greater than the
5028
5030
  * specified value.
5029
5031
  *
5030
- * @category BigInt checks
5032
+ * @category validation
5031
5033
  * @since 4.0.0
5032
5034
  */
5033
5035
  export const isGreaterThanBigInt = /*#__PURE__*/makeIsGreaterThan({
@@ -5060,7 +5062,7 @@ export const isGreaterThanBigInt = /*#__PURE__*/makeIsGreaterThan({
5060
5062
  * to ensure generated BigInt values are greater than or equal to the specified
5061
5063
  * value.
5062
5064
  *
5063
- * @category BigInt checks
5065
+ * @category validation
5064
5066
  * @since 4.0.0
5065
5067
  */
5066
5068
  export const isGreaterThanOrEqualToBigInt = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
@@ -5092,7 +5094,7 @@ export const isGreaterThanOrEqualToBigInt = /*#__PURE__*/makeIsGreaterThanOrEqua
5092
5094
  * `exclusiveMaximum - 1n` to ensure generated BigInts are less than the
5093
5095
  * specified value.
5094
5096
  *
5095
- * @category BigInt checks
5097
+ * @category validation
5096
5098
  * @since 4.0.0
5097
5099
  */
5098
5100
  export const isLessThanBigInt = /*#__PURE__*/makeIsLessThan({
@@ -5125,7 +5127,7 @@ export const isLessThanBigInt = /*#__PURE__*/makeIsLessThan({
5125
5127
  * to ensure generated BigInt values are less than or equal to the specified
5126
5128
  * value.
5127
5129
  *
5128
- * @category BigInt checks
5130
+ * @category validation
5129
5131
  * @since 4.0.0
5130
5132
  */
5131
5133
  export const isLessThanOrEqualToBigInt = /*#__PURE__*/makeIsLessThanOrEqualTo({
@@ -5158,7 +5160,7 @@ export const isLessThanOrEqualToBigInt = /*#__PURE__*/makeIsLessThanOrEqualTo({
5158
5160
  * constraints to ensure generated BigInt values fall within the specified
5159
5161
  * range.
5160
5162
  *
5161
- * @category BigInt checks
5163
+ * @category validation
5162
5164
  * @since 4.0.0
5163
5165
  */
5164
5166
  export const isBetweenBigInt = /*#__PURE__*/makeIsBetween({
@@ -5191,7 +5193,7 @@ export const isBetweenBigInt = /*#__PURE__*/makeIsBetween({
5191
5193
  /**
5192
5194
  * Validates that a BigDecimal is greater than the specified value (exclusive).
5193
5195
  *
5194
- * @category BigDecimal checks
5196
+ * @category validation
5195
5197
  * @since 4.0.0
5196
5198
  */
5197
5199
  export const isGreaterThanBigDecimal = /*#__PURE__*/makeIsGreaterThan({
@@ -5202,7 +5204,7 @@ export const isGreaterThanBigDecimal = /*#__PURE__*/makeIsGreaterThan({
5202
5204
  * Validates that a BigDecimal is greater than or equal to the specified value
5203
5205
  * (inclusive).
5204
5206
  *
5205
- * @category BigDecimal checks
5207
+ * @category validation
5206
5208
  * @since 4.0.0
5207
5209
  */
5208
5210
  export const isGreaterThanOrEqualToBigDecimal = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
@@ -5212,7 +5214,7 @@ export const isGreaterThanOrEqualToBigDecimal = /*#__PURE__*/makeIsGreaterThanOr
5212
5214
  /**
5213
5215
  * Validates that a BigDecimal is less than the specified value (exclusive).
5214
5216
  *
5215
- * @category BigDecimal checks
5217
+ * @category validation
5216
5218
  * @since 4.0.0
5217
5219
  */
5218
5220
  export const isLessThanBigDecimal = /*#__PURE__*/makeIsLessThan({
@@ -5223,7 +5225,7 @@ export const isLessThanBigDecimal = /*#__PURE__*/makeIsLessThan({
5223
5225
  * Validates that a BigDecimal is less than or equal to the specified value
5224
5226
  * (inclusive).
5225
5227
  *
5226
- * @category BigDecimal checks
5228
+ * @category validation
5227
5229
  * @since 4.0.0
5228
5230
  */
5229
5231
  export const isLessThanOrEqualToBigDecimal = /*#__PURE__*/makeIsLessThanOrEqualTo({
@@ -5238,7 +5240,7 @@ export const isLessThanOrEqualToBigDecimal = /*#__PURE__*/makeIsLessThanOrEqualT
5238
5240
  * The minimum and maximum boundaries are inclusive by default. Pass
5239
5241
  * `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
5240
5242
  *
5241
- * @category BigDecimal checks
5243
+ * @category validation
5242
5244
  * @since 4.0.0
5243
5245
  */
5244
5246
  export const isBetweenBigDecimal = /*#__PURE__*/makeIsBetween({
@@ -5264,14 +5266,16 @@ export const isBetweenBigDecimal = /*#__PURE__*/makeIsBetween({
5264
5266
  *
5265
5267
  * **Example** (Checking minimum length)
5266
5268
  *
5267
- * ```ts
5269
+ * ```ts import.meta.vitest
5268
5270
  * import { Schema } from "effect"
5269
5271
  *
5270
5272
  * const NonEmptyStringSchema = Schema.String.check(Schema.isMinLength(1))
5271
5273
  * const NonEmptyArraySchema = Schema.Array(Schema.Number).check(Schema.isMinLength(1))
5274
+ * Schema.is(NonEmptyStringSchema)("a") // => true
5275
+ * Schema.is(NonEmptyArraySchema)([1]) // => true
5272
5276
  * ```
5273
5277
  *
5274
- * @category Length checks
5278
+ * @category validation
5275
5279
  * @since 4.0.0
5276
5280
  */
5277
5281
  export function isMinLength(minLength, annotations) {
@@ -5312,7 +5316,7 @@ export function isMinLength(minLength, annotations) {
5312
5316
  *
5313
5317
  * @see {@link isMinLength} for creating the corresponding check
5314
5318
  *
5315
- * @category Length checks
5319
+ * @category validation
5316
5320
  * @since 4.0.0
5317
5321
  */
5318
5322
  export const isMinLengthReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMinLength", /*#__PURE__*/Struct({
@@ -5337,7 +5341,7 @@ export const isMinLengthReviver = /*#__PURE__*/InternalSchema.makeFilterReviver(
5337
5341
  * When generating test data with fast-check, this applies a `minLength: 1`
5338
5342
  * constraint to ensure generated strings or arrays are non-empty.
5339
5343
  *
5340
- * @category Length checks
5344
+ * @category validation
5341
5345
  * @since 4.0.0
5342
5346
  */
5343
5347
  export function isNonEmpty(annotations) {
@@ -5360,7 +5364,7 @@ export function isNonEmpty(annotations) {
5360
5364
  * constraint to ensure generated strings or arrays have at most the required
5361
5365
  * length.
5362
5366
  *
5363
- * @category Length checks
5367
+ * @category validation
5364
5368
  * @since 4.0.0
5365
5369
  */
5366
5370
  export function isMaxLength(maxLength, annotations) {
@@ -5401,7 +5405,7 @@ export function isMaxLength(maxLength, annotations) {
5401
5405
  *
5402
5406
  * @see {@link isMaxLength} for creating the corresponding check
5403
5407
  *
5404
- * @category Length checks
5408
+ * @category validation
5405
5409
  * @since 4.0.0
5406
5410
  */
5407
5411
  export const isMaxLengthReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMaxLength", /*#__PURE__*/Struct({
@@ -5427,7 +5431,7 @@ export const isMaxLengthReviver = /*#__PURE__*/InternalSchema.makeFilterReviver(
5427
5431
  * `maxLength` constraints to ensure generated strings or arrays have a length
5428
5432
  * within the specified range.
5429
5433
  *
5430
- * @category Length checks
5434
+ * @category validation
5431
5435
  * @since 4.0.0
5432
5436
  */
5433
5437
  export function isLengthBetween(minimum, maximum, annotations) {
@@ -5479,7 +5483,7 @@ export function isLengthBetween(minimum, maximum, annotations) {
5479
5483
  *
5480
5484
  * @see {@link isLengthBetween} for creating the corresponding check
5481
5485
  *
5482
- * @category Length checks
5486
+ * @category validation
5483
5487
  * @since 4.0.0
5484
5488
  */
5485
5489
  export const isLengthBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLengthBetween", /*#__PURE__*/Struct({
@@ -5506,7 +5510,7 @@ export const isLengthBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
5506
5510
  * `minLength` constraint. Generators for values with a final `.size`, such as
5507
5511
  * sets and maps, interpret it as final cardinality.
5508
5512
  *
5509
- * @category Size checks
5513
+ * @category validation
5510
5514
  * @since 4.0.0
5511
5515
  */
5512
5516
  export function isMinSize(minSize, annotations) {
@@ -5541,7 +5545,7 @@ export function isMinSize(minSize, annotations) {
5541
5545
  *
5542
5546
  * @see {@link isMinSize} for creating the corresponding check
5543
5547
  *
5544
- * @category Size checks
5548
+ * @category validation
5545
5549
  * @since 4.0.0
5546
5550
  */
5547
5551
  export const isMinSizeReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMinSize", /*#__PURE__*/Struct({
@@ -5567,7 +5571,7 @@ export const isMinSizeReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("e
5567
5571
  * `maxLength` constraint. Generators for values with a final `.size`, such as
5568
5572
  * sets and maps, interpret it as final cardinality.
5569
5573
  *
5570
- * @category Size checks
5574
+ * @category validation
5571
5575
  * @since 4.0.0
5572
5576
  */
5573
5577
  export function isMaxSize(maxSize, annotations) {
@@ -5602,7 +5606,7 @@ export function isMaxSize(maxSize, annotations) {
5602
5606
  *
5603
5607
  * @see {@link isMaxSize} for creating the corresponding check
5604
5608
  *
5605
- * @category Size checks
5609
+ * @category validation
5606
5610
  * @since 4.0.0
5607
5611
  */
5608
5612
  export const isMaxSizeReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMaxSize", /*#__PURE__*/Struct({
@@ -5628,7 +5632,7 @@ export const isMaxSizeReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("e
5628
5632
  * `minLength` and `maxLength` constraints. Generators for values with a final
5629
5633
  * `.size`, such as sets and maps, interpret them as final cardinality.
5630
5634
  *
5631
- * @category Size checks
5635
+ * @category validation
5632
5636
  * @since 4.0.0
5633
5637
  */
5634
5638
  export function isSizeBetween(minimum, maximum, annotations) {
@@ -5666,7 +5670,7 @@ export function isSizeBetween(minimum, maximum, annotations) {
5666
5670
  *
5667
5671
  * @see {@link isSizeBetween} for creating the corresponding check
5668
5672
  *
5669
- * @category Size checks
5673
+ * @category validation
5670
5674
  * @since 4.0.0
5671
5675
  */
5672
5676
  export const isSizeBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isSizeBetween", /*#__PURE__*/Struct({
@@ -5693,7 +5697,7 @@ export const isSizeBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterRevive
5693
5697
  * `minLength` constraint. Object generators interpret it as the final number
5694
5698
  * of own properties.
5695
5699
  *
5696
- * @category Object checks
5700
+ * @category validation
5697
5701
  * @since 4.0.0
5698
5702
  */
5699
5703
  export function isMinProperties(minProperties, annotations) {
@@ -5730,7 +5734,7 @@ export function isMinProperties(minProperties, annotations) {
5730
5734
  *
5731
5735
  * @see {@link isMinProperties} for creating the corresponding check
5732
5736
  *
5733
- * @category Object checks
5737
+ * @category validation
5734
5738
  * @since 4.0.0
5735
5739
  */
5736
5740
  export const isMinPropertiesReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMinProperties", /*#__PURE__*/Struct({
@@ -5755,7 +5759,7 @@ export const isMinPropertiesReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
5755
5759
  * `maxLength` constraint. Object generators interpret it as the final number
5756
5760
  * of own properties.
5757
5761
  *
5758
- * @category Object checks
5762
+ * @category validation
5759
5763
  * @since 4.0.0
5760
5764
  */
5761
5765
  export function isMaxProperties(maxProperties, annotations) {
@@ -5792,7 +5796,7 @@ export function isMaxProperties(maxProperties, annotations) {
5792
5796
  *
5793
5797
  * @see {@link isMaxProperties} for creating the corresponding check
5794
5798
  *
5795
- * @category Object checks
5799
+ * @category validation
5796
5800
  * @since 4.0.0
5797
5801
  */
5798
5802
  export const isMaxPropertiesReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isMaxProperties", /*#__PURE__*/Struct({
@@ -5818,7 +5822,7 @@ export const isMaxPropertiesReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
5818
5822
  * `minLength` and `maxLength` constraints. Object generators interpret them as
5819
5823
  * the final number of own properties.
5820
5824
  *
5821
- * @category Object checks
5825
+ * @category validation
5822
5826
  * @since 4.0.0
5823
5827
  */
5824
5828
  export function isPropertiesLengthBetween(minimum, maximum, annotations) {
@@ -5859,7 +5863,7 @@ export function isPropertiesLengthBetween(minimum, maximum, annotations) {
5859
5863
  *
5860
5864
  * @see {@link isPropertiesLengthBetween} for creating the corresponding check
5861
5865
  *
5862
- * @category Object checks
5866
+ * @category validation
5863
5867
  * @since 4.0.0
5864
5868
  */
5865
5869
  export const isPropertiesLengthBetweenReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isPropertiesLengthBetween", /*#__PURE__*/Struct({
@@ -5882,7 +5886,7 @@ export const isPropertiesLengthBetweenReviver = /*#__PURE__*/InternalSchema.make
5882
5886
  * For string property names, this corresponds to the `propertyNames` constraint
5883
5887
  * in JSON Schema.
5884
5888
  *
5885
- * @category Object checks
5889
+ * @category validation
5886
5890
  * @since 4.0.0
5887
5891
  */
5888
5892
  export function isPropertyNames(keySchema, annotations) {
@@ -5899,7 +5903,7 @@ export function isPropertyNames(keySchema, annotations) {
5899
5903
  }
5900
5904
  }
5901
5905
  if (Arr.isArrayNonEmpty(issues)) {
5902
- return new SchemaIssue.Composite(ast, Option_.some(input), issues);
5906
+ return new SchemaIssue.Composite(ast, issues);
5903
5907
  }
5904
5908
  return true;
5905
5909
  }, {
@@ -5932,7 +5936,7 @@ export function isPropertyNames(keySchema, annotations) {
5932
5936
  *
5933
5937
  * @see {@link isPropertyNames} for creating the corresponding check
5934
5938
  *
5935
- * @category Object checks
5939
+ * @category validation
5936
5940
  * @since 4.0.0
5937
5941
  */
5938
5942
  export const isPropertyNamesReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isPropertyNames", Null, ({
@@ -5952,7 +5956,7 @@ export const isPropertyNamesReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
5952
5956
  * `unique: true` constraint. Array generators translate it to `fast-check`
5953
5957
  * `uniqueArray` using Effect equality.
5954
5958
  *
5955
- * @category Array checks
5959
+ * @category validation
5956
5960
  * @since 4.0.0
5957
5961
  */
5958
5962
  export function isUnique(annotations) {
@@ -5985,7 +5989,7 @@ export function isUnique(annotations) {
5985
5989
  *
5986
5990
  * @see {@link isUnique} for creating the corresponding check
5987
5991
  *
5988
- * @category Array checks
5992
+ * @category validation
5989
5993
  * @since 4.0.0
5990
5994
  */
5991
5995
  export const isUniqueReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isUnique", Null, ({
@@ -5995,7 +5999,7 @@ export const isUniqueReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("ef
5995
5999
  * Schema for non-empty strings. Validates that a string has at least one
5996
6000
  * character.
5997
6001
  *
5998
- * @category string
6002
+ * @category schemas
5999
6003
  * @since 3.10.0
6000
6004
  */
6001
6005
  export const NonEmptyString = /*#__PURE__*/String.check(/*#__PURE__*/isNonEmpty());
@@ -6015,14 +6019,14 @@ export const NonEmptyString = /*#__PURE__*/String.check(/*#__PURE__*/isNonEmpty(
6015
6019
  * @see {@link NonEmptyString} for strings with length greater than zero
6016
6020
  * @see {@link isLengthBetween} for the underlying length check
6017
6021
  *
6018
- * @category string
6022
+ * @category schemas
6019
6023
  * @since 3.10.0
6020
6024
  */
6021
6025
  export const Char = /*#__PURE__*/String.check(/*#__PURE__*/isLengthBetween(1, 1));
6022
6026
  /**
6023
6027
  * Schema for `Option<A>` values.
6024
6028
  *
6025
- * @category Option
6029
+ * @category schemas
6026
6030
  * @since 3.10.0
6027
6031
  */
6028
6032
  export function Option(value) {
@@ -6033,10 +6037,10 @@ export function Option(value) {
6033
6037
  }
6034
6038
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(value)(input.value, options), {
6035
6039
  onSuccess: Option_.some,
6036
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["value"], issue)])
6040
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["value"], issue)])
6037
6041
  });
6038
6042
  }
6039
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6043
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6040
6044
  }, {
6041
6045
  representation: {
6042
6046
  id: "effect/schema/Option",
@@ -6088,7 +6092,7 @@ export function Option(value) {
6088
6092
  *
6089
6093
  * @see {@link Option} for creating the corresponding schema
6090
6094
  *
6091
- * @category Option
6095
+ * @category schemas
6092
6096
  * @since 4.0.0
6093
6097
  */
6094
6098
  export const OptionReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Option", Null, ({
@@ -6106,7 +6110,7 @@ export const OptionReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver(
6106
6110
  * Decoding maps `null` to `None` and all other values to `Some`. Encoding maps
6107
6111
  * `None` to `null` and maps `Some` to its value.
6108
6112
  *
6109
- * @category Option
6113
+ * @category schemas
6110
6114
  * @since 3.10.0
6111
6115
  */
6112
6116
  export function OptionFromNullOr(schema) {
@@ -6121,7 +6125,7 @@ export function OptionFromNullOr(schema) {
6121
6125
  * Decoding maps `undefined` to `None` and all other values to `Some`. Encoding
6122
6126
  * maps `None` to `undefined` and maps `Some` to its value.
6123
6127
  *
6124
- * @category Option
6128
+ * @category schemas
6125
6129
  * @since 3.10.0
6126
6130
  */
6127
6131
  export function OptionFromUndefinedOr(schema) {
@@ -6137,7 +6141,7 @@ export function OptionFromUndefinedOr(schema) {
6137
6141
  * `options.onNoneEncoding`, which defaults to `undefined`, and maps `Some` to
6138
6142
  * its value.
6139
6143
  *
6140
- * @category Option
6144
+ * @category schemas
6141
6145
  * @since 3.10.0
6142
6146
  */
6143
6147
  export function OptionFromNullishOr(schema, options) {
@@ -6151,7 +6155,7 @@ export function OptionFromNullishOr(schema, options) {
6151
6155
  * Decoding maps a missing key to `None` and a present value to `Some`.
6152
6156
  * Encoding maps `None` to a missing key and maps `Some` to its value.
6153
6157
  *
6154
- * @category Option
6158
+ * @category schemas
6155
6159
  * @since 4.0.0
6156
6160
  */
6157
6161
  export function OptionFromOptionalKey(schema) {
@@ -6167,7 +6171,7 @@ export function OptionFromOptionalKey(schema) {
6167
6171
  * maps all other values to `Some`. Encoding maps `None` to a missing key and
6168
6172
  * maps `Some` to its value.
6169
6173
  *
6170
- * @category Option
6174
+ * @category schemas
6171
6175
  * @since 4.0.0
6172
6176
  */
6173
6177
  export function OptionFromOptional(schema) {
@@ -6184,7 +6188,7 @@ export function OptionFromOptional(schema) {
6184
6188
  * according to `options.onNoneEncoding`: `"omit"` encodes a missing key,
6185
6189
  * `null` encodes `null`, and `undefined` encodes `undefined`.
6186
6190
  *
6187
- * @category Option
6191
+ * @category schemas
6188
6192
  * @since 4.0.0
6189
6193
  */
6190
6194
  export function OptionFromOptionalNullOr(schema, options) {
@@ -6204,18 +6208,18 @@ export function OptionFromOptionalNullOr(schema, options) {
6204
6208
  export function Result(success, failure) {
6205
6209
  const schema = declareConstructor()([success, failure], ([success, failure]) => (input, ast, options) => {
6206
6210
  if (!Result_.isResult(input)) {
6207
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6211
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6208
6212
  }
6209
6213
  switch (input._tag) {
6210
6214
  case "Success":
6211
6215
  return Effect.mapBothEager(SchemaParser.decodeEffect(success)(input.success, options), {
6212
6216
  onSuccess: Result_.succeed,
6213
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["success"], issue)])
6217
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["success"], issue)])
6214
6218
  });
6215
6219
  case "Failure":
6216
6220
  return Effect.mapBothEager(SchemaParser.decodeEffect(failure)(input.failure, options), {
6217
6221
  onSuccess: Result_.fail,
6218
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["failure"], issue)])
6222
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["failure"], issue)])
6219
6223
  });
6220
6224
  }
6221
6225
  }, {
@@ -6300,13 +6304,7 @@ const RedactedOptionsPayload = /*#__PURE__*/declare(input => {
6300
6304
  });
6301
6305
  const RedactedRepresentationPayload = /*#__PURE__*/Union([Null, RedactedOptionsPayload]);
6302
6306
  /**
6303
- * Schema for values that hide sensitive information from error output and
6304
- * inspection.
6305
- *
6306
- * **Details**
6307
- *
6308
- * If the wrapped schema fails, the issue will be redacted to prevent both
6309
- * the actual value and the schema details from being exposed.
6307
+ * Schema for `Redacted` values, which hide their contents from inspection.
6310
6308
  *
6311
6309
  * Options:
6312
6310
  *
@@ -6320,7 +6318,7 @@ const RedactedRepresentationPayload = /*#__PURE__*/Union([Null, RedactedOptionsP
6320
6318
  * sensitive and should not be exposed in JSON.
6321
6319
  *
6322
6320
  * @see {@link RedactedFromValue} for decoding raw values and wrapping them in `Redacted`.
6323
- * @category Redacted
6321
+ * @category schemas
6324
6322
  * @since 3.10.0
6325
6323
  */
6326
6324
  export function Redacted(value, options) {
@@ -6340,14 +6338,13 @@ export function Redacted(value, options) {
6340
6338
  const label = decodeLabel !== undefined ? Effect.mapErrorEager(decodeLabel(input.label, poptions), issue => new SchemaIssue.Pointer(["label"], issue)) : Effect.void;
6341
6339
  return Effect.flatMapEager(label, () => Effect.mapBothEager(SchemaParser.decodeUnknownEffect(value)(Redacted_.value(input), poptions), {
6342
6340
  onSuccess: () => input,
6343
- onFailure: (/** ignore the actual issue because of security reasons */
6341
+ onFailure: (/** ignore the issue because of security reasons */
6344
6342
  ) => {
6345
- const oinput = Option_.some(input);
6346
- return new SchemaIssue.Composite(ast, oinput, [new SchemaIssue.Pointer(["value"], new SchemaIssue.InvalidValue(oinput))]);
6343
+ return new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["value"], new SchemaIssue.InvalidValue())]);
6347
6344
  }
6348
6345
  }));
6349
6346
  }
6350
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6347
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6351
6348
  }, {
6352
6349
  representation: {
6353
6350
  id: "effect/schema/Redacted",
@@ -6361,7 +6358,7 @@ export function Redacted(value, options) {
6361
6358
  importDeclarations: [`import * as Redacted from "effect/Redacted"`]
6362
6359
  }),
6363
6360
  expected: "Redacted",
6364
- toCodecJson: ([value]) => link()(redact(value), {
6361
+ toCodecJson: ([value]) => link()(value, {
6365
6362
  decode: SchemaGetter.transform(e => Redacted_.make(e, {
6366
6363
  label
6367
6364
  })),
@@ -6391,7 +6388,7 @@ export function Redacted(value, options) {
6391
6388
  *
6392
6389
  * @see {@link Redacted} for creating the corresponding schema
6393
6390
  *
6394
- * @category Redacted
6391
+ * @category schemas
6395
6392
  * @since 4.0.0
6396
6393
  */
6397
6394
  export const RedactedReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Redacted", RedactedRepresentationPayload, ({
@@ -6402,27 +6399,17 @@ export const RedactedReviver = /*#__PURE__*/InternalSchema.makeDeclarationRevive
6402
6399
  const schema = Redacted(typeParameters[0], payload ?? undefined);
6403
6400
  return annotations === undefined ? schema : schema.annotate(annotations);
6404
6401
  });
6405
- /**
6406
- * Middleware that wraps decoded errors in `Redacted`, preventing sensitive
6407
- * schema details from leaking in error messages.
6408
- *
6409
- * @category Redacted
6410
- * @since 4.0.0
6411
- */
6412
- export function redact(schema) {
6413
- return middlewareDecoding(Effect.mapErrorEager(SchemaIssue.redact))(schema);
6414
- }
6415
6402
  /**
6416
6403
  * Decodes a value and wraps it in `Redacted<A>`. Unlike {@link Redacted} which
6417
6404
  * expects the input to already be a `Redacted` instance, this schema decodes
6418
6405
  * the raw value and wraps it.
6419
6406
  *
6420
6407
  * @see {@link Redacted} for schemas whose input is already a `Redacted` value.
6421
- * @category Redacted
6408
+ * @category schemas
6422
6409
  * @since 4.0.0
6423
6410
  */
6424
6411
  export function RedactedFromValue(value, options) {
6425
- return redact(value).pipe(decodeTo(Redacted(toType(value), {
6412
+ return decodeTo(Redacted(toType(value), {
6426
6413
  label: options?.label,
6427
6414
  disallowJsonEncode: options?.disallowEncode
6428
6415
  }), {
@@ -6430,7 +6417,7 @@ export function RedactedFromValue(value, options) {
6430
6417
  label: options?.label
6431
6418
  })),
6432
6419
  encode: options?.disallowEncode ? SchemaGetter.forbidden(oe => "Cannot encode Redacted" + (Option_.isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : SchemaGetter.transform(Redacted_.value)
6433
- }));
6420
+ })(value);
6434
6421
  }
6435
6422
  /**
6436
6423
  * Creates a schema for `Cause.Reason` values using separate schemas for typed
@@ -6449,24 +6436,24 @@ export function RedactedFromValue(value, options) {
6449
6436
  * @see {@link Cause} for constructing schemas for full Cause values
6450
6437
  * @see {@link CauseReasonIso} for the ISO shape of each cause reason
6451
6438
  *
6452
- * @category CauseReason
6439
+ * @category schemas
6453
6440
  * @since 4.0.0
6454
6441
  */
6455
6442
  export function CauseReason(error, defect) {
6456
6443
  const schema = declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
6457
6444
  if (!Cause_.isReason(input)) {
6458
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6445
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6459
6446
  }
6460
6447
  switch (input._tag) {
6461
6448
  case "Fail":
6462
6449
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(error)(input.error, options), {
6463
6450
  onSuccess: Cause_.makeFailReason,
6464
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["error"], issue)])
6451
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["error"], issue)])
6465
6452
  });
6466
6453
  case "Die":
6467
6454
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(defect)(input.defect, options), {
6468
6455
  onSuccess: Cause_.makeDieReason,
6469
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["defect"], issue)])
6456
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["defect"], issue)])
6470
6457
  });
6471
6458
  case "Interrupt":
6472
6459
  return Effect.succeed(input);
@@ -6524,7 +6511,7 @@ export function CauseReason(error, defect) {
6524
6511
  *
6525
6512
  * @see {@link CauseReason} for creating the corresponding schema
6526
6513
  *
6527
- * @category CauseReason
6514
+ * @category schemas
6528
6515
  * @since 4.0.0
6529
6516
  */
6530
6517
  export const CauseReasonReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/CauseReason", Null, ({
@@ -6586,7 +6573,7 @@ function causeReasonToFormatter(error, defect) {
6586
6573
  * @see {@link CauseReason} for the schema used by each individual cause reason
6587
6574
  * @see {@link CauseIso} for the ordered array representation used by the schema ISO
6588
6575
  *
6589
- * @category Cause
6576
+ * @category schemas
6590
6577
  * @since 3.10.0
6591
6578
  */
6592
6579
  export function Cause(error, defect) {
@@ -6594,11 +6581,11 @@ export function Cause(error, defect) {
6594
6581
  const failures = ArraySchema(CauseReason(error, defect));
6595
6582
  return (input, ast, options) => {
6596
6583
  if (!Cause_.isCause(input)) {
6597
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6584
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6598
6585
  }
6599
6586
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(failures)(input.reasons, options), {
6600
6587
  onSuccess: Cause_.fromReasons,
6601
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["failures"], issue)])
6588
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["failures"], issue)])
6602
6589
  });
6603
6590
  };
6604
6591
  }, {
@@ -6638,7 +6625,7 @@ export function Cause(error, defect) {
6638
6625
  *
6639
6626
  * @see {@link Cause} for creating the corresponding schema
6640
6627
  *
6641
- * @category Cause
6628
+ * @category schemas
6642
6629
  * @since 4.0.0
6643
6630
  */
6644
6631
  export const CauseReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Cause", Null, ({
@@ -6705,7 +6692,7 @@ const errorSchemaCache = [];
6705
6692
  * traces are omitted by default for security. Pass `{ includeStack: true }` to
6706
6693
  * include stack traces, or `{ excludeCause: true }` to omit causes.
6707
6694
  *
6708
- * @category constructors
6695
+ * @category schemas
6709
6696
  * @since 4.0.0
6710
6697
  */
6711
6698
  export function Error(options) {
@@ -6740,7 +6727,7 @@ export function Error(options) {
6740
6727
  *
6741
6728
  * @see {@link Error} for creating the corresponding schema
6742
6729
  *
6743
- * @category Error
6730
+ * @category schemas
6744
6731
  * @since 4.0.0
6745
6732
  */
6746
6733
  export const ErrorReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Error", ErrorRepresentationPayload, ({
@@ -6789,7 +6776,7 @@ const defectSchemaCache = [];
6789
6776
  * string representation.
6790
6777
  *
6791
6778
  * @see {@link Error} for a schema that only accepts JavaScript `Error` values.
6792
- * @category constructors
6779
+ * @category schemas
6793
6780
  * @since 4.0.0
6794
6781
  */
6795
6782
  export function Defect(options) {
@@ -6811,7 +6798,7 @@ export function Defect(options) {
6811
6798
  * Use when serializing or validating an effect outcome where success, typed
6812
6799
  * failure, and defects each need their own schema.
6813
6800
  *
6814
- * @category Exit
6801
+ * @category schemas
6815
6802
  * @since 3.10.0
6816
6803
  */
6817
6804
  export function Exit(value, error, defect) {
@@ -6819,18 +6806,18 @@ export function Exit(value, error, defect) {
6819
6806
  const cause = Cause(error, defect);
6820
6807
  return (input, ast, options) => {
6821
6808
  if (!Exit_.isExit(input)) {
6822
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6809
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6823
6810
  }
6824
6811
  switch (input._tag) {
6825
6812
  case "Success":
6826
6813
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(value)(input.value, options), {
6827
6814
  onSuccess: Exit_.succeed,
6828
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["value"], issue)])
6815
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["value"], issue)])
6829
6816
  });
6830
6817
  case "Failure":
6831
6818
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(cause)(input.cause, options), {
6832
6819
  onSuccess: Exit_.failCause,
6833
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["cause"], issue)])
6820
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["cause"], issue)])
6834
6821
  });
6835
6822
  }
6836
6823
  };
@@ -6908,7 +6895,7 @@ export function Exit(value, error, defect) {
6908
6895
  *
6909
6896
  * @see {@link Exit} for creating the corresponding schema
6910
6897
  *
6911
- * @category Exit
6898
+ * @category schemas
6912
6899
  * @since 4.0.0
6913
6900
  */
6914
6901
  export const ExitReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Exit", Null, ({
@@ -6964,7 +6951,7 @@ function entriesArbitrary(fc, ctx, key, value, fromIterable) {
6964
6951
  * Schema for readonly maps whose keys and values conform to the provided
6965
6952
  * schemas.
6966
6953
  *
6967
- * @category ReadonlyMap
6954
+ * @category schemas
6968
6955
  * @since 3.10.0
6969
6956
  */
6970
6957
  export function ReadonlyMap(key, value) {
@@ -6974,10 +6961,10 @@ export function ReadonlyMap(key, value) {
6974
6961
  if (input instanceof globalThis.Map) {
6975
6962
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(array)([...input], options), {
6976
6963
  onSuccess: array => new globalThis.Map(array),
6977
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["entries"], issue)])
6964
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["entries"], issue)])
6978
6965
  });
6979
6966
  }
6980
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
6967
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
6981
6968
  };
6982
6969
  }, {
6983
6970
  representation: {
@@ -7020,7 +7007,7 @@ export function ReadonlyMap(key, value) {
7020
7007
  *
7021
7008
  * @see {@link ReadonlyMap} for creating the corresponding schema
7022
7009
  *
7023
- * @category ReadonlyMap
7010
+ * @category schemas
7024
7011
  * @since 4.0.0
7025
7012
  */
7026
7013
  export const ReadonlyMapReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/ReadonlyMap", Null, ({
@@ -7033,7 +7020,7 @@ export const ReadonlyMapReviver = /*#__PURE__*/InternalSchema.makeDeclarationRev
7033
7020
  /**
7034
7021
  * Schema for hash maps whose keys and values conform to the provided schemas.
7035
7022
  *
7036
- * @category HashMap
7023
+ * @category schemas
7037
7024
  * @since 3.10.0
7038
7025
  */
7039
7026
  export function HashMap(key, value) {
@@ -7043,10 +7030,10 @@ export function HashMap(key, value) {
7043
7030
  if (HashMap_.isHashMap(input)) {
7044
7031
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(entries)(HashMap_.toEntries(input), options), {
7045
7032
  onSuccess: HashMap_.fromIterable,
7046
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["entries"], issue)])
7033
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["entries"], issue)])
7047
7034
  });
7048
7035
  }
7049
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
7036
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
7050
7037
  };
7051
7038
  }, {
7052
7039
  representation: {
@@ -7090,7 +7077,7 @@ export function HashMap(key, value) {
7090
7077
  *
7091
7078
  * @see {@link HashMap} for creating the corresponding schema
7092
7079
  *
7093
- * @category HashMap
7080
+ * @category schemas
7094
7081
  * @since 4.0.0
7095
7082
  */
7096
7083
  export const HashMapReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/HashMap", Null, ({
@@ -7103,7 +7090,7 @@ export const HashMapReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver
7103
7090
  /**
7104
7091
  * Schema for readonly sets whose values conform to the provided element schema.
7105
7092
  *
7106
- * @category ReadonlySet
7093
+ * @category schemas
7107
7094
  * @since 3.10.0
7108
7095
  */
7109
7096
  export function ReadonlySet(value) {
@@ -7113,10 +7100,10 @@ export function ReadonlySet(value) {
7113
7100
  if (input instanceof globalThis.Set) {
7114
7101
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(array)([...input], options), {
7115
7102
  onSuccess: array => new globalThis.Set(array),
7116
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["values"], issue)])
7103
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["values"], issue)])
7117
7104
  });
7118
7105
  }
7119
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
7106
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
7120
7107
  };
7121
7108
  }, {
7122
7109
  representation: {
@@ -7158,7 +7145,7 @@ export function ReadonlySet(value) {
7158
7145
  *
7159
7146
  * @see {@link ReadonlySet} for creating the corresponding schema
7160
7147
  *
7161
- * @category ReadonlySet
7148
+ * @category schemas
7162
7149
  * @since 4.0.0
7163
7150
  */
7164
7151
  export const ReadonlySetReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/ReadonlySet", Null, ({
@@ -7171,7 +7158,7 @@ export const ReadonlySetReviver = /*#__PURE__*/InternalSchema.makeDeclarationRev
7171
7158
  /**
7172
7159
  * Schema for hash sets whose values conform to the provided element schema.
7173
7160
  *
7174
- * @category HashSet
7161
+ * @category schemas
7175
7162
  * @since 3.10.0
7176
7163
  */
7177
7164
  export function HashSet(value) {
@@ -7181,10 +7168,10 @@ export function HashSet(value) {
7181
7168
  if (HashSet_.isHashSet(input)) {
7182
7169
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(values)(Arr.fromIterable(input), options), {
7183
7170
  onSuccess: HashSet_.fromIterable,
7184
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["values"], issue)])
7171
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["values"], issue)])
7185
7172
  });
7186
7173
  }
7187
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
7174
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
7188
7175
  };
7189
7176
  }, {
7190
7177
  representation: {
@@ -7226,7 +7213,7 @@ export function HashSet(value) {
7226
7213
  *
7227
7214
  * @see {@link HashSet} for creating the corresponding schema
7228
7215
  *
7229
- * @category HashSet
7216
+ * @category schemas
7230
7217
  * @since 4.0.0
7231
7218
  */
7232
7219
  export const HashSetReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/HashSet", Null, ({
@@ -7239,7 +7226,7 @@ export const HashSetReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver
7239
7226
  /**
7240
7227
  * Schema for chunks whose values conform to the provided element schema.
7241
7228
  *
7242
- * @category Chunk
7229
+ * @category schemas
7243
7230
  * @since 3.10.0
7244
7231
  */
7245
7232
  export function Chunk(value) {
@@ -7249,10 +7236,10 @@ export function Chunk(value) {
7249
7236
  if (Chunk_.isChunk(input)) {
7250
7237
  return Effect.mapBothEager(SchemaParser.decodeUnknownEffect(values)(Arr.fromIterable(input), options), {
7251
7238
  onSuccess: Chunk_.fromIterable,
7252
- onFailure: issue => new SchemaIssue.Composite(ast, Option_.some(input), [new SchemaIssue.Pointer(["values"], issue)])
7239
+ onFailure: issue => new SchemaIssue.Composite(ast, [new SchemaIssue.Pointer(["values"], issue)])
7253
7240
  });
7254
7241
  }
7255
- return Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
7242
+ return Effect.fail(new SchemaIssue.InvalidType(ast));
7256
7243
  };
7257
7244
  }, {
7258
7245
  representation: {
@@ -7294,7 +7281,7 @@ export function Chunk(value) {
7294
7281
  *
7295
7282
  * @see {@link Chunk} for creating the corresponding schema
7296
7283
  *
7297
- * @category Chunk
7284
+ * @category schemas
7298
7285
  * @since 4.0.0
7299
7286
  */
7300
7287
  export const ChunkReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("effect/schema/Chunk", Null, ({
@@ -7311,7 +7298,7 @@ export const ChunkReviver = /*#__PURE__*/InternalSchema.makeDeclarationReviver("
7311
7298
  *
7312
7299
  * The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
7313
7300
  *
7314
- * @category RegExp
7301
+ * @category schemas
7315
7302
  * @since 4.0.0
7316
7303
  */
7317
7304
  export const RegExp = /*#__PURE__*/instanceOf(globalThis.RegExp, {
@@ -7330,8 +7317,8 @@ export const RegExp = /*#__PURE__*/instanceOf(globalThis.RegExp, {
7330
7317
  }), SchemaTransformation.transformOrFail({
7331
7318
  decode: e => Effect.try({
7332
7319
  try: () => new globalThis.RegExp(e.source, e.flags),
7333
- catch: e => new SchemaIssue.InvalidValue(Option_.some(e), {
7334
- message: globalThis.String(e)
7320
+ catch: () => new SchemaIssue.InvalidValue({
7321
+ message: "Expected valid RegExp source and flags"
7335
7322
  })
7336
7323
  }),
7337
7324
  encode: regExp => Effect.succeed({
@@ -7355,7 +7342,7 @@ export const RegExp = /*#__PURE__*/instanceOf(globalThis.RegExp, {
7355
7342
  *
7356
7343
  * @see {@link RegExp} for the corresponding schema
7357
7344
  *
7358
- * @category RegExp
7345
+ * @category schemas
7359
7346
  * @since 4.0.0
7360
7347
  */
7361
7348
  export const RegExpReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/RegExp", RegExp);
@@ -7371,7 +7358,7 @@ const URLString = /*#__PURE__*/String.annotate({
7371
7358
  *
7372
7359
  * - encodes `URL` as a `string`
7373
7360
  *
7374
- * @category URL
7361
+ * @category schemas
7375
7362
  * @since 4.0.0
7376
7363
  */
7377
7364
  export const URL = /*#__PURE__*/instanceOf(globalThis.URL, {
@@ -7397,7 +7384,7 @@ export const URL = /*#__PURE__*/instanceOf(globalThis.URL, {
7397
7384
  *
7398
7385
  * @see {@link URL} for the corresponding schema
7399
7386
  *
7400
- * @category URL
7387
+ * @category schemas
7401
7388
  * @since 4.0.0
7402
7389
  */
7403
7390
  export const URLReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/URL", URL);
@@ -7412,7 +7399,7 @@ export const URLReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schem
7412
7399
  * Encoding:
7413
7400
  * - A `URL` is encoded as a `string`
7414
7401
  *
7415
- * @category URL
7402
+ * @category schemas
7416
7403
  * @since 4.0.0
7417
7404
  */
7418
7405
  export const URLFromString = /*#__PURE__*/URLString.pipe(/*#__PURE__*/decodeTo(URL, SchemaTransformation.urlFromString));
@@ -7454,17 +7441,17 @@ const DateString = /*#__PURE__*/String.annotate({
7454
7441
  *
7455
7442
  * **Example** (Defining a Date schema)
7456
7443
  *
7457
- * ```ts
7444
+ * ```ts import.meta.vitest
7458
7445
  * import { Schema } from "effect"
7459
7446
  *
7460
- * Schema.decodeUnknownSync(Schema.Date)(new Date("2024-01-01"))
7461
- * // => Date { 2024-01-01T00:00:00.000Z }
7447
+ * const date = Schema.decodeUnknownSync(Schema.Date)(new Date("2024-01-01"))
7448
+ * date.toISOString() // => "2024-01-01T00:00:00.000Z"
7462
7449
  * ```
7463
7450
  *
7464
7451
  * @see {@link DateFromString} for decoding strings into Date instances
7465
7452
  * @see {@link DateFromMillis} for decoding epoch milliseconds into Date instances
7466
7453
  *
7467
- * @category Date
7454
+ * @category schemas
7468
7455
  * @since 4.0.0
7469
7456
  */
7470
7457
  export const Date = /*#__PURE__*/declare(input => input instanceof globalThis.Date && !globalThis.Number.isNaN(input.getTime()), {
@@ -7491,7 +7478,7 @@ export const Date = /*#__PURE__*/declare(input => input instanceof globalThis.Da
7491
7478
  *
7492
7479
  * @see {@link Date} for the corresponding schema
7493
7480
  *
7494
- * @category Date
7481
+ * @category schemas
7495
7482
  * @since 4.0.0
7496
7483
  */
7497
7484
  export const DateReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/Date", Date);
@@ -7517,7 +7504,7 @@ export const DateReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/sche
7517
7504
  * @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
7518
7505
  * @see {@link Date} for accepting Date instances directly
7519
7506
  *
7520
- * @category Date
7507
+ * @category schemas
7521
7508
  * @since 3.10.0
7522
7509
  */
7523
7510
  export const DateFromString = /*#__PURE__*/DateString.pipe(/*#__PURE__*/decodeTo(Date, SchemaTransformation.dateFromString));
@@ -7546,7 +7533,7 @@ export const DateFromString = /*#__PURE__*/DateString.pipe(/*#__PURE__*/decodeTo
7546
7533
  * @see {@link DateFromString} for decoding string-encoded dates
7547
7534
  * @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
7548
7535
  *
7549
- * @category Date
7536
+ * @category schemas
7550
7537
  * @since 4.0.0
7551
7538
  */
7552
7539
  export const DateFromMillis = /*#__PURE__*/Int.pipe(/*#__PURE__*/decodeTo(Date, SchemaTransformation.dateFromMillis));
@@ -7560,14 +7547,13 @@ export const DateFromMillis = /*#__PURE__*/Int.pipe(/*#__PURE__*/decodeTo(Date,
7560
7547
  *
7561
7548
  * **Example** (Defining a Duration schema)
7562
7549
  *
7563
- * ```ts
7550
+ * ```ts import.meta.vitest
7564
7551
  * import { Duration, Schema } from "effect"
7565
7552
  *
7566
- * Schema.decodeUnknownSync(Schema.Duration)(Duration.seconds(5))
7567
- * // => Duration(5s)
7553
+ * Schema.decodeUnknownSync(Schema.Duration)(Duration.seconds(5)) // => Duration.seconds(5)
7568
7554
  * ```
7569
7555
  *
7570
- * @category Duration
7556
+ * @category schemas
7571
7557
  *
7572
7558
  * @since 3.10.0
7573
7559
  */
@@ -7641,7 +7627,7 @@ export const Duration = /*#__PURE__*/declare(Duration_.isDuration, {
7641
7627
  *
7642
7628
  * @see {@link Duration} for the corresponding schema
7643
7629
  *
7644
- * @category Duration
7630
+ * @category schemas
7645
7631
  * @since 4.0.0
7646
7632
  */
7647
7633
  export const DurationReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/Duration", Duration);
@@ -7660,7 +7646,7 @@ const DurationString = /*#__PURE__*/String.annotate({
7660
7646
  * Encoding:
7661
7647
  * - A `Duration` is encoded as a parseable `string`.
7662
7648
  *
7663
- * @category Duration
7649
+ * @category schemas
7664
7650
  * @since 4.0.0
7665
7651
  */
7666
7652
  export const DurationFromString = /*#__PURE__*/DurationString.pipe(/*#__PURE__*/decodeTo(Duration, SchemaTransformation.durationFromString));
@@ -7678,7 +7664,7 @@ export const DurationFromString = /*#__PURE__*/DurationString.pipe(/*#__PURE__*/
7678
7664
  * fails when the duration cannot be represented as nanoseconds, such as
7679
7665
  * `Duration.infinity` or `Duration.negativeInfinity`.
7680
7666
  *
7681
- * @category Duration
7667
+ * @category schemas
7682
7668
  * @since 3.10.0
7683
7669
  */
7684
7670
  export const DurationFromNanos = /*#__PURE__*/BigInt.pipe(/*#__PURE__*/decodeTo(Duration, SchemaTransformation.durationFromNanos));
@@ -7698,7 +7684,7 @@ export const DurationFromNanos = /*#__PURE__*/BigInt.pipe(/*#__PURE__*/decodeTo(
7698
7684
  *
7699
7685
  * `NaN` is decoded as `Duration.zero`, matching `Duration.millis`.
7700
7686
  *
7701
- * @category Duration
7687
+ * @category schemas
7702
7688
  * @since 3.10.0
7703
7689
  */
7704
7690
  export const DurationFromMillis = /*#__PURE__*/Number.pipe(/*#__PURE__*/decodeTo(Duration, SchemaTransformation.durationFromMillis));
@@ -7768,7 +7754,7 @@ function bigDecimalScaleConstraints(ordered) {
7768
7754
  *
7769
7755
  * @see {@link BigDecimalFromString} for parsing string input into a BigDecimal
7770
7756
  *
7771
- * @category BigDecimal
7757
+ * @category schemas
7772
7758
  * @since 3.10.0
7773
7759
  */
7774
7760
  export const BigDecimal = /*#__PURE__*/declare(BigDecimal_.isBigDecimal, {
@@ -7811,7 +7797,7 @@ export const BigDecimal = /*#__PURE__*/declare(BigDecimal_.isBigDecimal, {
7811
7797
  *
7812
7798
  * @see {@link BigDecimal} for the corresponding schema
7813
7799
  *
7814
- * @category BigDecimal
7800
+ * @category schemas
7815
7801
  * @since 4.0.0
7816
7802
  */
7817
7803
  export const BigDecimalReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/BigDecimal", BigDecimal);
@@ -7839,7 +7825,7 @@ export const BigDecimalReviver = /*#__PURE__*/makeFixedDeclarationReviver("effec
7839
7825
  * @see {@link BigIntFromString} for parsing base-10 integer strings into bigint values
7840
7826
  * @see {@link NumberFromString} for parsing JavaScript number strings
7841
7827
  *
7842
- * @category BigDecimal
7828
+ * @category schemas
7843
7829
  * @since 4.0.0
7844
7830
  */
7845
7831
  export const BigDecimalFromString = /*#__PURE__*/BigDecimalString.pipe(/*#__PURE__*/decodeTo(BigDecimal, SchemaTransformation.bigDecimalFromString));
@@ -7847,32 +7833,6 @@ const JsonString = /*#__PURE__*/String.annotate({
7847
7833
  expected: "a string that will be decoded as JSON",
7848
7834
  contentMediaType: "application/json"
7849
7835
  });
7850
- /**
7851
- * Schema that decodes a JSON-encoded string into an `unknown` value.
7852
- *
7853
- * **Details**
7854
- *
7855
- * Decoding:
7856
- * - A `string` is decoded as an `unknown` value.
7857
- * - If the string is not valid JSON, decoding fails.
7858
- *
7859
- * Encoding:
7860
- * - Any value is encoded as a JSON string using `JSON.stringify`.
7861
- * - If the value is not a valid JSON value, encoding fails.
7862
- *
7863
- * **Example** (Decoding unknown JSON strings)
7864
- *
7865
- * ```ts
7866
- * import { Schema } from "effect"
7867
- *
7868
- * Schema.decodeUnknownSync(Schema.UnknownFromJsonString)(`{"a":1,"b":2}`)
7869
- * // => { a: 1, b: 2 }
7870
- * ```
7871
- *
7872
- * @category schemas
7873
- * @since 4.0.0
7874
- */
7875
- export const UnknownFromJsonString = /*#__PURE__*/fromJsonString(Unknown);
7876
7836
  /**
7877
7837
  * Returns a schema that decodes a JSON string and then decodes the parsed value
7878
7838
  * using the given schema.
@@ -7882,27 +7842,31 @@ export const UnknownFromJsonString = /*#__PURE__*/fromJsonString(Unknown);
7882
7842
  * This is useful when working with JSON-encoded strings where the actual
7883
7843
  * structure of the value is known and described by an existing schema.
7884
7844
  *
7885
- * The resulting schema first parses the input string as JSON, and then runs the
7886
- * provided schema on the parsed result.
7845
+ * During decoding, the resulting schema first parses the input string as JSON,
7846
+ * using `reviver` when provided, and then runs the provided schema on the
7847
+ * parsed result. During encoding, it first encodes with the provided schema and
7848
+ * then passes the result to `JSON.stringify` with the optional `replacer` and
7849
+ * `space`.
7887
7850
  *
7888
- * **Example** (Decoding JSON strings with a schema)
7851
+ * **Example** (Formatting encoded JSON)
7889
7852
  *
7890
- * ```ts
7853
+ * ```ts import.meta.vitest
7891
7854
  * import { Schema } from "effect"
7892
7855
  *
7893
7856
  * const schema = Schema.Struct({ a: Schema.Number })
7894
- * const schemaFromJsonString = Schema.fromJsonString(schema)
7857
+ * const schemaFromJsonString = Schema.fromJsonString(schema, { space: 2 })
7895
7858
  *
7896
- * Schema.decodeUnknownSync(schemaFromJsonString)(`{"a":1,"b":2}`)
7897
- * // => { a: 1 }
7859
+ * Schema.encodeSync(schemaFromJsonString)({ a: 1 }) // => "{\n \"a\": 1\n}"
7898
7860
  * ```
7899
7861
  *
7900
- * @category constructors
7862
+ * @category schemas
7901
7863
  * @since 4.0.0
7902
7864
  */
7903
- export function fromJsonString(schema) {
7904
- return JsonString.pipe(decodeTo(schema, SchemaTransformation.fromJsonString));
7865
+ export function fromJsonString(schema, options) {
7866
+ return JsonString.pipe(decodeTo(schema, SchemaTransformation.fromJsonString(options)));
7905
7867
  }
7868
+ /** @internal */
7869
+ export const UnknownFromJsonString = /*#__PURE__*/fromJsonString(Unknown);
7906
7870
  /**
7907
7871
  * Schema for JavaScript `File` objects.
7908
7872
  *
@@ -7911,7 +7875,7 @@ export function fromJsonString(schema) {
7911
7875
  * The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
7912
7876
  * where `data` is base64-encoded.
7913
7877
  *
7914
- * @category file
7878
+ * @category schemas
7915
7879
  * @since 4.0.0
7916
7880
  */
7917
7881
  export const File = /*#__PURE__*/instanceOf(globalThis.File, {
@@ -7931,8 +7895,8 @@ export const File = /*#__PURE__*/instanceOf(globalThis.File, {
7931
7895
  lastModified: Int
7932
7896
  }), SchemaTransformation.transformOrFail({
7933
7897
  decode: e => Result_.match(Encoding.decodeBase64(e.data), {
7934
- onFailure: error => Effect.fail(new SchemaIssue.InvalidValue(Option_.some(e.data), {
7935
- message: error.message
7898
+ onFailure: () => Effect.fail(new SchemaIssue.InvalidValue({
7899
+ message: "Expected a valid Base64 string"
7936
7900
  })),
7937
7901
  onSuccess: bytes => {
7938
7902
  const buffer = new globalThis.Uint8Array(bytes);
@@ -7952,8 +7916,8 @@ export const File = /*#__PURE__*/instanceOf(globalThis.File, {
7952
7916
  lastModified: file.lastModified
7953
7917
  };
7954
7918
  },
7955
- catch: e => new SchemaIssue.InvalidValue(Option_.some(file), {
7956
- message: globalThis.String(e)
7919
+ catch: () => new SchemaIssue.InvalidValue({
7920
+ message: "Expected File to be readable"
7957
7921
  })
7958
7922
  })
7959
7923
  }))
@@ -7967,7 +7931,7 @@ export const File = /*#__PURE__*/instanceOf(globalThis.File, {
7967
7931
  *
7968
7932
  * @see {@link File} for the corresponding schema
7969
7933
  *
7970
- * @category file
7934
+ * @category schemas
7971
7935
  * @since 4.0.0
7972
7936
  */
7973
7937
  export const FileReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/File", File);
@@ -7979,7 +7943,7 @@ export const FileReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/sche
7979
7943
  * The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
7980
7944
  * pairs where each entry is tagged as `"String"` or `"File"`.
7981
7945
  *
7982
- * @category FormData
7946
+ * @category schemas
7983
7947
  * @since 4.0.0
7984
7948
  */
7985
7949
  export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
@@ -8032,7 +7996,7 @@ export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
8032
7996
  *
8033
7997
  * @see {@link FormData} for the corresponding schema
8034
7998
  *
8035
- * @category FormData
7999
+ * @category schemas
8036
8000
  * @since 4.0.0
8037
8001
  */
8038
8002
  export const FormDataReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/FormData", FormData);
@@ -8057,7 +8021,7 @@ export const FormDataReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/
8057
8021
  *
8058
8022
  * **Example** (Decoding a flat structure)
8059
8023
  *
8060
- * ```ts
8024
+ * ```ts import.meta.vitest
8061
8025
  * import { Schema } from "effect"
8062
8026
  *
8063
8027
  * const schema = Schema.fromFormData(
@@ -8070,13 +8034,12 @@ export const FormDataReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/
8070
8034
  * formData.append("a", "1")
8071
8035
  * formData.append("b", "2")
8072
8036
  *
8073
- * console.log(String(Schema.decodeUnknownExit(schema)(formData)))
8074
- * // Success({"a":"1"})
8037
+ * Schema.decodeUnknownSync(schema)(formData) // => { a: "1" }
8075
8038
  * ```
8076
8039
  *
8077
8040
  * **Example** (Decoding nested fields)
8078
8041
  *
8079
- * ```ts
8042
+ * ```ts import.meta.vitest
8080
8043
  * import { Schema } from "effect"
8081
8044
  *
8082
8045
  * const schema = Schema.fromFormData(
@@ -8094,13 +8057,12 @@ export const FormDataReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/
8094
8057
  * formData.append("b[c]", "2")
8095
8058
  * formData.append("b[d]", "3")
8096
8059
  *
8097
- * console.log(String(Schema.decodeUnknownExit(schema)(formData)))
8098
- * // Success({"a":"1","b":{"c":"2","d":"3"}})
8060
+ * Schema.decodeUnknownSync(schema)(formData) // => { a: "1", b: { c: "2", d: "3" } }
8099
8061
  * ```
8100
8062
  *
8101
8063
  * **Example** (Parsing non-string values)
8102
8064
  *
8103
- * ```ts
8065
+ * ```ts import.meta.vitest
8104
8066
  * import { Schema } from "effect"
8105
8067
  *
8106
8068
  * const schema = Schema.fromFormData(
@@ -8114,8 +8076,7 @@ export const FormDataReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/
8114
8076
  * const formData = new FormData()
8115
8077
  * formData.append("a", "1")
8116
8078
  *
8117
- * console.log(String(Schema.decodeUnknownExit(schema)(formData)))
8118
- * // Success({"a":1}) // Note: the value is a number
8079
+ * Schema.decodeUnknownSync(schema)(formData) // => { a: 1 }
8119
8080
  * ```
8120
8081
  *
8121
8082
  * @category decoding
@@ -8131,7 +8092,7 @@ export function fromFormData(schema) {
8131
8092
  *
8132
8093
  * The default JSON serializer encodes a `URLSearchParams` as a query string.
8133
8094
  *
8134
- * @category search params
8095
+ * @category schemas
8135
8096
  * @since 4.0.0
8136
8097
  */
8137
8098
  export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParams, {
@@ -8160,7 +8121,7 @@ export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParam
8160
8121
  *
8161
8122
  * @see {@link URLSearchParams} for the corresponding schema
8162
8123
  *
8163
- * @category search params
8124
+ * @category schemas
8164
8125
  * @since 4.0.0
8165
8126
  */
8166
8127
  export const URLSearchParamsReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/URLSearchParams", URLSearchParams);
@@ -8186,7 +8147,7 @@ export const URLSearchParamsReviver = /*#__PURE__*/makeFixedDeclarationReviver("
8186
8147
  *
8187
8148
  * **Example** (Decoding a flat structure)
8188
8149
  *
8189
- * ```ts
8150
+ * ```ts import.meta.vitest
8190
8151
  * import { Schema } from "effect"
8191
8152
  *
8192
8153
  * const schema = Schema.fromURLSearchParams(
@@ -8197,13 +8158,12 @@ export const URLSearchParamsReviver = /*#__PURE__*/makeFixedDeclarationReviver("
8197
8158
  *
8198
8159
  * const urlSearchParams = new URLSearchParams("a=1&b=2")
8199
8160
  *
8200
- * console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
8201
- * // Success({"a":"1"})
8161
+ * Schema.decodeUnknownSync(schema)(urlSearchParams) // => { a: "1" }
8202
8162
  * ```
8203
8163
  *
8204
8164
  * **Example** (Decoding nested fields)
8205
8165
  *
8206
- * ```ts
8166
+ * ```ts import.meta.vitest
8207
8167
  * import { Schema } from "effect"
8208
8168
  *
8209
8169
  * const schema = Schema.fromURLSearchParams(
@@ -8218,13 +8178,12 @@ export const URLSearchParamsReviver = /*#__PURE__*/makeFixedDeclarationReviver("
8218
8178
  *
8219
8179
  * const urlSearchParams = new URLSearchParams("a=1&b[c]=2&b[d]=3")
8220
8180
  *
8221
- * console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
8222
- * // Success({"a":"1","b":{"c":"2","d":"3"}})
8181
+ * Schema.decodeUnknownSync(schema)(urlSearchParams) // => { a: "1", b: { c: "2", d: "3" } }
8223
8182
  * ```
8224
8183
  *
8225
8184
  * **Example** (Parsing non-string values)
8226
8185
  *
8227
- * ```ts
8186
+ * ```ts import.meta.vitest
8228
8187
  * import { Schema } from "effect"
8229
8188
  *
8230
8189
  * const schema = Schema.fromURLSearchParams(
@@ -8237,8 +8196,7 @@ export const URLSearchParamsReviver = /*#__PURE__*/makeFixedDeclarationReviver("
8237
8196
  *
8238
8197
  * const urlSearchParams = new URLSearchParams("a=1&b=2")
8239
8198
  *
8240
- * console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
8241
- * // Success({"a":1}) // Note: the value is a number
8199
+ * Schema.decodeUnknownSync(schema)(urlSearchParams) // => { a: 1 }
8242
8200
  * ```
8243
8201
  *
8244
8202
  * @category decoding
@@ -8261,7 +8219,7 @@ export function fromURLSearchParams(schema) {
8261
8219
  * Encoding:
8262
8220
  * A number is encoded as a `string`.
8263
8221
  *
8264
- * @category Number
8222
+ * @category schemas
8265
8223
  * @since 3.10.0
8266
8224
  */
8267
8225
  export const NumberFromString = /*#__PURE__*/String.annotate({
@@ -8279,7 +8237,7 @@ export const NumberFromString = /*#__PURE__*/String.annotate({
8279
8237
  * Encoding:
8280
8238
  * - A finite number is encoded as a `string`.
8281
8239
  *
8282
- * @category Number
8240
+ * @category schemas
8283
8241
  * @since 4.0.0
8284
8242
  */
8285
8243
  export const FiniteFromString = /*#__PURE__*/String.annotate({
@@ -8310,14 +8268,14 @@ export const FiniteFromString = /*#__PURE__*/String.annotate({
8310
8268
  * @see {@link NumberFromString} for parsing JavaScript number strings, including non-finite values
8311
8269
  * @see {@link BigDecimalFromString} for parsing decimal number strings
8312
8270
  *
8313
- * @category BigInt
8271
+ * @category schemas
8314
8272
  * @since 4.0.0
8315
8273
  */
8316
8274
  export const BigIntFromString = /*#__PURE__*/make(SchemaAST.bigIntString).pipe(/*#__PURE__*/decodeTo(BigInt, SchemaTransformation.bigintFromString));
8317
8275
  /**
8318
8276
  * Schema for strings that contains no leading or trailing whitespaces.
8319
8277
  *
8320
- * @category string
8278
+ * @category schemas
8321
8279
  * @since 3.10.0
8322
8280
  */
8323
8281
  export const Trimmed = /*#__PURE__*/String.check(/*#__PURE__*/isTrimmed());
@@ -8332,7 +8290,7 @@ export const Trimmed = /*#__PURE__*/String.check(/*#__PURE__*/isTrimmed());
8332
8290
  * Encoding:
8333
8291
  * - The trimmed string is encoded as is.
8334
8292
  *
8335
- * @category string
8293
+ * @category schemas
8336
8294
  * @since 3.10.0
8337
8295
  */
8338
8296
  export const Trim = /*#__PURE__*/String.annotate({
@@ -8349,7 +8307,7 @@ export const Trim = /*#__PURE__*/String.annotate({
8349
8307
  * Encoding:
8350
8308
  * - A `string` is encoded as a base64-encoded string.
8351
8309
  *
8352
- * @category string
8310
+ * @category schemas
8353
8311
  * @since 3.10.0
8354
8312
  */
8355
8313
  export const StringFromBase64 = /*#__PURE__*/String.annotate({
@@ -8366,7 +8324,7 @@ export const StringFromBase64 = /*#__PURE__*/String.annotate({
8366
8324
  * Encoding:
8367
8325
  * - A `string` is encoded as a base64 (URL) encoded string.
8368
8326
  *
8369
- * @category string
8327
+ * @category schemas
8370
8328
  * @since 3.10.0
8371
8329
  */
8372
8330
  export const StringFromBase64Url = /*#__PURE__*/String.annotate({
@@ -8383,7 +8341,7 @@ export const StringFromBase64Url = /*#__PURE__*/String.annotate({
8383
8341
  * Encoding:
8384
8342
  * - A `string` is encoded as a hex string.
8385
8343
  *
8386
- * @category string
8344
+ * @category schemas
8387
8345
  * @since 3.10.0
8388
8346
  */
8389
8347
  export const StringFromHex = /*#__PURE__*/String.annotate({
@@ -8403,7 +8361,7 @@ export const StringFromHex = /*#__PURE__*/String.annotate({
8403
8361
  *
8404
8362
  * **Example** (Decoding URI component strings)
8405
8363
  *
8406
- * ```ts
8364
+ * ```ts import.meta.vitest
8407
8365
  * import { Schema } from "effect"
8408
8366
  *
8409
8367
  * const PaginationSchema = Schema.Struct({
@@ -8415,11 +8373,10 @@ export const StringFromHex = /*#__PURE__*/String.annotate({
8415
8373
  * Schema.decodeTo(Schema.fromJsonString(PaginationSchema))
8416
8374
  * )
8417
8375
  *
8418
- * console.log(Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }))
8419
- * // %7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D
8376
+ * Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }) // => "%7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D"
8420
8377
  * ```
8421
8378
  *
8422
- * @category string
8379
+ * @category schemas
8423
8380
  * @since 3.12.0
8424
8381
  */
8425
8382
  export const StringFromUriComponent = /*#__PURE__*/String.annotate({
@@ -8429,7 +8386,7 @@ export const StringFromUriComponent = /*#__PURE__*/String.annotate({
8429
8386
  * Schema for property keys accepted by Effect schemas: finite `number`,
8430
8387
  * `symbol`, or `string`.
8431
8388
  *
8432
- * @category PropertyKey
8389
+ * @category schemas
8433
8390
  * @since 4.0.0
8434
8391
  */
8435
8392
  export const PropertyKey = /*#__PURE__*/Union([Finite, Symbol, String]);
@@ -8441,7 +8398,7 @@ export const PropertyKey = /*#__PURE__*/Union([Finite, Symbol, String]);
8441
8398
  * The result contains an `issues` array where each issue has a message and an
8442
8399
  * optional path made of property keys or keyed path segments.
8443
8400
  *
8444
- * @category Standard Schema
8401
+ * @category schemas
8445
8402
  * @since 4.0.0
8446
8403
  */
8447
8404
  export const StandardSchemaV1FailureResult = /*#__PURE__*/Struct({
@@ -8468,7 +8425,7 @@ export const StandardSchemaV1FailureResult = /*#__PURE__*/Struct({
8468
8425
  * @see {@link Boolean} for validating values that are already booleans
8469
8426
  * @see {@link Literals} for keeping bit literals instead of decoding them
8470
8427
  *
8471
- * @category boolean
8428
+ * @category schemas
8472
8429
  * @since 4.0.0
8473
8430
  */
8474
8431
  export const BooleanFromBit = /*#__PURE__*/Literals([0, 1]).pipe(/*#__PURE__*/decodeTo(Boolean, /*#__PURE__*/SchemaTransformation.transform({
@@ -8489,7 +8446,7 @@ const Base64String = /*#__PURE__*/String.annotate({
8489
8446
  *
8490
8447
  * The default JSON serializer encodes Uint8Array as a Base64 encoded string.
8491
8448
  *
8492
- * @category Uint8Array
8449
+ * @category schemas
8493
8450
  * @since 4.0.0
8494
8451
  */
8495
8452
  export const Uint8Array = /*#__PURE__*/instanceOf(globalThis.Uint8Array, {
@@ -8514,7 +8471,7 @@ export const Uint8Array = /*#__PURE__*/instanceOf(globalThis.Uint8Array, {
8514
8471
  *
8515
8472
  * @see {@link Uint8Array} for the corresponding schema
8516
8473
  *
8517
- * @category Uint8Array
8474
+ * @category schemas
8518
8475
  * @since 4.0.0
8519
8476
  */
8520
8477
  export const Uint8ArrayReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/Uint8Array", Uint8Array);
@@ -8530,7 +8487,7 @@ export const Uint8ArrayReviver = /*#__PURE__*/makeFixedDeclarationReviver("effec
8530
8487
  * Encoding:
8531
8488
  * - A `Uint8Array` is encoded as a base64-encoded string.
8532
8489
  *
8533
- * @category Uint8Array
8490
+ * @category schemas
8534
8491
  * @since 3.10.0
8535
8492
  */
8536
8493
  export const Uint8ArrayFromBase64 = /*#__PURE__*/Base64String.pipe(/*#__PURE__*/decodeTo(Uint8Array, SchemaTransformation.uint8ArrayFromBase64String));
@@ -8546,7 +8503,7 @@ export const Uint8ArrayFromBase64 = /*#__PURE__*/Base64String.pipe(/*#__PURE__*/
8546
8503
  * Encoding:
8547
8504
  * - A `Uint8Array` is encoded as a base64 (URL) encoded string.
8548
8505
  *
8549
- * @category Uint8Array
8506
+ * @category schemas
8550
8507
  * @since 3.10.0
8551
8508
  */
8552
8509
  export const Uint8ArrayFromBase64Url = /*#__PURE__*/String.annotate({
@@ -8567,7 +8524,7 @@ export const Uint8ArrayFromBase64Url = /*#__PURE__*/String.annotate({
8567
8524
  * Encoding:
8568
8525
  * - A `Uint8Array` is encoded as a hex encoded string.
8569
8526
  *
8570
- * @category Uint8Array
8527
+ * @category schemas
8571
8528
  * @since 3.10.0
8572
8529
  */
8573
8530
  export const Uint8ArrayFromHex = /*#__PURE__*/String.annotate({
@@ -8594,7 +8551,7 @@ export const Uint8ArrayFromHex = /*#__PURE__*/String.annotate({
8594
8551
  * @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
8595
8552
  * @see {@link DateTimeZoned} for preserving zoned DateTime values
8596
8553
  *
8597
- * @category DateTime
8554
+ * @category schemas
8598
8555
  * @since 3.10.0
8599
8556
  */
8600
8557
  export const DateTimeUtc = /*#__PURE__*/declare(u => DateTime.isDateTime(u) && DateTime.isUtc(u), {
@@ -8624,7 +8581,7 @@ export const DateTimeUtc = /*#__PURE__*/declare(u => DateTime.isDateTime(u) && D
8624
8581
  *
8625
8582
  * @see {@link DateTimeUtc} for the corresponding schema
8626
8583
  *
8627
- * @category DateTime
8584
+ * @category schemas
8628
8585
  * @since 4.0.0
8629
8586
  */
8630
8587
  export const DateTimeUtcReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/DateTimeUtc", DateTimeUtc);
@@ -8649,7 +8606,7 @@ export const DateTimeUtcReviver = /*#__PURE__*/makeFixedDeclarationReviver("effe
8649
8606
  * @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
8650
8607
  * @see {@link Date} for validating Date instances without converting them
8651
8608
  *
8652
- * @category DateTime
8609
+ * @category schemas
8653
8610
  * @since 3.12.0
8654
8611
  */
8655
8612
  export const DateTimeUtcFromDate = /*#__PURE__*/Date.pipe(/*#__PURE__*/decodeTo(DateTimeUtc, {
@@ -8674,7 +8631,7 @@ export const DateTimeUtcFromDate = /*#__PURE__*/Date.pipe(/*#__PURE__*/decodeTo(
8674
8631
  * @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
8675
8632
  * @see {@link DateFromString} for decoding strings into JavaScript Date instances
8676
8633
  *
8677
- * @category DateTime
8634
+ * @category schemas
8678
8635
  * @since 4.0.0
8679
8636
  */
8680
8637
  export const DateTimeUtcFromString = /*#__PURE__*/String.annotate({
@@ -8695,7 +8652,7 @@ export const DateTimeUtcFromString = /*#__PURE__*/String.annotate({
8695
8652
  * @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
8696
8653
  * @see {@link DateFromMillis} for decoding epoch milliseconds into JavaScript Date instances
8697
8654
  *
8698
- * @category DateTime
8655
+ * @category schemas
8699
8656
  * @since 4.0.0
8700
8657
  */
8701
8658
  export const DateTimeUtcFromMillis = /*#__PURE__*/Int.pipe(/*#__PURE__*/decodeTo(DateTimeUtc, {
@@ -8711,7 +8668,7 @@ export const DateTimeUtcFromMillis = /*#__PURE__*/Int.pipe(/*#__PURE__*/decodeTo
8711
8668
  *
8712
8669
  * - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
8713
8670
  *
8714
- * @category DateTime
8671
+ * @category schemas
8715
8672
  * @since 3.10.0
8716
8673
  */
8717
8674
  export const TimeZoneOffset = /*#__PURE__*/declare(DateTime.isTimeZoneOffset, {
@@ -8742,7 +8699,7 @@ export const TimeZoneOffset = /*#__PURE__*/declare(DateTime.isTimeZoneOffset, {
8742
8699
  *
8743
8700
  * @see {@link TimeZoneOffset} for the corresponding schema
8744
8701
  *
8745
- * @category DateTime
8702
+ * @category schemas
8746
8703
  * @since 4.0.0
8747
8704
  */
8748
8705
  export const TimeZoneOffsetReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/TimeZoneOffset", TimeZoneOffset);
@@ -8758,7 +8715,7 @@ const TimeZoneNamedString = /*#__PURE__*/String.annotate({
8758
8715
  *
8759
8716
  * - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
8760
8717
  *
8761
- * @category DateTime
8718
+ * @category schemas
8762
8719
  * @since 3.10.0
8763
8720
  */
8764
8721
  export const TimeZoneNamed = /*#__PURE__*/declare(DateTime.isTimeZoneNamed, {
@@ -8786,7 +8743,7 @@ export const TimeZoneNamed = /*#__PURE__*/declare(DateTime.isTimeZoneNamed, {
8786
8743
  *
8787
8744
  * @see {@link TimeZoneNamed} for the corresponding schema
8788
8745
  *
8789
- * @category DateTime
8746
+ * @category schemas
8790
8747
  * @since 4.0.0
8791
8748
  */
8792
8749
  export const TimeZoneNamedReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/TimeZoneNamed", TimeZoneNamed);
@@ -8801,7 +8758,7 @@ export const TimeZoneNamedReviver = /*#__PURE__*/makeFixedDeclarationReviver("ef
8801
8758
  * Encoding:
8802
8759
  * - A `DateTime.TimeZone.Named` is encoded as a `string`.
8803
8760
  *
8804
- * @category DateTime
8761
+ * @category schemas
8805
8762
  * @since 4.0.0
8806
8763
  */
8807
8764
  export const TimeZoneNamedFromString = /*#__PURE__*/TimeZoneNamedString.pipe(/*#__PURE__*/decodeTo(TimeZoneNamed, SchemaTransformation.timeZoneNamedFromString));
@@ -8818,7 +8775,7 @@ const TimeZoneString = /*#__PURE__*/String.annotate({
8818
8775
  * - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
8819
8776
  * `+03:00`)
8820
8777
  *
8821
- * @category DateTime
8778
+ * @category schemas
8822
8779
  * @since 3.10.0
8823
8780
  */
8824
8781
  export const TimeZone = /*#__PURE__*/declare(DateTime.isTimeZone, {
@@ -8849,7 +8806,7 @@ export const TimeZone = /*#__PURE__*/declare(DateTime.isTimeZone, {
8849
8806
  *
8850
8807
  * @see {@link TimeZone} for the corresponding schema
8851
8808
  *
8852
- * @category DateTime
8809
+ * @category schemas
8853
8810
  * @since 4.0.0
8854
8811
  */
8855
8812
  export const TimeZoneReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/TimeZone", TimeZone);
@@ -8864,7 +8821,7 @@ export const TimeZoneReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/
8864
8821
  * Encoding:
8865
8822
  * - A `DateTime.TimeZone` is encoded as a `string`.
8866
8823
  *
8867
- * @category DateTime
8824
+ * @category schemas
8868
8825
  * @since 4.0.0
8869
8826
  */
8870
8827
  export const TimeZoneFromString = /*#__PURE__*/TimeZoneString.pipe(/*#__PURE__*/decodeTo(TimeZone, SchemaTransformation.timeZoneFromString));
@@ -8883,7 +8840,7 @@ const DateTimeZonedString = /*#__PURE__*/String.annotate({
8883
8840
  * - encodes named zones by appending the IANA identifier in brackets, such as
8884
8841
  * `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`
8885
8842
  *
8886
- * @category DateTime
8843
+ * @category schemas
8887
8844
  * @since 3.10.0
8888
8845
  */
8889
8846
  export const DateTimeZoned = /*#__PURE__*/declare(u => DateTime.isDateTime(u) && DateTime.isZoned(u), {
@@ -8917,7 +8874,7 @@ export const DateTimeZoned = /*#__PURE__*/declare(u => DateTime.isDateTime(u) &&
8917
8874
  *
8918
8875
  * @see {@link DateTimeZoned} for the corresponding schema
8919
8876
  *
8920
- * @category DateTime
8877
+ * @category schemas
8921
8878
  * @since 4.0.0
8922
8879
  */
8923
8880
  export const DateTimeZonedReviver = /*#__PURE__*/makeFixedDeclarationReviver("effect/schema/DateTimeZoned", DateTimeZoned);
@@ -8932,7 +8889,7 @@ export const DateTimeZonedReviver = /*#__PURE__*/makeFixedDeclarationReviver("ef
8932
8889
  * Encoding:
8933
8890
  * - A `DateTime.Zoned` is encoded as a `string`.
8934
8891
  *
8935
- * @category DateTime
8892
+ * @category schemas
8936
8893
  * @since 4.0.0
8937
8894
  */
8938
8895
  export const DateTimeZonedFromString = /*#__PURE__*/DateTimeZonedString.pipe(/*#__PURE__*/decodeTo(DateTimeZoned, SchemaTransformation.dateTimeZonedFromString));
@@ -9012,7 +8969,12 @@ function makeClass(Inherited, identifier, struct, annotations, proto) {
9012
8969
  return out;
9013
8970
  }
9014
8971
  function getClassTransformation(self) {
9015
- return new SchemaTransformation.Transformation(SchemaGetter.transform(input => new self(input)), SchemaGetter.passthrough());
8972
+ return new SchemaTransformation.Transformation(SchemaGetter.transform(input => new self(input, {
8973
+ "~payload": {
8974
+ token: payloadToken,
8975
+ value: input
8976
+ }
8977
+ })), SchemaGetter.passthrough());
9016
8978
  }
9017
8979
  function getClassTypeId(identifier) {
9018
8980
  return `~effect/Schema/Class/${identifier}`;
@@ -9025,7 +8987,7 @@ function getClassSchemaFactory(from, identifier, annotations) {
9025
8987
  }
9026
8988
  const transformation = getClassTransformation(self);
9027
8989
  const to = make(new SchemaAST.Declaration([from.ast], () => (input, ast) => {
9028
- return input instanceof self || Predicate.hasProperty(input, getClassTypeId(identifier)) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast, Option_.some(input)));
8990
+ return input instanceof self || Predicate.hasProperty(input, getClassTypeId(identifier)) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast));
9029
8991
  }, {
9030
8992
  identifier,
9031
8993
  [SchemaAST.ClassTypeId]: ([from]) => new SchemaAST.Link(from, transformation),
@@ -9059,13 +9021,23 @@ function isStruct(schema) {
9059
9021
  * Pass the desired class type as the first type parameter. The second optional
9060
9022
  * type parameter can be used to add nominal brands.
9061
9023
  *
9024
+ * The `identifier` is the schema's stable runtime name. It is exposed on the
9025
+ * class, stored in the schema AST, and used to label diagnostics and generated
9026
+ * references as well as to format class instances.
9027
+ *
9028
+ * It also derives a runtime marker that recognizes instances across hot module
9029
+ * reloads, where `instanceof` can fail because the constructor has been
9030
+ * replaced. The identifier is explicit because the outer JavaScript class name
9031
+ * is not available while the `extends` expression is evaluated and may change
9032
+ * through renaming or minification.
9033
+ *
9062
9034
  * **Gotchas**
9063
9035
  *
9064
9036
  * Passing `disableChecks` in the options skips constructor validation.
9065
9037
  *
9066
9038
  * **Example** (Defining a basic class)
9067
9039
  *
9068
- * ```ts
9040
+ * ```ts import.meta.vitest
9069
9041
  * import { Schema } from "effect"
9070
9042
  *
9071
9043
  * class Person extends Schema.Class<Person>("Person")({
@@ -9074,13 +9046,13 @@ function isStruct(schema) {
9074
9046
  * }) {}
9075
9047
  *
9076
9048
  * const alice = new Person({ name: "Alice", age: 30 })
9077
- * console.log(alice.name) // "Alice"
9078
- * console.log(`${alice}`) // "Person({ name: Alice, age: 30 })"
9049
+ * alice.name // => "Alice"
9050
+ * String(alice) // => "Person({\"name\":\"Alice\",\"age\":30})"
9079
9051
  * ```
9080
9052
  *
9081
9053
  * **Example** (Extending a class)
9082
9054
  *
9083
- * ```ts
9055
+ * ```ts import.meta.vitest
9084
9056
  * import { Schema } from "effect"
9085
9057
  *
9086
9058
  * class Animal extends Schema.Class<Animal>("Animal")({
@@ -9092,8 +9064,8 @@ function isStruct(schema) {
9092
9064
  * }) {}
9093
9065
  *
9094
9066
  * const dog = new Dog({ name: "Rex", breed: "Labrador" })
9095
- * console.log(dog.name) // "Rex"
9096
- * console.log(dog.breed) // "Labrador"
9067
+ * dog.name // => "Rex"
9068
+ * dog.breed // => "Labrador"
9097
9069
  * ```
9098
9070
  *
9099
9071
  * @see {@link TaggedClass} for adding a `_tag` literal field to the class schema
@@ -9128,7 +9100,7 @@ export const Class = identifier => (schema, annotations) => {
9128
9100
  *
9129
9101
  * **Example** (Defining a tagged class)
9130
9102
  *
9131
- * ```ts
9103
+ * ```ts import.meta.vitest
9132
9104
  * import { Schema } from "effect"
9133
9105
  *
9134
9106
  * class Circle extends Schema.TaggedClass<Circle>()("Circle", {
@@ -9136,8 +9108,8 @@ export const Class = identifier => (schema, annotations) => {
9136
9108
  * }) {}
9137
9109
  *
9138
9110
  * const c = new Circle({ radius: 5 })
9139
- * console.log(c._tag) // "Circle"
9140
- * console.log(c.radius) // 5
9111
+ * c._tag // => "Circle"
9112
+ * c.radius // => 5
9141
9113
  * ```
9142
9114
  *
9143
9115
  * @category constructors
@@ -9162,7 +9134,7 @@ export const TaggedClass = identifier => {
9162
9134
  *
9163
9135
  * **Example** (Schema-backed error)
9164
9136
  *
9165
- * ```ts
9137
+ * ```ts import.meta.vitest
9166
9138
  * import { Effect, Schema } from "effect"
9167
9139
  *
9168
9140
  * class NotFound extends Schema.ErrorClass<NotFound>("NotFound")({
@@ -9172,6 +9144,8 @@ export const TaggedClass = identifier => {
9172
9144
  * const program = Effect.gen(function*() {
9173
9145
  * yield* new NotFound({ id: 1 })
9174
9146
  * })
9147
+ * const error = await Effect.runPromise(Effect.flip(program))
9148
+ * error.id // => 1
9175
9149
  * ```
9176
9150
  *
9177
9151
  * @category constructors
@@ -9195,7 +9169,7 @@ export const ErrorClass = identifier => (schema, annotations) => {
9195
9169
  *
9196
9170
  * **Example** (Defining a tagged error class)
9197
9171
  *
9198
- * ```ts
9172
+ * ```ts import.meta.vitest
9199
9173
  * import { Effect, Schema } from "effect"
9200
9174
  *
9201
9175
  * class NotFound extends Schema.TaggedErrorClass<NotFound>()("NotFound", {
@@ -9205,6 +9179,9 @@ export const ErrorClass = identifier => (schema, annotations) => {
9205
9179
  * const program = Effect.gen(function*() {
9206
9180
  * yield* new NotFound({ id: 42 })
9207
9181
  * })
9182
+ * const error = await Effect.runPromise(Effect.flip(program))
9183
+ * error._tag // => "NotFound"
9184
+ * error.id // => 42
9208
9185
  * ```
9209
9186
  *
9210
9187
  * @category constructors
@@ -9232,7 +9209,7 @@ export const TaggedErrorClass = identifier => {
9232
9209
  * nodes, impossible constraints, invalid candidates, and recursive schemas
9233
9210
  * without a finite terminal path fail immediately.
9234
9211
  *
9235
- * @category Arbitrary
9212
+ * @category generators
9236
9213
  * @since 4.0.0
9237
9214
  */
9238
9215
  export function toArbitraryLazy(schema) {
@@ -9263,7 +9240,7 @@ export function toArbitrary(schema, options) {
9263
9240
  * The annotation is applied through this helper because adding it directly to
9264
9241
  * `Annotations.Bottom` would make schemas invariant.
9265
9242
  *
9266
- * @category Formatter
9243
+ * @category formatting
9267
9244
  * @since 4.0.0
9268
9245
  */
9269
9246
  export function overrideToFormatter(toFormatter) {
@@ -9283,7 +9260,7 @@ export function overrideToFormatter(toFormatter) {
9283
9260
  * The optional `onBefore` hook lets you intercept specific AST nodes before
9284
9261
  * the default formatting logic runs.
9285
9262
  *
9286
- * @category Formatter
9263
+ * @category formatting
9287
9264
  * @since 4.0.0
9288
9265
  */
9289
9266
  export function toFormatter(schema, options) {
@@ -9444,13 +9421,13 @@ export function overrideToEquivalence(toEquivalence) {
9444
9421
  *
9445
9422
  * **Example** (Comparing structs)
9446
9423
  *
9447
- * ```ts
9424
+ * ```ts import.meta.vitest
9448
9425
  * import { Schema } from "effect"
9449
9426
  *
9450
9427
  * const eq = Schema.toEquivalence(Schema.Struct({ id: Schema.Number, name: Schema.String }))
9451
9428
  *
9452
- * console.log(eq({ id: 1, name: "Alice" }, { id: 1, name: "Alice" })) // true
9453
- * console.log(eq({ id: 1, name: "Alice" }, { id: 2, name: "Alice" })) // false
9429
+ * eq({ id: 1, name: "Alice" }, { id: 1, name: "Alice" }) // => true
9430
+ * eq({ id: 1, name: "Alice" }, { id: 2, name: "Alice" }) // => false
9454
9431
  * ```
9455
9432
  *
9456
9433
  * @category instances
@@ -9470,7 +9447,7 @@ export function toEquivalence(schema) {
9470
9447
  *
9471
9448
  * Use {@link toType} before this function to represent the type side instead.
9472
9449
  *
9473
- * @category Representation
9450
+ * @category converting
9474
9451
  * @since 4.0.0
9475
9452
  */
9476
9453
  export function toRepresentation(schema) {
@@ -9513,7 +9490,7 @@ export function toJsonSchemaDocument(schema, options) {
9513
9490
  * `toCodecJson` callback can return `undefined` when the declaration is already
9514
9491
  * in canonical JSON form.
9515
9492
  *
9516
- * @category Canonical Codecs
9493
+ * @category converting
9517
9494
  * @since 4.0.0
9518
9495
  */
9519
9496
  export function toCodecJson(schema) {
@@ -9528,19 +9505,7 @@ const toCodecJsonASTBase = /*#__PURE__*/SchemaAST.applyToSelfOrLastLinkEncoding(
9528
9505
  return SchemaAST.replaceContextLastLink(out, withoutConstructorDefault(context));
9529
9506
  });
9530
9507
  /** @internal */
9531
- export const toCodecJsonAST = /*#__PURE__*/memoize(ast => {
9532
- const identifier = InternalAnnotations.resolveIdentifier(ast);
9533
- const out = toCodecJsonASTBase(ast);
9534
- if (identifier === undefined || out.encoding === undefined) return out;
9535
- const encoded = SchemaAST.getLastEncoding(out);
9536
- if (InternalAnnotations.resolveIdentifier(encoded) !== undefined || InternalAnnotations.resolveIdentifierFallback(encoded) === identifier) {
9537
- return out;
9538
- }
9539
- const annotated = SchemaAST.annotate(encoded, {
9540
- [InternalAnnotations.IDENTIFIER_FALLBACK_KEY]: identifier
9541
- });
9542
- return SchemaAST.applyToSelfOrLastLinkEncoding(() => annotated)(out);
9543
- });
9508
+ export const toCodecJsonAST = /*#__PURE__*/memoize(toCodecJsonASTBase);
9544
9509
  function withoutConstructorDefault(context) {
9545
9510
  return context.defaultValue === undefined ? context : new SchemaAST.Context(context.isOptional, context.isMutable, undefined, context.annotations);
9546
9511
  }
@@ -9633,7 +9598,7 @@ function toCodecJsonBase(ast, recur) {
9633
9598
  * Derives an isomorphism codec from a schema. The encoded form is the
9634
9599
  * schema's `Iso` type — the intermediate representation used for round-tripping.
9635
9600
  *
9636
- * @category Canonical Codecs
9601
+ * @category converting
9637
9602
  * @since 4.0.0
9638
9603
  */
9639
9604
  export function toCodecIso(schema) {
@@ -9672,7 +9637,7 @@ function toCodecIsoBase(ast, recur) {
9672
9637
  * `toCodec` encoding. A callback can return `undefined` when the declaration is
9673
9638
  * already in canonical StringTree form.
9674
9639
  *
9675
- * @category Canonical Codecs
9640
+ * @category converting
9676
9641
  * @since 4.0.0
9677
9642
  */
9678
9643
  export function toCodecStringTree(schema) {
@@ -9695,7 +9660,7 @@ export function toCodecStringTree(schema) {
9695
9660
  * decoding convenience rather than a canonical StringTree representation. It
9696
9661
  * does not parse comma-separated strings.
9697
9662
  *
9698
- * @category Canonical Codecs
9663
+ * @category converting
9699
9664
  * @since 4.0.0
9700
9665
  */
9701
9666
  export function toCodecArrayFromSingle(schema) {
@@ -9710,7 +9675,7 @@ export function toCodecArrayFromSingle(schema) {
9710
9675
  * an `Effect` that succeeds with the XML string or fails with `SchemaError` if
9711
9676
  * codec encoding fails.
9712
9677
  *
9713
- * @category Canonical Codecs
9678
+ * @category encoding
9714
9679
  * @since 4.0.0
9715
9680
  */
9716
9681
  export function toEncoderXml(codec, options) {
@@ -9919,7 +9884,7 @@ function onSerializerArrayFromSingle(ast) {
9919
9884
  *
9920
9885
  * @see {@link isGreaterThanDate} for creating the corresponding check
9921
9886
  *
9922
- * @category Date checks
9887
+ * @category validation
9923
9888
  * @since 4.0.0
9924
9889
  */
9925
9890
  export const isGreaterThanDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThanDate", /*#__PURE__*/Struct({
@@ -9937,7 +9902,7 @@ export const isGreaterThanDateReviver = /*#__PURE__*/InternalSchema.makeFilterRe
9937
9902
  *
9938
9903
  * @see {@link isGreaterThanOrEqualToDate} for creating the corresponding check
9939
9904
  *
9940
- * @category Date checks
9905
+ * @category validation
9941
9906
  * @since 4.0.0
9942
9907
  */
9943
9908
  export const isGreaterThanOrEqualToDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThanOrEqualToDate", /*#__PURE__*/Struct({
@@ -9955,7 +9920,7 @@ export const isGreaterThanOrEqualToDateReviver = /*#__PURE__*/InternalSchema.mak
9955
9920
  *
9956
9921
  * @see {@link isLessThanDate} for creating the corresponding check
9957
9922
  *
9958
- * @category Date checks
9923
+ * @category validation
9959
9924
  * @since 4.0.0
9960
9925
  */
9961
9926
  export const isLessThanDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThanDate", /*#__PURE__*/Struct({
@@ -9973,7 +9938,7 @@ export const isLessThanDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviv
9973
9938
  *
9974
9939
  * @see {@link isLessThanOrEqualToDate} for creating the corresponding check
9975
9940
  *
9976
- * @category Date checks
9941
+ * @category validation
9977
9942
  * @since 4.0.0
9978
9943
  */
9979
9944
  export const isLessThanOrEqualToDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThanOrEqualToDate", /*#__PURE__*/Struct({
@@ -9991,7 +9956,7 @@ export const isLessThanOrEqualToDateReviver = /*#__PURE__*/InternalSchema.makeFi
9991
9956
  *
9992
9957
  * @see {@link isBetweenDate} for creating the corresponding check
9993
9958
  *
9994
- * @category Date checks
9959
+ * @category validation
9995
9960
  * @since 4.0.0
9996
9961
  */
9997
9962
  export const isBetweenDateReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isBetweenDate", /*#__PURE__*/Struct({
@@ -10012,7 +9977,7 @@ export const isBetweenDateReviver = /*#__PURE__*/InternalSchema.makeFilterRevive
10012
9977
  *
10013
9978
  * @see {@link isGreaterThanBigInt} for creating the corresponding check
10014
9979
  *
10015
- * @category BigInt checks
9980
+ * @category validation
10016
9981
  * @since 4.0.0
10017
9982
  */
10018
9983
  export const isGreaterThanBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThanBigInt", /*#__PURE__*/Struct({
@@ -10030,7 +9995,7 @@ export const isGreaterThanBigIntReviver = /*#__PURE__*/InternalSchema.makeFilter
10030
9995
  *
10031
9996
  * @see {@link isGreaterThanOrEqualToBigInt} for creating the corresponding check
10032
9997
  *
10033
- * @category BigInt checks
9998
+ * @category validation
10034
9999
  * @since 4.0.0
10035
10000
  */
10036
10001
  export const isGreaterThanOrEqualToBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isGreaterThanOrEqualToBigInt", /*#__PURE__*/Struct({
@@ -10048,7 +10013,7 @@ export const isGreaterThanOrEqualToBigIntReviver = /*#__PURE__*/InternalSchema.m
10048
10013
  *
10049
10014
  * @see {@link isLessThanBigInt} for creating the corresponding check
10050
10015
  *
10051
- * @category BigInt checks
10016
+ * @category validation
10052
10017
  * @since 4.0.0
10053
10018
  */
10054
10019
  export const isLessThanBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThanBigInt", /*#__PURE__*/Struct({
@@ -10066,7 +10031,7 @@ export const isLessThanBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterRev
10066
10031
  *
10067
10032
  * @see {@link isLessThanOrEqualToBigInt} for creating the corresponding check
10068
10033
  *
10069
- * @category BigInt checks
10034
+ * @category validation
10070
10035
  * @since 4.0.0
10071
10036
  */
10072
10037
  export const isLessThanOrEqualToBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isLessThanOrEqualToBigInt", /*#__PURE__*/Struct({
@@ -10084,7 +10049,7 @@ export const isLessThanOrEqualToBigIntReviver = /*#__PURE__*/InternalSchema.make
10084
10049
  *
10085
10050
  * @see {@link isBetweenBigInt} for creating the corresponding check
10086
10051
  *
10087
- * @category BigInt checks
10052
+ * @category validation
10088
10053
  * @since 4.0.0
10089
10054
  */
10090
10055
  export const isBetweenBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterReviver("effect/schema/isBetweenBigInt", /*#__PURE__*/Struct({
@@ -10103,7 +10068,7 @@ export const isBetweenBigIntReviver = /*#__PURE__*/InternalSchema.makeFilterRevi
10103
10068
  * Derives an `Iso` optic from a schema that isomorphically converts between
10104
10069
  * the schema's `Type` and its `Iso` (intermediate / serialized form).
10105
10070
  *
10106
- * @category Optic
10071
+ * @category converting
10107
10072
  * @since 4.0.0
10108
10073
  */
10109
10074
  export function toIso(schema) {
@@ -10113,7 +10078,7 @@ export function toIso(schema) {
10113
10078
  /**
10114
10079
  * Returns an identity `Iso` over the schema's source (`Type`) side.
10115
10080
  *
10116
- * @category Optic
10081
+ * @category constructors
10117
10082
  * @since 4.0.0
10118
10083
  */
10119
10084
  export function toIsoSource(_) {
@@ -10122,7 +10087,7 @@ export function toIsoSource(_) {
10122
10087
  /**
10123
10088
  * Returns an identity `Iso` over the schema's focus (`Iso`) side.
10124
10089
  *
10125
- * @category Optic
10090
+ * @category constructors
10126
10091
  * @since 4.0.0
10127
10092
  */
10128
10093
  export function toIsoFocus(_) {
@@ -10142,7 +10107,7 @@ export function toIsoFocus(_) {
10142
10107
  * provided `decode` and `encode` getters to transform between the schema type
10143
10108
  * and the target codec.
10144
10109
  *
10145
- * @category Optic
10110
+ * @category transforming
10146
10111
  * @since 4.0.0
10147
10112
  */
10148
10113
  export function overrideToCodecIso(to, transformation) {
@@ -10185,7 +10150,7 @@ export function toDifferJsonPatch(schema) {
10185
10150
  * The resulting schema accepts a single node value, an array of trees, or an
10186
10151
  * object whose values are trees.
10187
10152
  *
10188
- * @category Tree
10153
+ * @category schemas
10189
10154
  * @since 4.0.0
10190
10155
  */
10191
10156
  export function Tree(node) {
@@ -10198,11 +10163,10 @@ export function Tree(node) {
10198
10163
  *
10199
10164
  * **Example** (Validating a JSON value)
10200
10165
  *
10201
- * ```ts
10202
- * import { Schema } from "effect"
10166
+ * ```ts import.meta.vitest
10167
+ * import { Option, Schema } from "effect"
10203
10168
  *
10204
- * const result = Schema.decodeUnknownOption(Schema.Json)({ key: [1, true, null] })
10205
- * console.log(result._tag) // "Some"
10169
+ * Schema.decodeUnknownOption(Schema.Json)({ key: [1, true, null] }) // => Option.some({ key: [1, true, null] })
10206
10170
  * ```
10207
10171
  *
10208
10172
  * @category schemas
@@ -10268,7 +10232,7 @@ export const MutableJsonReviver = /*#__PURE__*/makeFixedDeclarationReviver("effe
10268
10232
  * annotations are taken from the last check; otherwise they are taken from
10269
10233
  * the base schema instance.
10270
10234
  *
10271
- * @category Schema Resolvers
10235
+ * @category getters
10272
10236
  * @since 4.0.0
10273
10237
  */
10274
10238
  export function resolveAnnotations(schema) {
@@ -10279,7 +10243,7 @@ export function resolveAnnotations(schema) {
10279
10243
  * annotations are those attached via `annotateKey` and live on the AST's
10280
10244
  * `context` rather than on the schema node itself.
10281
10245
  *
10282
- * @category Schema Resolvers
10246
+ * @category getters
10283
10247
  * @since 4.0.0
10284
10248
  */
10285
10249
  export function resolveAnnotationsKey(schema) {