@typed/fx 2.0.0-beta.6 → 2.0.0-beta.8

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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/Fx/Fx.d.ts +9 -9
  4. package/dist/Fx/Fx.js +1 -1
  5. package/dist/Fx/TypeId.d.ts +3 -3
  6. package/dist/Fx/TypeId.js +2 -2
  7. package/dist/Fx/combinators/additive.d.ts +6 -6
  8. package/dist/Fx/combinators/additive.js +6 -6
  9. package/dist/Fx/combinators/catch.d.ts +7 -7
  10. package/dist/Fx/combinators/catch.js +7 -7
  11. package/dist/Fx/combinators/causes.d.ts +1 -1
  12. package/dist/Fx/combinators/causes.js +1 -1
  13. package/dist/Fx/combinators/changesWithEffect.d.ts +1 -1
  14. package/dist/Fx/combinators/changesWithEffect.js +1 -1
  15. package/dist/Fx/combinators/compact.d.ts +1 -1
  16. package/dist/Fx/combinators/compact.js +1 -1
  17. package/dist/Fx/combinators/concatMap.d.ts +2 -2
  18. package/dist/Fx/combinators/concatMap.js +2 -2
  19. package/dist/Fx/combinators/continueWith.d.ts +4 -4
  20. package/dist/Fx/combinators/continueWith.js +4 -4
  21. package/dist/Fx/combinators/debounce.d.ts +2 -2
  22. package/dist/Fx/combinators/debounce.d.ts.map +1 -1
  23. package/dist/Fx/combinators/debounce.js +1 -1
  24. package/dist/Fx/combinators/delay.d.ts +9 -7
  25. package/dist/Fx/combinators/delay.d.ts.map +1 -1
  26. package/dist/Fx/combinators/delay.js +8 -6
  27. package/dist/Fx/combinators/dropUntil.d.ts +2 -2
  28. package/dist/Fx/combinators/dropUntil.js +2 -2
  29. package/dist/Fx/combinators/during.d.ts +1 -1
  30. package/dist/Fx/combinators/during.js +1 -1
  31. package/dist/Fx/combinators/ensuring.d.ts +1 -1
  32. package/dist/Fx/combinators/ensuring.js +1 -1
  33. package/dist/Fx/combinators/exhaustLatestMap.d.ts +1 -1
  34. package/dist/Fx/combinators/exhaustLatestMap.js +1 -1
  35. package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts +1 -1
  36. package/dist/Fx/combinators/exhaustLatestMapEffect.js +1 -1
  37. package/dist/Fx/combinators/exhaustMap.d.ts +1 -1
  38. package/dist/Fx/combinators/exhaustMap.js +1 -1
  39. package/dist/Fx/combinators/exhaustMapEffect.d.ts +1 -1
  40. package/dist/Fx/combinators/exhaustMapEffect.js +1 -1
  41. package/dist/Fx/combinators/exit.d.ts +1 -1
  42. package/dist/Fx/combinators/exit.js +1 -1
  43. package/dist/Fx/combinators/filter.d.ts +1 -1
  44. package/dist/Fx/combinators/filter.js +1 -1
  45. package/dist/Fx/combinators/filterEffect.d.ts +1 -1
  46. package/dist/Fx/combinators/filterEffect.js +1 -1
  47. package/dist/Fx/combinators/filterMap.d.ts +1 -1
  48. package/dist/Fx/combinators/filterMap.js +1 -1
  49. package/dist/Fx/combinators/filterMapEffect.d.ts +1 -1
  50. package/dist/Fx/combinators/filterMapEffect.js +1 -1
  51. package/dist/Fx/combinators/filterMapLoop.d.ts +1 -1
  52. package/dist/Fx/combinators/filterMapLoop.js +1 -1
  53. package/dist/Fx/combinators/filterMapLoopCause.d.ts +1 -1
  54. package/dist/Fx/combinators/filterMapLoopCause.js +1 -1
  55. package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts +1 -1
  56. package/dist/Fx/combinators/filterMapLoopCauseEffect.js +1 -1
  57. package/dist/Fx/combinators/filterMapLoopEffect.d.ts +1 -1
  58. package/dist/Fx/combinators/filterMapLoopEffect.js +1 -1
  59. package/dist/Fx/combinators/flatMap.d.ts +2 -2
  60. package/dist/Fx/combinators/flatMap.js +1 -1
  61. package/dist/Fx/combinators/flatMapConcurrently.d.ts +1 -1
  62. package/dist/Fx/combinators/flatMapConcurrently.js +1 -1
  63. package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts +1 -1
  64. package/dist/Fx/combinators/flatMapConcurrentlyEffect.js +1 -1
  65. package/dist/Fx/combinators/flatMapEffect.d.ts +2 -2
  66. package/dist/Fx/combinators/flatMapEffect.js +1 -1
  67. package/dist/Fx/combinators/flip.d.ts +1 -1
  68. package/dist/Fx/combinators/flip.js +1 -1
  69. package/dist/Fx/combinators/gen.d.ts +1 -1
  70. package/dist/Fx/combinators/gen.js +1 -1
  71. package/dist/Fx/combinators/genScoped.d.ts +1 -1
  72. package/dist/Fx/combinators/genScoped.js +1 -1
  73. package/dist/Fx/combinators/grouped.d.ts +2 -2
  74. package/dist/Fx/combinators/grouped.js +2 -2
  75. package/dist/Fx/combinators/keyed.d.ts +2 -2
  76. package/dist/Fx/combinators/keyed.js +1 -1
  77. package/dist/Fx/combinators/loop.d.ts +1 -1
  78. package/dist/Fx/combinators/loop.js +1 -1
  79. package/dist/Fx/combinators/loopCause.d.ts +1 -1
  80. package/dist/Fx/combinators/loopCause.js +1 -1
  81. package/dist/Fx/combinators/loopCauseEffect.d.ts +1 -1
  82. package/dist/Fx/combinators/loopCauseEffect.js +1 -1
  83. package/dist/Fx/combinators/loopEffect.d.ts +1 -1
  84. package/dist/Fx/combinators/loopEffect.js +1 -1
  85. package/dist/Fx/combinators/map.d.ts +2 -2
  86. package/dist/Fx/combinators/map.js +2 -2
  87. package/dist/Fx/combinators/mapBoth.d.ts +1 -1
  88. package/dist/Fx/combinators/mapBoth.js +1 -1
  89. package/dist/Fx/combinators/mapEffect.d.ts +1 -1
  90. package/dist/Fx/combinators/mapEffect.js +1 -1
  91. package/dist/Fx/combinators/mapError.d.ts +1 -1
  92. package/dist/Fx/combinators/mapError.js +1 -1
  93. package/dist/Fx/combinators/mergeAll.d.ts +1 -1
  94. package/dist/Fx/combinators/mergeAll.js +1 -1
  95. package/dist/Fx/combinators/mergeOrdered.d.ts +1 -1
  96. package/dist/Fx/combinators/mergeOrdered.d.ts.map +1 -1
  97. package/dist/Fx/combinators/mergeOrdered.js +33 -11
  98. package/dist/Fx/combinators/onError.d.ts +1 -1
  99. package/dist/Fx/combinators/onError.js +1 -1
  100. package/dist/Fx/combinators/onExit.d.ts +1 -1
  101. package/dist/Fx/combinators/onExit.js +1 -1
  102. package/dist/Fx/combinators/onInterrupt.d.ts +1 -1
  103. package/dist/Fx/combinators/onInterrupt.js +1 -1
  104. package/dist/Fx/combinators/pairwise.d.ts +1 -1
  105. package/dist/Fx/combinators/pairwise.js +1 -1
  106. package/dist/Fx/combinators/provide.d.ts +4 -4
  107. package/dist/Fx/combinators/provide.js +4 -4
  108. package/dist/Fx/combinators/race.d.ts +2 -2
  109. package/dist/Fx/combinators/race.js +2 -2
  110. package/dist/Fx/combinators/repeat.d.ts +1 -1
  111. package/dist/Fx/combinators/repeat.js +1 -1
  112. package/dist/Fx/combinators/result.d.ts +1 -1
  113. package/dist/Fx/combinators/result.js +1 -1
  114. package/dist/Fx/combinators/retry.d.ts +1 -1
  115. package/dist/Fx/combinators/retry.js +1 -1
  116. package/dist/Fx/combinators/sample.d.ts +1 -1
  117. package/dist/Fx/combinators/sample.js +1 -1
  118. package/dist/Fx/combinators/scan.d.ts +2 -2
  119. package/dist/Fx/combinators/scan.js +2 -2
  120. package/dist/Fx/combinators/since.d.ts +1 -1
  121. package/dist/Fx/combinators/since.js +1 -1
  122. package/dist/Fx/combinators/skip.d.ts +2 -2
  123. package/dist/Fx/combinators/skip.js +2 -2
  124. package/dist/Fx/combinators/skipRepeats.d.ts +1 -1
  125. package/dist/Fx/combinators/skipRepeats.js +1 -1
  126. package/dist/Fx/combinators/skipRepeatsWith.d.ts +1 -1
  127. package/dist/Fx/combinators/skipRepeatsWith.js +1 -1
  128. package/dist/Fx/combinators/skipWhile.d.ts +4 -4
  129. package/dist/Fx/combinators/skipWhile.js +4 -4
  130. package/dist/Fx/combinators/slice.d.ts +3 -3
  131. package/dist/Fx/combinators/slice.js +2 -2
  132. package/dist/Fx/combinators/switchMap.d.ts +1 -1
  133. package/dist/Fx/combinators/switchMap.js +1 -1
  134. package/dist/Fx/combinators/switchMapEffect.d.ts +1 -1
  135. package/dist/Fx/combinators/switchMapEffect.js +1 -1
  136. package/dist/Fx/combinators/take.d.ts +2 -2
  137. package/dist/Fx/combinators/take.js +2 -2
  138. package/dist/Fx/combinators/takeUntil.d.ts +3 -3
  139. package/dist/Fx/combinators/takeUntil.js +3 -3
  140. package/dist/Fx/combinators/takeWhile.d.ts +2 -2
  141. package/dist/Fx/combinators/takeWhile.js +2 -2
  142. package/dist/Fx/combinators/tapEffect.d.ts +1 -1
  143. package/dist/Fx/combinators/tapEffect.js +1 -1
  144. package/dist/Fx/combinators/throttle.d.ts +3 -3
  145. package/dist/Fx/combinators/throttle.d.ts.map +1 -1
  146. package/dist/Fx/combinators/throttle.js +1 -1
  147. package/dist/Fx/combinators/timeout.d.ts +2 -2
  148. package/dist/Fx/combinators/timeout.js +2 -2
  149. package/dist/Fx/combinators/tuple.d.ts +2 -2
  150. package/dist/Fx/combinators/tuple.js +2 -2
  151. package/dist/Fx/combinators/until.d.ts +1 -1
  152. package/dist/Fx/combinators/until.js +1 -1
  153. package/dist/Fx/combinators/unwrap.d.ts +1 -1
  154. package/dist/Fx/combinators/unwrap.js +1 -1
  155. package/dist/Fx/combinators/unwrapScoped.d.ts +1 -1
  156. package/dist/Fx/combinators/unwrapScoped.js +1 -1
  157. package/dist/Fx/combinators/when.d.ts +2 -2
  158. package/dist/Fx/combinators/when.js +2 -2
  159. package/dist/Fx/combinators/withLatestFrom.d.ts +2 -2
  160. package/dist/Fx/combinators/withLatestFrom.js +2 -2
  161. package/dist/Fx/combinators/withSpan.d.ts +1 -1
  162. package/dist/Fx/combinators/withSpan.js +1 -1
  163. package/dist/Fx/combinators/zip.d.ts +4 -4
  164. package/dist/Fx/combinators/zip.js +4 -4
  165. package/dist/Fx/constructors/at.d.ts +1 -1
  166. package/dist/Fx/constructors/at.js +1 -1
  167. package/dist/Fx/constructors/die.d.ts +1 -1
  168. package/dist/Fx/constructors/die.js +1 -1
  169. package/dist/Fx/constructors/empty.d.ts +1 -1
  170. package/dist/Fx/constructors/empty.js +1 -1
  171. package/dist/Fx/constructors/fail.d.ts +1 -1
  172. package/dist/Fx/constructors/fail.js +1 -1
  173. package/dist/Fx/constructors/failCause.d.ts +1 -1
  174. package/dist/Fx/constructors/failCause.js +1 -1
  175. package/dist/Fx/constructors/fn.d.ts +4 -4
  176. package/dist/Fx/constructors/fn.js +1 -1
  177. package/dist/Fx/constructors/fromEffect.d.ts +2 -2
  178. package/dist/Fx/constructors/fromEffect.js +2 -2
  179. package/dist/Fx/constructors/fromFailures.d.ts +1 -1
  180. package/dist/Fx/constructors/fromFailures.js +1 -1
  181. package/dist/Fx/constructors/fromIterable.d.ts +1 -1
  182. package/dist/Fx/constructors/fromIterable.js +1 -1
  183. package/dist/Fx/constructors/fromSchedule.d.ts +6 -4
  184. package/dist/Fx/constructors/fromSchedule.d.ts.map +1 -1
  185. package/dist/Fx/constructors/fromSchedule.js +6 -4
  186. package/dist/Fx/constructors/interrupt.d.ts +1 -1
  187. package/dist/Fx/constructors/interrupt.js +1 -1
  188. package/dist/Fx/constructors/make.d.ts +9 -7
  189. package/dist/Fx/constructors/make.d.ts.map +1 -1
  190. package/dist/Fx/constructors/make.js +8 -6
  191. package/dist/Fx/constructors/periodic.d.ts +1 -1
  192. package/dist/Fx/constructors/periodic.js +1 -1
  193. package/dist/Fx/constructors/succeed.d.ts +4 -4
  194. package/dist/Fx/constructors/succeed.js +4 -4
  195. package/dist/Fx/constructors/suspend.d.ts +1 -1
  196. package/dist/Fx/constructors/suspend.js +1 -1
  197. package/dist/Fx/constructors/sync.d.ts +1 -1
  198. package/dist/Fx/constructors/sync.js +1 -1
  199. package/dist/Fx/run/collect.d.ts +4 -4
  200. package/dist/Fx/run/collect.js +4 -4
  201. package/dist/Fx/run/first.d.ts +1 -1
  202. package/dist/Fx/run/first.js +1 -1
  203. package/dist/Fx/run/fork.d.ts +2 -2
  204. package/dist/Fx/run/fork.js +2 -2
  205. package/dist/Fx/run/observe.d.ts +7 -5
  206. package/dist/Fx/run/observe.d.ts.map +1 -1
  207. package/dist/Fx/run/observe.js +30 -15
  208. package/dist/Fx/run/runPromise.d.ts +2 -2
  209. package/dist/Fx/run/runPromise.js +2 -2
  210. package/dist/Fx/stream.d.ts +4 -4
  211. package/dist/Fx/stream.js +2 -2
  212. package/dist/Push/Push.d.ts +30 -30
  213. package/dist/Push/Push.js +26 -26
  214. package/dist/RefSubject/Hydration.d.ts +24 -24
  215. package/dist/RefSubject/Hydration.js +5 -5
  216. package/dist/RefSubject/RefArray.d.ts +31 -31
  217. package/dist/RefSubject/RefArray.js +30 -30
  218. package/dist/RefSubject/RefBigDecimal.d.ts +20 -20
  219. package/dist/RefSubject/RefBigDecimal.js +19 -19
  220. package/dist/RefSubject/RefBigInt.d.ts +15 -15
  221. package/dist/RefSubject/RefBigInt.js +14 -14
  222. package/dist/RefSubject/RefBoolean.d.ts +15 -15
  223. package/dist/RefSubject/RefBoolean.js +14 -14
  224. package/dist/RefSubject/RefCause.d.ts +11 -11
  225. package/dist/RefSubject/RefCause.js +10 -10
  226. package/dist/RefSubject/RefChunk.d.ts +37 -37
  227. package/dist/RefSubject/RefChunk.js +36 -36
  228. package/dist/RefSubject/RefDateTime.d.ts +11 -11
  229. package/dist/RefSubject/RefDateTime.js +10 -10
  230. package/dist/RefSubject/RefDuration.d.ts +14 -14
  231. package/dist/RefSubject/RefDuration.js +13 -13
  232. package/dist/RefSubject/RefGraph.d.ts +29 -29
  233. package/dist/RefSubject/RefGraph.js +28 -28
  234. package/dist/RefSubject/RefHashMap.d.ts +27 -27
  235. package/dist/RefSubject/RefHashMap.js +26 -26
  236. package/dist/RefSubject/RefHashRing.d.ts +13 -13
  237. package/dist/RefSubject/RefHashRing.js +12 -12
  238. package/dist/RefSubject/RefHashSet.d.ts +21 -21
  239. package/dist/RefSubject/RefHashSet.js +20 -20
  240. package/dist/RefSubject/RefIterable.d.ts +30 -30
  241. package/dist/RefSubject/RefIterable.js +29 -29
  242. package/dist/RefSubject/RefOption.d.ts +13 -13
  243. package/dist/RefSubject/RefOption.js +12 -12
  244. package/dist/RefSubject/RefRecord.d.ts +31 -31
  245. package/dist/RefSubject/RefRecord.js +30 -30
  246. package/dist/RefSubject/RefResult.d.ts +12 -12
  247. package/dist/RefSubject/RefResult.js +11 -11
  248. package/dist/RefSubject/RefString.d.ts +17 -17
  249. package/dist/RefSubject/RefString.js +16 -16
  250. package/dist/RefSubject/RefStruct.d.ts +13 -13
  251. package/dist/RefSubject/RefStruct.js +12 -12
  252. package/dist/RefSubject/RefSubject.d.ts +93 -94
  253. package/dist/RefSubject/RefSubject.d.ts.map +1 -1
  254. package/dist/RefSubject/RefSubject.js +132 -77
  255. package/dist/RefSubject/RefTrie.d.ts +26 -26
  256. package/dist/RefSubject/RefTrie.js +25 -25
  257. package/dist/RefSubject/RefTuple.d.ts +11 -11
  258. package/dist/RefSubject/RefTuple.js +9 -9
  259. package/dist/Sink/Sink.d.ts +21 -19
  260. package/dist/Sink/Sink.d.ts.map +1 -1
  261. package/dist/Sink/Sink.js +5 -4
  262. package/dist/Sink/combinators.d.ts +33 -33
  263. package/dist/Sink/combinators.js +32 -32
  264. package/dist/Subject/Subject.d.ts +14 -13
  265. package/dist/Subject/Subject.d.ts.map +1 -1
  266. package/dist/Subject/Subject.js +11 -10
  267. package/dist/Versioned/Versioned.d.ts +31 -28
  268. package/dist/Versioned/Versioned.d.ts.map +1 -1
  269. package/dist/Versioned/Versioned.js +45 -37
  270. package/package.json +5 -4
@@ -31,7 +31,7 @@ import { observe } from "./observe.js";
31
31
  * @param fx - The `Fx` to collect values from.
32
32
  * @returns An `Effect` that produces an array of all values when the `Fx` completes.
33
33
  * @since 1.0.0
34
- * @category runners
34
+ * @category Collecting values
35
35
  */
36
36
  export const collectAll = (fx) => Effect.suspend(() => {
37
37
  const values = [];
@@ -66,7 +66,7 @@ export const collectAll = (fx) => Effect.suspend(() => {
66
66
  * @param fx - The `Fx` to collect values from.
67
67
  * @returns An `Effect` that produces a `Fiber` which computes the array of values.
68
68
  * @since 1.0.0
69
- * @category runners
69
+ * @category Collecting values
70
70
  */
71
71
  export const collectAllFork = (fx) => Effect.forkChild(collectAll(fx), {
72
72
  startImmediately: true,
@@ -99,7 +99,7 @@ export const collectAllFork = (fx) => Effect.forkChild(collectAll(fx), {
99
99
  * @param upTo - The maximum number of values to collect.
100
100
  * @returns An `Effect` that produces an array of up to `n` values.
101
101
  * @since 1.0.0
102
- * @category runners
102
+ * @category Collecting values
103
103
  */
104
104
  export const collectUpTo = dual(2, (fx, upTo) => fx.pipe(take(upTo), collectAll));
105
105
  /**
@@ -132,7 +132,7 @@ export const collectUpTo = dual(2, (fx, upTo) => fx.pipe(take(upTo), collectAll)
132
132
  * @param upTo - The maximum number of values to collect.
133
133
  * @returns An `Effect` that produces a `Fiber` which computes the array of values.
134
134
  * @since 1.0.0
135
- * @category runners
135
+ * @category Collecting values
136
136
  */
137
137
  export const collectUpToFork = (fx, upTo) => Effect.forkChild(collectUpTo(fx, upTo), {
138
138
  startImmediately: true,
@@ -30,7 +30,7 @@ import type { Fx } from "../Fx.js";
30
30
  * @param fx - The `Fx` stream.
31
31
  * @returns An `Effect` that produces `Some(firstValue)` or `None`.
32
32
  * @since 1.0.0
33
- * @category runners
33
+ * @category Collecting values
34
34
  */
35
35
  export declare function first<A, E, R>(fx: Fx<A, E, R>): Effect<Option<A>, E, R>;
36
36
  //# sourceMappingURL=first.d.ts.map
@@ -31,7 +31,7 @@ import { collectUpTo } from "./collect.js";
31
31
  * @param fx - The `Fx` stream.
32
32
  * @returns An `Effect` that produces `Some(firstValue)` or `None`.
33
33
  * @since 1.0.0
34
- * @category runners
34
+ * @category Collecting values
35
35
  */
36
36
  export function first(fx) {
37
37
  return pipe(fx, collectUpTo(1), map(head));
@@ -34,7 +34,7 @@ import type { Fx } from "../Fx.js";
34
34
  * @param options - Configuration for the forked fiber.
35
35
  * @returns An `Effect` that produces a `Fiber`.
36
36
  * @since 1.0.0
37
- * @category runners
37
+ * @category Running effects
38
38
  */
39
39
  export declare const fork: <A, E, R>(fx: Fx<A, E, R>, options?: {
40
40
  readonly startImmediately?: boolean;
@@ -73,7 +73,7 @@ export declare const fork: <A, E, R>(fx: Fx<A, E, R>, options?: {
73
73
  * @param options - `RunOptions` for the execution.
74
74
  * @returns The created `Fiber`.
75
75
  * @since 1.0.0
76
- * @category runners
76
+ * @category Running effects
77
77
  */
78
78
  export declare const runFork: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Fiber<void, E>;
79
79
  //# sourceMappingURL=fork.d.ts.map
@@ -33,7 +33,7 @@ import { drain } from "./observe.js";
33
33
  * @param options - Configuration for the forked fiber.
34
34
  * @returns An `Effect` that produces a `Fiber`.
35
35
  * @since 1.0.0
36
- * @category runners
36
+ * @category Running effects
37
37
  */
38
38
  export const fork = (fx, options) => effectFork(drain(fx), {
39
39
  startImmediately: options?.startImmediately ?? true,
@@ -72,6 +72,6 @@ export const fork = (fx, options) => effectFork(drain(fx), {
72
72
  * @param options - `RunOptions` for the execution.
73
73
  * @returns The created `Fiber`.
74
74
  * @since 1.0.0
75
- * @category runners
75
+ * @category Running effects
76
76
  */
77
77
  export const runFork = (fx, options) => effectRunFork(drain(fx), options);
@@ -19,7 +19,9 @@ import type { Fx } from "../Fx.js";
19
19
  * run and completes when the source completes. Interruption interrupts the internal
20
20
  * fiber and source cleanup. Callback invocation follows the producer's delivery
21
21
  * behavior; `observe` adds no buffer or concurrency of its own. A source cause or a
22
- * callback failure fails the returned Effect as `E | E2`.
22
+ * callback failure fails the returned Effect as `E | E2` and stops further
23
+ * deliveries. The producer fiber finishes cleanup before observation settles;
24
+ * resources acquired in the caller's Scope retain that Scope's lifetime.
23
25
  *
24
26
  * @example
25
27
  * ```ts
@@ -37,7 +39,7 @@ import type { Fx } from "../Fx.js";
37
39
  * @param f - The function to call for each emitted value.
38
40
  * @returns An `Effect` that completes when the stream ends.
39
41
  * @since 1.0.0
40
- * @category runners
42
+ * @category Running effects
41
43
  */
42
44
  export declare const observe: {
43
45
  <A, E2 = never, R2 = never>(f: (value: A) => void | Effect<unknown, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Effect<unknown, E | E2, R | R2>;
@@ -69,7 +71,7 @@ export declare const observe: {
69
71
  * @param fx - The `Fx` stream to drain.
70
72
  * @returns An `Effect` that completes when the stream ends.
71
73
  * @since 1.0.0
72
- * @category runners
74
+ * @category Running effects
73
75
  */
74
76
  export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;
75
77
  /**
@@ -109,7 +111,7 @@ export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;
109
111
  * @param fx - The `Fx` stream to run.
110
112
  * @returns A `Layer` that manages the background execution of the stream.
111
113
  * @since 1.0.0
112
- * @category runners
114
+ * @category Running effects
113
115
  */
114
116
  export declare const drainLayer: <A, E, R>(fx: Fx<A, E, R>) => Layer<never, E, Exclude<R, Scope>>;
115
117
  /**
@@ -150,7 +152,7 @@ export declare const drainLayer: <A, E, R>(fx: Fx<A, E, R>) => Layer<never, E, E
150
152
  * @param f - The function to call for each emitted value.
151
153
  * @returns A `Layer` that manages the background execution of the stream.
152
154
  * @since 1.0.0
153
- * @category runners
155
+ * @category Running effects
154
156
  */
155
157
  export declare const observeLayer: {
156
158
  <A, E2 = never, R2 = never>(f: (value: A) => void | Effect<unknown, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Layer<never, E | E2, Exclude<R | R2, Scope>>;
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../../src/Fx/run/observe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAe5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;;;;;;;;;;;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,KAAK,CAAC,CACjD,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,EAAE;IACzB,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAK,EACxB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,GAC9C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAE3E,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAK,EAC9B,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACf,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,GAC9C,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;CAOjD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { callback, catchCause, failCause, forkScoped, isEffect, matchCauseEffect, runForkWith, contextWith, sync, void as void_, } from "effect/Effect";
1
+ import { callback, catchCause, ensuring, failCause, forkScoped, isEffect, matchCauseEffect, runForkWith, contextWith, sync, suspend, void as void_, } from "effect/Effect";
2
2
  import { interrupt } from "effect/Fiber";
3
3
  import { dual } from "effect/Function";
4
4
  import { effectDiscard } from "effect/Layer";
@@ -20,7 +20,9 @@ import { make } from "../../Sink/Sink.js";
20
20
  * run and completes when the source completes. Interruption interrupts the internal
21
21
  * fiber and source cleanup. Callback invocation follows the producer's delivery
22
22
  * behavior; `observe` adds no buffer or concurrency of its own. A source cause or a
23
- * callback failure fails the returned Effect as `E | E2`.
23
+ * callback failure fails the returned Effect as `E | E2` and stops further
24
+ * deliveries. The producer fiber finishes cleanup before observation settles;
25
+ * resources acquired in the caller's Scope retain that Scope's lifetime.
24
26
  *
25
27
  * @example
26
28
  * ```ts
@@ -38,17 +40,30 @@ import { make } from "../../Sink/Sink.js";
38
40
  * @param f - The function to call for each emitted value.
39
41
  * @returns An `Effect` that completes when the stream ends.
40
42
  * @since 1.0.0
41
- * @category runners
43
+ * @category Running effects
42
44
  */
43
- export const observe = dual(2, (fx, f) => contextWith((services) => callback((resume) => {
44
- const onFailure = (cause) => sync(() => resume(failCause(cause)));
45
- const onSuccess = (value) => {
46
- const result = f(value);
47
- return isEffect(result) ? catchCause(result, onFailure) : void_;
48
- };
49
- const onDone = () => sync(() => resume(void_));
50
- return fx.run(make(onFailure, onSuccess)).pipe(matchCauseEffect(make(onFailure, onDone)), runForkWith(services), interrupt);
51
- })));
45
+ export const observe = dual(2, (fx, f) => contextWith((services) => {
46
+ let fiber;
47
+ return callback((resume) => {
48
+ let done = false;
49
+ const complete = (result) => sync(() => {
50
+ if (done)
51
+ return;
52
+ done = true;
53
+ resume(result);
54
+ });
55
+ const onFailure = (cause) => complete(failCause(cause));
56
+ const onSuccess = (value) => suspend(() => {
57
+ if (done)
58
+ return void_;
59
+ const result = f(value);
60
+ return isEffect(result) ? catchCause(result, onFailure) : void_;
61
+ });
62
+ fiber = fx
63
+ .run(make(onFailure, onSuccess))
64
+ .pipe(matchCauseEffect(make(onFailure, () => complete(void_))), runForkWith(services));
65
+ }).pipe(ensuring(suspend(() => (fiber === undefined ? void_ : interrupt(fiber)))));
66
+ }));
52
67
  /**
53
68
  * Runs an `Fx` stream to completion, discarding all values.
54
69
  * Useful when the side effects of the stream are all that matter.
@@ -75,7 +90,7 @@ export const observe = dual(2, (fx, f) => contextWith((services) => callback((re
75
90
  * @param fx - The `Fx` stream to drain.
76
91
  * @returns An `Effect` that completes when the stream ends.
77
92
  * @since 1.0.0
78
- * @category runners
93
+ * @category Running effects
79
94
  */
80
95
  export const drain = (fx) => observe(fx, () => void_);
81
96
  /**
@@ -115,7 +130,7 @@ export const drain = (fx) => observe(fx, () => void_);
115
130
  * @param fx - The `Fx` stream to run.
116
131
  * @returns A `Layer` that manages the background execution of the stream.
117
132
  * @since 1.0.0
118
- * @category runners
133
+ * @category Running effects
119
134
  */
120
135
  export const drainLayer = (fx) => effectDiscard(forkScoped(drain(fx)));
121
136
  /**
@@ -156,6 +171,6 @@ export const drainLayer = (fx) => effectDiscard(forkScoped(drain(fx)));
156
171
  * @param f - The function to call for each emitted value.
157
172
  * @returns A `Layer` that manages the background execution of the stream.
158
173
  * @since 1.0.0
159
- * @category runners
174
+ * @category Running effects
160
175
  */
161
176
  export const observeLayer = dual(2, (fx, f) => effectDiscard(forkScoped(observe(fx, f))));
@@ -30,7 +30,7 @@ import type { Fx } from "../Fx.js";
30
30
  * @param options - `RunOptions` for execution.
31
31
  * @returns A Promise resolving to the `Exit` of the execution.
32
32
  * @since 1.0.0
33
- * @category runners
33
+ * @category Running effects
34
34
  */
35
35
  export declare const runPromiseExit: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<Exit.Exit<void, E>>;
36
36
  /**
@@ -62,7 +62,7 @@ export declare const runPromiseExit: <A, E>(fx: Fx<A, E>, options?: RunOptions)
62
62
  * @param options - `RunOptions` for execution.
63
63
  * @returns A Promise that resolves when the stream completes.
64
64
  * @since 1.0.0
65
- * @category runners
65
+ * @category Running effects
66
66
  */
67
67
  export declare const runPromise: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<unknown>;
68
68
  //# sourceMappingURL=runPromise.d.ts.map
@@ -29,7 +29,7 @@ import { drain } from "./observe.js";
29
29
  * @param options - `RunOptions` for execution.
30
30
  * @returns A Promise resolving to the `Exit` of the execution.
31
31
  * @since 1.0.0
32
- * @category runners
32
+ * @category Running effects
33
33
  */
34
34
  export const runPromiseExit = (fx, options) => Effect.runPromiseExit(drain(fx), options);
35
35
  /**
@@ -61,6 +61,6 @@ export const runPromiseExit = (fx, options) => Effect.runPromiseExit(drain(fx),
61
61
  * @param options - `RunOptions` for execution.
62
62
  * @returns A Promise that resolves when the stream completes.
63
63
  * @since 1.0.0
64
- * @category runners
64
+ * @category Running effects
65
65
  */
66
66
  export const runPromise = (fx, options) => Effect.runPromise(drain(fx), options);
@@ -15,7 +15,7 @@ import type * as Fx from "./Fx.js";
15
15
  * only when the resulting Stream is run.
16
16
  *
17
17
  * @since 1.0.0
18
- * @category models
18
+ * @category Operator options
19
19
  */
20
20
  export type ToStreamOptions = Parameters<typeof Stream.callback<unknown, unknown, unknown>>[1];
21
21
  /**
@@ -45,7 +45,7 @@ export type ToStreamOptions = Parameters<typeof Stream.callback<unknown, unknown
45
45
  * ```
46
46
  *
47
47
  * @since 1.0.0
48
- * @category interop
48
+ * @category Stream interop
49
49
  */
50
50
  export declare const toStream: <A, E, R>(fx: Fx.Fx<A, E, R>, options?: ToStreamOptions) => Stream.Stream<A, E, R>;
51
51
  /**
@@ -63,7 +63,7 @@ export declare const toStream: <A, E, R>(fx: Fx.Fx<A, E, R>, options?: ToStreamO
63
63
  * adapted `Fx` is run.
64
64
  *
65
65
  * @since 1.0.0
66
- * @category models
66
+ * @category Operator options
67
67
  */
68
68
  export type FromStreamOptions = Parameters<typeof Stream.mapEffect<unknown, unknown, unknown, unknown>>[1];
69
69
  /**
@@ -93,7 +93,7 @@ export type FromStreamOptions = Parameters<typeof Stream.mapEffect<unknown, unkn
93
93
  * ```
94
94
  *
95
95
  * @since 1.0.0
96
- * @category interop
96
+ * @category Stream interop
97
97
  */
98
98
  export declare const fromStream: <A, E, R>(stream: Stream.Stream<A, E, R>, options?: FromStreamOptions) => Fx.Fx<A, E, R>;
99
99
  //# sourceMappingURL=stream.d.ts.map
package/dist/Fx/stream.js CHANGED
@@ -31,7 +31,7 @@ import { make } from "./constructors/make.js";
31
31
  * ```
32
32
  *
33
33
  * @since 1.0.0
34
- * @category interop
34
+ * @category Stream interop
35
35
  */
36
36
  export const toStream = (fx, options) => Stream.callback((queue) => Effect.flatMap(fx.run(Sink.make((cause) => Queue.failCause(queue, cause), (value) => Queue.offer(queue, value))), () => Queue.end(queue)), options);
37
37
  /**
@@ -61,6 +61,6 @@ export const toStream = (fx, options) => Stream.callback((queue) => Effect.flatM
61
61
  * ```
62
62
  *
63
63
  * @since 1.0.0
64
- * @category interop
64
+ * @category Stream interop
65
65
  */
66
66
  export const fromStream = (stream, options) => make((sink) => pipe(stream, Stream.mapEffect(sink.onSuccess, options), Stream.catchCause((cause) => Stream.fromEffect(sink.onFailure(cause))), Stream.runDrain));
@@ -64,7 +64,7 @@ import * as Sink from "../Sink.js";
64
64
  * ```
65
65
  *
66
66
  * @since 1.0.0
67
- * @category models
67
+ * @category Bidirectional contracts
68
68
  */
69
69
  export interface Push<in A, in E, out R, out B, out E2, out R2> extends Sink.Sink<A, E, R>, Fx.Fx<B, E2, R2> {
70
70
  }
@@ -83,7 +83,7 @@ export declare namespace Push {
83
83
  * This type alias creates no value or resource and changes no runtime lifetime.
84
84
  *
85
85
  * @since 1.0.0
86
- * @category type-level
86
+ * @category Type contracts
87
87
  */
88
88
  type Any = Push<any, any, any, any, any, any>;
89
89
  /**
@@ -114,7 +114,7 @@ export declare namespace Push {
114
114
  * ```
115
115
  *
116
116
  * @since 1.0.0
117
- * @category models
117
+ * @category Push services
118
118
  */
119
119
  interface Service<Self, Id extends string, A, E, B, E2> extends Push<A, E, Self, B, E2, Self> {
120
120
  /**
@@ -223,7 +223,7 @@ export declare namespace Push {
223
223
  * ```
224
224
  *
225
225
  * @since 1.0.0
226
- * @category models
226
+ * @category Push services
227
227
  */
228
228
  interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {
229
229
  /**
@@ -293,7 +293,7 @@ export declare namespace Push {
293
293
  * ```
294
294
  *
295
295
  * @since 1.0.0
296
- * @category constructors
296
+ * @category Push construction
297
297
  */
298
298
  export declare const make: {
299
299
  <B, E2, R2>(fx: Fx.Fx<B, E2, R2>): <A, E, R>(sink: Sink.Sink<A, E, R>) => Push<A, E, R, B, E2, R2>;
@@ -343,7 +343,7 @@ export declare const make: {
343
343
  * ```
344
344
  *
345
345
  * @since 1.0.0
346
- * @category combinators
346
+ * @category Transforming inputs
347
347
  */
348
348
  export declare const mapInput: {
349
349
  <C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;
@@ -391,7 +391,7 @@ export declare const mapInput: {
391
391
  * ```
392
392
  *
393
393
  * @since 1.0.0
394
- * @category combinators
394
+ * @category Transforming inputs
395
395
  */
396
396
  export declare const mapInputEffect: {
397
397
  <C, R3, E, A>(f: (c: C) => Effect.Effect<A, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R | R3, B, E2, R2>;
@@ -434,7 +434,7 @@ export declare const mapInputEffect: {
434
434
  * ```
435
435
  *
436
436
  * @since 1.0.0
437
- * @category combinators
437
+ * @category Selecting inputs
438
438
  */
439
439
  export declare const filterInput: {
440
440
  <A>(f: (a: A) => boolean): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E2, R2>;
@@ -477,7 +477,7 @@ export declare const filterInput: {
477
477
  * ```
478
478
  *
479
479
  * @since 1.0.0
480
- * @category combinators
480
+ * @category Selecting inputs
481
481
  */
482
482
  export declare const filterInputEffect: {
483
483
  <A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;
@@ -523,7 +523,7 @@ export declare const filterInputEffect: {
523
523
  * ```
524
524
  *
525
525
  * @since 1.0.0
526
- * @category combinators
526
+ * @category Selecting inputs
527
527
  */
528
528
  export declare const filterMapInput: {
529
529
  <C, A>(f: (c: C) => Option.Option<A>): <P extends Push.Any>(push: P) => Push<C, Sink.Error<P>, Sink.Services<P>, Fx.Fx.Success<P>, Fx.Fx.Error<P>, Fx.Fx.Services<P>>;
@@ -566,7 +566,7 @@ export declare const filterMapInput: {
566
566
  * ```
567
567
  *
568
568
  * @since 1.0.0
569
- * @category combinators
569
+ * @category Selecting inputs
570
570
  */
571
571
  export declare const filterMapInputEffect: {
572
572
  <C, R3, E, A>(f: (c: C) => Effect.Effect<Option.Option<A>, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R | R3, B, E2, R2>;
@@ -618,7 +618,7 @@ export declare const filterMapInputEffect: {
618
618
  * ```
619
619
  *
620
620
  * @since 1.0.0
621
- * @category combinators
621
+ * @category Transforming outputs
622
622
  */
623
623
  export declare const map: {
624
624
  <B, C>(f: (b: B) => C): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;
@@ -655,7 +655,7 @@ export declare const map: {
655
655
  * ```
656
656
  *
657
657
  * @since 1.0.0
658
- * @category combinators
658
+ * @category Transforming outputs
659
659
  */
660
660
  export declare const mapEffect: {
661
661
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3>;
@@ -694,7 +694,7 @@ export declare const mapEffect: {
694
694
  * ```
695
695
  *
696
696
  * @since 1.0.0
697
- * @category combinators
697
+ * @category Output failures
698
698
  */
699
699
  export declare const mapError: {
700
700
  <E2, E3>(f: (e: E2) => E3): <A, E, R, B, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E3, R2>;
@@ -733,7 +733,7 @@ export declare const mapError: {
733
733
  * ```
734
734
  *
735
735
  * @since 1.0.0
736
- * @category combinators
736
+ * @category Transforming outputs
737
737
  */
738
738
  export declare const mapBoth: {
739
739
  <B, C, E2, E3>(options: {
@@ -777,7 +777,7 @@ export declare const mapBoth: {
777
777
  * ```
778
778
  *
779
779
  * @since 1.0.0
780
- * @category combinators
780
+ * @category Selecting outputs
781
781
  */
782
782
  export declare const filter: {
783
783
  <B>(f: (b: B) => boolean): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E2, R2>;
@@ -815,7 +815,7 @@ export declare const filter: {
815
815
  * ```
816
816
  *
817
817
  * @since 1.0.0
818
- * @category combinators
818
+ * @category Selecting outputs
819
819
  */
820
820
  export declare const filterEffect: {
821
821
  <B, R3, E3>(f: (b: B) => Effect.Effect<boolean, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E2 | E3, R2 | R3>;
@@ -852,7 +852,7 @@ export declare const filterEffect: {
852
852
  * ```
853
853
  *
854
854
  * @since 1.0.0
855
- * @category combinators
855
+ * @category Selecting outputs
856
856
  */
857
857
  export declare const filterMap: {
858
858
  <B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;
@@ -889,7 +889,7 @@ export declare const filterMap: {
889
889
  * ```
890
890
  *
891
891
  * @since 1.0.0
892
- * @category combinators
892
+ * @category Selecting outputs
893
893
  */
894
894
  export declare const filterMapEffect: {
895
895
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<Option.Option<C>, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3>;
@@ -948,7 +948,7 @@ export declare const filterMapEffect: {
948
948
  * ```
949
949
  *
950
950
  * @since 1.0.0
951
- * @category combinators
951
+ * @category Concurrent output work
952
952
  */
953
953
  export declare const switchMap: {
954
954
  <B, C, E3, R3>(f: (b: B) => Fx.Fx<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1002,7 +1002,7 @@ export declare const switchMap: {
1002
1002
  * ```
1003
1003
  *
1004
1004
  * @since 1.0.0
1005
- * @category combinators
1005
+ * @category Concurrent output work
1006
1006
  */
1007
1007
  export declare const switchMapEffect: {
1008
1008
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1058,7 +1058,7 @@ export declare const switchMapEffect: {
1058
1058
  * ```
1059
1059
  *
1060
1060
  * @since 1.0.0
1061
- * @category combinators
1061
+ * @category Concurrent output work
1062
1062
  */
1063
1063
  export declare const flatMap: {
1064
1064
  <B, C, E3, R3>(f: (b: B) => Fx.Fx<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1109,7 +1109,7 @@ export declare const flatMap: {
1109
1109
  * ```
1110
1110
  *
1111
1111
  * @since 1.0.0
1112
- * @category combinators
1112
+ * @category Concurrent output work
1113
1113
  */
1114
1114
  export declare const flatMapEffect: {
1115
1115
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1169,7 +1169,7 @@ export declare const flatMapEffect: {
1169
1169
  * ```
1170
1170
  *
1171
1171
  * @since 1.0.0
1172
- * @category combinators
1172
+ * @category Concurrent output work
1173
1173
  */
1174
1174
  export declare const exhaustMap: {
1175
1175
  <B, C, E3, R3>(f: (b: B) => Fx.Fx<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1222,7 +1222,7 @@ export declare const exhaustMap: {
1222
1222
  * ```
1223
1223
  *
1224
1224
  * @since 1.0.0
1225
- * @category combinators
1225
+ * @category Concurrent output work
1226
1226
  */
1227
1227
  export declare const exhaustMapEffect: {
1228
1228
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1283,7 +1283,7 @@ export declare const exhaustMapEffect: {
1283
1283
  * ```
1284
1284
  *
1285
1285
  * @since 1.0.0
1286
- * @category combinators
1286
+ * @category Concurrent output work
1287
1287
  */
1288
1288
  export declare const exhaustLatestMap: {
1289
1289
  <B, C, E3, R3>(f: (b: B) => Fx.Fx<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1337,7 +1337,7 @@ export declare const exhaustLatestMap: {
1337
1337
  * ```
1338
1338
  *
1339
1339
  * @since 1.0.0
1340
- * @category combinators
1340
+ * @category Concurrent output work
1341
1341
  */
1342
1342
  export declare const exhaustLatestMapEffect: {
1343
1343
  <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3 | Scope.Scope>;
@@ -1376,7 +1376,7 @@ export declare const exhaustLatestMapEffect: {
1376
1376
  * @param f - Reducer `(state, value) => [nextState, emitted]`.
1377
1377
  * @returns A `Push` whose Fx side emits the accumulated/mapped values.
1378
1378
  * @since 1.0.0
1379
- * @category combinators
1379
+ * @category Stateful outputs
1380
1380
  */
1381
1381
  export declare const mapAccum: {
1382
1382
  <S, B, C>(initial: S, f: (s: S, b: B) => readonly [S, C]): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;
@@ -1451,7 +1451,7 @@ export declare const mapAccum: {
1451
1451
  * @param f - Effectful reducer `(state, value) => Effect<[nextState, emitted]>`.
1452
1452
  * @returns A `Push` whose Fx side emits the accumulated/mapped values.
1453
1453
  * @since 1.0.0
1454
- * @category combinators
1454
+ * @category Stateful outputs
1455
1455
  */
1456
1456
  export declare const mapAccumEffect: {
1457
1457
  <S, B, C, E3, R3>(initial: S, f: (s: S, b: B) => Effect.Effect<readonly [S, C], E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3>;
@@ -1494,7 +1494,7 @@ export declare const mapAccumEffect: {
1494
1494
  * ```
1495
1495
  *
1496
1496
  * @since 1.0.0
1497
- * @category services
1497
+ * @category Push services
1498
1498
  */
1499
1499
  export declare function Service<Self, A, E = never, B = never, E2 = never>(): <const Id extends string>(id: Id) => Push.Class<Self, Id, A, E, B, E2>;
1500
1500
  //# sourceMappingURL=Push.d.ts.map