effect 3.10.17 → 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 (353) 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/stream.js +1 -1
  99. package/dist/cjs/internal/stream.js.map +1 -1
  100. package/dist/cjs/internal/version.js +1 -1
  101. package/dist/dts/Array.d.ts +534 -0
  102. package/dist/dts/Array.d.ts.map +1 -1
  103. package/dist/dts/BigDecimal.d.ts +116 -0
  104. package/dist/dts/BigDecimal.d.ts.map +1 -1
  105. package/dist/dts/BigInt.d.ts +114 -0
  106. package/dist/dts/BigInt.d.ts.map +1 -1
  107. package/dist/dts/Boolean.d.ts +56 -0
  108. package/dist/dts/Boolean.d.ts.map +1 -1
  109. package/dist/dts/Brand.d.ts +6 -0
  110. package/dist/dts/Brand.d.ts.map +1 -1
  111. package/dist/dts/Chunk.d.ts +30 -0
  112. package/dist/dts/Chunk.d.ts.map +1 -1
  113. package/dist/dts/Config.d.ts +2 -0
  114. package/dist/dts/Config.d.ts.map +1 -1
  115. package/dist/dts/Context.d.ts +44 -0
  116. package/dist/dts/Context.d.ts.map +1 -1
  117. package/dist/dts/Cron.d.ts +6 -0
  118. package/dist/dts/Cron.d.ts.map +1 -1
  119. package/dist/dts/Data.d.ts +26 -0
  120. package/dist/dts/Data.d.ts.map +1 -1
  121. package/dist/dts/DateTime.d.ts +152 -0
  122. package/dist/dts/DateTime.d.ts.map +1 -1
  123. package/dist/dts/Duration.d.ts +2 -0
  124. package/dist/dts/Duration.d.ts.map +1 -1
  125. package/dist/dts/Effect.d.ts +570 -0
  126. package/dist/dts/Effect.d.ts.map +1 -1
  127. package/dist/dts/Either.d.ts +84 -2
  128. package/dist/dts/Either.d.ts.map +1 -1
  129. package/dist/dts/FiberHandle.d.ts +6 -0
  130. package/dist/dts/FiberHandle.d.ts.map +1 -1
  131. package/dist/dts/FiberMap.d.ts +6 -0
  132. package/dist/dts/FiberMap.d.ts.map +1 -1
  133. package/dist/dts/FiberSet.d.ts +6 -0
  134. package/dist/dts/FiberSet.d.ts.map +1 -1
  135. package/dist/dts/Function.d.ts +50 -0
  136. package/dist/dts/Function.d.ts.map +1 -1
  137. package/dist/dts/GlobalValue.d.ts +2 -0
  138. package/dist/dts/GlobalValue.d.ts.map +1 -1
  139. package/dist/dts/HashMap.d.ts +6 -0
  140. package/dist/dts/HashMap.d.ts.map +1 -1
  141. package/dist/dts/Iterable.d.ts +26 -0
  142. package/dist/dts/Iterable.d.ts.map +1 -1
  143. package/dist/dts/List.d.ts +20 -0
  144. package/dist/dts/List.d.ts.map +1 -1
  145. package/dist/dts/Logger.d.ts +34 -0
  146. package/dist/dts/Logger.d.ts.map +1 -1
  147. package/dist/dts/Mailbox.d.ts +2 -0
  148. package/dist/dts/Mailbox.d.ts.map +1 -1
  149. package/dist/dts/ManagedRuntime.d.ts +2 -0
  150. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  151. package/dist/dts/Metric.d.ts +18 -0
  152. package/dist/dts/Metric.d.ts.map +1 -1
  153. package/dist/dts/Micro.d.ts +14 -0
  154. package/dist/dts/Micro.d.ts.map +1 -1
  155. package/dist/dts/Number.d.ts +104 -0
  156. package/dist/dts/Number.d.ts.map +1 -1
  157. package/dist/dts/Option.d.ts +142 -0
  158. package/dist/dts/Option.d.ts.map +1 -1
  159. package/dist/dts/Order.d.ts +2 -0
  160. package/dist/dts/Order.d.ts.map +1 -1
  161. package/dist/dts/Ordering.d.ts +8 -0
  162. package/dist/dts/Ordering.d.ts.map +1 -1
  163. package/dist/dts/Predicate.d.ts +104 -0
  164. package/dist/dts/Predicate.d.ts.map +1 -1
  165. package/dist/dts/Random.d.ts +4 -0
  166. package/dist/dts/Random.d.ts.map +1 -1
  167. package/dist/dts/RateLimiter.d.ts +4 -0
  168. package/dist/dts/RateLimiter.d.ts.map +1 -1
  169. package/dist/dts/RcMap.d.ts +6 -0
  170. package/dist/dts/RcMap.d.ts.map +1 -1
  171. package/dist/dts/RcRef.d.ts +2 -0
  172. package/dist/dts/RcRef.d.ts.map +1 -1
  173. package/dist/dts/Record.d.ts +136 -0
  174. package/dist/dts/Record.d.ts.map +1 -1
  175. package/dist/dts/Redacted.d.ts +8 -0
  176. package/dist/dts/Redacted.d.ts.map +1 -1
  177. package/dist/dts/RegExp.d.ts +4 -0
  178. package/dist/dts/RegExp.d.ts.map +1 -1
  179. package/dist/dts/Request.d.ts +4 -0
  180. package/dist/dts/Request.d.ts.map +1 -1
  181. package/dist/dts/RequestResolver.d.ts +6 -0
  182. package/dist/dts/RequestResolver.d.ts.map +1 -1
  183. package/dist/dts/Runtime.d.ts +18 -0
  184. package/dist/dts/Runtime.d.ts.map +1 -1
  185. package/dist/dts/Schema.d.ts +58 -0
  186. package/dist/dts/Schema.d.ts.map +1 -1
  187. package/dist/dts/Stream.d.ts +344 -0
  188. package/dist/dts/Stream.d.ts.map +1 -1
  189. package/dist/dts/String.d.ts +94 -0
  190. package/dist/dts/String.d.ts.map +1 -1
  191. package/dist/dts/Struct.d.ts +24 -0
  192. package/dist/dts/Struct.d.ts.map +1 -1
  193. package/dist/dts/Symbol.d.ts +2 -0
  194. package/dist/dts/Symbol.d.ts.map +1 -1
  195. package/dist/dts/Trie.d.ts +132 -0
  196. package/dist/dts/Trie.d.ts.map +1 -1
  197. package/dist/dts/Tuple.d.ts +42 -0
  198. package/dist/dts/Tuple.d.ts.map +1 -1
  199. package/dist/dts/Types.d.ts +24 -0
  200. package/dist/dts/Types.d.ts.map +1 -1
  201. package/dist/esm/Array.js +208 -0
  202. package/dist/esm/Array.js.map +1 -1
  203. package/dist/esm/BigDecimal.js +56 -0
  204. package/dist/esm/BigDecimal.js.map +1 -1
  205. package/dist/esm/BigInt.js +54 -0
  206. package/dist/esm/BigInt.js.map +1 -1
  207. package/dist/esm/Boolean.js +24 -0
  208. package/dist/esm/Boolean.js.map +1 -1
  209. package/dist/esm/Brand.js +4 -0
  210. package/dist/esm/Brand.js.map +1 -1
  211. package/dist/esm/Chunk.js +8 -0
  212. package/dist/esm/Chunk.js.map +1 -1
  213. package/dist/esm/Config.js +2 -0
  214. package/dist/esm/Config.js.map +1 -1
  215. package/dist/esm/Context.js +24 -0
  216. package/dist/esm/Context.js.map +1 -1
  217. package/dist/esm/Cron.js +6 -0
  218. package/dist/esm/Cron.js.map +1 -1
  219. package/dist/esm/Data.js +16 -0
  220. package/dist/esm/Data.js.map +1 -1
  221. package/dist/esm/DateTime.js +64 -0
  222. package/dist/esm/DateTime.js.map +1 -1
  223. package/dist/esm/Duration.js +2 -0
  224. package/dist/esm/Duration.js.map +1 -1
  225. package/dist/esm/Effect.js +220 -0
  226. package/dist/esm/Effect.js.map +1 -1
  227. package/dist/esm/Either.js +40 -2
  228. package/dist/esm/Either.js.map +1 -1
  229. package/dist/esm/FiberHandle.js +6 -0
  230. package/dist/esm/FiberHandle.js.map +1 -1
  231. package/dist/esm/FiberMap.js +6 -0
  232. package/dist/esm/FiberMap.js.map +1 -1
  233. package/dist/esm/FiberSet.js +6 -0
  234. package/dist/esm/FiberSet.js.map +1 -1
  235. package/dist/esm/Function.js +34 -0
  236. package/dist/esm/Function.js.map +1 -1
  237. package/dist/esm/GlobalValue.js +2 -0
  238. package/dist/esm/GlobalValue.js.map +1 -1
  239. package/dist/esm/HashMap.js.map +1 -1
  240. package/dist/esm/Iterable.js +18 -0
  241. package/dist/esm/Iterable.js.map +1 -1
  242. package/dist/esm/List.js +4 -0
  243. package/dist/esm/List.js.map +1 -1
  244. package/dist/esm/Logger.js +26 -0
  245. package/dist/esm/Logger.js.map +1 -1
  246. package/dist/esm/Mailbox.js +2 -0
  247. package/dist/esm/Mailbox.js.map +1 -1
  248. package/dist/esm/ManagedRuntime.js +2 -0
  249. package/dist/esm/ManagedRuntime.js.map +1 -1
  250. package/dist/esm/Metric.js +10 -0
  251. package/dist/esm/Metric.js.map +1 -1
  252. package/dist/esm/Micro.js +10 -0
  253. package/dist/esm/Micro.js.map +1 -1
  254. package/dist/esm/Number.js +44 -0
  255. package/dist/esm/Number.js.map +1 -1
  256. package/dist/esm/Option.js +72 -0
  257. package/dist/esm/Option.js.map +1 -1
  258. package/dist/esm/Order.js +2 -0
  259. package/dist/esm/Order.js.map +1 -1
  260. package/dist/esm/Ordering.js +4 -0
  261. package/dist/esm/Ordering.js.map +1 -1
  262. package/dist/esm/Predicate.js +68 -0
  263. package/dist/esm/Predicate.js.map +1 -1
  264. package/dist/esm/Random.js +4 -0
  265. package/dist/esm/Random.js.map +1 -1
  266. package/dist/esm/RateLimiter.js +4 -0
  267. package/dist/esm/RateLimiter.js.map +1 -1
  268. package/dist/esm/RcMap.js +2 -0
  269. package/dist/esm/RcMap.js.map +1 -1
  270. package/dist/esm/RcRef.js +2 -0
  271. package/dist/esm/RcRef.js.map +1 -1
  272. package/dist/esm/Record.js +56 -0
  273. package/dist/esm/Record.js.map +1 -1
  274. package/dist/esm/Redacted.js +8 -0
  275. package/dist/esm/Redacted.js.map +1 -1
  276. package/dist/esm/RegExp.js +4 -0
  277. package/dist/esm/RegExp.js.map +1 -1
  278. package/dist/esm/Request.js +4 -0
  279. package/dist/esm/Request.js.map +1 -1
  280. package/dist/esm/RequestResolver.js +2 -0
  281. package/dist/esm/RequestResolver.js.map +1 -1
  282. package/dist/esm/Runtime.js +6 -0
  283. package/dist/esm/Runtime.js.map +1 -1
  284. package/dist/esm/Schema.js +34 -0
  285. package/dist/esm/Schema.js.map +1 -1
  286. package/dist/esm/Stream.js +160 -0
  287. package/dist/esm/Stream.js.map +1 -1
  288. package/dist/esm/String.js +62 -0
  289. package/dist/esm/String.js.map +1 -1
  290. package/dist/esm/Struct.js +12 -0
  291. package/dist/esm/Struct.js.map +1 -1
  292. package/dist/esm/Symbol.js +2 -0
  293. package/dist/esm/Symbol.js.map +1 -1
  294. package/dist/esm/Trie.js +56 -0
  295. package/dist/esm/Trie.js.map +1 -1
  296. package/dist/esm/Tuple.js +22 -0
  297. package/dist/esm/Tuple.js.map +1 -1
  298. package/dist/esm/internal/stream.js +1 -1
  299. package/dist/esm/internal/stream.js.map +1 -1
  300. package/dist/esm/internal/version.js +1 -1
  301. package/package.json +1 -1
  302. package/src/Array.ts +534 -0
  303. package/src/BigDecimal.ts +116 -0
  304. package/src/BigInt.ts +114 -0
  305. package/src/Boolean.ts +56 -0
  306. package/src/Brand.ts +6 -0
  307. package/src/Chunk.ts +32 -0
  308. package/src/Config.ts +2 -0
  309. package/src/Context.ts +44 -0
  310. package/src/Cron.ts +6 -0
  311. package/src/Data.ts +26 -0
  312. package/src/DateTime.ts +152 -0
  313. package/src/Duration.ts +2 -0
  314. package/src/Effect.ts +570 -0
  315. package/src/Either.ts +84 -2
  316. package/src/FiberHandle.ts +6 -0
  317. package/src/FiberMap.ts +6 -0
  318. package/src/FiberSet.ts +6 -0
  319. package/src/Function.ts +50 -0
  320. package/src/GlobalValue.ts +2 -0
  321. package/src/HashMap.ts +6 -0
  322. package/src/Iterable.ts +26 -0
  323. package/src/List.ts +24 -0
  324. package/src/Logger.ts +34 -0
  325. package/src/Mailbox.ts +2 -0
  326. package/src/ManagedRuntime.ts +2 -0
  327. package/src/Metric.ts +18 -0
  328. package/src/Micro.ts +14 -0
  329. package/src/Number.ts +104 -0
  330. package/src/Option.ts +142 -0
  331. package/src/Order.ts +2 -0
  332. package/src/Ordering.ts +8 -0
  333. package/src/Predicate.ts +104 -0
  334. package/src/Random.ts +4 -0
  335. package/src/RateLimiter.ts +4 -0
  336. package/src/RcMap.ts +6 -0
  337. package/src/RcRef.ts +2 -0
  338. package/src/Record.ts +136 -0
  339. package/src/Redacted.ts +8 -0
  340. package/src/RegExp.ts +4 -0
  341. package/src/Request.ts +4 -0
  342. package/src/RequestResolver.ts +6 -0
  343. package/src/Runtime.ts +18 -0
  344. package/src/Schema.ts +64 -0
  345. package/src/Stream.ts +344 -0
  346. package/src/String.ts +94 -0
  347. package/src/Struct.ts +24 -0
  348. package/src/Symbol.ts +2 -0
  349. package/src/Trie.ts +132 -0
  350. package/src/Tuple.ts +42 -0
  351. package/src/Types.ts +24 -0
  352. package/src/internal/stream.ts +1 -1
  353. package/src/internal/version.ts +1 -1
@@ -174,6 +174,7 @@ export declare const accumulateChunks: <A, E, R>(self: Stream<A, E, R>) => Strea
174
174
  * stream is consumed.
175
175
  *
176
176
  * @example
177
+ * ```ts
177
178
  * import { Console, Effect, Stream } from "effect"
178
179
  *
179
180
  * // Simulating File operations
@@ -195,6 +196,7 @@ export declare const accumulateChunks: <A, E, R>(self: Stream<A, E, R>) => Strea
195
196
  * // Opening file.txt
196
197
  * // Closing file.txt
197
198
  * // { _id: 'Chunk', values: [ [ 'Line 1', 'Line 2', 'Line 3' ] ] }
199
+ * ```
198
200
  *
199
201
  * @since 2.0.0
200
202
  * @category constructors
@@ -339,12 +341,14 @@ export declare const aggregateWithinEither: {
339
341
  * Maps the success values of this stream to the specified constant value.
340
342
  *
341
343
  * @example
344
+ * ```ts
342
345
  * import { Effect, Stream } from "effect"
343
346
  *
344
347
  * const stream = Stream.range(1, 5).pipe(Stream.as(null))
345
348
  *
346
349
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
347
350
  * // { _id: 'Chunk', values: [ null, null, null, null, null ] }
351
+ * ```
348
352
  *
349
353
  * @since 2.0.0
350
354
  * @category mapping
@@ -354,12 +358,14 @@ export declare const as: {
354
358
  * Maps the success values of this stream to the specified constant value.
355
359
  *
356
360
  * @example
361
+ * ```ts
357
362
  * import { Effect, Stream } from "effect"
358
363
  *
359
364
  * const stream = Stream.range(1, 5).pipe(Stream.as(null))
360
365
  *
361
366
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
362
367
  * // { _id: 'Chunk', values: [ null, null, null, null, null ] }
368
+ * ```
363
369
  *
364
370
  * @since 2.0.0
365
371
  * @category mapping
@@ -369,12 +375,14 @@ export declare const as: {
369
375
  * Maps the success values of this stream to the specified constant value.
370
376
  *
371
377
  * @example
378
+ * ```ts
372
379
  * import { Effect, Stream } from "effect"
373
380
  *
374
381
  * const stream = Stream.range(1, 5).pipe(Stream.as(null))
375
382
  *
376
383
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
377
384
  * // { _id: 'Chunk', values: [ null, null, null, null, null ] }
385
+ * ```
378
386
  *
379
387
  * @since 2.0.0
380
388
  * @category mapping
@@ -395,6 +403,7 @@ export {
395
403
  * executed if the `Fiber` executing this Effect is interrupted.
396
404
  *
397
405
  * @example
406
+ * ```ts
398
407
  * import type { StreamEmit } from "effect"
399
408
  * import { Chunk, Effect, Option, Stream } from "effect"
400
409
  *
@@ -417,6 +426,7 @@ export {
417
426
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
418
427
  * // { _id: 'Chunk', values: [ 1, 2 ] }
419
428
  *
429
+ * ```
420
430
  * @since 2.0.0
421
431
  * @category constructors
422
432
  */
@@ -448,6 +458,7 @@ export declare const asyncEffect: <A, E = never, R = never>(register: (emit: Emi
448
458
  * second argument with the `bufferSize` and `strategy` fields.
449
459
  *
450
460
  * @example
461
+ * ```ts
451
462
  * import { Effect, Stream } from "effect"
452
463
  *
453
464
  * Stream.asyncPush<string>((emit) =>
@@ -462,6 +473,7 @@ export declare const asyncEffect: <A, E = never, R = never>(register: (emit: Emi
462
473
  * clearInterval(handle)
463
474
  * })
464
475
  * ), { bufferSize: 16, strategy: "dropping" })
476
+ * ```
465
477
  *
466
478
  * @since 3.6.0
467
479
  * @category constructors
@@ -519,6 +531,7 @@ export declare const branchAfter: {
519
531
  * chunks before the slowest downstream stream.
520
532
  *
521
533
  * @example
534
+ * ```ts
522
535
  * import { Console, Effect, Fiber, Schedule, Stream } from "effect"
523
536
  *
524
537
  * const numbers = Effect.scoped(
@@ -588,6 +601,7 @@ export declare const branchAfter: {
588
601
  * // Logging to the Console: 19
589
602
  * // Logging to the Console: 20
590
603
  * // { _id: 'Chunk', values: [ undefined ] }
604
+ * ```
591
605
  *
592
606
  * @since 2.0.0
593
607
  * @category utils
@@ -599,6 +613,7 @@ export declare const broadcast: {
599
613
  * chunks before the slowest downstream stream.
600
614
  *
601
615
  * @example
616
+ * ```ts
602
617
  * import { Console, Effect, Fiber, Schedule, Stream } from "effect"
603
618
  *
604
619
  * const numbers = Effect.scoped(
@@ -668,6 +683,7 @@ export declare const broadcast: {
668
683
  * // Logging to the Console: 19
669
684
  * // Logging to the Console: 20
670
685
  * // { _id: 'Chunk', values: [ undefined ] }
686
+ * ```
671
687
  *
672
688
  * @since 2.0.0
673
689
  * @category utils
@@ -686,6 +702,7 @@ export declare const broadcast: {
686
702
  * chunks before the slowest downstream stream.
687
703
  *
688
704
  * @example
705
+ * ```ts
689
706
  * import { Console, Effect, Fiber, Schedule, Stream } from "effect"
690
707
  *
691
708
  * const numbers = Effect.scoped(
@@ -755,6 +772,7 @@ export declare const broadcast: {
755
772
  * // Logging to the Console: 19
756
773
  * // Logging to the Console: 20
757
774
  * // { _id: 'Chunk', values: [ undefined ] }
775
+ * ```
758
776
  *
759
777
  * @since 2.0.0
760
778
  * @category utils
@@ -961,6 +979,7 @@ export declare const broadcastedQueuesDynamic: {
961
979
  * of 2 for better performance.
962
980
  *
963
981
  * @example
982
+ * ```ts
964
983
  * import { Console, Effect, Schedule, Stream } from "effect"
965
984
  *
966
985
  * const stream = Stream.range(1, 10).pipe(
@@ -987,6 +1006,7 @@ export declare const broadcastedQueuesDynamic: {
987
1006
  * // after buffering: 5
988
1007
  * // before buffering: 10
989
1008
  * // ...
1009
+ * ```
990
1010
  *
991
1011
  * @since 2.0.0
992
1012
  * @category utils
@@ -1001,6 +1021,7 @@ export declare const buffer: {
1001
1021
  * of 2 for better performance.
1002
1022
  *
1003
1023
  * @example
1024
+ * ```ts
1004
1025
  * import { Console, Effect, Schedule, Stream } from "effect"
1005
1026
  *
1006
1027
  * const stream = Stream.range(1, 10).pipe(
@@ -1027,6 +1048,7 @@ export declare const buffer: {
1027
1048
  * // after buffering: 5
1028
1049
  * // before buffering: 10
1029
1050
  * // ...
1051
+ * ```
1030
1052
  *
1031
1053
  * @since 2.0.0
1032
1054
  * @category utils
@@ -1046,6 +1068,7 @@ export declare const buffer: {
1046
1068
  * of 2 for better performance.
1047
1069
  *
1048
1070
  * @example
1071
+ * ```ts
1049
1072
  * import { Console, Effect, Schedule, Stream } from "effect"
1050
1073
  *
1051
1074
  * const stream = Stream.range(1, 10).pipe(
@@ -1072,6 +1095,7 @@ export declare const buffer: {
1072
1095
  * // after buffering: 5
1073
1096
  * // before buffering: 10
1074
1097
  * // ...
1098
+ * ```
1075
1099
  *
1076
1100
  * @since 2.0.0
1077
1101
  * @category utils
@@ -1319,12 +1343,14 @@ export declare const catchSomeCause: {
1319
1343
  * elements are equal.
1320
1344
  *
1321
1345
  * @example
1346
+ * ```ts
1322
1347
  * import { Effect, Stream } from "effect"
1323
1348
  *
1324
1349
  * const stream = Stream.make(1, 1, 1, 2, 2, 3, 4).pipe(Stream.changes)
1325
1350
  *
1326
1351
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
1327
1352
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
1353
+ * ```
1328
1354
  *
1329
1355
  * @since 2.0.0
1330
1356
  * @category utils
@@ -1502,6 +1528,7 @@ export declare const combineChunks: {
1502
1528
  * specified stream.
1503
1529
  *
1504
1530
  * @example
1531
+ * ```ts
1505
1532
  * import { Effect, Stream } from "effect"
1506
1533
  *
1507
1534
  * const s1 = Stream.make(1, 2, 3)
@@ -1511,6 +1538,7 @@ export declare const combineChunks: {
1511
1538
  *
1512
1539
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
1513
1540
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
1541
+ * ```
1514
1542
  *
1515
1543
  * @since 2.0.0
1516
1544
  * @category utils
@@ -1522,6 +1550,7 @@ export declare const concat: {
1522
1550
  * specified stream.
1523
1551
  *
1524
1552
  * @example
1553
+ * ```ts
1525
1554
  * import { Effect, Stream } from "effect"
1526
1555
  *
1527
1556
  * const s1 = Stream.make(1, 2, 3)
@@ -1531,6 +1560,7 @@ export declare const concat: {
1531
1560
  *
1532
1561
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
1533
1562
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
1563
+ * ```
1534
1564
  *
1535
1565
  * @since 2.0.0
1536
1566
  * @category utils
@@ -1542,6 +1572,7 @@ export declare const concat: {
1542
1572
  * specified stream.
1543
1573
  *
1544
1574
  * @example
1575
+ * ```ts
1545
1576
  * import { Effect, Stream } from "effect"
1546
1577
  *
1547
1578
  * const s1 = Stream.make(1, 2, 3)
@@ -1551,6 +1582,7 @@ export declare const concat: {
1551
1582
  *
1552
1583
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
1553
1584
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
1585
+ * ```
1554
1586
  *
1555
1587
  * @since 2.0.0
1556
1588
  * @category utils
@@ -1561,6 +1593,7 @@ export declare const concat: {
1561
1593
  * Concatenates all of the streams in the chunk to one stream.
1562
1594
  *
1563
1595
  * @example
1596
+ * ```ts
1564
1597
  * import { Chunk, Effect, Stream } from "effect"
1565
1598
  *
1566
1599
  * const s1 = Stream.make(1, 2, 3)
@@ -1577,6 +1610,7 @@ export declare const concat: {
1577
1610
  * // 5, 6, 7, 8
1578
1611
  * // ]
1579
1612
  * // }
1613
+ * ```
1580
1614
  *
1581
1615
  * @since 2.0.0
1582
1616
  * @category constructors
@@ -1590,6 +1624,7 @@ export declare const concatAll: <A, E, R>(streams: Chunk.Chunk<Stream<A, E, R>>)
1590
1624
  * See also `Stream.zip` for the more common point-wise variant.
1591
1625
  *
1592
1626
  * @example
1627
+ * ```ts
1593
1628
  * import { Effect, Stream } from "effect"
1594
1629
  *
1595
1630
  * const s1 = Stream.make(1, 2, 3)
@@ -1604,6 +1639,7 @@ export declare const concatAll: <A, E, R>(streams: Chunk.Chunk<Stream<A, E, R>>)
1604
1639
  * // [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ], [ 3, "a" ], [ 3, "b" ]
1605
1640
  * // ]
1606
1641
  * // }
1642
+ * ```
1607
1643
  *
1608
1644
  * @since 2.0.0
1609
1645
  * @category utils
@@ -1617,6 +1653,7 @@ export declare const cross: {
1617
1653
  * See also `Stream.zip` for the more common point-wise variant.
1618
1654
  *
1619
1655
  * @example
1656
+ * ```ts
1620
1657
  * import { Effect, Stream } from "effect"
1621
1658
  *
1622
1659
  * const s1 = Stream.make(1, 2, 3)
@@ -1631,6 +1668,7 @@ export declare const cross: {
1631
1668
  * // [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ], [ 3, "a" ], [ 3, "b" ]
1632
1669
  * // ]
1633
1670
  * // }
1671
+ * ```
1634
1672
  *
1635
1673
  * @since 2.0.0
1636
1674
  * @category utils
@@ -1644,6 +1682,7 @@ export declare const cross: {
1644
1682
  * See also `Stream.zip` for the more common point-wise variant.
1645
1683
  *
1646
1684
  * @example
1685
+ * ```ts
1647
1686
  * import { Effect, Stream } from "effect"
1648
1687
  *
1649
1688
  * const s1 = Stream.make(1, 2, 3)
@@ -1658,6 +1697,7 @@ export declare const cross: {
1658
1697
  * // [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ], [ 3, "a" ], [ 3, "b" ]
1659
1698
  * // ]
1660
1699
  * // }
1700
+ * ```
1661
1701
  *
1662
1702
  * @since 2.0.0
1663
1703
  * @category utils
@@ -1781,6 +1821,7 @@ export declare const crossWith: {
1781
1821
  * has paused typing so as to not prematurely recommend results.
1782
1822
  *
1783
1823
  * @example
1824
+ * ```ts
1784
1825
  * import { Effect, Stream } from "effect"
1785
1826
  *
1786
1827
  * let last = Date.now()
@@ -1818,6 +1859,7 @@ export declare const crossWith: {
1818
1859
  * // Received 8 after 1ms
1819
1860
  * // > Emitted 8 after 101ms
1820
1861
  * // { _id: 'Chunk', values: [ 3, 6, 8 ] }
1862
+ * ```
1821
1863
  *
1822
1864
  * @since 2.0.0
1823
1865
  * @category utils
@@ -1835,6 +1877,7 @@ export declare const debounce: {
1835
1877
  * has paused typing so as to not prematurely recommend results.
1836
1878
  *
1837
1879
  * @example
1880
+ * ```ts
1838
1881
  * import { Effect, Stream } from "effect"
1839
1882
  *
1840
1883
  * let last = Date.now()
@@ -1872,6 +1915,7 @@ export declare const debounce: {
1872
1915
  * // Received 8 after 1ms
1873
1916
  * // > Emitted 8 after 101ms
1874
1917
  * // { _id: 'Chunk', values: [ 3, 6, 8 ] }
1918
+ * ```
1875
1919
  *
1876
1920
  * @since 2.0.0
1877
1921
  * @category utils
@@ -1889,6 +1933,7 @@ export declare const debounce: {
1889
1933
  * has paused typing so as to not prematurely recommend results.
1890
1934
  *
1891
1935
  * @example
1936
+ * ```ts
1892
1937
  * import { Effect, Stream } from "effect"
1893
1938
  *
1894
1939
  * let last = Date.now()
@@ -1926,6 +1971,7 @@ export declare const debounce: {
1926
1971
  * // Received 8 after 1ms
1927
1972
  * // > Emitted 8 after 101ms
1928
1973
  * // { _id: 'Chunk', values: [ 3, 6, 8 ] }
1974
+ * ```
1929
1975
  *
1930
1976
  * @since 2.0.0
1931
1977
  * @category utils
@@ -2037,6 +2083,7 @@ export declare const distributedWithDynamic: {
2037
2083
  * elements. Useful for sequencing effects using streams:
2038
2084
  *
2039
2085
  * @example
2086
+ * ```ts
2040
2087
  * import { Effect, Stream } from "effect"
2041
2088
  *
2042
2089
  * // We create a stream and immediately drain it.
@@ -2044,6 +2091,7 @@ export declare const distributedWithDynamic: {
2044
2091
  *
2045
2092
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2046
2093
  * // { _id: 'Chunk', values: [] }
2094
+ * ```
2047
2095
  *
2048
2096
  * @since 2.0.0
2049
2097
  * @category utils
@@ -2242,12 +2290,14 @@ export declare const either: <A, E, R>(self: Stream<A, E, R>) => Stream<Either.E
2242
2290
  * The empty stream.
2243
2291
  *
2244
2292
  * @example
2293
+ * ```ts
2245
2294
  * import { Effect, Stream } from "effect"
2246
2295
  *
2247
2296
  * const stream = Stream.empty
2248
2297
  *
2249
2298
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2250
2299
  * // { _id: 'Chunk', values: [] }
2300
+ * ```
2251
2301
  *
2252
2302
  * @since 2.0.0
2253
2303
  * @category constructors
@@ -2257,6 +2307,7 @@ export declare const empty: Stream<never>;
2257
2307
  * Executes the provided finalizer after this stream's finalizers run.
2258
2308
  *
2259
2309
  * @example
2310
+ * ```ts
2260
2311
  * import { Console, Effect, Stream } from "effect"
2261
2312
  *
2262
2313
  * const program = Stream.fromEffect(Console.log("Application Logic.")).pipe(
@@ -2271,6 +2322,7 @@ export declare const empty: Stream<never>;
2271
2322
  * // Finalizing the stream
2272
2323
  * // Doing some other works after stream's finalization
2273
2324
  * // { _id: 'Chunk', values: [ undefined, undefined ] }
2325
+ * ```
2274
2326
  *
2275
2327
  * @since 2.0.0
2276
2328
  * @category utils
@@ -2280,6 +2332,7 @@ export declare const ensuring: {
2280
2332
  * Executes the provided finalizer after this stream's finalizers run.
2281
2333
  *
2282
2334
  * @example
2335
+ * ```ts
2283
2336
  * import { Console, Effect, Stream } from "effect"
2284
2337
  *
2285
2338
  * const program = Stream.fromEffect(Console.log("Application Logic.")).pipe(
@@ -2294,6 +2347,7 @@ export declare const ensuring: {
2294
2347
  * // Finalizing the stream
2295
2348
  * // Doing some other works after stream's finalization
2296
2349
  * // { _id: 'Chunk', values: [ undefined, undefined ] }
2350
+ * ```
2297
2351
  *
2298
2352
  * @since 2.0.0
2299
2353
  * @category utils
@@ -2303,6 +2357,7 @@ export declare const ensuring: {
2303
2357
  * Executes the provided finalizer after this stream's finalizers run.
2304
2358
  *
2305
2359
  * @example
2360
+ * ```ts
2306
2361
  * import { Console, Effect, Stream } from "effect"
2307
2362
  *
2308
2363
  * const program = Stream.fromEffect(Console.log("Application Logic.")).pipe(
@@ -2317,6 +2372,7 @@ export declare const ensuring: {
2317
2372
  * // Finalizing the stream
2318
2373
  * // Doing some other works after stream's finalization
2319
2374
  * // { _id: 'Chunk', values: [ undefined, undefined ] }
2375
+ * ```
2320
2376
  *
2321
2377
  * @since 2.0.0
2322
2378
  * @category utils
@@ -2384,6 +2440,7 @@ export declare const execute: <X, E, R>(effect: Effect.Effect<X, E, R>) => Strea
2384
2440
  * Terminates with the specified error.
2385
2441
  *
2386
2442
  * @example
2443
+ * ```ts
2387
2444
  * import { Effect, Stream } from "effect"
2388
2445
  *
2389
2446
  * const stream = Stream.fail("Uh oh!")
@@ -2394,6 +2451,7 @@ export declare const execute: <X, E, R>(effect: Effect.Effect<X, E, R>) => Strea
2394
2451
  * // _tag: 'Failure',
2395
2452
  * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' }
2396
2453
  * // }
2454
+ * ```
2397
2455
  *
2398
2456
  * @since 2.0.0
2399
2457
  * @category constructors
@@ -2424,12 +2482,14 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => St
2424
2482
  * Filters the elements emitted by this stream using the provided function.
2425
2483
  *
2426
2484
  * @example
2485
+ * ```ts
2427
2486
  * import { Effect, Stream } from "effect"
2428
2487
  *
2429
2488
  * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0))
2430
2489
  *
2431
2490
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2432
2491
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
2492
+ * ```
2433
2493
  *
2434
2494
  * @since 2.0.0
2435
2495
  * @category filtering
@@ -2439,12 +2499,14 @@ export declare const filter: {
2439
2499
  * Filters the elements emitted by this stream using the provided function.
2440
2500
  *
2441
2501
  * @example
2502
+ * ```ts
2442
2503
  * import { Effect, Stream } from "effect"
2443
2504
  *
2444
2505
  * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0))
2445
2506
  *
2446
2507
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2447
2508
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
2509
+ * ```
2448
2510
  *
2449
2511
  * @since 2.0.0
2450
2512
  * @category filtering
@@ -2454,12 +2516,14 @@ export declare const filter: {
2454
2516
  * Filters the elements emitted by this stream using the provided function.
2455
2517
  *
2456
2518
  * @example
2519
+ * ```ts
2457
2520
  * import { Effect, Stream } from "effect"
2458
2521
  *
2459
2522
  * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0))
2460
2523
  *
2461
2524
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2462
2525
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
2526
+ * ```
2463
2527
  *
2464
2528
  * @since 2.0.0
2465
2529
  * @category filtering
@@ -2469,12 +2533,14 @@ export declare const filter: {
2469
2533
  * Filters the elements emitted by this stream using the provided function.
2470
2534
  *
2471
2535
  * @example
2536
+ * ```ts
2472
2537
  * import { Effect, Stream } from "effect"
2473
2538
  *
2474
2539
  * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0))
2475
2540
  *
2476
2541
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2477
2542
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
2543
+ * ```
2478
2544
  *
2479
2545
  * @since 2.0.0
2480
2546
  * @category filtering
@@ -2484,12 +2550,14 @@ export declare const filter: {
2484
2550
  * Filters the elements emitted by this stream using the provided function.
2485
2551
  *
2486
2552
  * @example
2553
+ * ```ts
2487
2554
  * import { Effect, Stream } from "effect"
2488
2555
  *
2489
2556
  * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0))
2490
2557
  *
2491
2558
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2492
2559
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
2560
+ * ```
2493
2561
  *
2494
2562
  * @since 2.0.0
2495
2563
  * @category filtering
@@ -2617,6 +2685,7 @@ export declare const filterMapWhileEffect: {
2617
2685
  * when it ends.
2618
2686
  *
2619
2687
  * @example
2688
+ * ```ts
2620
2689
  * import { Console, Effect, Stream } from "effect"
2621
2690
  *
2622
2691
  * const application = Stream.fromEffect(Console.log("Application Logic."))
@@ -2638,6 +2707,7 @@ export declare const filterMapWhileEffect: {
2638
2707
  * // Deleting dir: tmp
2639
2708
  * // Temporary directory was deleted.
2640
2709
  * // { _id: 'Chunk', values: [ undefined, undefined ] }
2710
+ * ```
2641
2711
  *
2642
2712
  * @since 2.0.0
2643
2713
  * @category constructors
@@ -2852,6 +2922,7 @@ export declare const forever: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R
2852
2922
  * Creates a stream from an `AsyncIterable`.
2853
2923
  *
2854
2924
  * @example
2925
+ * ```ts
2855
2926
  * import { Effect, Stream } from "effect"
2856
2927
  *
2857
2928
  * const myAsyncIterable = async function*() {
@@ -2866,6 +2937,7 @@ export declare const forever: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R
2866
2937
  *
2867
2938
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2868
2939
  * // { _id: 'Chunk', values: [ 1, 2 ] }
2940
+ * ```
2869
2941
  *
2870
2942
  * @since 2.0.0
2871
2943
  * @category constructors
@@ -2889,6 +2961,7 @@ export declare const toChannel: <A, E, R>(stream: Stream<A, E, R>) => Channel.Ch
2889
2961
  * Creates a stream from a `Chunk` of values.
2890
2962
  *
2891
2963
  * @example
2964
+ * ```ts
2892
2965
  * import { Chunk, Effect, Stream } from "effect"
2893
2966
  *
2894
2967
  * // Creating a stream with values from a single Chunk
@@ -2896,6 +2969,7 @@ export declare const toChannel: <A, E, R>(stream: Stream<A, E, R>) => Channel.Ch
2896
2969
  *
2897
2970
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2898
2971
  * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
2972
+ * ```
2899
2973
  *
2900
2974
  * @since 2.0.0
2901
2975
  * @category constructors
@@ -2946,6 +3020,7 @@ export declare const fromChunkQueue: <A>(queue: Queue.Dequeue<Chunk.Chunk<A>>, o
2946
3020
  * Creates a stream from an arbitrary number of chunks.
2947
3021
  *
2948
3022
  * @example
3023
+ * ```ts
2949
3024
  * import { Chunk, Effect, Stream } from "effect"
2950
3025
  *
2951
3026
  * // Creating a stream with values from multiple Chunks
@@ -2953,6 +3028,7 @@ export declare const fromChunkQueue: <A>(queue: Queue.Dequeue<Chunk.Chunk<A>>, o
2953
3028
  *
2954
3029
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2955
3030
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] }
3031
+ * ```
2956
3032
  *
2957
3033
  * @since 2.0.0
2958
3034
  * @category constructors
@@ -2963,12 +3039,14 @@ export declare const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream
2963
3039
  * with the failure value of this effect.
2964
3040
  *
2965
3041
  * @example
3042
+ * ```ts
2966
3043
  * import { Effect, Random, Stream } from "effect"
2967
3044
  *
2968
3045
  * const stream = Stream.fromEffect(Random.nextInt)
2969
3046
  *
2970
3047
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
2971
3048
  * // Example Output: { _id: 'Chunk', values: [ 922694024 ] }
3049
+ * ```
2972
3050
  *
2973
3051
  * @since 2.0.0
2974
3052
  * @category constructors
@@ -3026,6 +3104,7 @@ export declare const fromTPubSub: <A>(pubsub: TPubSub<A>) => Stream<A>;
3026
3104
  * Creates a new `Stream` from an iterable collection of values.
3027
3105
  *
3028
3106
  * @example
3107
+ * ```ts
3029
3108
  * import { Effect, Stream } from "effect"
3030
3109
  *
3031
3110
  * const numbers = [1, 2, 3]
@@ -3034,6 +3113,7 @@ export declare const fromTPubSub: <A>(pubsub: TPubSub<A>) => Stream<A>;
3034
3113
  *
3035
3114
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
3036
3115
  * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
3116
+ * ```
3037
3117
  *
3038
3118
  * @since 2.0.0
3039
3119
  * @category constructors
@@ -3043,6 +3123,7 @@ export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<A>;
3043
3123
  * Creates a stream from an effect producing a value of type `Iterable<A>`.
3044
3124
  *
3045
3125
  * @example
3126
+ * ```ts
3046
3127
  * import { Context, Effect, Stream } from "effect"
3047
3128
  *
3048
3129
  * class Database extends Context.Tag("Database")<
@@ -3058,6 +3139,7 @@ export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<A>;
3058
3139
  * // Stream.runCollect(stream.pipe(Stream.provideService(Database, { getUsers: Effect.succeed(["user1", "user2"]) })))
3059
3140
  * // ).then(console.log)
3060
3141
  * // { _id: 'Chunk', values: [ 'user1', 'user2' ] }
3142
+ * ```
3061
3143
  *
3062
3144
  * @since 2.0.0
3063
3145
  * @category constructors
@@ -3172,6 +3254,7 @@ export declare const fromReadableStreamByob: {
3172
3254
  * schedule, continuing for as long as the schedule continues.
3173
3255
  *
3174
3256
  * @example
3257
+ * ```ts
3175
3258
  * import { Effect, Schedule, Stream } from "effect"
3176
3259
  *
3177
3260
  * // Emits values every 1 second for a total of 5 emissions
@@ -3183,6 +3266,7 @@ export declare const fromReadableStreamByob: {
3183
3266
  *
3184
3267
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
3185
3268
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
3269
+ * ```
3186
3270
  *
3187
3271
  * @since 2.0.0
3188
3272
  * @category constructors
@@ -3217,6 +3301,7 @@ export declare const groupAdjacentBy: {
3217
3301
  * More powerful version of `Stream.groupByKey`.
3218
3302
  *
3219
3303
  * @example
3304
+ * ```ts
3220
3305
  * import { Chunk, Effect, GroupBy, Stream } from "effect"
3221
3306
  *
3222
3307
  * const groupByKeyResult = Stream.fromIterable([
@@ -3244,6 +3329,7 @@ export declare const groupAdjacentBy: {
3244
3329
  * // _id: 'Chunk',
3245
3330
  * // values: [ [ 'M', 1 ], [ 'J', 3 ], [ 'R', 2 ], [ 'P', 2 ] ]
3246
3331
  * // }
3332
+ * ```
3247
3333
  *
3248
3334
  * @since 2.0.0
3249
3335
  * @category grouping
@@ -3253,6 +3339,7 @@ export declare const groupBy: {
3253
3339
  * More powerful version of `Stream.groupByKey`.
3254
3340
  *
3255
3341
  * @example
3342
+ * ```ts
3256
3343
  * import { Chunk, Effect, GroupBy, Stream } from "effect"
3257
3344
  *
3258
3345
  * const groupByKeyResult = Stream.fromIterable([
@@ -3280,6 +3367,7 @@ export declare const groupBy: {
3280
3367
  * // _id: 'Chunk',
3281
3368
  * // values: [ [ 'M', 1 ], [ 'J', 3 ], [ 'R', 2 ], [ 'P', 2 ] ]
3282
3369
  * // }
3370
+ * ```
3283
3371
  *
3284
3372
  * @since 2.0.0
3285
3373
  * @category grouping
@@ -3291,6 +3379,7 @@ export declare const groupBy: {
3291
3379
  * More powerful version of `Stream.groupByKey`.
3292
3380
  *
3293
3381
  * @example
3382
+ * ```ts
3294
3383
  * import { Chunk, Effect, GroupBy, Stream } from "effect"
3295
3384
  *
3296
3385
  * const groupByKeyResult = Stream.fromIterable([
@@ -3318,6 +3407,7 @@ export declare const groupBy: {
3318
3407
  * // _id: 'Chunk',
3319
3408
  * // values: [ [ 'M', 1 ], [ 'J', 3 ], [ 'R', 2 ], [ 'P', 2 ] ]
3320
3409
  * // }
3410
+ * ```
3321
3411
  *
3322
3412
  * @since 2.0.0
3323
3413
  * @category grouping
@@ -3449,6 +3539,7 @@ export declare const groupByKey: {
3449
3539
  * Partitions the stream with specified `chunkSize`.
3450
3540
  *
3451
3541
  * @example
3542
+ * ```ts
3452
3543
  * import { Effect, Stream } from "effect"
3453
3544
  *
3454
3545
  * const stream = Stream.range(0, 8).pipe(Stream.grouped(3))
@@ -3463,6 +3554,7 @@ export declare const groupByKey: {
3463
3554
  * // [length]: 3
3464
3555
  * // ]
3465
3556
  * // }
3557
+ * ```
3466
3558
  *
3467
3559
  * @since 2.0.0
3468
3560
  * @category grouping
@@ -3472,6 +3564,7 @@ export declare const grouped: {
3472
3564
  * Partitions the stream with specified `chunkSize`.
3473
3565
  *
3474
3566
  * @example
3567
+ * ```ts
3475
3568
  * import { Effect, Stream } from "effect"
3476
3569
  *
3477
3570
  * const stream = Stream.range(0, 8).pipe(Stream.grouped(3))
@@ -3486,6 +3579,7 @@ export declare const grouped: {
3486
3579
  * // [length]: 3
3487
3580
  * // ]
3488
3581
  * // }
3582
+ * ```
3489
3583
  *
3490
3584
  * @since 2.0.0
3491
3585
  * @category grouping
@@ -3495,6 +3589,7 @@ export declare const grouped: {
3495
3589
  * Partitions the stream with specified `chunkSize`.
3496
3590
  *
3497
3591
  * @example
3592
+ * ```ts
3498
3593
  * import { Effect, Stream } from "effect"
3499
3594
  *
3500
3595
  * const stream = Stream.range(0, 8).pipe(Stream.grouped(3))
@@ -3509,6 +3604,7 @@ export declare const grouped: {
3509
3604
  * // [length]: 3
3510
3605
  * // ]
3511
3606
  * // }
3607
+ * ```
3512
3608
  *
3513
3609
  * @since 2.0.0
3514
3610
  * @category grouping
@@ -3520,6 +3616,7 @@ export declare const grouped: {
3520
3616
  * `duration` has passed, whichever is satisfied first.
3521
3617
  *
3522
3618
  * @example
3619
+ * ```ts
3523
3620
  * import { Chunk, Effect, Schedule, Stream } from "effect"
3524
3621
  *
3525
3622
  * const stream = Stream.range(0, 9).pipe(
@@ -3555,6 +3652,7 @@ export declare const grouped: {
3555
3652
  * // ]
3556
3653
  * // }
3557
3654
  * // ]
3655
+ * ```
3558
3656
  *
3559
3657
  * @since 2.0.0
3560
3658
  * @category grouping
@@ -3565,6 +3663,7 @@ export declare const groupedWithin: {
3565
3663
  * `duration` has passed, whichever is satisfied first.
3566
3664
  *
3567
3665
  * @example
3666
+ * ```ts
3568
3667
  * import { Chunk, Effect, Schedule, Stream } from "effect"
3569
3668
  *
3570
3669
  * const stream = Stream.range(0, 9).pipe(
@@ -3600,6 +3699,7 @@ export declare const groupedWithin: {
3600
3699
  * // ]
3601
3700
  * // }
3602
3701
  * // ]
3702
+ * ```
3603
3703
  *
3604
3704
  * @since 2.0.0
3605
3705
  * @category grouping
@@ -3610,6 +3710,7 @@ export declare const groupedWithin: {
3610
3710
  * `duration` has passed, whichever is satisfied first.
3611
3711
  *
3612
3712
  * @example
3713
+ * ```ts
3613
3714
  * import { Chunk, Effect, Schedule, Stream } from "effect"
3614
3715
  *
3615
3716
  * const stream = Stream.range(0, 9).pipe(
@@ -3645,6 +3746,7 @@ export declare const groupedWithin: {
3645
3746
  * // ]
3646
3747
  * // }
3647
3748
  * // ]
3749
+ * ```
3648
3750
  *
3649
3751
  * @since 2.0.0
3650
3752
  * @category grouping
@@ -3770,6 +3872,7 @@ export declare const identity: <A, E = never, R = never>() => Stream<A, E, R>;
3770
3872
  * pulled.
3771
3873
  *
3772
3874
  * @example
3875
+ * ```ts
3773
3876
  * import { Effect, Stream } from "effect"
3774
3877
  *
3775
3878
  * const s1 = Stream.make(1, 2, 3)
@@ -3779,6 +3882,7 @@ export declare const identity: <A, E = never, R = never>() => Stream<A, E, R>;
3779
3882
  *
3780
3883
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
3781
3884
  * // { _id: 'Chunk', values: [ 1, 4, 2, 5, 3, 6 ] }
3885
+ * ```
3782
3886
  * @since 2.0.0
3783
3887
  * @category utils
3784
3888
  */
@@ -3790,6 +3894,7 @@ export declare const interleave: {
3790
3894
  * pulled.
3791
3895
  *
3792
3896
  * @example
3897
+ * ```ts
3793
3898
  * import { Effect, Stream } from "effect"
3794
3899
  *
3795
3900
  * const s1 = Stream.make(1, 2, 3)
@@ -3799,6 +3904,7 @@ export declare const interleave: {
3799
3904
  *
3800
3905
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
3801
3906
  * // { _id: 'Chunk', values: [ 1, 4, 2, 5, 3, 6 ] }
3907
+ * ```
3802
3908
  * @since 2.0.0
3803
3909
  * @category utils
3804
3910
  */
@@ -3810,6 +3916,7 @@ export declare const interleave: {
3810
3916
  * pulled.
3811
3917
  *
3812
3918
  * @example
3919
+ * ```ts
3813
3920
  * import { Effect, Stream } from "effect"
3814
3921
  *
3815
3922
  * const s1 = Stream.make(1, 2, 3)
@@ -3819,6 +3926,7 @@ export declare const interleave: {
3819
3926
  *
3820
3927
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
3821
3928
  * // { _id: 'Chunk', values: [ 1, 4, 2, 5, 3, 6 ] }
3929
+ * ```
3822
3930
  * @since 2.0.0
3823
3931
  * @category utils
3824
3932
  */
@@ -3834,6 +3942,7 @@ export declare const interleave: {
3834
3942
  * ignored.
3835
3943
  *
3836
3944
  * @example
3945
+ * ```ts
3837
3946
  * import { Effect, Stream } from "effect"
3838
3947
  *
3839
3948
  * const s1 = Stream.make(1, 3, 5, 7, 9)
@@ -3851,6 +3960,7 @@ export declare const interleave: {
3851
3960
  * // 8, 5, 10, 7, 9
3852
3961
  * // ]
3853
3962
  * // }
3963
+ * ```
3854
3964
  *
3855
3965
  * @since 2.0.0
3856
3966
  * @category utils
@@ -3866,6 +3976,7 @@ export declare const interleaveWith: {
3866
3976
  * ignored.
3867
3977
  *
3868
3978
  * @example
3979
+ * ```ts
3869
3980
  * import { Effect, Stream } from "effect"
3870
3981
  *
3871
3982
  * const s1 = Stream.make(1, 3, 5, 7, 9)
@@ -3883,6 +3994,7 @@ export declare const interleaveWith: {
3883
3994
  * // 8, 5, 10, 7, 9
3884
3995
  * // ]
3885
3996
  * // }
3997
+ * ```
3886
3998
  *
3887
3999
  * @since 2.0.0
3888
4000
  * @category utils
@@ -3898,6 +4010,7 @@ export declare const interleaveWith: {
3898
4010
  * ignored.
3899
4011
  *
3900
4012
  * @example
4013
+ * ```ts
3901
4014
  * import { Effect, Stream } from "effect"
3902
4015
  *
3903
4016
  * const s1 = Stream.make(1, 3, 5, 7, 9)
@@ -3915,6 +4028,7 @@ export declare const interleaveWith: {
3915
4028
  * // 8, 5, 10, 7, 9
3916
4029
  * // ]
3917
4030
  * // }
4031
+ * ```
3918
4032
  *
3919
4033
  * @since 2.0.0
3920
4034
  * @category utils
@@ -3925,6 +4039,7 @@ export declare const interleaveWith: {
3925
4039
  * Intersperse stream with provided `element`.
3926
4040
  *
3927
4041
  * @example
4042
+ * ```ts
3928
4043
  * import { Effect, Stream } from "effect"
3929
4044
  *
3930
4045
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(Stream.intersperse(0))
@@ -3937,6 +4052,7 @@ export declare const interleaveWith: {
3937
4052
  * // 0, 4, 0, 5
3938
4053
  * // ]
3939
4054
  * // }
4055
+ * ```
3940
4056
  *
3941
4057
  * @since 2.0.0
3942
4058
  * @category utils
@@ -3946,6 +4062,7 @@ export declare const intersperse: {
3946
4062
  * Intersperse stream with provided `element`.
3947
4063
  *
3948
4064
  * @example
4065
+ * ```ts
3949
4066
  * import { Effect, Stream } from "effect"
3950
4067
  *
3951
4068
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(Stream.intersperse(0))
@@ -3958,6 +4075,7 @@ export declare const intersperse: {
3958
4075
  * // 0, 4, 0, 5
3959
4076
  * // ]
3960
4077
  * // }
4078
+ * ```
3961
4079
  *
3962
4080
  * @since 2.0.0
3963
4081
  * @category utils
@@ -3967,6 +4085,7 @@ export declare const intersperse: {
3967
4085
  * Intersperse stream with provided `element`.
3968
4086
  *
3969
4087
  * @example
4088
+ * ```ts
3970
4089
  * import { Effect, Stream } from "effect"
3971
4090
  *
3972
4091
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(Stream.intersperse(0))
@@ -3979,6 +4098,7 @@ export declare const intersperse: {
3979
4098
  * // 0, 4, 0, 5
3980
4099
  * // ]
3981
4100
  * // }
4101
+ * ```
3982
4102
  *
3983
4103
  * @since 2.0.0
3984
4104
  * @category utils
@@ -3989,6 +4109,7 @@ export declare const intersperse: {
3989
4109
  * Intersperse the specified element, also adding a prefix and a suffix.
3990
4110
  *
3991
4111
  * @example
4112
+ * ```ts
3992
4113
  * import { Effect, Stream } from "effect"
3993
4114
  *
3994
4115
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(
@@ -4008,6 +4129,7 @@ export declare const intersperse: {
4008
4129
  * // ']'
4009
4130
  * // ]
4010
4131
  * // }
4132
+ * ```
4011
4133
  *
4012
4134
  * @since 2.0.0
4013
4135
  * @category utils
@@ -4017,6 +4139,7 @@ export declare const intersperseAffixes: {
4017
4139
  * Intersperse the specified element, also adding a prefix and a suffix.
4018
4140
  *
4019
4141
  * @example
4142
+ * ```ts
4020
4143
  * import { Effect, Stream } from "effect"
4021
4144
  *
4022
4145
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(
@@ -4036,6 +4159,7 @@ export declare const intersperseAffixes: {
4036
4159
  * // ']'
4037
4160
  * // ]
4038
4161
  * // }
4162
+ * ```
4039
4163
  *
4040
4164
  * @since 2.0.0
4041
4165
  * @category utils
@@ -4049,6 +4173,7 @@ export declare const intersperseAffixes: {
4049
4173
  * Intersperse the specified element, also adding a prefix and a suffix.
4050
4174
  *
4051
4175
  * @example
4176
+ * ```ts
4052
4177
  * import { Effect, Stream } from "effect"
4053
4178
  *
4054
4179
  * const stream = Stream.make(1, 2, 3, 4, 5).pipe(
@@ -4068,6 +4193,7 @@ export declare const intersperseAffixes: {
4068
4193
  * // ']'
4069
4194
  * // ]
4070
4195
  * // }
4196
+ * ```
4071
4197
  *
4072
4198
  * @since 2.0.0
4073
4199
  * @category utils
@@ -4182,6 +4308,7 @@ export declare const interruptWhenDeferred: {
4182
4308
  * f(f(f(a))), ...
4183
4309
  *
4184
4310
  * @example
4311
+ * ```ts
4185
4312
  * import { Effect, Stream } from "effect"
4186
4313
  *
4187
4314
  * // An infinite Stream of numbers starting from 1 and incrementing
@@ -4189,6 +4316,7 @@ export declare const interruptWhenDeferred: {
4189
4316
  *
4190
4317
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(10)))).then(console.log)
4191
4318
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] }
4319
+ * ```
4192
4320
  *
4193
4321
  * @since 2.0.0
4194
4322
  * @category constructors
@@ -4198,12 +4326,14 @@ export declare const iterate: <A>(value: A, next: (value: A) => A) => Stream<A>;
4198
4326
  * Creates a stream from an sequence of values.
4199
4327
  *
4200
4328
  * @example
4329
+ * ```ts
4201
4330
  * import { Effect, Stream } from "effect"
4202
4331
  *
4203
4332
  * const stream = Stream.make(1, 2, 3)
4204
4333
  *
4205
4334
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4206
4335
  * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
4336
+ * ```
4207
4337
  *
4208
4338
  * @since 2.0.0
4209
4339
  * @category constructors
@@ -4213,12 +4343,14 @@ export declare const make: <As extends Array<any>>(...as: As) => Stream<As[numbe
4213
4343
  * Transforms the elements of this stream using the supplied function.
4214
4344
  *
4215
4345
  * @example
4346
+ * ```ts
4216
4347
  * import { Effect, Stream } from "effect"
4217
4348
  *
4218
4349
  * const stream = Stream.make(1, 2, 3).pipe(Stream.map((n) => n + 1))
4219
4350
  *
4220
4351
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4221
4352
  * // { _id: 'Chunk', values: [ 2, 3, 4 ] }
4353
+ * ```
4222
4354
  *
4223
4355
  * @since 2.0.0
4224
4356
  * @category mapping
@@ -4228,12 +4360,14 @@ export declare const map: {
4228
4360
  * Transforms the elements of this stream using the supplied function.
4229
4361
  *
4230
4362
  * @example
4363
+ * ```ts
4231
4364
  * import { Effect, Stream } from "effect"
4232
4365
  *
4233
4366
  * const stream = Stream.make(1, 2, 3).pipe(Stream.map((n) => n + 1))
4234
4367
  *
4235
4368
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4236
4369
  * // { _id: 'Chunk', values: [ 2, 3, 4 ] }
4370
+ * ```
4237
4371
  *
4238
4372
  * @since 2.0.0
4239
4373
  * @category mapping
@@ -4243,12 +4377,14 @@ export declare const map: {
4243
4377
  * Transforms the elements of this stream using the supplied function.
4244
4378
  *
4245
4379
  * @example
4380
+ * ```ts
4246
4381
  * import { Effect, Stream } from "effect"
4247
4382
  *
4248
4383
  * const stream = Stream.make(1, 2, 3).pipe(Stream.map((n) => n + 1))
4249
4384
  *
4250
4385
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4251
4386
  * // { _id: 'Chunk', values: [ 2, 3, 4 ] }
4387
+ * ```
4252
4388
  *
4253
4389
  * @since 2.0.0
4254
4390
  * @category mapping
@@ -4259,6 +4395,7 @@ export declare const map: {
4259
4395
  * Statefully maps over the elements of this stream to produce new elements.
4260
4396
  *
4261
4397
  * @example
4398
+ * ```ts
4262
4399
  * import { Effect, Stream } from "effect"
4263
4400
  *
4264
4401
  * const runningTotal = (stream: Stream.Stream<number>): Stream.Stream<number> =>
@@ -4269,6 +4406,7 @@ export declare const map: {
4269
4406
  * // console.log
4270
4407
  * // )
4271
4408
  * // { _id: "Chunk", values: [ 0, 1, 3, 6, 10, 15, 21 ] }
4409
+ * ```
4272
4410
  *
4273
4411
  * @since 2.0.0
4274
4412
  * @category mapping
@@ -4278,6 +4416,7 @@ export declare const mapAccum: {
4278
4416
  * Statefully maps over the elements of this stream to produce new elements.
4279
4417
  *
4280
4418
  * @example
4419
+ * ```ts
4281
4420
  * import { Effect, Stream } from "effect"
4282
4421
  *
4283
4422
  * const runningTotal = (stream: Stream.Stream<number>): Stream.Stream<number> =>
@@ -4288,6 +4427,7 @@ export declare const mapAccum: {
4288
4427
  * // console.log
4289
4428
  * // )
4290
4429
  * // { _id: "Chunk", values: [ 0, 1, 3, 6, 10, 15, 21 ] }
4430
+ * ```
4291
4431
  *
4292
4432
  * @since 2.0.0
4293
4433
  * @category mapping
@@ -4297,6 +4437,7 @@ export declare const mapAccum: {
4297
4437
  * Statefully maps over the elements of this stream to produce new elements.
4298
4438
  *
4299
4439
  * @example
4440
+ * ```ts
4300
4441
  * import { Effect, Stream } from "effect"
4301
4442
  *
4302
4443
  * const runningTotal = (stream: Stream.Stream<number>): Stream.Stream<number> =>
@@ -4307,6 +4448,7 @@ export declare const mapAccum: {
4307
4448
  * // console.log
4308
4449
  * // )
4309
4450
  * // { _id: "Chunk", values: [ 0, 1, 3, 6, 10, 15, 21 ] }
4451
+ * ```
4310
4452
  *
4311
4453
  * @since 2.0.0
4312
4454
  * @category mapping
@@ -4418,6 +4560,7 @@ export declare const mapChunksEffect: {
4418
4560
  * output of this stream.
4419
4561
  *
4420
4562
  * @example
4563
+ * ```ts
4421
4564
  * import { Effect, Stream } from "effect"
4422
4565
  *
4423
4566
  * const numbers = Stream.make("1-2-3", "4-5", "6").pipe(
@@ -4427,6 +4570,7 @@ export declare const mapChunksEffect: {
4427
4570
  *
4428
4571
  * // Effect.runPromise(Stream.runCollect(numbers)).then(console.log)
4429
4572
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] }
4573
+ * ```
4430
4574
  *
4431
4575
  * @since 2.0.0
4432
4576
  * @category mapping
@@ -4437,6 +4581,7 @@ export declare const mapConcat: {
4437
4581
  * output of this stream.
4438
4582
  *
4439
4583
  * @example
4584
+ * ```ts
4440
4585
  * import { Effect, Stream } from "effect"
4441
4586
  *
4442
4587
  * const numbers = Stream.make("1-2-3", "4-5", "6").pipe(
@@ -4446,6 +4591,7 @@ export declare const mapConcat: {
4446
4591
  *
4447
4592
  * // Effect.runPromise(Stream.runCollect(numbers)).then(console.log)
4448
4593
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] }
4594
+ * ```
4449
4595
  *
4450
4596
  * @since 2.0.0
4451
4597
  * @category mapping
@@ -4456,6 +4602,7 @@ export declare const mapConcat: {
4456
4602
  * output of this stream.
4457
4603
  *
4458
4604
  * @example
4605
+ * ```ts
4459
4606
  * import { Effect, Stream } from "effect"
4460
4607
  *
4461
4608
  * const numbers = Stream.make("1-2-3", "4-5", "6").pipe(
@@ -4465,6 +4612,7 @@ export declare const mapConcat: {
4465
4612
  *
4466
4613
  * // Effect.runPromise(Stream.runCollect(numbers)).then(console.log)
4467
4614
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] }
4615
+ * ```
4468
4616
  *
4469
4617
  * @since 2.0.0
4470
4618
  * @category mapping
@@ -4550,6 +4698,7 @@ export declare const mapConcatEffect: {
4550
4698
  * Maps over elements of the stream with the specified effectful function.
4551
4699
  *
4552
4700
  * @example
4701
+ * ```ts
4553
4702
  * import { Effect, Random, Stream } from "effect"
4554
4703
  *
4555
4704
  * const stream = Stream.make(10, 20, 30).pipe(
@@ -4558,6 +4707,7 @@ export declare const mapConcatEffect: {
4558
4707
  *
4559
4708
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4560
4709
  * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] }
4710
+ * ```
4561
4711
  *
4562
4712
  * @since 2.0.0
4563
4713
  * @category mapping
@@ -4567,6 +4717,7 @@ export declare const mapEffect: {
4567
4717
  * Maps over elements of the stream with the specified effectful function.
4568
4718
  *
4569
4719
  * @example
4720
+ * ```ts
4570
4721
  * import { Effect, Random, Stream } from "effect"
4571
4722
  *
4572
4723
  * const stream = Stream.make(10, 20, 30).pipe(
@@ -4575,6 +4726,7 @@ export declare const mapEffect: {
4575
4726
  *
4576
4727
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4577
4728
  * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] }
4729
+ * ```
4578
4730
  *
4579
4731
  * @since 2.0.0
4580
4732
  * @category mapping
@@ -4587,6 +4739,7 @@ export declare const mapEffect: {
4587
4739
  * Maps over elements of the stream with the specified effectful function.
4588
4740
  *
4589
4741
  * @example
4742
+ * ```ts
4590
4743
  * import { Effect, Random, Stream } from "effect"
4591
4744
  *
4592
4745
  * const stream = Stream.make(10, 20, 30).pipe(
@@ -4595,6 +4748,7 @@ export declare const mapEffect: {
4595
4748
  *
4596
4749
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4597
4750
  * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] }
4751
+ * ```
4598
4752
  *
4599
4753
  * @since 2.0.0
4600
4754
  * @category mapping
@@ -4607,6 +4761,7 @@ export declare const mapEffect: {
4607
4761
  * Maps over elements of the stream with the specified effectful function.
4608
4762
  *
4609
4763
  * @example
4764
+ * ```ts
4610
4765
  * import { Effect, Random, Stream } from "effect"
4611
4766
  *
4612
4767
  * const stream = Stream.make(10, 20, 30).pipe(
@@ -4615,6 +4770,7 @@ export declare const mapEffect: {
4615
4770
  *
4616
4771
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4617
4772
  * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] }
4773
+ * ```
4618
4774
  *
4619
4775
  * @since 2.0.0
4620
4776
  * @category mapping
@@ -4627,6 +4783,7 @@ export declare const mapEffect: {
4627
4783
  * Maps over elements of the stream with the specified effectful function.
4628
4784
  *
4629
4785
  * @example
4786
+ * ```ts
4630
4787
  * import { Effect, Random, Stream } from "effect"
4631
4788
  *
4632
4789
  * const stream = Stream.make(10, 20, 30).pipe(
@@ -4635,6 +4792,7 @@ export declare const mapEffect: {
4635
4792
  *
4636
4793
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4637
4794
  * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] }
4795
+ * ```
4638
4796
  *
4639
4797
  * @since 2.0.0
4640
4798
  * @category mapping
@@ -4695,6 +4853,7 @@ export declare const mapErrorCause: {
4695
4853
  * no termination strategy is specified.
4696
4854
  *
4697
4855
  * @example
4856
+ * ```ts
4698
4857
  * import { Effect, Schedule, Stream } from "effect"
4699
4858
  *
4700
4859
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -4708,6 +4867,7 @@ export declare const mapErrorCause: {
4708
4867
  *
4709
4868
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4710
4869
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
4870
+ * ```
4711
4871
  *
4712
4872
  * @since 2.0.0
4713
4873
  * @category utils
@@ -4720,6 +4880,7 @@ export declare const merge: {
4720
4880
  * no termination strategy is specified.
4721
4881
  *
4722
4882
  * @example
4883
+ * ```ts
4723
4884
  * import { Effect, Schedule, Stream } from "effect"
4724
4885
  *
4725
4886
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -4733,6 +4894,7 @@ export declare const merge: {
4733
4894
  *
4734
4895
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4735
4896
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
4897
+ * ```
4736
4898
  *
4737
4899
  * @since 2.0.0
4738
4900
  * @category utils
@@ -4747,6 +4909,7 @@ export declare const merge: {
4747
4909
  * no termination strategy is specified.
4748
4910
  *
4749
4911
  * @example
4912
+ * ```ts
4750
4913
  * import { Effect, Schedule, Stream } from "effect"
4751
4914
  *
4752
4915
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -4760,6 +4923,7 @@ export declare const merge: {
4760
4923
  *
4761
4924
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4762
4925
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
4926
+ * ```
4763
4927
  *
4764
4928
  * @since 2.0.0
4765
4929
  * @category utils
@@ -4808,12 +4972,14 @@ export declare const mergeAll: {
4808
4972
  * @since 3.8.5
4809
4973
  *
4810
4974
  * @example
4975
+ * ```ts
4811
4976
  * import { Stream } from "effect"
4812
4977
  * // Stream.Stream<{ _tag: "a"; value: number; } | { _tag: "b"; value: string; }>
4813
4978
  * const res = Stream.mergeWithTag({
4814
4979
  * a: Stream.make(0),
4815
4980
  * b: Stream.make("")
4816
4981
  * }, { concurrency: "unbounded" })
4982
+ * ```
4817
4983
  */
4818
4984
  export declare const mergeWithTag: {
4819
4985
  /**
@@ -4822,12 +4988,14 @@ export declare const mergeWithTag: {
4822
4988
  * @since 3.8.5
4823
4989
  *
4824
4990
  * @example
4991
+ * ```ts
4825
4992
  * import { Stream } from "effect"
4826
4993
  * // Stream.Stream<{ _tag: "a"; value: number; } | { _tag: "b"; value: string; }>
4827
4994
  * const res = Stream.mergeWithTag({
4828
4995
  * a: Stream.make(0),
4829
4996
  * b: Stream.make("")
4830
4997
  * }, { concurrency: "unbounded" })
4998
+ * ```
4831
4999
  */
4832
5000
  <S extends {
4833
5001
  [k in string]: Stream<any, any, any>;
@@ -4846,12 +5014,14 @@ export declare const mergeWithTag: {
4846
5014
  * @since 3.8.5
4847
5015
  *
4848
5016
  * @example
5017
+ * ```ts
4849
5018
  * import { Stream } from "effect"
4850
5019
  * // Stream.Stream<{ _tag: "a"; value: number; } | { _tag: "b"; value: string; }>
4851
5020
  * const res = Stream.mergeWithTag({
4852
5021
  * a: Stream.make(0),
4853
5022
  * b: Stream.make("")
4854
5023
  * }, { concurrency: "unbounded" })
5024
+ * ```
4855
5025
  */
4856
5026
  (options: {
4857
5027
  readonly concurrency: number | "unbounded";
@@ -4873,6 +5043,7 @@ export declare const mergeWithTag: {
4873
5043
  * no termination strategy is specified.
4874
5044
  *
4875
5045
  * @example
5046
+ * ```ts
4876
5047
  * import { Effect, Schedule, Stream } from "effect"
4877
5048
  *
4878
5049
  * const s1 = Stream.make("1", "2", "3").pipe(
@@ -4889,6 +5060,7 @@ export declare const mergeWithTag: {
4889
5060
  *
4890
5061
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4891
5062
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
5063
+ * ```
4892
5064
  *
4893
5065
  * @since 2.0.0
4894
5066
  * @category utils
@@ -4902,6 +5074,7 @@ export declare const mergeWith: {
4902
5074
  * no termination strategy is specified.
4903
5075
  *
4904
5076
  * @example
5077
+ * ```ts
4905
5078
  * import { Effect, Schedule, Stream } from "effect"
4906
5079
  *
4907
5080
  * const s1 = Stream.make("1", "2", "3").pipe(
@@ -4918,6 +5091,7 @@ export declare const mergeWith: {
4918
5091
  *
4919
5092
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4920
5093
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
5094
+ * ```
4921
5095
  *
4922
5096
  * @since 2.0.0
4923
5097
  * @category utils
@@ -4935,6 +5109,7 @@ export declare const mergeWith: {
4935
5109
  * no termination strategy is specified.
4936
5110
  *
4937
5111
  * @example
5112
+ * ```ts
4938
5113
  * import { Effect, Schedule, Stream } from "effect"
4939
5114
  *
4940
5115
  * const s1 = Stream.make("1", "2", "3").pipe(
@@ -4951,6 +5126,7 @@ export declare const mergeWith: {
4951
5126
  *
4952
5127
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
4953
5128
  * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] }
5129
+ * ```
4954
5130
  *
4955
5131
  * @since 2.0.0
4956
5132
  * @category utils
@@ -5055,6 +5231,7 @@ export declare const never: Stream<never>;
5055
5231
  * Adds an effect to be executed at the end of the stream.
5056
5232
  *
5057
5233
  * @example
5234
+ * ```ts
5058
5235
  * import { Console, Effect, Stream } from "effect"
5059
5236
  *
5060
5237
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5069,6 +5246,7 @@ export declare const never: Stream<never>;
5069
5246
  * // after mapping: 6
5070
5247
  * // Stream ended
5071
5248
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5249
+ * ```
5072
5250
  *
5073
5251
  * @since 3.6.0
5074
5252
  * @category sequencing
@@ -5078,6 +5256,7 @@ export declare const onEnd: {
5078
5256
  * Adds an effect to be executed at the end of the stream.
5079
5257
  *
5080
5258
  * @example
5259
+ * ```ts
5081
5260
  * import { Console, Effect, Stream } from "effect"
5082
5261
  *
5083
5262
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5092,6 +5271,7 @@ export declare const onEnd: {
5092
5271
  * // after mapping: 6
5093
5272
  * // Stream ended
5094
5273
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5274
+ * ```
5095
5275
  *
5096
5276
  * @since 3.6.0
5097
5277
  * @category sequencing
@@ -5101,6 +5281,7 @@ export declare const onEnd: {
5101
5281
  * Adds an effect to be executed at the end of the stream.
5102
5282
  *
5103
5283
  * @example
5284
+ * ```ts
5104
5285
  * import { Console, Effect, Stream } from "effect"
5105
5286
  *
5106
5287
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5115,6 +5296,7 @@ export declare const onEnd: {
5115
5296
  * // after mapping: 6
5116
5297
  * // Stream ended
5117
5298
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5299
+ * ```
5118
5300
  *
5119
5301
  * @since 3.6.0
5120
5302
  * @category sequencing
@@ -5181,6 +5363,7 @@ export declare const onDone: {
5181
5363
  * Adds an effect to be executed at the start of the stream.
5182
5364
  *
5183
5365
  * @example
5366
+ * ```ts
5184
5367
  * import { Console, Effect, Stream } from "effect"
5185
5368
  *
5186
5369
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5195,6 +5378,7 @@ export declare const onDone: {
5195
5378
  * // after mapping: 4
5196
5379
  * // after mapping: 6
5197
5380
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5381
+ * ```
5198
5382
  *
5199
5383
  * @since 3.6.0
5200
5384
  * @category sequencing
@@ -5204,6 +5388,7 @@ export declare const onStart: {
5204
5388
  * Adds an effect to be executed at the start of the stream.
5205
5389
  *
5206
5390
  * @example
5391
+ * ```ts
5207
5392
  * import { Console, Effect, Stream } from "effect"
5208
5393
  *
5209
5394
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5218,6 +5403,7 @@ export declare const onStart: {
5218
5403
  * // after mapping: 4
5219
5404
  * // after mapping: 6
5220
5405
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5406
+ * ```
5221
5407
  *
5222
5408
  * @since 3.6.0
5223
5409
  * @category sequencing
@@ -5227,6 +5413,7 @@ export declare const onStart: {
5227
5413
  * Adds an effect to be executed at the start of the stream.
5228
5414
  *
5229
5415
  * @example
5416
+ * ```ts
5230
5417
  * import { Console, Effect, Stream } from "effect"
5231
5418
  *
5232
5419
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -5241,6 +5428,7 @@ export declare const onStart: {
5241
5428
  * // after mapping: 4
5242
5429
  * // after mapping: 6
5243
5430
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
5431
+ * ```
5244
5432
  *
5245
5433
  * @since 3.6.0
5246
5434
  * @category sequencing
@@ -5458,6 +5646,7 @@ export declare const orElseSucceed: {
5458
5646
  * APIs, hence the name.
5459
5647
  *
5460
5648
  * @example
5649
+ * ```ts
5461
5650
  * import { Effect, Option, Stream } from "effect"
5462
5651
  *
5463
5652
  * const stream = Stream.paginate(0, (n) => [
@@ -5467,6 +5656,7 @@ export declare const orElseSucceed: {
5467
5656
  *
5468
5657
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
5469
5658
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3 ] }
5659
+ * ```
5470
5660
  *
5471
5661
  * @since 2.0.0
5472
5662
  * @category constructors
@@ -5506,6 +5696,7 @@ export declare const paginateEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effe
5506
5696
  * further than the slower one.
5507
5697
  *
5508
5698
  * @example
5699
+ * ```ts
5509
5700
  * import { Effect, Stream } from "effect"
5510
5701
  *
5511
5702
  * const partition = Stream.range(1, 10).pipe(
@@ -5523,6 +5714,7 @@ export declare const paginateEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effe
5523
5714
  * // Effect.runPromise(program)
5524
5715
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
5525
5716
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5717
+ * ```
5526
5718
  *
5527
5719
  * @since 2.0.0
5528
5720
  * @category utils
@@ -5535,6 +5727,7 @@ export declare const partition: {
5535
5727
  * further than the slower one.
5536
5728
  *
5537
5729
  * @example
5730
+ * ```ts
5538
5731
  * import { Effect, Stream } from "effect"
5539
5732
  *
5540
5733
  * const partition = Stream.range(1, 10).pipe(
@@ -5552,6 +5745,7 @@ export declare const partition: {
5552
5745
  * // Effect.runPromise(program)
5553
5746
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
5554
5747
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5748
+ * ```
5555
5749
  *
5556
5750
  * @since 2.0.0
5557
5751
  * @category utils
@@ -5566,6 +5760,7 @@ export declare const partition: {
5566
5760
  * further than the slower one.
5567
5761
  *
5568
5762
  * @example
5763
+ * ```ts
5569
5764
  * import { Effect, Stream } from "effect"
5570
5765
  *
5571
5766
  * const partition = Stream.range(1, 10).pipe(
@@ -5583,6 +5778,7 @@ export declare const partition: {
5583
5778
  * // Effect.runPromise(program)
5584
5779
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
5585
5780
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5781
+ * ```
5586
5782
  *
5587
5783
  * @since 2.0.0
5588
5784
  * @category utils
@@ -5597,6 +5793,7 @@ export declare const partition: {
5597
5793
  * further than the slower one.
5598
5794
  *
5599
5795
  * @example
5796
+ * ```ts
5600
5797
  * import { Effect, Stream } from "effect"
5601
5798
  *
5602
5799
  * const partition = Stream.range(1, 10).pipe(
@@ -5614,6 +5811,7 @@ export declare const partition: {
5614
5811
  * // Effect.runPromise(program)
5615
5812
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
5616
5813
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5814
+ * ```
5617
5815
  *
5618
5816
  * @since 2.0.0
5619
5817
  * @category utils
@@ -5628,6 +5826,7 @@ export declare const partition: {
5628
5826
  * further than the slower one.
5629
5827
  *
5630
5828
  * @example
5829
+ * ```ts
5631
5830
  * import { Effect, Stream } from "effect"
5632
5831
  *
5633
5832
  * const partition = Stream.range(1, 10).pipe(
@@ -5645,6 +5844,7 @@ export declare const partition: {
5645
5844
  * // Effect.runPromise(program)
5646
5845
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] }
5647
5846
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5847
+ * ```
5648
5848
  *
5649
5849
  * @since 2.0.0
5650
5850
  * @category utils
@@ -5658,6 +5858,7 @@ export declare const partition: {
5658
5858
  * up to buffer elements further than the slower one.
5659
5859
  *
5660
5860
  * @example
5861
+ * ```ts
5661
5862
  * import { Effect, Either, Stream } from "effect"
5662
5863
  *
5663
5864
  * const partition = Stream.range(1, 9).pipe(
@@ -5678,6 +5879,7 @@ export declare const partition: {
5678
5879
  * // Effect.runPromise(program)
5679
5880
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] }
5680
5881
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5882
+ * ```
5681
5883
  *
5682
5884
  * @since 2.0.0
5683
5885
  * @category utils
@@ -5688,6 +5890,7 @@ export declare const partitionEither: {
5688
5890
  * up to buffer elements further than the slower one.
5689
5891
  *
5690
5892
  * @example
5893
+ * ```ts
5691
5894
  * import { Effect, Either, Stream } from "effect"
5692
5895
  *
5693
5896
  * const partition = Stream.range(1, 9).pipe(
@@ -5708,6 +5911,7 @@ export declare const partitionEither: {
5708
5911
  * // Effect.runPromise(program)
5709
5912
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] }
5710
5913
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5914
+ * ```
5711
5915
  *
5712
5916
  * @since 2.0.0
5713
5917
  * @category utils
@@ -5720,6 +5924,7 @@ export declare const partitionEither: {
5720
5924
  * up to buffer elements further than the slower one.
5721
5925
  *
5722
5926
  * @example
5927
+ * ```ts
5723
5928
  * import { Effect, Either, Stream } from "effect"
5724
5929
  *
5725
5930
  * const partition = Stream.range(1, 9).pipe(
@@ -5740,6 +5945,7 @@ export declare const partitionEither: {
5740
5945
  * // Effect.runPromise(program)
5741
5946
  * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] }
5742
5947
  * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] }
5948
+ * ```
5743
5949
  *
5744
5950
  * @since 2.0.0
5745
5951
  * @category utils
@@ -6055,6 +6261,7 @@ export declare const provideSomeLayer: {
6055
6261
  * Any upstream failures will cause the returned stream to fail.
6056
6262
  *
6057
6263
  * @example
6264
+ * ```ts
6058
6265
  * import { Stream, Schedule, Console, Effect } from "effect"
6059
6266
  *
6060
6267
  * const stream = Stream.fromSchedule(Schedule.spaced('2 millis')).pipe(
@@ -6071,6 +6278,7 @@ export declare const provideSomeLayer: {
6071
6278
  * // 3
6072
6279
  * // 4
6073
6280
  * // 5
6281
+ * ```
6074
6282
  * @since 3.7.0
6075
6283
  * @category racing
6076
6284
  */
@@ -6082,6 +6290,7 @@ export declare const race: {
6082
6290
  * Any upstream failures will cause the returned stream to fail.
6083
6291
  *
6084
6292
  * @example
6293
+ * ```ts
6085
6294
  * import { Stream, Schedule, Console, Effect } from "effect"
6086
6295
  *
6087
6296
  * const stream = Stream.fromSchedule(Schedule.spaced('2 millis')).pipe(
@@ -6098,6 +6307,7 @@ export declare const race: {
6098
6307
  * // 3
6099
6308
  * // 4
6100
6309
  * // 5
6310
+ * ```
6101
6311
  * @since 3.7.0
6102
6312
  * @category racing
6103
6313
  */
@@ -6109,6 +6319,7 @@ export declare const race: {
6109
6319
  * Any upstream failures will cause the returned stream to fail.
6110
6320
  *
6111
6321
  * @example
6322
+ * ```ts
6112
6323
  * import { Stream, Schedule, Console, Effect } from "effect"
6113
6324
  *
6114
6325
  * const stream = Stream.fromSchedule(Schedule.spaced('2 millis')).pipe(
@@ -6125,6 +6336,7 @@ export declare const race: {
6125
6336
  * // 3
6126
6337
  * // 4
6127
6338
  * // 5
6339
+ * ```
6128
6340
  * @since 3.7.0
6129
6341
  * @category racing
6130
6342
  */
@@ -6137,6 +6349,7 @@ export declare const race: {
6137
6349
  * Any upstream failures will cause the returned stream to fail.
6138
6350
  *
6139
6351
  * @example
6352
+ * ```ts
6140
6353
  * import { Stream, Schedule, Console, Effect } from "effect"
6141
6354
  *
6142
6355
  * const stream = Stream.raceAll(
@@ -6153,6 +6366,7 @@ export declare const race: {
6153
6366
  * // 3
6154
6367
  * // 4
6155
6368
  * // 5
6369
+ * ```
6156
6370
  * @since 3.5.0
6157
6371
  * @category racing
6158
6372
  */
@@ -6161,6 +6375,7 @@ export declare const raceAll: <S extends ReadonlyArray<Stream<any, any, any>>>(.
6161
6375
  * Constructs a stream from a range of integers, including both endpoints.
6162
6376
  *
6163
6377
  * @example
6378
+ * ```ts
6164
6379
  * import { Effect, Stream } from "effect"
6165
6380
  *
6166
6381
  * // A Stream with a range of numbers from 1 to 5
@@ -6168,6 +6383,7 @@ export declare const raceAll: <S extends ReadonlyArray<Stream<any, any, any>>>(.
6168
6383
  *
6169
6384
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
6170
6385
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
6386
+ * ```
6171
6387
  *
6172
6388
  * @since 2.0.0
6173
6389
  * @category constructors
@@ -6250,12 +6466,14 @@ export declare const refineOrDieWith: {
6250
6466
  * execute normally, and then repeat again according to the provided schedule.
6251
6467
  *
6252
6468
  * @example
6469
+ * ```ts
6253
6470
  * import { Effect, Schedule, Stream } from "effect"
6254
6471
  *
6255
6472
  * const stream = Stream.repeat(Stream.succeed(1), Schedule.forever)
6256
6473
  *
6257
6474
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
6258
6475
  * // { _id: 'Chunk', values: [ 1, 1, 1, 1, 1 ] }
6476
+ * ```
6259
6477
  *
6260
6478
  * @since 2.0.0
6261
6479
  * @category utils
@@ -6266,12 +6484,14 @@ export declare const repeat: {
6266
6484
  * execute normally, and then repeat again according to the provided schedule.
6267
6485
  *
6268
6486
  * @example
6487
+ * ```ts
6269
6488
  * import { Effect, Schedule, Stream } from "effect"
6270
6489
  *
6271
6490
  * const stream = Stream.repeat(Stream.succeed(1), Schedule.forever)
6272
6491
  *
6273
6492
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
6274
6493
  * // { _id: 'Chunk', values: [ 1, 1, 1, 1, 1 ] }
6494
+ * ```
6275
6495
  *
6276
6496
  * @since 2.0.0
6277
6497
  * @category utils
@@ -6282,12 +6502,14 @@ export declare const repeat: {
6282
6502
  * execute normally, and then repeat again according to the provided schedule.
6283
6503
  *
6284
6504
  * @example
6505
+ * ```ts
6285
6506
  * import { Effect, Schedule, Stream } from "effect"
6286
6507
  *
6287
6508
  * const stream = Stream.repeat(Stream.succeed(1), Schedule.forever)
6288
6509
  *
6289
6510
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
6290
6511
  * // { _id: 'Chunk', values: [ 1, 1, 1, 1, 1 ] }
6512
+ * ```
6291
6513
  *
6292
6514
  * @since 2.0.0
6293
6515
  * @category utils
@@ -6299,12 +6521,14 @@ export declare const repeat: {
6299
6521
  * forever.
6300
6522
  *
6301
6523
  * @example
6524
+ * ```ts
6302
6525
  * import { Effect, Random, Stream } from "effect"
6303
6526
  *
6304
6527
  * const stream = Stream.repeatEffect(Random.nextInt)
6305
6528
  *
6306
6529
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
6307
6530
  * // Example Output: { _id: 'Chunk', values: [ 3891571149, 4239494205, 2352981603, 2339111046, 1488052210 ] }
6531
+ * ```
6308
6532
  *
6309
6533
  * @since 2.0.0
6310
6534
  * @category constructors
@@ -6331,6 +6555,7 @@ export declare const repeatEffectChunkOption: <A, E, R>(effect: Effect.Effect<Ch
6331
6555
  * with `None`.
6332
6556
  *
6333
6557
  * @example
6558
+ * ```ts
6334
6559
  * // In this example, we're draining an Iterator to create a stream from it
6335
6560
  * import { Stream, Effect, Option } from "effect"
6336
6561
  *
@@ -6345,6 +6570,7 @@ export declare const repeatEffectChunkOption: <A, E, R>(effect: Effect.Effect<Ch
6345
6570
  * })
6346
6571
  * )
6347
6572
  * )
6573
+ * ```
6348
6574
  *
6349
6575
  * @since 2.0.0
6350
6576
  * @category constructors
@@ -6479,12 +6705,14 @@ export declare const repeatElementsWith: {
6479
6705
  * Repeats the provided value infinitely.
6480
6706
  *
6481
6707
  * @example
6708
+ * ```ts
6482
6709
  * import { Effect, Stream } from "effect"
6483
6710
  *
6484
6711
  * const stream = Stream.repeatValue(0)
6485
6712
  *
6486
6713
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
6487
6714
  * // { _id: 'Chunk', values: [ 0, 0, 0, 0, 0 ] }
6715
+ * ```
6488
6716
  *
6489
6717
  * @since 2.0.0
6490
6718
  * @category constructors
@@ -7135,12 +7363,14 @@ export declare const runSum: <E, R>(self: Stream<number, E, R>) => Effect.Effect
7135
7363
  * intermediate results of type `S` given an initial S.
7136
7364
  *
7137
7365
  * @example
7366
+ * ```ts
7138
7367
  * import { Effect, Stream } from "effect"
7139
7368
  *
7140
7369
  * const stream = Stream.range(1, 6).pipe(Stream.scan(0, (a, b) => a + b))
7141
7370
  *
7142
7371
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7143
7372
  * // { _id: 'Chunk', values: [ 0, 1, 3, 6, 10, 15, 21 ] }
7373
+ * ```
7144
7374
  *
7145
7375
  * @since 2.0.0
7146
7376
  * @category utils
@@ -7151,12 +7381,14 @@ export declare const scan: {
7151
7381
  * intermediate results of type `S` given an initial S.
7152
7382
  *
7153
7383
  * @example
7384
+ * ```ts
7154
7385
  * import { Effect, Stream } from "effect"
7155
7386
  *
7156
7387
  * const stream = Stream.range(1, 6).pipe(Stream.scan(0, (a, b) => a + b))
7157
7388
  *
7158
7389
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7159
7390
  * // { _id: 'Chunk', values: [ 0, 1, 3, 6, 10, 15, 21 ] }
7391
+ * ```
7160
7392
  *
7161
7393
  * @since 2.0.0
7162
7394
  * @category utils
@@ -7167,12 +7399,14 @@ export declare const scan: {
7167
7399
  * intermediate results of type `S` given an initial S.
7168
7400
  *
7169
7401
  * @example
7402
+ * ```ts
7170
7403
  * import { Effect, Stream } from "effect"
7171
7404
  *
7172
7405
  * const stream = Stream.range(1, 6).pipe(Stream.scan(0, (a, b) => a + b))
7173
7406
  *
7174
7407
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7175
7408
  * // { _id: 'Chunk', values: [ 0, 1, 3, 6, 10, 15, 21 ] }
7409
+ * ```
7176
7410
  *
7177
7411
  * @since 2.0.0
7178
7412
  * @category utils
@@ -7326,6 +7560,7 @@ export declare const scheduleWith: {
7326
7560
  * Creates a single-valued stream from a scoped resource.
7327
7561
  *
7328
7562
  * @example
7563
+ * ```ts
7329
7564
  * import { Console, Effect, Stream } from "effect"
7330
7565
  *
7331
7566
  * // Creating a single-valued stream from a scoped resource
@@ -7342,6 +7577,7 @@ export declare const scheduleWith: {
7342
7577
  * // use
7343
7578
  * // release
7344
7579
  * // { _id: 'Chunk', values: [ undefined ] }
7580
+ * ```
7345
7581
  *
7346
7582
  * @since 2.0.0
7347
7583
  * @category constructors
@@ -7608,6 +7844,7 @@ export declare const splitLines: <E, R>(self: Stream<string, E, R>) => Stream<st
7608
7844
  * Creates a single-valued pure stream.
7609
7845
  *
7610
7846
  * @example
7847
+ * ```ts
7611
7848
  * import { Effect, Stream } from "effect"
7612
7849
  *
7613
7850
  * // A Stream with a single number
@@ -7615,6 +7852,7 @@ export declare const splitLines: <E, R>(self: Stream<string, E, R>) => Stream<st
7615
7852
  *
7616
7853
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7617
7854
  * // { _id: 'Chunk', values: [ 3 ] }
7855
+ * ```
7618
7856
  *
7619
7857
  * @since 2.0.0
7620
7858
  * @category constructors
@@ -7638,12 +7876,14 @@ export declare const suspend: <A, E, R>(stream: LazyArg<Stream<A, E, R>>) => Str
7638
7876
  * Takes the specified number of elements from this stream.
7639
7877
  *
7640
7878
  * @example
7879
+ * ```ts
7641
7880
  * import { Effect, Stream } from "effect"
7642
7881
  *
7643
7882
  * const stream = Stream.take(Stream.iterate(0, (n) => n + 1), 5)
7644
7883
  *
7645
7884
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7646
7885
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
7886
+ * ```
7647
7887
  *
7648
7888
  * @since 2.0.0
7649
7889
  * @category utils
@@ -7653,12 +7893,14 @@ export declare const take: {
7653
7893
  * Takes the specified number of elements from this stream.
7654
7894
  *
7655
7895
  * @example
7896
+ * ```ts
7656
7897
  * import { Effect, Stream } from "effect"
7657
7898
  *
7658
7899
  * const stream = Stream.take(Stream.iterate(0, (n) => n + 1), 5)
7659
7900
  *
7660
7901
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7661
7902
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
7903
+ * ```
7662
7904
  *
7663
7905
  * @since 2.0.0
7664
7906
  * @category utils
@@ -7668,12 +7910,14 @@ export declare const take: {
7668
7910
  * Takes the specified number of elements from this stream.
7669
7911
  *
7670
7912
  * @example
7913
+ * ```ts
7671
7914
  * import { Effect, Stream } from "effect"
7672
7915
  *
7673
7916
  * const stream = Stream.take(Stream.iterate(0, (n) => n + 1), 5)
7674
7917
  *
7675
7918
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7676
7919
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
7920
+ * ```
7677
7921
  *
7678
7922
  * @since 2.0.0
7679
7923
  * @category utils
@@ -7684,12 +7928,14 @@ export declare const take: {
7684
7928
  * Takes the last specified number of elements from this stream.
7685
7929
  *
7686
7930
  * @example
7931
+ * ```ts
7687
7932
  * import { Effect, Stream } from "effect"
7688
7933
  *
7689
7934
  * const stream = Stream.takeRight(Stream.make(1, 2, 3, 4, 5, 6), 3)
7690
7935
  *
7691
7936
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7692
7937
  * // { _id: 'Chunk', values: [ 4, 5, 6 ] }
7938
+ * ```
7693
7939
  *
7694
7940
  * @since 2.0.0
7695
7941
  * @category utils
@@ -7699,12 +7945,14 @@ export declare const takeRight: {
7699
7945
  * Takes the last specified number of elements from this stream.
7700
7946
  *
7701
7947
  * @example
7948
+ * ```ts
7702
7949
  * import { Effect, Stream } from "effect"
7703
7950
  *
7704
7951
  * const stream = Stream.takeRight(Stream.make(1, 2, 3, 4, 5, 6), 3)
7705
7952
  *
7706
7953
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7707
7954
  * // { _id: 'Chunk', values: [ 4, 5, 6 ] }
7955
+ * ```
7708
7956
  *
7709
7957
  * @since 2.0.0
7710
7958
  * @category utils
@@ -7714,12 +7962,14 @@ export declare const takeRight: {
7714
7962
  * Takes the last specified number of elements from this stream.
7715
7963
  *
7716
7964
  * @example
7965
+ * ```ts
7717
7966
  * import { Effect, Stream } from "effect"
7718
7967
  *
7719
7968
  * const stream = Stream.takeRight(Stream.make(1, 2, 3, 4, 5, 6), 3)
7720
7969
  *
7721
7970
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7722
7971
  * // { _id: 'Chunk', values: [ 4, 5, 6 ] }
7972
+ * ```
7723
7973
  *
7724
7974
  * @since 2.0.0
7725
7975
  * @category utils
@@ -7731,12 +7981,14 @@ export declare const takeRight: {
7731
7981
  * `true`.
7732
7982
  *
7733
7983
  * @example
7984
+ * ```ts
7734
7985
  * import { Effect, Stream } from "effect"
7735
7986
  *
7736
7987
  * const stream = Stream.takeUntil(Stream.iterate(0, (n) => n + 1), (n) => n === 4)
7737
7988
  *
7738
7989
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7739
7990
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
7991
+ * ```
7740
7992
  *
7741
7993
  * @since 2.0.0
7742
7994
  * @category utils
@@ -7747,12 +7999,14 @@ export declare const takeUntil: {
7747
7999
  * `true`.
7748
8000
  *
7749
8001
  * @example
8002
+ * ```ts
7750
8003
  * import { Effect, Stream } from "effect"
7751
8004
  *
7752
8005
  * const stream = Stream.takeUntil(Stream.iterate(0, (n) => n + 1), (n) => n === 4)
7753
8006
  *
7754
8007
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7755
8008
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8009
+ * ```
7756
8010
  *
7757
8011
  * @since 2.0.0
7758
8012
  * @category utils
@@ -7763,12 +8017,14 @@ export declare const takeUntil: {
7763
8017
  * `true`.
7764
8018
  *
7765
8019
  * @example
8020
+ * ```ts
7766
8021
  * import { Effect, Stream } from "effect"
7767
8022
  *
7768
8023
  * const stream = Stream.takeUntil(Stream.iterate(0, (n) => n + 1), (n) => n === 4)
7769
8024
  *
7770
8025
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7771
8026
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8027
+ * ```
7772
8028
  *
7773
8029
  * @since 2.0.0
7774
8030
  * @category utils
@@ -7805,12 +8061,14 @@ export declare const takeUntilEffect: {
7805
8061
  * evaluates to `true`.
7806
8062
  *
7807
8063
  * @example
8064
+ * ```ts
7808
8065
  * import { Effect, Stream } from "effect"
7809
8066
  *
7810
8067
  * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5)
7811
8068
  *
7812
8069
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7813
8070
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8071
+ * ```
7814
8072
  *
7815
8073
  * @since 2.0.0
7816
8074
  * @category utils
@@ -7821,12 +8079,14 @@ export declare const takeWhile: {
7821
8079
  * evaluates to `true`.
7822
8080
  *
7823
8081
  * @example
8082
+ * ```ts
7824
8083
  * import { Effect, Stream } from "effect"
7825
8084
  *
7826
8085
  * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5)
7827
8086
  *
7828
8087
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7829
8088
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8089
+ * ```
7830
8090
  *
7831
8091
  * @since 2.0.0
7832
8092
  * @category utils
@@ -7837,12 +8097,14 @@ export declare const takeWhile: {
7837
8097
  * evaluates to `true`.
7838
8098
  *
7839
8099
  * @example
8100
+ * ```ts
7840
8101
  * import { Effect, Stream } from "effect"
7841
8102
  *
7842
8103
  * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5)
7843
8104
  *
7844
8105
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7845
8106
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8107
+ * ```
7846
8108
  *
7847
8109
  * @since 2.0.0
7848
8110
  * @category utils
@@ -7853,12 +8115,14 @@ export declare const takeWhile: {
7853
8115
  * evaluates to `true`.
7854
8116
  *
7855
8117
  * @example
8118
+ * ```ts
7856
8119
  * import { Effect, Stream } from "effect"
7857
8120
  *
7858
8121
  * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5)
7859
8122
  *
7860
8123
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7861
8124
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8125
+ * ```
7862
8126
  *
7863
8127
  * @since 2.0.0
7864
8128
  * @category utils
@@ -7869,12 +8133,14 @@ export declare const takeWhile: {
7869
8133
  * evaluates to `true`.
7870
8134
  *
7871
8135
  * @example
8136
+ * ```ts
7872
8137
  * import { Effect, Stream } from "effect"
7873
8138
  *
7874
8139
  * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5)
7875
8140
  *
7876
8141
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
7877
8142
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] }
8143
+ * ```
7878
8144
  *
7879
8145
  * @since 2.0.0
7880
8146
  * @category utils
@@ -7885,6 +8151,7 @@ export declare const takeWhile: {
7885
8151
  * Adds an effect to consumption of every element of the stream.
7886
8152
  *
7887
8153
  * @example
8154
+ * ```ts
7888
8155
  * import { Console, Effect, Stream } from "effect"
7889
8156
  *
7890
8157
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -7901,6 +8168,7 @@ export declare const takeWhile: {
7901
8168
  * // before mapping: 3
7902
8169
  * // after mapping: 6
7903
8170
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
8171
+ * ```
7904
8172
  *
7905
8173
  * @since 2.0.0
7906
8174
  * @category sequencing
@@ -7910,6 +8178,7 @@ export declare const tap: {
7910
8178
  * Adds an effect to consumption of every element of the stream.
7911
8179
  *
7912
8180
  * @example
8181
+ * ```ts
7913
8182
  * import { Console, Effect, Stream } from "effect"
7914
8183
  *
7915
8184
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -7926,6 +8195,7 @@ export declare const tap: {
7926
8195
  * // before mapping: 3
7927
8196
  * // after mapping: 6
7928
8197
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
8198
+ * ```
7929
8199
  *
7930
8200
  * @since 2.0.0
7931
8201
  * @category sequencing
@@ -7935,6 +8205,7 @@ export declare const tap: {
7935
8205
  * Adds an effect to consumption of every element of the stream.
7936
8206
  *
7937
8207
  * @example
8208
+ * ```ts
7938
8209
  * import { Console, Effect, Stream } from "effect"
7939
8210
  *
7940
8211
  * const stream = Stream.make(1, 2, 3).pipe(
@@ -7951,6 +8222,7 @@ export declare const tap: {
7951
8222
  * // before mapping: 3
7952
8223
  * // after mapping: 6
7953
8224
  * // { _id: 'Chunk', values: [ 2, 4, 6 ] }
8225
+ * ```
7954
8226
  *
7955
8227
  * @since 2.0.0
7956
8228
  * @category sequencing
@@ -8074,6 +8346,7 @@ export declare const tapSink: {
8074
8346
  * Defaults to the "shape" strategy.
8075
8347
  *
8076
8348
  * @example
8349
+ * ```ts
8077
8350
  * import { Chunk, Effect, Schedule, Stream } from "effect"
8078
8351
  *
8079
8352
  * let last = Date.now()
@@ -8109,6 +8382,7 @@ export declare const tapSink: {
8109
8382
  * // Received 5 after 52ms
8110
8383
  * // > Emitted 5 after 49ms
8111
8384
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4, 5 ] }
8385
+ * ```
8112
8386
  *
8113
8387
  * @since 2.0.0
8114
8388
  * @category utils
@@ -8128,6 +8402,7 @@ export declare const throttle: {
8128
8402
  * Defaults to the "shape" strategy.
8129
8403
  *
8130
8404
  * @example
8405
+ * ```ts
8131
8406
  * import { Chunk, Effect, Schedule, Stream } from "effect"
8132
8407
  *
8133
8408
  * let last = Date.now()
@@ -8163,6 +8438,7 @@ export declare const throttle: {
8163
8438
  * // Received 5 after 52ms
8164
8439
  * // > Emitted 5 after 49ms
8165
8440
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4, 5 ] }
8441
+ * ```
8166
8442
  *
8167
8443
  * @since 2.0.0
8168
8444
  * @category utils
@@ -8188,6 +8464,7 @@ export declare const throttle: {
8188
8464
  * Defaults to the "shape" strategy.
8189
8465
  *
8190
8466
  * @example
8467
+ * ```ts
8191
8468
  * import { Chunk, Effect, Schedule, Stream } from "effect"
8192
8469
  *
8193
8470
  * let last = Date.now()
@@ -8223,6 +8500,7 @@ export declare const throttle: {
8223
8500
  * // Received 5 after 52ms
8224
8501
  * // > Emitted 5 after 49ms
8225
8502
  * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4, 5 ] }
8503
+ * ```
8226
8504
  *
8227
8505
  * @since 2.0.0
8228
8506
  * @category utils
@@ -8303,6 +8581,7 @@ export declare const throttleEffect: {
8303
8581
  * A stream that emits void values spaced by the specified duration.
8304
8582
  *
8305
8583
  * @example
8584
+ * ```ts
8306
8585
  * import { Effect, Stream } from "effect"
8307
8586
  *
8308
8587
  * let last = Date.now()
@@ -8322,6 +8601,7 @@ export declare const throttleEffect: {
8322
8601
  * // tick after 1002ms
8323
8602
  * // tick after 1002ms
8324
8603
  * // { _id: 'Chunk', values: [ undefined, undefined, undefined, undefined, undefined ] }
8604
+ * ```
8325
8605
  *
8326
8606
  * @since 2.0.0
8327
8607
  * @category constructors
@@ -8470,6 +8750,7 @@ export declare const toPubSub: {
8470
8750
  * the stream's output.
8471
8751
  *
8472
8752
  * @example
8753
+ * ```ts
8473
8754
  * import { Effect, Stream } from "effect"
8474
8755
  *
8475
8756
  * // Simulate a chunked stream
@@ -8494,6 +8775,7 @@ export declare const toPubSub: {
8494
8775
  * // "_id": "Option",
8495
8776
  * // "_tag": "None"
8496
8777
  * // }
8778
+ * ```
8497
8779
  *
8498
8780
  * @since 2.0.0
8499
8781
  * @category destructors
@@ -8697,12 +8979,14 @@ export declare const transduce: {
8697
8979
  * Creates a stream by peeling off the "layers" of a value of type `S`.
8698
8980
  *
8699
8981
  * @example
8982
+ * ```ts
8700
8983
  * import { Effect, Option, Stream } from "effect"
8701
8984
  *
8702
8985
  * const stream = Stream.unfold(1, (n) => Option.some([n, n + 1]))
8703
8986
  *
8704
8987
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
8705
8988
  * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
8989
+ * ```
8706
8990
  *
8707
8991
  * @since 2.0.0
8708
8992
  * @category constructors
@@ -8728,6 +9012,7 @@ export declare const unfoldChunkEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.E
8728
9012
  * `S`.
8729
9013
  *
8730
9014
  * @example
9015
+ * ```ts
8731
9016
  * import { Effect, Option, Random, Stream } from "effect"
8732
9017
  *
8733
9018
  * const stream = Stream.unfoldEffect(1, (n) =>
@@ -8737,6 +9022,7 @@ export declare const unfoldChunkEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.E
8737
9022
  *
8738
9023
  * // Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log)
8739
9024
  * // { _id: 'Chunk', values: [ 1, -1, -1, -1, -1 ] }
9025
+ * ```
8740
9026
  *
8741
9027
  * @since 2.0.0
8742
9028
  * @category constructors
@@ -8748,6 +9034,7 @@ export {
8748
9034
  * A stream that contains a single `void` value.
8749
9035
  *
8750
9036
  * @example
9037
+ * ```ts
8751
9038
  * import { Effect, Stream } from "effect"
8752
9039
  *
8753
9040
  * const stream = Stream.void
@@ -8755,6 +9042,7 @@ export {
8755
9042
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
8756
9043
  * // { _id: 'Chunk', values: [ undefined ] }
8757
9044
  *
9045
+ * ```
8758
9046
  * @since 2.0.0
8759
9047
  * @category constructors
8760
9048
  */
@@ -8907,6 +9195,7 @@ export declare const withSpan: {
8907
9195
  * The new stream will end when one of the sides ends.
8908
9196
  *
8909
9197
  * @example
9198
+ * ```ts
8910
9199
  * import { Effect, Stream } from "effect"
8911
9200
  *
8912
9201
  * // We create two streams and zip them together.
@@ -8917,6 +9206,7 @@ export declare const withSpan: {
8917
9206
  *
8918
9207
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
8919
9208
  * // { _id: 'Chunk', values: [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ] ] }
9209
+ * ```
8920
9210
  *
8921
9211
  * @since 2.0.0
8922
9212
  * @category zipping
@@ -8929,6 +9219,7 @@ export declare const zip: {
8929
9219
  * The new stream will end when one of the sides ends.
8930
9220
  *
8931
9221
  * @example
9222
+ * ```ts
8932
9223
  * import { Effect, Stream } from "effect"
8933
9224
  *
8934
9225
  * // We create two streams and zip them together.
@@ -8939,6 +9230,7 @@ export declare const zip: {
8939
9230
  *
8940
9231
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
8941
9232
  * // { _id: 'Chunk', values: [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ] ] }
9233
+ * ```
8942
9234
  *
8943
9235
  * @since 2.0.0
8944
9236
  * @category zipping
@@ -8951,6 +9243,7 @@ export declare const zip: {
8951
9243
  * The new stream will end when one of the sides ends.
8952
9244
  *
8953
9245
  * @example
9246
+ * ```ts
8954
9247
  * import { Effect, Stream } from "effect"
8955
9248
  *
8956
9249
  * // We create two streams and zip them together.
@@ -8961,6 +9254,7 @@ export declare const zip: {
8961
9254
  *
8962
9255
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
8963
9256
  * // { _id: 'Chunk', values: [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ] ] }
9257
+ * ```
8964
9258
  *
8965
9259
  * @since 2.0.0
8966
9260
  * @category zipping
@@ -9006,6 +9300,7 @@ export declare const zipFlatten: {
9006
9300
  * have different lengths and one of the streams has ended before the other.
9007
9301
  *
9008
9302
  * @example
9303
+ * ```ts
9009
9304
  * import { Effect, Stream } from "effect"
9010
9305
  *
9011
9306
  * const stream = Stream.zipAll(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9016,6 +9311,7 @@ export declare const zipFlatten: {
9016
9311
  *
9017
9312
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9018
9313
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 2, "b" ], [ 3, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9314
+ * ```
9019
9315
  *
9020
9316
  * @since 2.0.0
9021
9317
  * @category zipping
@@ -9029,6 +9325,7 @@ export declare const zipAll: {
9029
9325
  * have different lengths and one of the streams has ended before the other.
9030
9326
  *
9031
9327
  * @example
9328
+ * ```ts
9032
9329
  * import { Effect, Stream } from "effect"
9033
9330
  *
9034
9331
  * const stream = Stream.zipAll(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9039,6 +9336,7 @@ export declare const zipAll: {
9039
9336
  *
9040
9337
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9041
9338
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 2, "b" ], [ 3, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9339
+ * ```
9042
9340
  *
9043
9341
  * @since 2.0.0
9044
9342
  * @category zipping
@@ -9056,6 +9354,7 @@ export declare const zipAll: {
9056
9354
  * have different lengths and one of the streams has ended before the other.
9057
9355
  *
9058
9356
  * @example
9357
+ * ```ts
9059
9358
  * import { Effect, Stream } from "effect"
9060
9359
  *
9061
9360
  * const stream = Stream.zipAll(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9066,6 +9365,7 @@ export declare const zipAll: {
9066
9365
  *
9067
9366
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9068
9367
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 2, "b" ], [ 3, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9368
+ * ```
9069
9369
  *
9070
9370
  * @since 2.0.0
9071
9371
  * @category zipping
@@ -9368,6 +9668,7 @@ export declare const zipAllSortedByKeyWith: {
9368
9668
  * lengths and one of the streams has ended before the other.
9369
9669
  *
9370
9670
  * @example
9671
+ * ```ts
9371
9672
  * import { Effect, Stream } from "effect"
9372
9673
  *
9373
9674
  * const stream = Stream.zipAllWith(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9379,6 +9680,7 @@ export declare const zipAllSortedByKeyWith: {
9379
9680
  *
9380
9681
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9381
9682
  * // { _id: "Chunk", values: [ [ 0, "a" ], [ 1, "b" ], [ 2, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9683
+ * ```
9382
9684
  *
9383
9685
  * @since 2.0.0
9384
9686
  * @category zipping
@@ -9392,6 +9694,7 @@ export declare const zipAllWith: {
9392
9694
  * lengths and one of the streams has ended before the other.
9393
9695
  *
9394
9696
  * @example
9697
+ * ```ts
9395
9698
  * import { Effect, Stream } from "effect"
9396
9699
  *
9397
9700
  * const stream = Stream.zipAllWith(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9403,6 +9706,7 @@ export declare const zipAllWith: {
9403
9706
  *
9404
9707
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9405
9708
  * // { _id: "Chunk", values: [ [ 0, "a" ], [ 1, "b" ], [ 2, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9709
+ * ```
9406
9710
  *
9407
9711
  * @since 2.0.0
9408
9712
  * @category zipping
@@ -9421,6 +9725,7 @@ export declare const zipAllWith: {
9421
9725
  * lengths and one of the streams has ended before the other.
9422
9726
  *
9423
9727
  * @example
9728
+ * ```ts
9424
9729
  * import { Effect, Stream } from "effect"
9425
9730
  *
9426
9731
  * const stream = Stream.zipAllWith(Stream.make(1, 2, 3, 4, 5, 6), {
@@ -9432,6 +9737,7 @@ export declare const zipAllWith: {
9432
9737
  *
9433
9738
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9434
9739
  * // { _id: "Chunk", values: [ [ 0, "a" ], [ 1, "b" ], [ 2, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] }
9740
+ * ```
9435
9741
  *
9436
9742
  * @since 2.0.0
9437
9743
  * @category zipping
@@ -9453,6 +9759,7 @@ export declare const zipAllWith: {
9453
9759
  * used for zipping.
9454
9760
  *
9455
9761
  * @example
9762
+ * ```ts
9456
9763
  * import { Effect, Schedule, Stream } from "effect"
9457
9764
  *
9458
9765
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -9467,6 +9774,7 @@ export declare const zipAllWith: {
9467
9774
  *
9468
9775
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9469
9776
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 1, "b" ], [ 2, "b" ], [ 2, "c" ], [ 2, "d" ], [ 3, "d" ] ] }
9777
+ * ```
9470
9778
  *
9471
9779
  * @since 2.0.0
9472
9780
  * @category zipping
@@ -9482,6 +9790,7 @@ export declare const zipLatest: {
9482
9790
  * used for zipping.
9483
9791
  *
9484
9792
  * @example
9793
+ * ```ts
9485
9794
  * import { Effect, Schedule, Stream } from "effect"
9486
9795
  *
9487
9796
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -9496,6 +9805,7 @@ export declare const zipLatest: {
9496
9805
  *
9497
9806
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9498
9807
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 1, "b" ], [ 2, "b" ], [ 2, "c" ], [ 2, "d" ], [ 3, "d" ] ] }
9808
+ * ```
9499
9809
  *
9500
9810
  * @since 2.0.0
9501
9811
  * @category zipping
@@ -9511,6 +9821,7 @@ export declare const zipLatest: {
9511
9821
  * used for zipping.
9512
9822
  *
9513
9823
  * @example
9824
+ * ```ts
9514
9825
  * import { Effect, Schedule, Stream } from "effect"
9515
9826
  *
9516
9827
  * const s1 = Stream.make(1, 2, 3).pipe(
@@ -9525,6 +9836,7 @@ export declare const zipLatest: {
9525
9836
  *
9526
9837
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9527
9838
  * // { _id: "Chunk", values: [ [ 1, "a" ], [ 1, "b" ], [ 2, "b" ], [ 2, "c" ], [ 2, "d" ], [ 3, "d" ] ] }
9839
+ * ```
9528
9840
  *
9529
9841
  * @since 2.0.0
9530
9842
  * @category zipping
@@ -9540,6 +9852,7 @@ export declare const zipLatest: {
9540
9852
  * used for zipping.
9541
9853
  *
9542
9854
  * @example
9855
+ * ```ts
9543
9856
  * import { Stream, Schedule, Console, Effect } from "effect"
9544
9857
  *
9545
9858
  * const stream = Stream.zipLatestAll(
@@ -9557,6 +9870,7 @@ export declare const zipLatest: {
9557
9870
  * // [ 3, 1, 0 ]
9558
9871
  * // [ 3, 1, 1 ]
9559
9872
  * // .....
9873
+ * ```
9560
9874
  *
9561
9875
  * @since 3.3.0
9562
9876
  * @category zipping
@@ -9679,6 +9993,7 @@ export declare const zipRight: {
9679
9993
  * The new stream will end when one of the sides ends.
9680
9994
  *
9681
9995
  * @example
9996
+ * ```ts
9682
9997
  * import { Effect, Stream } from "effect"
9683
9998
  *
9684
9999
  * // We create two streams and zip them with custom logic.
@@ -9690,6 +10005,7 @@ export declare const zipRight: {
9690
10005
  *
9691
10006
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9692
10007
  * // { _id: 'Chunk', values: [ [ 0, 'a' ], [ 1, 'b' ], [ 2, 'c' ] ] }
10008
+ * ```
9693
10009
  *
9694
10010
  * @since 2.0.0
9695
10011
  * @category zipping
@@ -9702,6 +10018,7 @@ export declare const zipWith: {
9702
10018
  * The new stream will end when one of the sides ends.
9703
10019
  *
9704
10020
  * @example
10021
+ * ```ts
9705
10022
  * import { Effect, Stream } from "effect"
9706
10023
  *
9707
10024
  * // We create two streams and zip them with custom logic.
@@ -9713,6 +10030,7 @@ export declare const zipWith: {
9713
10030
  *
9714
10031
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9715
10032
  * // { _id: 'Chunk', values: [ [ 0, 'a' ], [ 1, 'b' ], [ 2, 'c' ] ] }
10033
+ * ```
9716
10034
  *
9717
10035
  * @since 2.0.0
9718
10036
  * @category zipping
@@ -9725,6 +10043,7 @@ export declare const zipWith: {
9725
10043
  * The new stream will end when one of the sides ends.
9726
10044
  *
9727
10045
  * @example
10046
+ * ```ts
9728
10047
  * import { Effect, Stream } from "effect"
9729
10048
  *
9730
10049
  * // We create two streams and zip them with custom logic.
@@ -9736,6 +10055,7 @@ export declare const zipWith: {
9736
10055
  *
9737
10056
  * // Effect.runPromise(Stream.runCollect(stream)).then(console.log)
9738
10057
  * // { _id: 'Chunk', values: [ [ 0, 'a' ], [ 1, 'b' ], [ 2, 'c' ] ] }
10058
+ * ```
9739
10059
  *
9740
10060
  * @since 2.0.0
9741
10061
  * @category zipping
@@ -9777,6 +10097,7 @@ export declare const zipWithChunks: {
9777
10097
  * Zips each element with the next element if present.
9778
10098
  *
9779
10099
  * @example
10100
+ * ```ts
9780
10101
  * import { Chunk, Effect, Stream } from "effect"
9781
10102
  *
9782
10103
  * const stream = Stream.zipWithNext(Stream.make(1, 2, 3, 4))
@@ -9788,6 +10109,7 @@ export declare const zipWithChunks: {
9788
10109
  * // [ 3, { _id: 'Option', _tag: 'Some', value: 4 } ],
9789
10110
  * // [ 4, { _id: 'Option', _tag: 'None' } ]
9790
10111
  * // ]
10112
+ * ```
9791
10113
  *
9792
10114
  * @since 2.0.0
9793
10115
  * @category zipping
@@ -9798,6 +10120,7 @@ export declare const zipWithNext: <A, E, R>(self: Stream<A, E, R>) => Stream<[A,
9798
10120
  * `None`.
9799
10121
  *
9800
10122
  * @example
10123
+ * ```ts
9801
10124
  * import { Chunk, Effect, Stream } from "effect"
9802
10125
  *
9803
10126
  * const stream = Stream.zipWithPrevious(Stream.make(1, 2, 3, 4))
@@ -9809,6 +10132,7 @@ export declare const zipWithNext: <A, E, R>(self: Stream<A, E, R>) => Stream<[A,
9809
10132
  * // [ { _id: 'Option', _tag: 'Some', value: 2 }, 3 ],
9810
10133
  * // [ { _id: 'Option', _tag: 'Some', value: 3 }, 4 ]
9811
10134
  * // ]
10135
+ * ```
9812
10136
  *
9813
10137
  * @since 2.0.0
9814
10138
  * @category zipping
@@ -9818,6 +10142,7 @@ export declare const zipWithPrevious: <A, E, R>(self: Stream<A, E, R>) => Stream
9818
10142
  * Zips each element with both the previous and next element.
9819
10143
  *
9820
10144
  * @example
10145
+ * ```ts
9821
10146
  * import { Chunk, Effect, Stream } from "effect"
9822
10147
  *
9823
10148
  * const stream = Stream.zipWithPreviousAndNext(Stream.make(1, 2, 3, 4))
@@ -9845,6 +10170,7 @@ export declare const zipWithPrevious: <A, E, R>(self: Stream<A, E, R>) => Stream
9845
10170
  * // { _id: 'Option', _tag: 'None' }
9846
10171
  * // ]
9847
10172
  * // ]
10173
+ * ```
9848
10174
  *
9849
10175
  * @since 2.0.0
9850
10176
  * @category zipping
@@ -9854,6 +10180,7 @@ export declare const zipWithPreviousAndNext: <A, E, R>(self: Stream<A, E, R>) =>
9854
10180
  * Zips this stream together with the index of elements.
9855
10181
  *
9856
10182
  * @example
10183
+ * ```ts
9857
10184
  * import { Effect, Stream } from "effect"
9858
10185
  *
9859
10186
  * const stream = Stream.make("Mary", "James", "Robert", "Patricia")
@@ -9865,6 +10192,7 @@ export declare const zipWithPreviousAndNext: <A, E, R>(self: Stream<A, E, R>) =>
9865
10192
  * // _id: 'Chunk',
9866
10193
  * // values: [ [ 'Mary', 0 ], [ 'James', 1 ], [ 'Robert', 2 ], [ 'Patricia', 3 ] ]
9867
10194
  * // }
10195
+ * ```
9868
10196
  *
9869
10197
  * @since 2.0.0
9870
10198
  * @category zipping
@@ -9886,6 +10214,7 @@ export declare const zipWithIndex: <A, E, R>(self: Stream<A, E, R>) => Stream<[A
9886
10214
  * @see {@link let_ let}
9887
10215
  *
9888
10216
  * @example
10217
+ * ```ts
9889
10218
  * import { Chunk, Effect, pipe, Stream } from "effect"
9890
10219
  *
9891
10220
  * const result = pipe(
@@ -9895,6 +10224,7 @@ export declare const zipWithIndex: <A, E, R>(self: Stream<A, E, R>) => Stream<[A
9895
10224
  * Stream.let("sum", ({ x, y }) => x + y)
9896
10225
  * )
9897
10226
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10227
+ * ```
9898
10228
  *
9899
10229
  * @category do notation
9900
10230
  * @since 2.0.0
@@ -9916,6 +10246,7 @@ export declare const Do: Stream<{}>;
9916
10246
  * @see {@link let_ let}
9917
10247
  *
9918
10248
  * @example
10249
+ * ```ts
9919
10250
  * import { Chunk, Effect, pipe, Stream } from "effect"
9920
10251
  *
9921
10252
  * const result = pipe(
@@ -9925,6 +10256,7 @@ export declare const Do: Stream<{}>;
9925
10256
  * Stream.let("sum", ({ x, y }) => x + y)
9926
10257
  * )
9927
10258
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10259
+ * ```
9928
10260
  *
9929
10261
  * @category do notation
9930
10262
  * @since 2.0.0
@@ -9946,6 +10278,7 @@ export declare const bind: {
9946
10278
  * @see {@link let_ let}
9947
10279
  *
9948
10280
  * @example
10281
+ * ```ts
9949
10282
  * import { Chunk, Effect, pipe, Stream } from "effect"
9950
10283
  *
9951
10284
  * const result = pipe(
@@ -9955,6 +10288,7 @@ export declare const bind: {
9955
10288
  * Stream.let("sum", ({ x, y }) => x + y)
9956
10289
  * )
9957
10290
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10291
+ * ```
9958
10292
  *
9959
10293
  * @category do notation
9960
10294
  * @since 2.0.0
@@ -9981,6 +10315,7 @@ export declare const bind: {
9981
10315
  * @see {@link let_ let}
9982
10316
  *
9983
10317
  * @example
10318
+ * ```ts
9984
10319
  * import { Chunk, Effect, pipe, Stream } from "effect"
9985
10320
  *
9986
10321
  * const result = pipe(
@@ -9990,6 +10325,7 @@ export declare const bind: {
9990
10325
  * Stream.let("sum", ({ x, y }) => x + y)
9991
10326
  * )
9992
10327
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10328
+ * ```
9993
10329
  *
9994
10330
  * @category do notation
9995
10331
  * @since 2.0.0
@@ -10064,6 +10400,7 @@ export declare const bindEffect: {
10064
10400
  * @see {@link let_ let}
10065
10401
  *
10066
10402
  * @example
10403
+ * ```ts
10067
10404
  * import { Chunk, Effect, pipe, Stream } from "effect"
10068
10405
  *
10069
10406
  * const result = pipe(
@@ -10073,6 +10410,7 @@ export declare const bindEffect: {
10073
10410
  * Stream.let("sum", ({ x, y }) => x + y)
10074
10411
  * )
10075
10412
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10413
+ * ```
10076
10414
  *
10077
10415
  * @category do notation
10078
10416
  * @since 2.0.0
@@ -10094,6 +10432,7 @@ export declare const bindTo: {
10094
10432
  * @see {@link let_ let}
10095
10433
  *
10096
10434
  * @example
10435
+ * ```ts
10097
10436
  * import { Chunk, Effect, pipe, Stream } from "effect"
10098
10437
  *
10099
10438
  * const result = pipe(
@@ -10103,6 +10442,7 @@ export declare const bindTo: {
10103
10442
  * Stream.let("sum", ({ x, y }) => x + y)
10104
10443
  * )
10105
10444
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10445
+ * ```
10106
10446
  *
10107
10447
  * @category do notation
10108
10448
  * @since 2.0.0
@@ -10126,6 +10466,7 @@ export declare const bindTo: {
10126
10466
  * @see {@link let_ let}
10127
10467
  *
10128
10468
  * @example
10469
+ * ```ts
10129
10470
  * import { Chunk, Effect, pipe, Stream } from "effect"
10130
10471
  *
10131
10472
  * const result = pipe(
@@ -10135,6 +10476,7 @@ export declare const bindTo: {
10135
10476
  * Stream.let("sum", ({ x, y }) => x + y)
10136
10477
  * )
10137
10478
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10479
+ * ```
10138
10480
  *
10139
10481
  * @category do notation
10140
10482
  * @since 2.0.0
@@ -10168,6 +10510,7 @@ export {
10168
10510
  * @see {@link bindEffect}
10169
10511
  *
10170
10512
  * @example
10513
+ * ```ts
10171
10514
  * import { Chunk, Effect, pipe, Stream } from "effect"
10172
10515
  *
10173
10516
  * const result = pipe(
@@ -10178,6 +10521,7 @@ export {
10178
10521
  * )
10179
10522
  * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 }))
10180
10523
  *
10524
+ * ```
10181
10525
  * @category do notation
10182
10526
  * @since 2.0.0
10183
10527
  */