effect 3.10.18 → 3.10.19

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 (348) hide show
  1. package/dist/cjs/Array.js +206 -0
  2. package/dist/cjs/Array.js.map +1 -1
  3. package/dist/cjs/BigDecimal.js +56 -0
  4. package/dist/cjs/BigDecimal.js.map +1 -1
  5. package/dist/cjs/BigInt.js +54 -0
  6. package/dist/cjs/BigInt.js.map +1 -1
  7. package/dist/cjs/Boolean.js +24 -0
  8. package/dist/cjs/Boolean.js.map +1 -1
  9. package/dist/cjs/Brand.js +4 -0
  10. package/dist/cjs/Brand.js.map +1 -1
  11. package/dist/cjs/Chunk.js +8 -0
  12. package/dist/cjs/Chunk.js.map +1 -1
  13. package/dist/cjs/Config.js +2 -0
  14. package/dist/cjs/Config.js.map +1 -1
  15. package/dist/cjs/Context.js +24 -0
  16. package/dist/cjs/Context.js.map +1 -1
  17. package/dist/cjs/Cron.js +6 -0
  18. package/dist/cjs/Cron.js.map +1 -1
  19. package/dist/cjs/Data.js +14 -0
  20. package/dist/cjs/Data.js.map +1 -1
  21. package/dist/cjs/DateTime.js +64 -0
  22. package/dist/cjs/DateTime.js.map +1 -1
  23. package/dist/cjs/Duration.js +2 -0
  24. package/dist/cjs/Duration.js.map +1 -1
  25. package/dist/cjs/Effect.js +214 -0
  26. package/dist/cjs/Effect.js.map +1 -1
  27. package/dist/cjs/Either.js +38 -2
  28. package/dist/cjs/Either.js.map +1 -1
  29. package/dist/cjs/FiberHandle.js +6 -0
  30. package/dist/cjs/FiberHandle.js.map +1 -1
  31. package/dist/cjs/FiberMap.js +6 -0
  32. package/dist/cjs/FiberMap.js.map +1 -1
  33. package/dist/cjs/FiberSet.js +6 -0
  34. package/dist/cjs/FiberSet.js.map +1 -1
  35. package/dist/cjs/Function.js +34 -0
  36. package/dist/cjs/Function.js.map +1 -1
  37. package/dist/cjs/GlobalValue.js +2 -0
  38. package/dist/cjs/GlobalValue.js.map +1 -1
  39. package/dist/cjs/HashMap.js.map +1 -1
  40. package/dist/cjs/Iterable.js +18 -0
  41. package/dist/cjs/Iterable.js.map +1 -1
  42. package/dist/cjs/List.js +4 -0
  43. package/dist/cjs/List.js.map +1 -1
  44. package/dist/cjs/Logger.js +26 -0
  45. package/dist/cjs/Logger.js.map +1 -1
  46. package/dist/cjs/Mailbox.js +2 -0
  47. package/dist/cjs/Mailbox.js.map +1 -1
  48. package/dist/cjs/ManagedRuntime.js +2 -0
  49. package/dist/cjs/ManagedRuntime.js.map +1 -1
  50. package/dist/cjs/Metric.js +10 -0
  51. package/dist/cjs/Metric.js.map +1 -1
  52. package/dist/cjs/Micro.js +8 -0
  53. package/dist/cjs/Micro.js.map +1 -1
  54. package/dist/cjs/Number.js +44 -0
  55. package/dist/cjs/Number.js.map +1 -1
  56. package/dist/cjs/Option.js +70 -0
  57. package/dist/cjs/Option.js.map +1 -1
  58. package/dist/cjs/Order.js +2 -0
  59. package/dist/cjs/Order.js.map +1 -1
  60. package/dist/cjs/Ordering.js +4 -0
  61. package/dist/cjs/Ordering.js.map +1 -1
  62. package/dist/cjs/Predicate.js +68 -0
  63. package/dist/cjs/Predicate.js.map +1 -1
  64. package/dist/cjs/Random.js +4 -0
  65. package/dist/cjs/Random.js.map +1 -1
  66. package/dist/cjs/RateLimiter.js +4 -0
  67. package/dist/cjs/RateLimiter.js.map +1 -1
  68. package/dist/cjs/RcMap.js +2 -0
  69. package/dist/cjs/RcMap.js.map +1 -1
  70. package/dist/cjs/RcRef.js +2 -0
  71. package/dist/cjs/RcRef.js.map +1 -1
  72. package/dist/cjs/Record.js +56 -0
  73. package/dist/cjs/Record.js.map +1 -1
  74. package/dist/cjs/Redacted.js +8 -0
  75. package/dist/cjs/Redacted.js.map +1 -1
  76. package/dist/cjs/RegExp.js +4 -0
  77. package/dist/cjs/RegExp.js.map +1 -1
  78. package/dist/cjs/Request.js +4 -0
  79. package/dist/cjs/Request.js.map +1 -1
  80. package/dist/cjs/RequestResolver.js +2 -0
  81. package/dist/cjs/RequestResolver.js.map +1 -1
  82. package/dist/cjs/Runtime.js +6 -0
  83. package/dist/cjs/Runtime.js.map +1 -1
  84. package/dist/cjs/Schema.js +34 -0
  85. package/dist/cjs/Schema.js.map +1 -1
  86. package/dist/cjs/Stream.js +154 -0
  87. package/dist/cjs/Stream.js.map +1 -1
  88. package/dist/cjs/String.js +62 -0
  89. package/dist/cjs/String.js.map +1 -1
  90. package/dist/cjs/Struct.js +12 -0
  91. package/dist/cjs/Struct.js.map +1 -1
  92. package/dist/cjs/Symbol.js +2 -0
  93. package/dist/cjs/Symbol.js.map +1 -1
  94. package/dist/cjs/Trie.js +56 -0
  95. package/dist/cjs/Trie.js.map +1 -1
  96. package/dist/cjs/Tuple.js +18 -0
  97. package/dist/cjs/Tuple.js.map +1 -1
  98. package/dist/cjs/internal/version.js +1 -1
  99. package/dist/dts/Array.d.ts +534 -0
  100. package/dist/dts/Array.d.ts.map +1 -1
  101. package/dist/dts/BigDecimal.d.ts +116 -0
  102. package/dist/dts/BigDecimal.d.ts.map +1 -1
  103. package/dist/dts/BigInt.d.ts +114 -0
  104. package/dist/dts/BigInt.d.ts.map +1 -1
  105. package/dist/dts/Boolean.d.ts +56 -0
  106. package/dist/dts/Boolean.d.ts.map +1 -1
  107. package/dist/dts/Brand.d.ts +6 -0
  108. package/dist/dts/Brand.d.ts.map +1 -1
  109. package/dist/dts/Chunk.d.ts +30 -0
  110. package/dist/dts/Chunk.d.ts.map +1 -1
  111. package/dist/dts/Config.d.ts +2 -0
  112. package/dist/dts/Config.d.ts.map +1 -1
  113. package/dist/dts/Context.d.ts +44 -0
  114. package/dist/dts/Context.d.ts.map +1 -1
  115. package/dist/dts/Cron.d.ts +6 -0
  116. package/dist/dts/Cron.d.ts.map +1 -1
  117. package/dist/dts/Data.d.ts +26 -0
  118. package/dist/dts/Data.d.ts.map +1 -1
  119. package/dist/dts/DateTime.d.ts +152 -0
  120. package/dist/dts/DateTime.d.ts.map +1 -1
  121. package/dist/dts/Duration.d.ts +2 -0
  122. package/dist/dts/Duration.d.ts.map +1 -1
  123. package/dist/dts/Effect.d.ts +570 -0
  124. package/dist/dts/Effect.d.ts.map +1 -1
  125. package/dist/dts/Either.d.ts +84 -2
  126. package/dist/dts/Either.d.ts.map +1 -1
  127. package/dist/dts/FiberHandle.d.ts +6 -0
  128. package/dist/dts/FiberHandle.d.ts.map +1 -1
  129. package/dist/dts/FiberMap.d.ts +6 -0
  130. package/dist/dts/FiberMap.d.ts.map +1 -1
  131. package/dist/dts/FiberSet.d.ts +6 -0
  132. package/dist/dts/FiberSet.d.ts.map +1 -1
  133. package/dist/dts/Function.d.ts +50 -0
  134. package/dist/dts/Function.d.ts.map +1 -1
  135. package/dist/dts/GlobalValue.d.ts +2 -0
  136. package/dist/dts/GlobalValue.d.ts.map +1 -1
  137. package/dist/dts/HashMap.d.ts +6 -0
  138. package/dist/dts/HashMap.d.ts.map +1 -1
  139. package/dist/dts/Iterable.d.ts +26 -0
  140. package/dist/dts/Iterable.d.ts.map +1 -1
  141. package/dist/dts/List.d.ts +20 -0
  142. package/dist/dts/List.d.ts.map +1 -1
  143. package/dist/dts/Logger.d.ts +34 -0
  144. package/dist/dts/Logger.d.ts.map +1 -1
  145. package/dist/dts/Mailbox.d.ts +2 -0
  146. package/dist/dts/Mailbox.d.ts.map +1 -1
  147. package/dist/dts/ManagedRuntime.d.ts +2 -0
  148. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  149. package/dist/dts/Metric.d.ts +18 -0
  150. package/dist/dts/Metric.d.ts.map +1 -1
  151. package/dist/dts/Micro.d.ts +14 -0
  152. package/dist/dts/Micro.d.ts.map +1 -1
  153. package/dist/dts/Number.d.ts +104 -0
  154. package/dist/dts/Number.d.ts.map +1 -1
  155. package/dist/dts/Option.d.ts +142 -0
  156. package/dist/dts/Option.d.ts.map +1 -1
  157. package/dist/dts/Order.d.ts +2 -0
  158. package/dist/dts/Order.d.ts.map +1 -1
  159. package/dist/dts/Ordering.d.ts +8 -0
  160. package/dist/dts/Ordering.d.ts.map +1 -1
  161. package/dist/dts/Predicate.d.ts +104 -0
  162. package/dist/dts/Predicate.d.ts.map +1 -1
  163. package/dist/dts/Random.d.ts +4 -0
  164. package/dist/dts/Random.d.ts.map +1 -1
  165. package/dist/dts/RateLimiter.d.ts +4 -0
  166. package/dist/dts/RateLimiter.d.ts.map +1 -1
  167. package/dist/dts/RcMap.d.ts +6 -0
  168. package/dist/dts/RcMap.d.ts.map +1 -1
  169. package/dist/dts/RcRef.d.ts +2 -0
  170. package/dist/dts/RcRef.d.ts.map +1 -1
  171. package/dist/dts/Record.d.ts +136 -0
  172. package/dist/dts/Record.d.ts.map +1 -1
  173. package/dist/dts/Redacted.d.ts +8 -0
  174. package/dist/dts/Redacted.d.ts.map +1 -1
  175. package/dist/dts/RegExp.d.ts +4 -0
  176. package/dist/dts/RegExp.d.ts.map +1 -1
  177. package/dist/dts/Request.d.ts +4 -0
  178. package/dist/dts/Request.d.ts.map +1 -1
  179. package/dist/dts/RequestResolver.d.ts +6 -0
  180. package/dist/dts/RequestResolver.d.ts.map +1 -1
  181. package/dist/dts/Runtime.d.ts +18 -0
  182. package/dist/dts/Runtime.d.ts.map +1 -1
  183. package/dist/dts/Schema.d.ts +58 -0
  184. package/dist/dts/Schema.d.ts.map +1 -1
  185. package/dist/dts/Stream.d.ts +344 -0
  186. package/dist/dts/Stream.d.ts.map +1 -1
  187. package/dist/dts/String.d.ts +94 -0
  188. package/dist/dts/String.d.ts.map +1 -1
  189. package/dist/dts/Struct.d.ts +24 -0
  190. package/dist/dts/Struct.d.ts.map +1 -1
  191. package/dist/dts/Symbol.d.ts +2 -0
  192. package/dist/dts/Symbol.d.ts.map +1 -1
  193. package/dist/dts/Trie.d.ts +132 -0
  194. package/dist/dts/Trie.d.ts.map +1 -1
  195. package/dist/dts/Tuple.d.ts +42 -0
  196. package/dist/dts/Tuple.d.ts.map +1 -1
  197. package/dist/dts/Types.d.ts +24 -0
  198. package/dist/dts/Types.d.ts.map +1 -1
  199. package/dist/esm/Array.js +208 -0
  200. package/dist/esm/Array.js.map +1 -1
  201. package/dist/esm/BigDecimal.js +56 -0
  202. package/dist/esm/BigDecimal.js.map +1 -1
  203. package/dist/esm/BigInt.js +54 -0
  204. package/dist/esm/BigInt.js.map +1 -1
  205. package/dist/esm/Boolean.js +24 -0
  206. package/dist/esm/Boolean.js.map +1 -1
  207. package/dist/esm/Brand.js +4 -0
  208. package/dist/esm/Brand.js.map +1 -1
  209. package/dist/esm/Chunk.js +8 -0
  210. package/dist/esm/Chunk.js.map +1 -1
  211. package/dist/esm/Config.js +2 -0
  212. package/dist/esm/Config.js.map +1 -1
  213. package/dist/esm/Context.js +24 -0
  214. package/dist/esm/Context.js.map +1 -1
  215. package/dist/esm/Cron.js +6 -0
  216. package/dist/esm/Cron.js.map +1 -1
  217. package/dist/esm/Data.js +16 -0
  218. package/dist/esm/Data.js.map +1 -1
  219. package/dist/esm/DateTime.js +64 -0
  220. package/dist/esm/DateTime.js.map +1 -1
  221. package/dist/esm/Duration.js +2 -0
  222. package/dist/esm/Duration.js.map +1 -1
  223. package/dist/esm/Effect.js +220 -0
  224. package/dist/esm/Effect.js.map +1 -1
  225. package/dist/esm/Either.js +40 -2
  226. package/dist/esm/Either.js.map +1 -1
  227. package/dist/esm/FiberHandle.js +6 -0
  228. package/dist/esm/FiberHandle.js.map +1 -1
  229. package/dist/esm/FiberMap.js +6 -0
  230. package/dist/esm/FiberMap.js.map +1 -1
  231. package/dist/esm/FiberSet.js +6 -0
  232. package/dist/esm/FiberSet.js.map +1 -1
  233. package/dist/esm/Function.js +34 -0
  234. package/dist/esm/Function.js.map +1 -1
  235. package/dist/esm/GlobalValue.js +2 -0
  236. package/dist/esm/GlobalValue.js.map +1 -1
  237. package/dist/esm/HashMap.js.map +1 -1
  238. package/dist/esm/Iterable.js +18 -0
  239. package/dist/esm/Iterable.js.map +1 -1
  240. package/dist/esm/List.js +4 -0
  241. package/dist/esm/List.js.map +1 -1
  242. package/dist/esm/Logger.js +26 -0
  243. package/dist/esm/Logger.js.map +1 -1
  244. package/dist/esm/Mailbox.js +2 -0
  245. package/dist/esm/Mailbox.js.map +1 -1
  246. package/dist/esm/ManagedRuntime.js +2 -0
  247. package/dist/esm/ManagedRuntime.js.map +1 -1
  248. package/dist/esm/Metric.js +10 -0
  249. package/dist/esm/Metric.js.map +1 -1
  250. package/dist/esm/Micro.js +10 -0
  251. package/dist/esm/Micro.js.map +1 -1
  252. package/dist/esm/Number.js +44 -0
  253. package/dist/esm/Number.js.map +1 -1
  254. package/dist/esm/Option.js +72 -0
  255. package/dist/esm/Option.js.map +1 -1
  256. package/dist/esm/Order.js +2 -0
  257. package/dist/esm/Order.js.map +1 -1
  258. package/dist/esm/Ordering.js +4 -0
  259. package/dist/esm/Ordering.js.map +1 -1
  260. package/dist/esm/Predicate.js +68 -0
  261. package/dist/esm/Predicate.js.map +1 -1
  262. package/dist/esm/Random.js +4 -0
  263. package/dist/esm/Random.js.map +1 -1
  264. package/dist/esm/RateLimiter.js +4 -0
  265. package/dist/esm/RateLimiter.js.map +1 -1
  266. package/dist/esm/RcMap.js +2 -0
  267. package/dist/esm/RcMap.js.map +1 -1
  268. package/dist/esm/RcRef.js +2 -0
  269. package/dist/esm/RcRef.js.map +1 -1
  270. package/dist/esm/Record.js +56 -0
  271. package/dist/esm/Record.js.map +1 -1
  272. package/dist/esm/Redacted.js +8 -0
  273. package/dist/esm/Redacted.js.map +1 -1
  274. package/dist/esm/RegExp.js +4 -0
  275. package/dist/esm/RegExp.js.map +1 -1
  276. package/dist/esm/Request.js +4 -0
  277. package/dist/esm/Request.js.map +1 -1
  278. package/dist/esm/RequestResolver.js +2 -0
  279. package/dist/esm/RequestResolver.js.map +1 -1
  280. package/dist/esm/Runtime.js +6 -0
  281. package/dist/esm/Runtime.js.map +1 -1
  282. package/dist/esm/Schema.js +34 -0
  283. package/dist/esm/Schema.js.map +1 -1
  284. package/dist/esm/Stream.js +160 -0
  285. package/dist/esm/Stream.js.map +1 -1
  286. package/dist/esm/String.js +62 -0
  287. package/dist/esm/String.js.map +1 -1
  288. package/dist/esm/Struct.js +12 -0
  289. package/dist/esm/Struct.js.map +1 -1
  290. package/dist/esm/Symbol.js +2 -0
  291. package/dist/esm/Symbol.js.map +1 -1
  292. package/dist/esm/Trie.js +56 -0
  293. package/dist/esm/Trie.js.map +1 -1
  294. package/dist/esm/Tuple.js +22 -0
  295. package/dist/esm/Tuple.js.map +1 -1
  296. package/dist/esm/internal/version.js +1 -1
  297. package/package.json +1 -1
  298. package/src/Array.ts +534 -0
  299. package/src/BigDecimal.ts +116 -0
  300. package/src/BigInt.ts +114 -0
  301. package/src/Boolean.ts +56 -0
  302. package/src/Brand.ts +6 -0
  303. package/src/Chunk.ts +32 -0
  304. package/src/Config.ts +2 -0
  305. package/src/Context.ts +44 -0
  306. package/src/Cron.ts +6 -0
  307. package/src/Data.ts +26 -0
  308. package/src/DateTime.ts +152 -0
  309. package/src/Duration.ts +2 -0
  310. package/src/Effect.ts +570 -0
  311. package/src/Either.ts +84 -2
  312. package/src/FiberHandle.ts +6 -0
  313. package/src/FiberMap.ts +6 -0
  314. package/src/FiberSet.ts +6 -0
  315. package/src/Function.ts +50 -0
  316. package/src/GlobalValue.ts +2 -0
  317. package/src/HashMap.ts +6 -0
  318. package/src/Iterable.ts +26 -0
  319. package/src/List.ts +24 -0
  320. package/src/Logger.ts +34 -0
  321. package/src/Mailbox.ts +2 -0
  322. package/src/ManagedRuntime.ts +2 -0
  323. package/src/Metric.ts +18 -0
  324. package/src/Micro.ts +14 -0
  325. package/src/Number.ts +104 -0
  326. package/src/Option.ts +142 -0
  327. package/src/Order.ts +2 -0
  328. package/src/Ordering.ts +8 -0
  329. package/src/Predicate.ts +104 -0
  330. package/src/Random.ts +4 -0
  331. package/src/RateLimiter.ts +4 -0
  332. package/src/RcMap.ts +6 -0
  333. package/src/RcRef.ts +2 -0
  334. package/src/Record.ts +136 -0
  335. package/src/Redacted.ts +8 -0
  336. package/src/RegExp.ts +4 -0
  337. package/src/Request.ts +4 -0
  338. package/src/RequestResolver.ts +6 -0
  339. package/src/Runtime.ts +18 -0
  340. package/src/Schema.ts +64 -0
  341. package/src/Stream.ts +344 -0
  342. package/src/String.ts +94 -0
  343. package/src/Struct.ts +24 -0
  344. package/src/Symbol.ts +2 -0
  345. package/src/Trie.ts +132 -0
  346. package/src/Tuple.ts +42 -0
  347. package/src/Types.ts +24 -0
  348. package/src/internal/version.ts +1 -1
@@ -47,6 +47,7 @@ const isEffect = exports.isEffect = core.isEffect;
47
47
  * be recomputed upon next evaluation.
48
48
  *
49
49
  * @example
50
+ * ```ts
50
51
  * import { Effect, Console } from "effect"
51
52
  *
52
53
  * let i = 1
@@ -74,6 +75,7 @@ const isEffect = exports.isEffect = core.isEffect;
74
75
  * // result 1
75
76
  * // expensive task...
76
77
  * // result 2
78
+ * ```
77
79
  *
78
80
  * @since 2.0.0
79
81
  * @category Caching
@@ -85,6 +87,7 @@ const cachedWithTTL = exports.cachedWithTTL = circular.cached;
85
87
  * invalidating the cached value before it naturally expires.
86
88
  *
87
89
  * @example
90
+ * ```ts
88
91
  * import { Effect, Console } from "effect"
89
92
  *
90
93
  * let i = 1
@@ -115,6 +118,7 @@ const cachedWithTTL = exports.cachedWithTTL = circular.cached;
115
118
  * // result 1
116
119
  * // expensive task...
117
120
  * // result 2
121
+ * ```
118
122
  *
119
123
  * @since 2.0.0
120
124
  * @category Caching
@@ -126,6 +130,7 @@ const cachedInvalidateWithTTL = exports.cachedInvalidateWithTTL = circular.cache
126
130
  * the logic.
127
131
  *
128
132
  * @example
133
+ * ```ts
129
134
  * import { Effect, Console } from "effect"
130
135
  *
131
136
  * let i = 1
@@ -159,6 +164,7 @@ const cachedInvalidateWithTTL = exports.cachedInvalidateWithTTL = circular.cache
159
164
  * // expensive task...
160
165
  * // result 3
161
166
  * // result 3
167
+ * ```
162
168
  *
163
169
  * @since 2.0.0
164
170
  * @category Caching
@@ -170,6 +176,7 @@ const cached = exports.cached = effect.memoize;
170
176
  * recompute them.
171
177
  *
172
178
  * @example
179
+ * ```ts
173
180
  * import { Effect, Random } from "effect"
174
181
  *
175
182
  * const program = Effect.gen(function* () {
@@ -192,6 +199,7 @@ const cached = exports.cached = effect.memoize;
192
199
  * // memoized version:
193
200
  * // 5
194
201
  * // 5
202
+ * ```
195
203
  *
196
204
  * @since 2.0.0
197
205
  * @category Caching
@@ -202,6 +210,7 @@ const cachedFunction = exports.cachedFunction = circular.cachedFunction;
202
210
  * called.
203
211
  *
204
212
  * @example
213
+ * ```ts
205
214
  * import { Effect, Console } from "effect"
206
215
  *
207
216
  * const program = Effect.gen(function* () {
@@ -217,6 +226,7 @@ const cachedFunction = exports.cachedFunction = circular.cachedFunction;
217
226
  * // task1
218
227
  * // task1
219
228
  * // task2
229
+ * ```
220
230
  *
221
231
  * @since 2.0.0
222
232
  * @category Caching
@@ -272,6 +282,7 @@ const once = exports.once = effect.once;
272
282
  * @see {@link forEach} for iterating over elements and applying an effect.
273
283
  *
274
284
  * @example
285
+ * ```ts
275
286
  * // Title: Combining Effects in Tuples
276
287
  * import { Effect, Console } from "effect"
277
288
  *
@@ -289,6 +300,7 @@ const once = exports.once = effect.once;
289
300
  * // 42
290
301
  * // Hello
291
302
  * // [ 42, 'Hello' ]
303
+ * ```
292
304
  *
293
305
  * @example
294
306
  * // Title: Combining Effects in Iterables
@@ -437,6 +449,7 @@ const all = exports.all = fiberRuntime.all;
437
449
  * your data and then apply operations to it.
438
450
  *
439
451
  * @example
452
+ * ```ts
440
453
  * import { Effect, pipe } from "effect"
441
454
  *
442
455
  * const task1 = Effect.succeed(1).pipe(
@@ -460,6 +473,7 @@ const all = exports.all = fiberRuntime.all;
460
473
  * // timestamp=... level=INFO fiber=#3 message="task2 done"
461
474
  * // timestamp=... level=INFO fiber=#2 message="task1 done"
462
475
  * // [ 1, 'hello' ]
476
+ * ```
463
477
  *
464
478
  * @since 2.0.0
465
479
  * @category Collecting
@@ -521,6 +535,7 @@ const filter = exports.filter = fiberRuntime.filter;
521
535
  * @see {@link filter} for concurrent filtering without mapping.
522
536
  *
523
537
  * @example
538
+ * ```ts
524
539
  * import { Console, Effect, Option } from "effect"
525
540
  *
526
541
  * const task = (n: number) =>
@@ -541,6 +556,7 @@ const filter = exports.filter = fiberRuntime.filter;
541
556
  * // task3 done
542
557
  * // task4 done
543
558
  * // [ 2, 4 ]
559
+ * ```
544
560
  *
545
561
  * @since 2.0.0
546
562
  * @category Filtering
@@ -577,6 +593,7 @@ const findFirst = exports.findFirst = effect.findFirst;
577
593
  * @see {@link all} for combining multiple effects into one.
578
594
  *
579
595
  * @example
596
+ * ```ts
580
597
  * // Title: Applying Effects to Iterable Elements
581
598
  * import { Effect, Console } from "effect"
582
599
  *
@@ -592,6 +609,7 @@ const findFirst = exports.findFirst = effect.findFirst;
592
609
  * // Currently at index 3
593
610
  * // Currently at index 4
594
611
  * // [ 2, 4, 6, 8, 10 ]
612
+ * ```
595
613
  *
596
614
  * @example
597
615
  * // Title: Using discard to Ignore Results
@@ -650,6 +668,7 @@ const mergeAll = exports.mergeAll = fiberRuntime.mergeAll;
650
668
  * @see {@link validateFirst} for a function that stops at the first success.
651
669
  *
652
670
  * @example
671
+ * ```ts
653
672
  * import { Effect } from "effect"
654
673
  *
655
674
  * // ┌─── Effect<[string[], number[]], never, never>
@@ -665,6 +684,7 @@ const mergeAll = exports.mergeAll = fiberRuntime.mergeAll;
665
684
  * Effect.runPromise(program).then(console.log, console.error)
666
685
  * // Output:
667
686
  * // [ [ '1 is not even', '3 is not even' ], [ 0, 2, 4 ] ]
687
+ * ```
668
688
  *
669
689
  * @since 2.0.0
670
690
  * @category Error Accumulation
@@ -745,6 +765,7 @@ const takeWhile = exports.takeWhile = effect.takeWhile;
745
765
  * @see {@link partition} when you need to separate successes and failures instead of losing successes with errors.
746
766
  *
747
767
  * @example
768
+ * ```ts
748
769
  * import { Effect, Console } from "effect"
749
770
  *
750
771
  * // ┌─── Effect<number[], string[], never>
@@ -771,6 +792,7 @@ const takeWhile = exports.takeWhile = effect.takeWhile;
771
792
  * // failure: [ '4 is not less that 4', '5 is not less that 4' ]
772
793
  * // }
773
794
  * // }
795
+ * ```
774
796
  *
775
797
  * @since 2.0.0
776
798
  * @category Error Accumulation
@@ -792,6 +814,7 @@ const validateAll = exports.validateAll = fiberRuntime.validateAll;
792
814
  * @see {@link firstSuccessOf} for a similar function that processes multiple effects and returns the first successful one or the last error.
793
815
  *
794
816
  * @example
817
+ * ```ts
795
818
  * import { Effect, Console } from "effect"
796
819
  *
797
820
  * // ┌─── Effect<number, string[], never>
@@ -808,6 +831,7 @@ const validateAll = exports.validateAll = fiberRuntime.validateAll;
808
831
  * // Output:
809
832
  * // item 4
810
833
  * // 4
834
+ * ```
811
835
  *
812
836
  * @since 2.0.0
813
837
  * @category Error Accumulation
@@ -838,6 +862,7 @@ const validateFirst = exports.validateFirst = fiberRuntime.validateFirst;
838
862
  * behavior of the returned effect.
839
863
  *
840
864
  * @example
865
+ * ```ts
841
866
  * // Title: Wrapping a Callback API
842
867
  * import { Effect } from "effect"
843
868
  * import * as NodeFS from "node:fs"
@@ -858,6 +883,7 @@ const validateFirst = exports.validateFirst = fiberRuntime.validateFirst;
858
883
  * // ┌─── Effect<Buffer, Error, never>
859
884
  * // ▼
860
885
  * const program = readFile("example.txt")
886
+ * ```
861
887
  *
862
888
  * @example
863
889
  * // Title: Handling Interruption with Cleanup
@@ -948,12 +974,14 @@ const asyncEffect = exports.asyncEffect = _runtime.asyncEffect;
948
974
  * the "this" of the effect.
949
975
  *
950
976
  * @example
977
+ * ```ts
951
978
  * import { Effect } from "effect"
952
979
  *
953
980
  * const throwingFunction = () => { throw new Error() }
954
981
  * const blowUp = Effect.custom(throwingFunction, function() {
955
982
  * return Effect.succeed(this.effect_instruction_i0())
956
983
  * })
984
+ * ```
957
985
  *
958
986
  * @since 2.0.0
959
987
  * @category Creating Effects
@@ -976,6 +1004,7 @@ const withFiberRuntime = exports.withFiberRuntime = core.withFiberRuntime;
976
1004
  * @see {@link succeed} to create an effect that represents a successful value.
977
1005
  *
978
1006
  * @example
1007
+ * ```ts
979
1008
  * // Title: Creating a Failed Effect
980
1009
  * import { Effect } from "effect"
981
1010
  *
@@ -984,6 +1013,7 @@ const withFiberRuntime = exports.withFiberRuntime = core.withFiberRuntime;
984
1013
  * const failure = Effect.fail(
985
1014
  * new Error("Operation failed due to network error")
986
1015
  * )
1016
+ * ```
987
1017
  *
988
1018
  * @since 2.0.0
989
1019
  * @category Creating Effects
@@ -1025,6 +1055,7 @@ const failCauseSync = exports.failCauseSync = core.failCauseSync;
1025
1055
  * @see {@link dieMessage} for a variant that throws a `RuntimeException` with a message.
1026
1056
  *
1027
1057
  * @example
1058
+ * ```ts
1028
1059
  * // Title: Terminating on Division by Zero with a Specified Error
1029
1060
  * import { Effect } from "effect"
1030
1061
  *
@@ -1041,6 +1072,7 @@ const failCauseSync = exports.failCauseSync = core.failCauseSync;
1041
1072
  * // Output:
1042
1073
  * // (FiberFailure) Error: Cannot divide by zero
1043
1074
  * // ...stack trace...
1075
+ * ```
1044
1076
  *
1045
1077
  * @since 2.0.0
1046
1078
  * @category Creating Effects
@@ -1069,6 +1101,7 @@ const die = exports.die = core.die;
1069
1101
  * lazily.
1070
1102
  *
1071
1103
  * @example
1104
+ * ```ts
1072
1105
  * // Title: Terminating on Division by Zero with a Specified Message
1073
1106
  * import { Effect } from "effect"
1074
1107
  *
@@ -1085,6 +1118,7 @@ const die = exports.die = core.die;
1085
1118
  * // Output:
1086
1119
  * // (FiberFailure) RuntimeException: Cannot divide by zero
1087
1120
  * // ...stack trace...
1121
+ * ```
1088
1122
  *
1089
1123
  * @since 2.0.0
1090
1124
  * @category Creating Effects
@@ -1118,6 +1152,7 @@ const dieSync = exports.dieSync = core.dieSync;
1118
1152
  * effects and return the final result at the end.
1119
1153
  *
1120
1154
  * @example
1155
+ * ```ts
1121
1156
  * import { Effect } from "effect"
1122
1157
  *
1123
1158
  * const addServiceCharge = (amount: number) => amount + 1
@@ -1144,6 +1179,7 @@ const dieSync = exports.dieSync = core.dieSync;
1144
1179
  * const finalAmount = addServiceCharge(discountedAmount)
1145
1180
  * return `Final amount to charge: ${finalAmount}`
1146
1181
  * })
1182
+ * ```
1147
1183
  *
1148
1184
  * @since 2.0.0
1149
1185
  * @category Creating Effects
@@ -1190,6 +1226,7 @@ const none = exports.none = effect.none;
1190
1226
  * @see {@link tryPromise} for a version that can handle failures.
1191
1227
  *
1192
1228
  * @example
1229
+ * ```ts
1193
1230
  * // Title: Delayed Message
1194
1231
  * import { Effect } from "effect"
1195
1232
  *
@@ -1206,6 +1243,7 @@ const none = exports.none = effect.none;
1206
1243
  * // ┌─── Effect<string, never, never>
1207
1244
  * // ▼
1208
1245
  * const program = delay("Async operation completed successfully!")
1246
+ * ```
1209
1247
  *
1210
1248
  * @since 2.0.0
1211
1249
  * @category Creating Effects
@@ -1222,6 +1260,7 @@ const promise = exports.promise = effect.promise;
1222
1260
  * @see {@link fail} to create an effect that represents a failure.
1223
1261
  *
1224
1262
  * @example
1263
+ * ```ts
1225
1264
  * // Title: Creating a Successful Effect
1226
1265
  * import { Effect } from "effect"
1227
1266
  *
@@ -1230,6 +1269,7 @@ const promise = exports.promise = effect.promise;
1230
1269
  * // ┌─── Effect<number, never, never>
1231
1270
  * // ▼
1232
1271
  * const success = Effect.succeed(42)
1272
+ * ```
1233
1273
  *
1234
1274
  * @since 2.0.0
1235
1275
  * @category Creating Effects
@@ -1264,6 +1304,7 @@ const succeedSome = exports.succeedSome = effect.succeedSome;
1264
1304
  * - **Unifying Return Types**: Can help TypeScript unify return types in situations where multiple branches of logic return different effects, simplifying type inference.
1265
1305
  *
1266
1306
  * @example
1307
+ * ```ts
1267
1308
  * // Title: Lazy Evaluation with Side Effects
1268
1309
  * import { Effect } from "effect"
1269
1310
  *
@@ -1278,6 +1319,7 @@ const succeedSome = exports.succeedSome = effect.succeedSome;
1278
1319
  *
1279
1320
  * console.log(Effect.runSync(good)) // Output: 1
1280
1321
  * console.log(Effect.runSync(good)) // Output: 2
1322
+ * ```
1281
1323
  *
1282
1324
  * @example
1283
1325
  * // Title: Recursive Fibonacci
@@ -1350,6 +1392,7 @@ const suspend = exports.suspend = core.suspend;
1350
1392
  * @see {@link try_ | try} for a version that can handle failures.
1351
1393
  *
1352
1394
  * @example
1395
+ * ```ts
1353
1396
  * // Title: Logging a Message
1354
1397
  * import { Effect } from "effect"
1355
1398
  *
@@ -1361,6 +1404,7 @@ const suspend = exports.suspend = core.suspend;
1361
1404
  * // ┌─── Effect<void, never, never>
1362
1405
  * // ▼
1363
1406
  * const program = log("Hello, World!")
1407
+ * ```
1364
1408
  *
1365
1409
  * @since 2.0.0
1366
1410
  * @category Creating Effects
@@ -1389,6 +1433,7 @@ const _catch = exports.catch = effect._catch;
1389
1433
  * @see {@link catchAllCause} for a version that can recover from both recoverable and unrecoverable errors.
1390
1434
  *
1391
1435
  * @example
1436
+ * ```ts
1392
1437
  * // Title: Providing Recovery Logic for Recoverable Errors
1393
1438
  * import { Effect, Random } from "effect"
1394
1439
  *
@@ -1421,6 +1466,7 @@ const _catch = exports.catch = effect._catch;
1421
1466
  * Effect.succeed(`Recovering from ${error._tag}`)
1422
1467
  * )
1423
1468
  * )
1469
+ * ```
1424
1470
  *
1425
1471
  * @since 2.0.0
1426
1472
  * @category Error handling
@@ -1444,6 +1490,7 @@ const catchAll = exports.catchAll = core.catchAll;
1444
1490
  * dynamically loaded plugins, controlled recovery might be needed.
1445
1491
  *
1446
1492
  * @example
1493
+ * ```ts
1447
1494
  * // Title: Recovering from All Errors
1448
1495
  * import { Cause, Effect } from "effect"
1449
1496
  *
@@ -1461,6 +1508,7 @@ const catchAll = exports.catchAll = core.catchAll;
1461
1508
  *
1462
1509
  * Effect.runPromise(recovered).then(console.log)
1463
1510
  * // Output: "Recovered from a regular error"
1511
+ * ```
1464
1512
  *
1465
1513
  * @since 2.0.0
1466
1514
  * @category Error handling
@@ -1490,6 +1538,7 @@ const catchAllCause = exports.catchAllCause = core.catchAllCause;
1490
1538
  * dynamically loaded plugins, controlled recovery might be needed.
1491
1539
  *
1492
1540
  * @example
1541
+ * ```ts
1493
1542
  * // Title: Handling All Defects
1494
1543
  * import { Effect, Cause, Console } from "effect"
1495
1544
  *
@@ -1514,6 +1563,7 @@ const catchAllCause = exports.catchAllCause = core.catchAllCause;
1514
1563
  * // _tag: "Success",
1515
1564
  * // value: undefined
1516
1565
  * // }
1566
+ * ```
1517
1567
  *
1518
1568
  * @since 2.0.0
1519
1569
  * @category Error handling
@@ -1531,6 +1581,7 @@ const catchAllDefect = exports.catchAllDefect = effect.catchAllDefect;
1531
1581
  * error type unless a user-defined type guard is used to narrow the type.
1532
1582
  *
1533
1583
  * @example
1584
+ * ```ts
1534
1585
  * // Title: Catching Specific Errors with a Predicate
1535
1586
  * import { Effect, Random } from "effect"
1536
1587
  *
@@ -1565,6 +1616,7 @@ const catchAllDefect = exports.catchAllDefect = effect.catchAllDefect;
1565
1616
  * () => Effect.succeed("Recovering from HttpError")
1566
1617
  * )
1567
1618
  * )
1619
+ * ```
1568
1620
  *
1569
1621
  * @since 2.0.0
1570
1622
  * @category Error handling
@@ -1585,6 +1637,7 @@ const catchIf = exports.catchIf = core.catchIf;
1585
1637
  * @see {@link catchIf} for a version that allows you to recover from errors based on a predicate.
1586
1638
  *
1587
1639
  * @example
1640
+ * ```ts
1588
1641
  * // Title: Handling Specific Errors with Effect.catchSome
1589
1642
  * import { Effect, Random, Option } from "effect"
1590
1643
  *
@@ -1622,6 +1675,7 @@ const catchIf = exports.catchIf = core.catchIf;
1622
1675
  * }
1623
1676
  * })
1624
1677
  * )
1678
+ * ```
1625
1679
  *
1626
1680
  * @since 2.0.0
1627
1681
  * @category Error handling
@@ -1661,6 +1715,7 @@ const catchSomeCause = exports.catchSomeCause = effect.catchSomeCause;
1661
1715
  * - If the defect does not match, the function returns `Option.none`, allowing the defect to propagate.
1662
1716
  *
1663
1717
  * @example
1718
+ * ```ts
1664
1719
  * // Title: Handling Specific Defects
1665
1720
  * import { Effect, Cause, Option, Console } from "effect"
1666
1721
  *
@@ -1691,6 +1746,7 @@ const catchSomeCause = exports.catchSomeCause = effect.catchSomeCause;
1691
1746
  * // defect: { _tag: 'RuntimeException' }
1692
1747
  * // }
1693
1748
  * // }
1749
+ * ```
1694
1750
  *
1695
1751
  * @since 2.0.0
1696
1752
  * @category Error handling
@@ -1714,6 +1770,7 @@ const catchSomeDefect = exports.catchSomeDefect = effect.catchSomeDefect;
1714
1770
  * types at once.
1715
1771
  *
1716
1772
  * @example
1773
+ * ```ts
1717
1774
  * // Title: Handling Errors by Tag
1718
1775
  * import { Effect, Random } from "effect"
1719
1776
  *
@@ -1747,6 +1804,7 @@ const catchSomeDefect = exports.catchSomeDefect = effect.catchSomeDefect;
1747
1804
  * Effect.succeed("Recovering from HttpError")
1748
1805
  * )
1749
1806
  * )
1807
+ * ```
1750
1808
  *
1751
1809
  * @since 2.0.0
1752
1810
  * @category Error handling
@@ -1767,6 +1825,7 @@ const catchTag = exports.catchTag = effect.catchTag;
1767
1825
  * field is used to identify and match errors.
1768
1826
  *
1769
1827
  * @example
1828
+ * ```ts
1770
1829
  * // Title: Handling Multiple Tagged Error Types at Once
1771
1830
  * import { Effect, Random } from "effect"
1772
1831
  *
@@ -1802,6 +1861,7 @@ const catchTag = exports.catchTag = effect.catchTag;
1802
1861
  * Effect.succeed(`Recovering from ValidationError`)
1803
1862
  * })
1804
1863
  * )
1864
+ * ```
1805
1865
  *
1806
1866
  * @since 2.0.0
1807
1867
  * @category Error handling
@@ -1819,6 +1879,7 @@ const catchTags = exports.catchTags = effect.catchTags;
1819
1879
  * interruptions, etc.).
1820
1880
  *
1821
1881
  * @example
1882
+ * ```ts
1822
1883
  * import { Effect, Console } from "effect"
1823
1884
  *
1824
1885
  * // ┌─── Effect<number, string, never>
@@ -1831,6 +1892,7 @@ const catchTags = exports.catchTags = effect.catchTags;
1831
1892
  * const cause = yield* Effect.cause(program)
1832
1893
  * yield* Console.log(cause)
1833
1894
  * })
1895
+ * ```
1834
1896
  *
1835
1897
  * @since 2.0.0
1836
1898
  * @category Error handling
@@ -1852,6 +1914,7 @@ const eventually = exports.eventually = effect.eventually;
1852
1914
  * side effects of the effect and do not need to handle or process its outcome.
1853
1915
  *
1854
1916
  * @example
1917
+ * ```ts
1855
1918
  * import { Effect } from "effect"
1856
1919
  *
1857
1920
  * // ┌─── Effect<number, string, never>
@@ -1861,6 +1924,7 @@ const eventually = exports.eventually = effect.eventually;
1861
1924
  * // ┌─── Effect<void, never, never>
1862
1925
  * // ▼
1863
1926
  * const program = Effect.ignore(task)
1927
+ * ```
1864
1928
  *
1865
1929
  * @since 2.0.0
1866
1930
  * @category Error handling
@@ -1886,6 +1950,7 @@ const ignoreLogged = exports.ignoreLogged = effect.ignoreLogged;
1886
1950
  * it easier to manage and respond to errors from multiple operations at once.
1887
1951
  *
1888
1952
  * @example
1953
+ * ```ts
1889
1954
  * import { Effect } from "effect"
1890
1955
  *
1891
1956
  * const fail1 = Effect.fail("Oh uh!")
@@ -1904,6 +1969,7 @@ const ignoreLogged = exports.ignoreLogged = effect.ignoreLogged;
1904
1969
  * // _tag: 'Failure',
1905
1970
  * // cause: { _id: 'Cause', _tag: 'Fail', failure: [ 'Oh uh!', 'Oh no!' ] }
1906
1971
  * // }
1972
+ * ```
1907
1973
  *
1908
1974
  * @since 2.0.0
1909
1975
  * @category Error handling
@@ -1925,6 +1991,7 @@ const parallelErrors = exports.parallelErrors = effect.parallelErrors;
1925
1991
  * @see {@link unsandbox} to restore the original error handling.
1926
1992
  *
1927
1993
  * @example
1994
+ * ```ts
1928
1995
  * import { Effect, Console } from "effect"
1929
1996
  *
1930
1997
  * // ┌─── Effect<string, Error, never>
@@ -1959,6 +2026,7 @@ const parallelErrors = exports.parallelErrors = effect.parallelErrors;
1959
2026
  * // Output:
1960
2027
  * // Caught a defect: Oh uh!
1961
2028
  * // fallback result on failure
2029
+ * ```
1962
2030
  *
1963
2031
  * @since 2.0.0
1964
2032
  * @category Error handling
@@ -1981,6 +2049,7 @@ const sandbox = exports.sandbox = effect.sandbox;
1981
2049
  * @see {@link retryOrElse} for a version that allows you to run a fallback.
1982
2050
  *
1983
2051
  * @example
2052
+ * ```ts
1984
2053
  * import { Effect, Schedule } from "effect"
1985
2054
  *
1986
2055
  * let count = 0
@@ -2009,6 +2078,7 @@ const sandbox = exports.sandbox = effect.sandbox;
2009
2078
  * // failure
2010
2079
  * // success
2011
2080
  * // yay!
2081
+ * ```
2012
2082
  *
2013
2083
  * @since 2.0.0
2014
2084
  * @category Error handling
@@ -2026,6 +2096,7 @@ const retry = exports.retry = _schedule.retry_combined;
2026
2096
  * @see {@link retry} for a version that does not run a fallback effect.
2027
2097
  *
2028
2098
  * @example
2099
+ * ```ts
2029
2100
  * import { Effect, Schedule, Console } from "effect"
2030
2101
  *
2031
2102
  * let count = 0
@@ -2057,6 +2128,7 @@ const retry = exports.retry = _schedule.retry_combined;
2057
2128
  * // failure
2058
2129
  * // orElse
2059
2130
  * // default value
2131
+ * ```
2060
2132
  *
2061
2133
  * @since 2.0.0
2062
2134
  * @category Error handling
@@ -2113,6 +2185,7 @@ const tryMapPromise = exports.tryMapPromise = effect.tryMapPromise;
2113
2185
  * @see {@link promise} if the effectful computation is asynchronous and does not throw errors.
2114
2186
  *
2115
2187
  * @example
2188
+ * ```ts
2116
2189
  * // Title: Fetching a TODO Item
2117
2190
  * import { Effect } from "effect"
2118
2191
  *
@@ -2125,6 +2198,7 @@ const tryMapPromise = exports.tryMapPromise = effect.tryMapPromise;
2125
2198
  * // ┌─── Effect<Response, UnknownException, never>
2126
2199
  * // ▼
2127
2200
  * const program = getTodo(1)
2201
+ * ```
2128
2202
  *
2129
2203
  * @example
2130
2204
  * // Title: Custom Error Handling
@@ -2207,6 +2281,7 @@ const checkInterruptible = exports.checkInterruptible = core.checkInterruptible;
2207
2281
  * @see {@link Effect.uninterruptible} for creating an uninterruptible effect.
2208
2282
  *
2209
2283
  * @example
2284
+ * ```ts
2210
2285
  * import { Effect } from "effect"
2211
2286
  *
2212
2287
  * const longRunningTask = Effect.gen(function* () {
@@ -2236,6 +2311,7 @@ const checkInterruptible = exports.checkInterruptible = core.checkInterruptible;
2236
2311
  * // }
2237
2312
  * // }
2238
2313
  * // Heavy processing done.
2314
+ * ```
2239
2315
  *
2240
2316
  * @since 2.0.0
2241
2317
  * @category Interruption
@@ -2281,6 +2357,7 @@ const uninterruptibleMask = exports.uninterruptibleMask = core.uninterruptibleMa
2281
2357
  * or failing with specified error if the predicate fails
2282
2358
  *
2283
2359
  * @example
2360
+ * ```ts
2284
2361
  * import { Effect } from "effect"
2285
2362
  *
2286
2363
  * const isPositive = (n: number): boolean => n > 0
@@ -2290,6 +2367,7 @@ const uninterruptibleMask = exports.uninterruptibleMask = core.uninterruptibleMa
2290
2367
  *
2291
2368
  * // fails with `"0 is not positive"`
2292
2369
  * Effect.liftPredicate(0, isPositive, n => `${n} is not positive`)
2370
+ * ```
2293
2371
  *
2294
2372
  * @category Condition Checking
2295
2373
  * @since 3.4.0
@@ -2302,6 +2380,7 @@ const liftPredicate = exports.liftPredicate = effect.liftPredicate;
2302
2380
  * replace it with a new constant value.
2303
2381
  *
2304
2382
  * @example
2383
+ * ```ts
2305
2384
  * // Title: Replacing a Value
2306
2385
  * import { pipe, Effect } from "effect"
2307
2386
  *
@@ -2310,6 +2389,7 @@ const liftPredicate = exports.liftPredicate = effect.liftPredicate;
2310
2389
  *
2311
2390
  * Effect.runPromise(program).then(console.log)
2312
2391
  * // Output: "new value"
2392
+ * ```
2313
2393
  *
2314
2394
  * @since 2.0.0
2315
2395
  * @category Mapping
@@ -2353,6 +2433,7 @@ const asVoid = exports.asVoid = core.asVoid;
2353
2433
  * treat an error as a valid result.
2354
2434
  *
2355
2435
  * @example
2436
+ * ```ts
2356
2437
  * import { Effect } from "effect"
2357
2438
  *
2358
2439
  * // ┌─── Effect<number, string, never>
@@ -2362,6 +2443,7 @@ const asVoid = exports.asVoid = core.asVoid;
2362
2443
  * // ┌─── Effect<string, number, never>
2363
2444
  * // ▼
2364
2445
  * const flipped = Effect.flip(program)
2446
+ * ```
2365
2447
  *
2366
2448
  * @since 2.0.0
2367
2449
  * @category Mapping
@@ -2402,6 +2484,7 @@ const flipWith = exports.flipWith = effect.flipWith;
2402
2484
  * @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
2403
2485
  *
2404
2486
  * @example
2487
+ * ```ts
2405
2488
  * // Title: Adding a Service Charge
2406
2489
  * import { pipe, Effect } from "effect"
2407
2490
  *
@@ -2416,6 +2499,7 @@ const flipWith = exports.flipWith = effect.flipWith;
2416
2499
  *
2417
2500
  * Effect.runPromise(finalAmount).then(console.log)
2418
2501
  * // Output: 101
2502
+ * ```
2419
2503
  * @since 2.0.0
2420
2504
  * @category Mapping
2421
2505
  */
@@ -2440,6 +2524,7 @@ const map = exports.map = core.map;
2440
2524
  * input collection type.
2441
2525
  *
2442
2526
  * @example
2527
+ * ```ts
2443
2528
  * import { Effect } from "effect"
2444
2529
  *
2445
2530
  * // Define an initial state and a transformation function
@@ -2458,6 +2543,7 @@ const map = exports.map = core.map;
2458
2543
  * // Output:
2459
2544
  * // 6
2460
2545
  * // [ 'A', 'BB', 'CCC' ]
2546
+ * ```
2461
2547
  *
2462
2548
  * @since 2.0.0
2463
2549
  * @category Mapping
@@ -2476,6 +2562,7 @@ const mapAccum = exports.mapAccum = effect.mapAccum;
2476
2562
  * @see {@link mapError} for a version that operates on the error channel.
2477
2563
  *
2478
2564
  * @example
2565
+ * ```ts
2479
2566
  * import { Effect } from "effect"
2480
2567
  *
2481
2568
  * // ┌─── Effect<number, string, never>
@@ -2488,6 +2575,7 @@ const mapAccum = exports.mapAccum = effect.mapAccum;
2488
2575
  * onFailure: (message) => new Error(message),
2489
2576
  * onSuccess: (n) => n > 0
2490
2577
  * })
2578
+ * ```
2491
2579
  *
2492
2580
  * @since 2.0.0
2493
2581
  * @category Mapping
@@ -2507,6 +2595,7 @@ const mapBoth = exports.mapBoth = core.mapBoth;
2507
2595
  * @see {@link orElseFail} if you want to replace the error with a new one.
2508
2596
  *
2509
2597
  * @example
2598
+ * ```ts
2510
2599
  * import { Effect } from "effect"
2511
2600
  *
2512
2601
  * // ┌─── Effect<number, string, never>
@@ -2519,6 +2608,7 @@ const mapBoth = exports.mapBoth = core.mapBoth;
2519
2608
  * simulatedTask,
2520
2609
  * (message) => new Error(message)
2521
2610
  * )
2611
+ * ```
2522
2612
  *
2523
2613
  * @since 2.0.0
2524
2614
  * @category Mapping
@@ -2546,6 +2636,7 @@ const mapErrorCause = exports.mapErrorCause = effect.mapErrorCause;
2546
2636
  * errors as part of the outcome.
2547
2637
  *
2548
2638
  * @example
2639
+ * ```ts
2549
2640
  * import { Effect } from "effect"
2550
2641
  *
2551
2642
  * // ┌─── Effect<number, string, never>
@@ -2555,6 +2646,7 @@ const mapErrorCause = exports.mapErrorCause = effect.mapErrorCause;
2555
2646
  * // ┌─── Effect<number | string, never, never>
2556
2647
  * // ▼
2557
2648
  * const recovered = Effect.merge(program)
2649
+ * ```
2558
2650
  *
2559
2651
  * @since 2.0.0
2560
2652
  * @category Mapping
@@ -3026,6 +3118,7 @@ const timedWith = exports.timedWith = effect.timedWith;
3026
3118
  * @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
3027
3119
  *
3028
3120
  * @example
3121
+ * ```ts
3029
3122
  * import { Effect } from "effect"
3030
3123
  *
3031
3124
  * const task = Effect.gen(function* () {
@@ -3051,6 +3144,7 @@ const timedWith = exports.timedWith = effect.timedWith;
3051
3144
  * // failure: { _tag: 'TimeoutException' }
3052
3145
  * // }
3053
3146
  * // }
3147
+ * ```
3054
3148
  *
3055
3149
  * @since 2.0.0
3056
3150
  * @category delays & timeouts
@@ -3076,6 +3170,7 @@ const timeout = exports.timeout = circular.timeout;
3076
3170
  * @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
3077
3171
  *
3078
3172
  * @example
3173
+ * ```ts
3079
3174
  * import { Effect } from "effect"
3080
3175
  *
3081
3176
  * const task = Effect.gen(function* () {
@@ -3099,6 +3194,7 @@ const timeout = exports.timeout = circular.timeout;
3099
3194
  * // { _id: 'Option', _tag: 'Some', value: 'Result' },
3100
3195
  * // { _id: 'Option', _tag: 'None' }
3101
3196
  * // ]
3197
+ * ```
3102
3198
  *
3103
3199
  * @since 3.1.0
3104
3200
  * @category delays & timeouts
@@ -3123,6 +3219,7 @@ const timeoutOption = exports.timeoutOption = circular.timeoutOption;
3123
3219
  * @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
3124
3220
  *
3125
3221
  * @example
3222
+ * ```ts
3126
3223
  * import { Effect } from "effect"
3127
3224
  *
3128
3225
  * const task = Effect.gen(function* () {
@@ -3155,6 +3252,7 @@ const timeoutOption = exports.timeoutOption = circular.timeoutOption;
3155
3252
  * // failure: MyTimeoutError { _tag: 'MyTimeoutError' }
3156
3253
  * // }
3157
3254
  * // }
3255
+ * ```
3158
3256
  *
3159
3257
  * @since 2.0.0
3160
3258
  * @category delays & timeouts
@@ -3178,6 +3276,7 @@ const timeoutFail = exports.timeoutFail = circular.timeoutFail;
3178
3276
  * @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
3179
3277
  *
3180
3278
  * @example
3279
+ * ```ts
3181
3280
  * import { Effect, Cause } from "effect"
3182
3281
  *
3183
3282
  * const task = Effect.gen(function* () {
@@ -3202,6 +3301,7 @@ const timeoutFail = exports.timeoutFail = circular.timeoutFail;
3202
3301
  * // _tag: 'Failure',
3203
3302
  * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Timed out!' }
3204
3303
  * // }
3304
+ * ```
3205
3305
  *
3206
3306
  * @since 2.0.0
3207
3307
  * @category delays & timeouts
@@ -3229,6 +3329,7 @@ const timeoutFailCause = exports.timeoutFailCause = circular.timeoutFailCause;
3229
3329
  * @see {@link timeoutFailCause} for a version that raises a custom defect.
3230
3330
  *
3231
3331
  * @example
3332
+ * ```ts
3232
3333
  * import { Effect, Either } from "effect"
3233
3334
  *
3234
3335
  * const task = Effect.gen(function* () {
@@ -3256,6 +3357,7 @@ const timeoutFailCause = exports.timeoutFailCause = circular.timeoutFailCause;
3256
3357
  * // _tag: "Left",
3257
3358
  * // left: "Timed out!"
3258
3359
  * // }
3360
+ * ```
3259
3361
  *
3260
3362
  * @since 2.0.0
3261
3363
  * @category delays & timeouts
@@ -3322,6 +3424,7 @@ const mapInputContext = exports.mapInputContext = core.mapInputContext;
3322
3424
  * @see {@link provideService} for providing a service to an effect.
3323
3425
  *
3324
3426
  * @example
3427
+ * ```ts
3325
3428
  * import { Context, Effect, Layer } from "effect"
3326
3429
  *
3327
3430
  * class Database extends Context.Tag("Database")<
@@ -3353,6 +3456,7 @@ const mapInputContext = exports.mapInputContext = core.mapInputContext;
3353
3456
  * // Output:
3354
3457
  * // timestamp=... level=INFO fiber=#0 message="Executing query: SELECT * FROM users"
3355
3458
  * // []
3459
+ * ```
3356
3460
  *
3357
3461
  * @since 2.0.0
3358
3462
  * @category Context
@@ -3371,6 +3475,7 @@ const provide = exports.provide = layer.effect_provide;
3371
3475
  * @see {@link provide} for providing multiple layers to an effect.
3372
3476
  *
3373
3477
  * @example
3478
+ * ```ts
3374
3479
  * import { Effect, Context } from "effect"
3375
3480
  *
3376
3481
  * // Declaring a tag for a service that generates random numbers
@@ -3398,6 +3503,7 @@ const provide = exports.provide = layer.effect_provide;
3398
3503
  * Effect.runPromise(runnable)
3399
3504
  * // Example Output:
3400
3505
  * // random number: 0.8241872233134417
3506
+ * ```
3401
3507
  *
3402
3508
  * @since 2.0.0
3403
3509
  * @category Context
@@ -3468,6 +3574,7 @@ const updateService = exports.updateService = effect.updateService;
3468
3574
  * @see {@link let_ let}
3469
3575
  *
3470
3576
  * @example
3577
+ * ```ts
3471
3578
  * import { Effect, pipe } from "effect"
3472
3579
  *
3473
3580
  * const result = pipe(
@@ -3477,6 +3584,7 @@ const updateService = exports.updateService = effect.updateService;
3477
3584
  * Effect.let("sum", ({ x, y }) => x + y)
3478
3585
  * )
3479
3586
  * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 })
3587
+ * ```
3480
3588
  *
3481
3589
  * @category Do notation
3482
3590
  * @since 2.0.0
@@ -3497,6 +3605,7 @@ const Do = exports.Do = effect.Do;
3497
3605
  * @see {@link let_ let}
3498
3606
  *
3499
3607
  * @example
3608
+ * ```ts
3500
3609
  * import { Effect, pipe } from "effect"
3501
3610
  *
3502
3611
  * const result = pipe(
@@ -3506,6 +3615,7 @@ const Do = exports.Do = effect.Do;
3506
3615
  * Effect.let("sum", ({ x, y }) => x + y)
3507
3616
  * )
3508
3617
  * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 })
3618
+ * ```
3509
3619
  *
3510
3620
  * @category Do notation
3511
3621
  * @since 2.0.0
@@ -3517,6 +3627,7 @@ const bind = exports.bind = effect.bind;
3517
3627
  * results in a Do notation pipeline.
3518
3628
  *
3519
3629
  * @example
3630
+ * ```ts
3520
3631
  * import { Effect, Either, pipe } from "effect"
3521
3632
  *
3522
3633
  * const result = pipe(
@@ -3528,6 +3639,7 @@ const bind = exports.bind = effect.bind;
3528
3639
  * }), { concurrency: 2, mode: "either" })
3529
3640
  * )
3530
3641
  * assert.deepStrictEqual(Effect.runSync(result), { x: 2, a: Either.right(2), b: Either.left("oops") })
3642
+ * ```
3531
3643
  *
3532
3644
  * @category Do notation
3533
3645
  * @since 3.7.0
@@ -3548,6 +3660,7 @@ const bindAll = exports.bindAll = circular.bindAll;
3548
3660
  * @see {@link let_ let}
3549
3661
  *
3550
3662
  * @example
3663
+ * ```ts
3551
3664
  * import { Effect, pipe } from "effect"
3552
3665
  *
3553
3666
  * const result = pipe(
@@ -3557,6 +3670,7 @@ const bindAll = exports.bindAll = circular.bindAll;
3557
3670
  * Effect.let("sum", ({ x, y }) => x + y)
3558
3671
  * )
3559
3672
  * assert.deepStrictEqual(Effect.runSync(result), { x: 2, y: 3, sum: 5 })
3673
+ * ```
3560
3674
  *
3561
3675
  * @category Do notation
3562
3676
  * @since 2.0.0
@@ -3581,6 +3695,7 @@ const let_ = exports.let = effect.let_;
3581
3695
  * @see {@link exit} for a version that uses `Exit` instead.
3582
3696
  *
3583
3697
  * @example
3698
+ * ```ts
3584
3699
  * // Title: Using Effect.option to Handle Errors
3585
3700
  * import { Effect } from "effect"
3586
3701
  *
@@ -3613,6 +3728,7 @@ const let_ = exports.let = effect.let_;
3613
3728
  * // _tag: 'Failure',
3614
3729
  * // cause: { _id: 'Cause', _tag: 'Die', defect: 'Boom!' }
3615
3730
  * // }
3731
+ * ```
3616
3732
  *
3617
3733
  * @since 2.0.0
3618
3734
  * @category Outcome Encapsulation
@@ -3637,6 +3753,7 @@ const option = exports.option = effect.option;
3637
3753
  * @see {@link exit} for a version that uses `Exit` instead.
3638
3754
  *
3639
3755
  * @example
3756
+ * ```ts
3640
3757
  * import { Effect, Either, Random } from "effect"
3641
3758
  *
3642
3759
  * class HttpError {
@@ -3672,6 +3789,7 @@ const option = exports.option = effect.option;
3672
3789
  * onRight: (value) => value // Do nothing in case of success
3673
3790
  * })
3674
3791
  * })
3792
+ * ```
3675
3793
  *
3676
3794
  * @since 2.0.0
3677
3795
  * @category Outcome Encapsulation
@@ -3694,6 +3812,7 @@ const either = exports.either = core.either;
3694
3812
  * @see {@link either} for a version that uses `Either` instead.
3695
3813
  *
3696
3814
  * @example
3815
+ * ```ts
3697
3816
  * import { Effect, Cause, Console, Exit } from "effect"
3698
3817
  *
3699
3818
  * // Simulating a runtime error
@@ -3725,6 +3844,7 @@ const either = exports.either = core.either;
3725
3844
  * // _tag: "Success",
3726
3845
  * // value: undefined
3727
3846
  * // }
3847
+ * ```
3728
3848
  *
3729
3849
  * @since 2.0.0
3730
3850
  * @category Outcome Encapsulation
@@ -3741,6 +3861,7 @@ const exit = exports.exit = core.exit;
3741
3861
  * failure. Additionally, if the effect is interrupted, the `Deferred` will also be interrupted.
3742
3862
  *
3743
3863
  * @example
3864
+ * ```ts
3744
3865
  * import { Deferred, Effect } from "effect"
3745
3866
  *
3746
3867
  * // Define an effect that succeeds
@@ -3764,6 +3885,7 @@ const exit = exports.exit = core.exit;
3764
3885
  * // Output:
3765
3886
  * // 42
3766
3887
  * // true
3888
+ * ```
3767
3889
  *
3768
3890
  * @since 2.0.0
3769
3891
  * @category Synchronization Utilities
@@ -3805,6 +3927,7 @@ const filterOrElse = exports.filterOrElse = effect.filterOrElse;
3805
3927
  * Let's explore this concept through an example:
3806
3928
  *
3807
3929
  * @example
3930
+ * ```ts
3808
3931
  * import { Effect, pipe } from "effect"
3809
3932
  *
3810
3933
  * // Define a user interface
@@ -3825,6 +3948,7 @@ const filterOrElse = exports.filterOrElse = effect.filterOrElse;
3825
3948
  * // 'user' now has the type `User` (not `User | null`)
3826
3949
  * Effect.andThen((user) => user.name)
3827
3950
  * )
3951
+ * ```
3828
3952
  *
3829
3953
  * @since 2.0.0
3830
3954
  * @category Filtering
@@ -3868,6 +3992,7 @@ const unlessEffect = exports.unlessEffect = effect.unlessEffect;
3868
3992
  * @see {@link unless} for a version that executes the effect when the condition is `false`.
3869
3993
  *
3870
3994
  * @example
3995
+ * ```ts
3871
3996
  * // Title: Conditional Effect Execution
3872
3997
  * import { Effect, Option } from "effect"
3873
3998
  *
@@ -3893,6 +4018,7 @@ const unlessEffect = exports.unlessEffect = effect.unlessEffect;
3893
4018
  * // _id: "Option",
3894
4019
  * // _tag: "None"
3895
4020
  * // }
4021
+ * ```
3896
4022
  *
3897
4023
  * @since 2.0.0
3898
4024
  * @category Conditional Operators
@@ -3916,6 +4042,7 @@ const when = exports.when = effect.when;
3916
4042
  * @see {@link unlessEffect} for a version that executes the effect when the condition is `false`.
3917
4043
  *
3918
4044
  * @example
4045
+ * ```ts
3919
4046
  * // Title: Using an Effect as a Condition
3920
4047
  * import { Effect, Random } from "effect"
3921
4048
  *
@@ -3926,6 +4053,7 @@ const when = exports.when = effect.when;
3926
4053
  * console.log(Effect.runSync(randomIntOption))
3927
4054
  * // Example Output:
3928
4055
  * // { _id: 'Option', _tag: 'Some', value: 8609104974198840 }
4056
+ * ```
3929
4057
  *
3930
4058
  * @since 2.0.0
3931
4059
  * @category Conditional Operators
@@ -3976,6 +4104,7 @@ const whenRef = exports.whenRef = effect.whenRef;
3976
4104
  * changing the original one.
3977
4105
  *
3978
4106
  * @example
4107
+ * ```ts
3979
4108
  * import { pipe, Effect } from "effect"
3980
4109
  *
3981
4110
  * // Function to apply a discount safely to a transaction amount
@@ -3998,6 +4127,7 @@ const whenRef = exports.whenRef = effect.whenRef;
3998
4127
  *
3999
4128
  * Effect.runPromise(finalAmount).then(console.log)
4000
4129
  * // Output: 95
4130
+ * ```
4001
4131
  *
4002
4132
  * @since 2.0.0
4003
4133
  * @category sequencing
@@ -4037,6 +4167,7 @@ const flatMap = exports.flatMap = core.flatMap;
4037
4167
  * treating them as effects.
4038
4168
  *
4039
4169
  * @example
4170
+ * ```ts
4040
4171
  * // Title: Applying a Discount Based on Fetched Amount
4041
4172
  * import { pipe, Effect } from "effect"
4042
4173
  *
@@ -4071,6 +4202,7 @@ const flatMap = exports.flatMap = core.flatMap;
4071
4202
  *
4072
4203
  * Effect.runPromise(result2).then(console.log)
4073
4204
  * // Output: 190
4205
+ * ```
4074
4206
  *
4075
4207
  * @since 2.0.0
4076
4208
  * @category sequencing
@@ -4151,6 +4283,7 @@ const summarized = exports.summarized = effect.summarized;
4151
4283
  * will fail too.
4152
4284
  *
4153
4285
  * @example
4286
+ * ```ts
4154
4287
  * // Title: Logging a step in a pipeline
4155
4288
  * import { Console, Effect, pipe } from "effect"
4156
4289
  *
@@ -4178,6 +4311,7 @@ const summarized = exports.summarized = effect.summarized;
4178
4311
  * // Output:
4179
4312
  * // Apply a discount to: 100
4180
4313
  * // 95
4314
+ * ```
4181
4315
  *
4182
4316
  * @since 2.0.0
4183
4317
  * @category sequencing
@@ -4195,6 +4329,7 @@ const tap = exports.tap = core.tap;
4195
4329
  * altering the result.
4196
4330
  *
4197
4331
  * @example
4332
+ * ```ts
4198
4333
  * import { Effect, Random, Console } from "effect"
4199
4334
  *
4200
4335
  * // Simulate a task that might fail
@@ -4214,6 +4349,7 @@ const tap = exports.tap = core.tap;
4214
4349
  * Effect.runFork(tapping)
4215
4350
  * // Example Output:
4216
4351
  * // failure: random number is negative
4352
+ * ```
4217
4353
  *
4218
4354
  * @since 2.0.0
4219
4355
  * @category sequencing
@@ -4230,6 +4366,7 @@ const tapBoth = exports.tapBoth = effect.tapBoth;
4230
4366
  * severe errors.
4231
4367
  *
4232
4368
  * @example
4369
+ * ```ts
4233
4370
  * import { Effect, Console } from "effect"
4234
4371
  *
4235
4372
  * // Simulate a task that fails with a recoverable error
@@ -4257,6 +4394,7 @@ const tapBoth = exports.tapBoth = effect.tapBoth;
4257
4394
  * // Output:
4258
4395
  * // defect: RuntimeException: Something went wrong
4259
4396
  * // ... stack trace ...
4397
+ * ```
4260
4398
  *
4261
4399
  * @since 2.0.0
4262
4400
  * @category sequencing
@@ -4272,6 +4410,7 @@ const tapDefect = exports.tapDefect = effect.tapDefect;
4272
4410
  * while the operation you provide can inspect or act on it.
4273
4411
  *
4274
4412
  * @example
4413
+ * ```ts
4275
4414
  * import { Effect, Console } from "effect"
4276
4415
  *
4277
4416
  * // Simulate a task that fails with an error
@@ -4285,6 +4424,7 @@ const tapDefect = exports.tapDefect = effect.tapDefect;
4285
4424
  * Effect.runFork(tapping)
4286
4425
  * // Output:
4287
4426
  * // expected error: NetworkError
4427
+ * ```
4288
4428
  *
4289
4429
  * @since 2.0.0
4290
4430
  * @category sequencing
@@ -4300,6 +4440,7 @@ const tapError = exports.tapError = effect.tapError;
4300
4440
  * without modifying the error or the overall result of the effect.
4301
4441
  *
4302
4442
  * @example
4443
+ * ```ts
4303
4444
  * import { Effect, Console } from "effect"
4304
4445
  *
4305
4446
  * class NetworkError {
@@ -4324,6 +4465,7 @@ const tapError = exports.tapError = effect.tapError;
4324
4465
  * Effect.runFork(tapping)
4325
4466
  * // Output:
4326
4467
  * // expected error: 504
4468
+ * ```
4327
4469
  *
4328
4470
  * @since 2.0.0
4329
4471
  * @category sequencing
@@ -4339,6 +4481,7 @@ const tapErrorTag = exports.tapErrorTag = effect.tapErrorTag;
4339
4481
  * altering the error or the overall result of the effect.
4340
4482
  *
4341
4483
  * @example
4484
+ * ```ts
4342
4485
  * import { Effect, Console } from "effect"
4343
4486
  *
4344
4487
  * // Create a task that fails with a NetworkError
@@ -4365,6 +4508,7 @@ const tapErrorTag = exports.tapErrorTag = effect.tapErrorTag;
4365
4508
  * // Output:
4366
4509
  * // error cause: RuntimeException: Something went wrong
4367
4510
  * // ... stack trace ...
4511
+ * ```
4368
4512
  *
4369
4513
  * @since 2.0.0
4370
4514
  * @category sequencing
@@ -4396,6 +4540,7 @@ const forever = exports.forever = effect.forever;
4396
4540
  * ```
4397
4541
  *
4398
4542
  * @example
4543
+ * ```ts
4399
4544
  * // Title: Effectful Iteration
4400
4545
  * import { Effect } from "effect"
4401
4546
  *
@@ -4412,6 +4557,7 @@ const forever = exports.forever = effect.forever;
4412
4557
  *
4413
4558
  * Effect.runPromise(result).then(console.log)
4414
4559
  * // Output: 6
4560
+ * ```
4415
4561
  *
4416
4562
  * @since 2.0.0
4417
4563
  * @category Looping
@@ -4444,6 +4590,7 @@ const iterate = exports.iterate = effect.iterate;
4444
4590
  * discarded, and the final result will be `void`.
4445
4591
  *
4446
4592
  * @example
4593
+ * ```ts
4447
4594
  * // Title: Looping with Collected Results
4448
4595
  * import { Effect } from "effect"
4449
4596
  *
@@ -4463,6 +4610,7 @@ const iterate = exports.iterate = effect.iterate;
4463
4610
  *
4464
4611
  * Effect.runPromise(result).then(console.log)
4465
4612
  * // Output: [1, 2, 3, 4, 5]
4613
+ * ```
4466
4614
  *
4467
4615
  * @example
4468
4616
  * // Title: Loop with Discarded Results
@@ -4504,6 +4652,7 @@ const loop = exports.loop = effect.loop;
4504
4652
  * an additional time.
4505
4653
  *
4506
4654
  * @example
4655
+ * ```ts
4507
4656
  * // Success Example
4508
4657
  * import { Effect, Schedule, Console } from "effect"
4509
4658
  *
@@ -4512,6 +4661,7 @@ const loop = exports.loop = effect.loop;
4512
4661
  * const program = Effect.repeat(action, policy)
4513
4662
  *
4514
4663
  * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`))
4664
+ * ```
4515
4665
  *
4516
4666
  * @example
4517
4667
  * // Failure Example
@@ -4547,12 +4697,14 @@ const repeat = exports.repeat = _schedule.repeat_combined;
4547
4697
  * initially and then repeats it one additional time if it succeeds.
4548
4698
  *
4549
4699
  * @example
4700
+ * ```ts
4550
4701
  * import { Effect, Console } from "effect"
4551
4702
  *
4552
4703
  * const action = Console.log("success")
4553
4704
  * const program = Effect.repeatN(action, 2)
4554
4705
  *
4555
4706
  * Effect.runPromise(program)
4707
+ * ```
4556
4708
  *
4557
4709
  * @since 2.0.0
4558
4710
  * @category repetition / recursion
@@ -4567,6 +4719,7 @@ const repeatN = exports.repeatN = effect.repeatN;
4567
4719
  * initially and then repeats it an additional time if it succeeds.
4568
4720
  *
4569
4721
  * @example
4722
+ * ```ts
4570
4723
  * import { Effect, Schedule } from "effect"
4571
4724
  *
4572
4725
  * let count = 0
@@ -4596,6 +4749,7 @@ const repeatN = exports.repeatN = effect.repeatN;
4596
4749
  * )
4597
4750
  *
4598
4751
  * Effect.runPromise(program).then((n) => console.log(`repetitions: ${n}`))
4752
+ * ```
4599
4753
  *
4600
4754
  * @since 2.0.0
4601
4755
  * @category repetition / recursion
@@ -4718,6 +4872,7 @@ const isSuccess = exports.isSuccess = effect.isSuccess;
4718
4872
  * @see {@link matchEffect} if you need to perform side effects in the handlers.
4719
4873
  *
4720
4874
  * @example
4875
+ * ```ts
4721
4876
  * import { Effect } from "effect"
4722
4877
  *
4723
4878
  * const success: Effect.Effect<number, Error> = Effect.succeed(42)
@@ -4743,6 +4898,7 @@ const isSuccess = exports.isSuccess = effect.isSuccess;
4743
4898
  * // Run and log the result of the failed effect
4744
4899
  * Effect.runPromise(program2).then(console.log)
4745
4900
  * // Output: "failure: Uh oh!"
4901
+ * ```
4746
4902
  *
4747
4903
  * @since 2.0.0
4748
4904
  * @category getters & folding
@@ -4778,6 +4934,7 @@ const matchCause = exports.matchCause = core.matchCause;
4778
4934
  * @see {@link matchEffect} if you don't need to handle the cause of the failure.
4779
4935
  *
4780
4936
  * @example
4937
+ * ```ts
4781
4938
  * import { Effect, Console } from "effect"
4782
4939
  *
4783
4940
  * const task: Effect.Effect<number, Error> = Effect.die("Uh oh!")
@@ -4805,6 +4962,7 @@ const matchCause = exports.matchCause = core.matchCause;
4805
4962
  *
4806
4963
  * Effect.runSync(program)
4807
4964
  * // Output: "Die: Uh oh!"
4965
+ * ```
4808
4966
  *
4809
4967
  * @since 2.0.0
4810
4968
  * @category getters & folding
@@ -4833,6 +4991,7 @@ const matchEffect = exports.matchEffect = core.matchEffect;
4833
4991
  * To adjust the log level, use the `Logger.withMinimumLogLevel` function.
4834
4992
  *
4835
4993
  * @example
4994
+ * ```ts
4836
4995
  * import { Cause, Effect } from "effect"
4837
4996
  *
4838
4997
  * const program = Effect.log(
@@ -4846,6 +5005,7 @@ const matchEffect = exports.matchEffect = core.matchEffect;
4846
5005
  * // Output:
4847
5006
  * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 cause="Error: Oh no!
4848
5007
  * // Error: Oh uh!"
5008
+ * ```
4849
5009
  *
4850
5010
  * @since 2.0.0
4851
5011
  * @category Logging
@@ -4874,12 +5034,14 @@ const logTrace = exports.logTrace = effect.logTrace;
4874
5034
  * `Logger.withMinimumLogLevel` and set the log level to `LogLevel.Debug`.
4875
5035
  *
4876
5036
  * @example
5037
+ * ```ts
4877
5038
  * import { Effect, Logger, LogLevel } from "effect"
4878
5039
  *
4879
5040
  * const program = Effect.logDebug("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Debug))
4880
5041
  *
4881
5042
  * // Effect.runFork(program)
4882
5043
  * // timestamp=... level=DEBUG fiber=#0 message=message1
5044
+ * ```
4883
5045
  *
4884
5046
  * @since 2.0.0
4885
5047
  * @category Logging
@@ -4919,6 +5081,7 @@ const logFatal = exports.logFatal = effect.logFatal;
4919
5081
  * time-sensitive processes.
4920
5082
  *
4921
5083
  * @example
5084
+ * ```ts
4922
5085
  * import { Effect } from "effect"
4923
5086
  *
4924
5087
  * const program = Effect.gen(function*() {
@@ -4928,6 +5091,7 @@ const logFatal = exports.logFatal = effect.logFatal;
4928
5091
  *
4929
5092
  * // Effect.runFork(program)
4930
5093
  * // timestamp=... level=INFO fiber=#0 message="The job is finished!" myspan=1011ms
5094
+ * ```
4931
5095
  *
4932
5096
  * @since 2.0.0
4933
5097
  * @category Logging
@@ -4939,6 +5103,7 @@ const withLogSpan = exports.withLogSpan = effect.withLogSpan;
4939
5103
  * to log messages, making them more informative and easier to trace.
4940
5104
  *
4941
5105
  * @example
5106
+ * ```ts
4942
5107
  * import { Effect } from "effect"
4943
5108
  *
4944
5109
  * const program = Effect.gen(function*() {
@@ -4949,6 +5114,7 @@ const withLogSpan = exports.withLogSpan = effect.withLogSpan;
4949
5114
  * // Effect.runFork(program)
4950
5115
  * // timestamp=... level=INFO fiber=#0 message=message1 key=value
4951
5116
  * // timestamp=... level=INFO fiber=#0 message=message2 key=value
5117
+ * ```
4952
5118
  *
4953
5119
  * @since 2.0.0
4954
5120
  * @category Logging
@@ -4961,6 +5127,7 @@ const annotateLogs = exports.annotateLogs = effect.annotateLogs;
4961
5127
  * defined `Scope`, making it easier to manage context-specific logging.
4962
5128
  *
4963
5129
  * @example
5130
+ * ```ts
4964
5131
  * import { Effect } from "effect"
4965
5132
  *
4966
5133
  * const program = Effect.gen(function*() {
@@ -4975,6 +5142,7 @@ const annotateLogs = exports.annotateLogs = effect.annotateLogs;
4975
5142
  * // timestamp=... level=INFO fiber=#0 message=message1 key=value
4976
5143
  * // timestamp=... level=INFO fiber=#0 message=message2 key=value
4977
5144
  * // timestamp=... level=INFO fiber=#0 message="no annotations again"
5145
+ * ```
4978
5146
  *
4979
5147
  * @since 3.1.0
4980
5148
  * @category Logging
@@ -5010,6 +5178,7 @@ const withUnhandledErrorLogLevel = exports.withUnhandledErrorLogLevel = core.wit
5010
5178
  * @see {@link orDieWith} if you need to customize the error.
5011
5179
  *
5012
5180
  * @example
5181
+ * ```ts
5013
5182
  * // Title: Propagating an Error as a Defect
5014
5183
  * import { Effect } from "effect"
5015
5184
  *
@@ -5026,6 +5195,7 @@ const withUnhandledErrorLogLevel = exports.withUnhandledErrorLogLevel = core.wit
5026
5195
  * // Output:
5027
5196
  * // (FiberFailure) Error: Cannot divide by zero
5028
5197
  * // ...stack trace...
5198
+ * ```
5029
5199
  *
5030
5200
  * @since 2.0.0
5031
5201
  * @category Converting Failures to Defects
@@ -5049,6 +5219,7 @@ const orDie = exports.orDie = core.orDie;
5049
5219
  * @see {@link orDie} if you don't need to customize the error.
5050
5220
  *
5051
5221
  * @example
5222
+ * ```ts
5052
5223
  * // Title: Customizing Defect
5053
5224
  * import { Effect } from "effect"
5054
5225
  *
@@ -5068,6 +5239,7 @@ const orDie = exports.orDie = core.orDie;
5068
5239
  * // Output:
5069
5240
  * // (FiberFailure) Error: defect: Cannot divide by zero
5070
5241
  * // ...stack trace...
5242
+ * ```
5071
5243
  *
5072
5244
  * @since 2.0.0
5073
5245
  * @category Converting Failures to Defects
@@ -5084,6 +5256,7 @@ const orDieWith = exports.orDieWith = core.orDieWith;
5084
5256
  * @see {@link catchAll} if you need to access the error in the fallback effect.
5085
5257
  *
5086
5258
  * @example
5259
+ * ```ts
5087
5260
  * import { Effect } from "effect"
5088
5261
  *
5089
5262
  * const success = Effect.succeed("success")
@@ -5099,6 +5272,7 @@ const orDieWith = exports.orDieWith = core.orDieWith;
5099
5272
  * const program2 = Effect.orElse(failure, () => fallback)
5100
5273
  * console.log(Effect.runSync(program2))
5101
5274
  * // Output: "fallback"
5275
+ * ```
5102
5276
  *
5103
5277
  * @since 2.0.0
5104
5278
  * @category Fallback
@@ -5117,6 +5291,7 @@ const orElse = exports.orElse = core.orElse;
5117
5291
  * @see {@link mapError} if you need to access the error to transform it.
5118
5292
  *
5119
5293
  * @example
5294
+ * ```ts
5120
5295
  * import { Effect } from "effect"
5121
5296
  *
5122
5297
  * const validate = (age: number): Effect.Effect<number, string> => {
@@ -5138,6 +5313,7 @@ const orElse = exports.orElse = core.orElse;
5138
5313
  * // _tag: 'Failure',
5139
5314
  * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'invalid age' }
5140
5315
  * // }
5316
+ * ```
5141
5317
  *
5142
5318
  * @since 2.0.0
5143
5319
  * @category Fallback
@@ -5161,6 +5337,7 @@ const orElseFail = exports.orElseFail = effect.orElseFail;
5161
5337
  * already succeeds, it will remain unchanged.
5162
5338
  *
5163
5339
  * @example
5340
+ * ```ts
5164
5341
  * import { Effect } from "effect"
5165
5342
  *
5166
5343
  * const validate = (age: number): Effect.Effect<number, string> => {
@@ -5178,6 +5355,7 @@ const orElseFail = exports.orElseFail = effect.orElseFail;
5178
5355
  * console.log(Effect.runSyncExit(program))
5179
5356
  * // Output:
5180
5357
  * // { _id: 'Exit', _tag: 'Success', value: 18 }
5358
+ * ```
5181
5359
  *
5182
5360
  * @since 2.0.0
5183
5361
  * @category Fallback
@@ -5201,6 +5379,7 @@ const orElseSucceed = exports.orElseSucceed = effect.orElseSucceed;
5201
5379
  * error.
5202
5380
  *
5203
5381
  * @example
5382
+ * ```ts
5204
5383
  * import { Effect, Console } from "effect"
5205
5384
  *
5206
5385
  * interface Config {
@@ -5247,6 +5426,7 @@ const orElseSucceed = exports.orElseSucceed = effect.orElseSucceed;
5247
5426
  * // Unavailable config for node2
5248
5427
  * // Config for node3 found
5249
5428
  * // { host: 'node3.example.com', port: 8080, apiKey: '12345-abcde' }
5429
+ * ```
5250
5430
  *
5251
5431
  * @since 2.0.0
5252
5432
  * @category Fallback
@@ -5378,6 +5558,7 @@ const unsafeMakeLatch = exports.unsafeMakeLatch = circular.unsafeMakeLatch;
5378
5558
  * @category latch
5379
5559
  * @since 3.8.0
5380
5560
  * @example
5561
+ * ```ts
5381
5562
  * import { Effect } from "effect"
5382
5563
  *
5383
5564
  * Effect.gen(function*() {
@@ -5394,6 +5575,7 @@ const unsafeMakeLatch = exports.unsafeMakeLatch = circular.unsafeMakeLatch;
5394
5575
  * yield* latch.open
5395
5576
  * yield* fiber.await
5396
5577
  * })
5578
+ * ```
5397
5579
  */
5398
5580
  const makeLatch = exports.makeLatch = circular.makeLatch;
5399
5581
  /**
@@ -5410,6 +5592,7 @@ const makeLatch = exports.makeLatch = circular.makeLatch;
5410
5592
  * `runFork` is a good default choice.
5411
5593
  *
5412
5594
  * @example
5595
+ * ```ts
5413
5596
  * // Title: Running an Effect in the Background
5414
5597
  * import { Effect, Console, Schedule, Fiber } from "effect"
5415
5598
  *
@@ -5427,6 +5610,7 @@ const makeLatch = exports.makeLatch = circular.makeLatch;
5427
5610
  * setTimeout(() => {
5428
5611
  * Effect.runFork(Fiber.interrupt(fiber))
5429
5612
  * }, 500)
5613
+ * ```
5430
5614
  *
5431
5615
  * @since 2.0.0
5432
5616
  * @category Running Effects
@@ -5452,11 +5636,13 @@ const runCallback = exports.runCallback = _runtime.unsafeRunEffect;
5452
5636
  * @see {@link runPromiseExit} for a version that returns an `Exit` type instead of rejecting.
5453
5637
  *
5454
5638
  * @example
5639
+ * ```ts
5455
5640
  * // Title: Running a Successful Effect as a Promise
5456
5641
  * import { Effect } from "effect"
5457
5642
  *
5458
5643
  * Effect.runPromise(Effect.succeed(1)).then(console.log)
5459
5644
  * // Output: 1
5645
+ * ```
5460
5646
  *
5461
5647
  * @example
5462
5648
  * //Example: Handling a Failing Effect as a Rejected Promise
@@ -5487,6 +5673,7 @@ const runPromise = exports.runPromise = _runtime.unsafeRunPromiseEffect;
5487
5673
  * a `Cause` type.
5488
5674
  *
5489
5675
  * @example
5676
+ * ```ts
5490
5677
  * // Title: Handling Results as Exit
5491
5678
  * import { Effect } from "effect"
5492
5679
  *
@@ -5511,6 +5698,7 @@ const runPromise = exports.runPromise = _runtime.unsafeRunPromiseEffect;
5511
5698
  * // failure: "my error"
5512
5699
  * // }
5513
5700
  * // }
5701
+ * ```
5514
5702
  *
5515
5703
  * @since 2.0.0
5516
5704
  * @category Running Effects
@@ -5532,6 +5720,7 @@ const runPromiseExit = exports.runPromiseExit = _runtime.unsafeRunPromiseExitEff
5532
5720
  * throwing an error.
5533
5721
  *
5534
5722
  * @example
5723
+ * ```ts
5535
5724
  * // Title: Synchronous Logging
5536
5725
  * import { Effect } from "effect"
5537
5726
  *
@@ -5545,6 +5734,7 @@ const runPromiseExit = exports.runPromiseExit = _runtime.unsafeRunPromiseExitEff
5545
5734
  *
5546
5735
  * console.log(result)
5547
5736
  * // Output: 1
5737
+ * ```
5548
5738
  *
5549
5739
  * @example
5550
5740
  * // Title: Incorrect Usage with Failing or Async Effects
@@ -5593,6 +5783,7 @@ const runSync = exports.runSync = _runtime.unsafeRunSyncEffect;
5593
5783
  * resolved synchronously.
5594
5784
  *
5595
5785
  * @example
5786
+ * ```ts
5596
5787
  * // Title: Handling Results as Exit
5597
5788
  * import { Effect } from "effect"
5598
5789
  *
@@ -5615,6 +5806,7 @@ const runSync = exports.runSync = _runtime.unsafeRunSyncEffect;
5615
5806
  * // failure: "my error"
5616
5807
  * // }
5617
5808
  * // }
5809
+ * ```
5618
5810
  *
5619
5811
  * @example
5620
5812
  * // Title: Asynchronous Operation Resulting in Die
@@ -5655,6 +5847,7 @@ const runSyncExit = exports.runSyncExit = _runtime.unsafeRunSyncExitEffect;
5655
5847
  * @see {@link zip} for a version that stops at the first error.
5656
5848
  *
5657
5849
  * @example
5850
+ * ```ts
5658
5851
  * import { Effect, Console } from "effect"
5659
5852
  *
5660
5853
  * const task1 = Console.log("task1").pipe(Effect.as(1))
@@ -5682,6 +5875,7 @@ const runSyncExit = exports.runSyncExit = _runtime.unsafeRunSyncExitEffect;
5682
5875
  * // right: { _id: 'Cause', _tag: 'Fail', failure: 'Oh no!' }
5683
5876
  * // }
5684
5877
  * // }
5878
+ * ```
5685
5879
  *
5686
5880
  * @since 2.0.0
5687
5881
  * @category Error Accumulation
@@ -5710,6 +5904,7 @@ const validateWith = exports.validateWith = fiberRuntime.validateWith;
5710
5904
  * @see {@link validate} for a version that accumulates errors.
5711
5905
  *
5712
5906
  * @example
5907
+ * ```ts
5713
5908
  * // Title: Combining Two Effects Sequentially
5714
5909
  * import { Effect } from "effect"
5715
5910
  *
@@ -5733,6 +5928,7 @@ const validateWith = exports.validateWith = fiberRuntime.validateWith;
5733
5928
  * // timestamp=... level=INFO fiber=#0 message="task1 done"
5734
5929
  * // timestamp=... level=INFO fiber=#0 message="task2 done"
5735
5930
  * // [ 1, 'hello' ]
5931
+ * ```
5736
5932
  *
5737
5933
  * @example
5738
5934
  * // Title: Combining Two Effects Concurrently
@@ -5778,6 +5974,7 @@ const zip = exports.zip = fiberRuntime.zipOptions;
5778
5974
  * @see {@link zipRight} for a version that returns the result of the second effect.
5779
5975
  *
5780
5976
  * @example
5977
+ * ```ts
5781
5978
  * import { Effect } from "effect"
5782
5979
  *
5783
5980
  * const task1 = Effect.succeed(1).pipe(
@@ -5796,6 +5993,7 @@ const zip = exports.zip = fiberRuntime.zipOptions;
5796
5993
  * // timestamp=... level=INFO fiber=#0 message="task1 done"
5797
5994
  * // timestamp=... level=INFO fiber=#0 message="task2 done"
5798
5995
  * // 1
5996
+ * ```
5799
5997
  *
5800
5998
  * @since 2.0.0
5801
5999
  * @category Zipping
@@ -5819,6 +6017,7 @@ const zipLeft = exports.zipLeft = fiberRuntime.zipLeftOptions;
5819
6017
  * @see {@link zipLeft} for a version that returns the result of the first effect.
5820
6018
  *
5821
6019
  * @example
6020
+ * ```ts
5822
6021
  * import { Effect } from "effect"
5823
6022
  *
5824
6023
  * const task1 = Effect.succeed(1).pipe(
@@ -5837,6 +6036,7 @@ const zipLeft = exports.zipLeft = fiberRuntime.zipLeftOptions;
5837
6036
  * // timestamp=... level=INFO fiber=#0 message="task1 done"
5838
6037
  * // timestamp=... level=INFO fiber=#0 message="task2 done"
5839
6038
  * // hello
6039
+ * ```
5840
6040
  *
5841
6041
  * @since 2.0.0
5842
6042
  * @category Zipping
@@ -5858,6 +6058,7 @@ const zipRight = exports.zipRight = fiberRuntime.zipRightOptions;
5858
6058
  * use the `{ concurrent: true }` option.
5859
6059
  *
5860
6060
  * @example
6061
+ * ```ts
5861
6062
  * // Title: Combining Effects with a Custom Function
5862
6063
  * import { Effect } from "effect"
5863
6064
  *
@@ -5882,6 +6083,7 @@ const zipRight = exports.zipRight = fiberRuntime.zipRightOptions;
5882
6083
  * // timestamp=... level=INFO fiber=#3 message="task1 done"
5883
6084
  * // timestamp=... level=INFO fiber=#2 message="task2 done"
5884
6085
  * // 6
6086
+ * ```
5885
6087
  *
5886
6088
  * @since 2.0.0
5887
6089
  * @category Zipping
@@ -5958,6 +6160,7 @@ const withTracerScoped = exports.withTracerScoped = fiberRuntime.withTracerScope
5958
6160
  * @since 2.0.0
5959
6161
  * @category Tracing
5960
6162
  * @example
6163
+ * ```ts
5961
6164
  * import { Effect } from "effect"
5962
6165
  *
5963
6166
  * Effect.succeed(42).pipe(
@@ -5965,6 +6168,7 @@ const withTracerScoped = exports.withTracerScoped = fiberRuntime.withTracerScope
5965
6168
  * // the span will not be registered with the tracer
5966
6169
  * Effect.withTracerEnabled(false)
5967
6170
  * )
6171
+ * ```
5968
6172
  */
5969
6173
  const withTracerEnabled = exports.withTracerEnabled = core.withTracerEnabled;
5970
6174
  /**
@@ -6055,6 +6259,7 @@ const withSpan = exports.withSpan = effect.withSpan;
6055
6259
  * @since 3.2.0
6056
6260
  * @category Tracing
6057
6261
  * @example
6262
+ * ```ts
6058
6263
  * import { Effect } from "effect"
6059
6264
  *
6060
6265
  * const getTodo = Effect.functionWithSpan({
@@ -6064,6 +6269,7 @@ const withSpan = exports.withSpan = effect.withSpan;
6064
6269
  * attributes: { id }
6065
6270
  * })
6066
6271
  * })
6272
+ * ```
6067
6273
  */
6068
6274
  const functionWithSpan = exports.functionWithSpan = effect.functionWithSpan;
6069
6275
  /**
@@ -6094,6 +6300,7 @@ const withParentSpan = exports.withParentSpan = effect.withParentSpan;
6094
6300
  * value.
6095
6301
  *
6096
6302
  * @example
6303
+ * ```ts
6097
6304
  * import { Effect } from "effect"
6098
6305
  *
6099
6306
  * // ┌─── Effect<number, NoSuchElementException, never>
@@ -6119,6 +6326,7 @@ const withParentSpan = exports.withParentSpan = effect.withParentSpan;
6119
6326
  * // failure: { _tag: 'NoSuchElementException' }
6120
6327
  * // }
6121
6328
  * // }
6329
+ * ```
6122
6330
  *
6123
6331
  * @since 2.0.0
6124
6332
  * @category Optional Wrapping
@@ -6136,6 +6344,7 @@ const fromNullable = exports.fromNullable = effect.fromNullable;
6136
6344
  * unchanged.
6137
6345
  *
6138
6346
  * @example
6347
+ * ```ts
6139
6348
  * import { Effect } from "effect"
6140
6349
  *
6141
6350
  * // ┌─── Effect<number, NoSuchElementException, never>
@@ -6159,6 +6368,7 @@ const fromNullable = exports.fromNullable = effect.fromNullable;
6159
6368
  *
6160
6369
  * Effect.runPromise(option2).then(console.log)
6161
6370
  * // Output: { _tag: 'None' }
6371
+ * ```
6162
6372
  *
6163
6373
  * @since 2.0.0
6164
6374
  * @category Optional Wrapping
@@ -6192,6 +6402,7 @@ const makeTagProxy = TagClass => {
6192
6402
  };
6193
6403
  /**
6194
6404
  * @example
6405
+ * ```ts
6195
6406
  * import { Effect, Layer } from "effect"
6196
6407
  *
6197
6408
  * class MapTag extends Effect.Tag("MapTag")<MapTag, Map<string, string>>() {
@@ -6200,6 +6411,7 @@ const makeTagProxy = TagClass => {
6200
6411
  * Effect.sync(() => new Map())
6201
6412
  * )
6202
6413
  * }
6414
+ * ```
6203
6415
  *
6204
6416
  * @since 2.0.0
6205
6417
  * @category Context
@@ -6226,6 +6438,7 @@ const Tag = id => () => {
6226
6438
  };
6227
6439
  /**
6228
6440
  * @example
6441
+ * ```ts
6229
6442
  * import { Effect } from 'effect';
6230
6443
  *
6231
6444
  * class Prefix extends Effect.Service<Prefix>()("Prefix", {
@@ -6245,6 +6458,7 @@ const Tag = id => () => {
6245
6458
  * }),
6246
6459
  * dependencies: [Prefix.Default]
6247
6460
  * }) {}
6461
+ * ```
6248
6462
  *
6249
6463
  * @since 3.9.0
6250
6464
  * @category Context