@typed/fx 2.0.0-beta.6 → 2.0.0-beta.7
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.
- package/dist/Fx/Fx.d.ts +9 -9
- package/dist/Fx/Fx.js +1 -1
- package/dist/Fx/TypeId.d.ts +3 -3
- package/dist/Fx/TypeId.js +2 -2
- package/dist/Fx/combinators/additive.d.ts +6 -6
- package/dist/Fx/combinators/additive.js +6 -6
- package/dist/Fx/combinators/catch.d.ts +7 -7
- package/dist/Fx/combinators/catch.js +7 -7
- package/dist/Fx/combinators/causes.d.ts +1 -1
- package/dist/Fx/combinators/causes.js +1 -1
- package/dist/Fx/combinators/changesWithEffect.d.ts +1 -1
- package/dist/Fx/combinators/changesWithEffect.js +1 -1
- package/dist/Fx/combinators/compact.d.ts +1 -1
- package/dist/Fx/combinators/compact.js +1 -1
- package/dist/Fx/combinators/concatMap.d.ts +2 -2
- package/dist/Fx/combinators/concatMap.js +2 -2
- package/dist/Fx/combinators/continueWith.d.ts +4 -4
- package/dist/Fx/combinators/continueWith.js +4 -4
- package/dist/Fx/combinators/debounce.d.ts +2 -2
- package/dist/Fx/combinators/debounce.d.ts.map +1 -1
- package/dist/Fx/combinators/debounce.js +1 -1
- package/dist/Fx/combinators/delay.d.ts +9 -7
- package/dist/Fx/combinators/delay.d.ts.map +1 -1
- package/dist/Fx/combinators/delay.js +8 -6
- package/dist/Fx/combinators/dropUntil.d.ts +2 -2
- package/dist/Fx/combinators/dropUntil.js +2 -2
- package/dist/Fx/combinators/during.d.ts +1 -1
- package/dist/Fx/combinators/during.js +1 -1
- package/dist/Fx/combinators/ensuring.d.ts +1 -1
- package/dist/Fx/combinators/ensuring.js +1 -1
- package/dist/Fx/combinators/exhaustLatestMap.d.ts +1 -1
- package/dist/Fx/combinators/exhaustLatestMap.js +1 -1
- package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts +1 -1
- package/dist/Fx/combinators/exhaustLatestMapEffect.js +1 -1
- package/dist/Fx/combinators/exhaustMap.d.ts +1 -1
- package/dist/Fx/combinators/exhaustMap.js +1 -1
- package/dist/Fx/combinators/exhaustMapEffect.d.ts +1 -1
- package/dist/Fx/combinators/exhaustMapEffect.js +1 -1
- package/dist/Fx/combinators/exit.d.ts +1 -1
- package/dist/Fx/combinators/exit.js +1 -1
- package/dist/Fx/combinators/filter.d.ts +1 -1
- package/dist/Fx/combinators/filter.js +1 -1
- package/dist/Fx/combinators/filterEffect.d.ts +1 -1
- package/dist/Fx/combinators/filterEffect.js +1 -1
- package/dist/Fx/combinators/filterMap.d.ts +1 -1
- package/dist/Fx/combinators/filterMap.js +1 -1
- package/dist/Fx/combinators/filterMapEffect.d.ts +1 -1
- package/dist/Fx/combinators/filterMapEffect.js +1 -1
- package/dist/Fx/combinators/filterMapLoop.d.ts +1 -1
- package/dist/Fx/combinators/filterMapLoop.js +1 -1
- package/dist/Fx/combinators/filterMapLoopCause.d.ts +1 -1
- package/dist/Fx/combinators/filterMapLoopCause.js +1 -1
- package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts +1 -1
- package/dist/Fx/combinators/filterMapLoopCauseEffect.js +1 -1
- package/dist/Fx/combinators/filterMapLoopEffect.d.ts +1 -1
- package/dist/Fx/combinators/filterMapLoopEffect.js +1 -1
- package/dist/Fx/combinators/flatMap.d.ts +2 -2
- package/dist/Fx/combinators/flatMap.js +1 -1
- package/dist/Fx/combinators/flatMapConcurrently.d.ts +1 -1
- package/dist/Fx/combinators/flatMapConcurrently.js +1 -1
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts +1 -1
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.js +1 -1
- package/dist/Fx/combinators/flatMapEffect.d.ts +2 -2
- package/dist/Fx/combinators/flatMapEffect.js +1 -1
- package/dist/Fx/combinators/flip.d.ts +1 -1
- package/dist/Fx/combinators/flip.js +1 -1
- package/dist/Fx/combinators/gen.d.ts +1 -1
- package/dist/Fx/combinators/gen.js +1 -1
- package/dist/Fx/combinators/genScoped.d.ts +1 -1
- package/dist/Fx/combinators/genScoped.js +1 -1
- package/dist/Fx/combinators/grouped.d.ts +2 -2
- package/dist/Fx/combinators/grouped.js +2 -2
- package/dist/Fx/combinators/keyed.d.ts +2 -2
- package/dist/Fx/combinators/keyed.js +1 -1
- package/dist/Fx/combinators/loop.d.ts +1 -1
- package/dist/Fx/combinators/loop.js +1 -1
- package/dist/Fx/combinators/loopCause.d.ts +1 -1
- package/dist/Fx/combinators/loopCause.js +1 -1
- package/dist/Fx/combinators/loopCauseEffect.d.ts +1 -1
- package/dist/Fx/combinators/loopCauseEffect.js +1 -1
- package/dist/Fx/combinators/loopEffect.d.ts +1 -1
- package/dist/Fx/combinators/loopEffect.js +1 -1
- package/dist/Fx/combinators/map.d.ts +2 -2
- package/dist/Fx/combinators/map.js +2 -2
- package/dist/Fx/combinators/mapBoth.d.ts +1 -1
- package/dist/Fx/combinators/mapBoth.js +1 -1
- package/dist/Fx/combinators/mapEffect.d.ts +1 -1
- package/dist/Fx/combinators/mapEffect.js +1 -1
- package/dist/Fx/combinators/mapError.d.ts +1 -1
- package/dist/Fx/combinators/mapError.js +1 -1
- package/dist/Fx/combinators/mergeAll.d.ts +1 -1
- package/dist/Fx/combinators/mergeAll.js +1 -1
- package/dist/Fx/combinators/mergeOrdered.d.ts +1 -1
- package/dist/Fx/combinators/mergeOrdered.d.ts.map +1 -1
- package/dist/Fx/combinators/mergeOrdered.js +33 -11
- package/dist/Fx/combinators/onError.d.ts +1 -1
- package/dist/Fx/combinators/onError.js +1 -1
- package/dist/Fx/combinators/onExit.d.ts +1 -1
- package/dist/Fx/combinators/onExit.js +1 -1
- package/dist/Fx/combinators/onInterrupt.d.ts +1 -1
- package/dist/Fx/combinators/onInterrupt.js +1 -1
- package/dist/Fx/combinators/pairwise.d.ts +1 -1
- package/dist/Fx/combinators/pairwise.js +1 -1
- package/dist/Fx/combinators/provide.d.ts +4 -4
- package/dist/Fx/combinators/provide.js +4 -4
- package/dist/Fx/combinators/race.d.ts +2 -2
- package/dist/Fx/combinators/race.js +2 -2
- package/dist/Fx/combinators/repeat.d.ts +1 -1
- package/dist/Fx/combinators/repeat.js +1 -1
- package/dist/Fx/combinators/result.d.ts +1 -1
- package/dist/Fx/combinators/result.js +1 -1
- package/dist/Fx/combinators/retry.d.ts +1 -1
- package/dist/Fx/combinators/retry.js +1 -1
- package/dist/Fx/combinators/sample.d.ts +1 -1
- package/dist/Fx/combinators/sample.js +1 -1
- package/dist/Fx/combinators/scan.d.ts +2 -2
- package/dist/Fx/combinators/scan.js +2 -2
- package/dist/Fx/combinators/since.d.ts +1 -1
- package/dist/Fx/combinators/since.js +1 -1
- package/dist/Fx/combinators/skip.d.ts +2 -2
- package/dist/Fx/combinators/skip.js +2 -2
- package/dist/Fx/combinators/skipRepeats.d.ts +1 -1
- package/dist/Fx/combinators/skipRepeats.js +1 -1
- package/dist/Fx/combinators/skipRepeatsWith.d.ts +1 -1
- package/dist/Fx/combinators/skipRepeatsWith.js +1 -1
- package/dist/Fx/combinators/skipWhile.d.ts +4 -4
- package/dist/Fx/combinators/skipWhile.js +4 -4
- package/dist/Fx/combinators/slice.d.ts +3 -3
- package/dist/Fx/combinators/slice.js +2 -2
- package/dist/Fx/combinators/switchMap.d.ts +1 -1
- package/dist/Fx/combinators/switchMap.js +1 -1
- package/dist/Fx/combinators/switchMapEffect.d.ts +1 -1
- package/dist/Fx/combinators/switchMapEffect.js +1 -1
- package/dist/Fx/combinators/take.d.ts +2 -2
- package/dist/Fx/combinators/take.js +2 -2
- package/dist/Fx/combinators/takeUntil.d.ts +3 -3
- package/dist/Fx/combinators/takeUntil.js +3 -3
- package/dist/Fx/combinators/takeWhile.d.ts +2 -2
- package/dist/Fx/combinators/takeWhile.js +2 -2
- package/dist/Fx/combinators/tapEffect.d.ts +1 -1
- package/dist/Fx/combinators/tapEffect.js +1 -1
- package/dist/Fx/combinators/throttle.d.ts +3 -3
- package/dist/Fx/combinators/throttle.d.ts.map +1 -1
- package/dist/Fx/combinators/throttle.js +1 -1
- package/dist/Fx/combinators/timeout.d.ts +2 -2
- package/dist/Fx/combinators/timeout.js +2 -2
- package/dist/Fx/combinators/tuple.d.ts +2 -2
- package/dist/Fx/combinators/tuple.js +2 -2
- package/dist/Fx/combinators/until.d.ts +1 -1
- package/dist/Fx/combinators/until.js +1 -1
- package/dist/Fx/combinators/unwrap.d.ts +1 -1
- package/dist/Fx/combinators/unwrap.js +1 -1
- package/dist/Fx/combinators/unwrapScoped.d.ts +1 -1
- package/dist/Fx/combinators/unwrapScoped.js +1 -1
- package/dist/Fx/combinators/when.d.ts +2 -2
- package/dist/Fx/combinators/when.js +2 -2
- package/dist/Fx/combinators/withLatestFrom.d.ts +2 -2
- package/dist/Fx/combinators/withLatestFrom.js +2 -2
- package/dist/Fx/combinators/withSpan.d.ts +1 -1
- package/dist/Fx/combinators/withSpan.js +1 -1
- package/dist/Fx/combinators/zip.d.ts +4 -4
- package/dist/Fx/combinators/zip.js +4 -4
- package/dist/Fx/constructors/at.d.ts +1 -1
- package/dist/Fx/constructors/at.js +1 -1
- package/dist/Fx/constructors/die.d.ts +1 -1
- package/dist/Fx/constructors/die.js +1 -1
- package/dist/Fx/constructors/empty.d.ts +1 -1
- package/dist/Fx/constructors/empty.js +1 -1
- package/dist/Fx/constructors/fail.d.ts +1 -1
- package/dist/Fx/constructors/fail.js +1 -1
- package/dist/Fx/constructors/failCause.d.ts +1 -1
- package/dist/Fx/constructors/failCause.js +1 -1
- package/dist/Fx/constructors/fn.d.ts +4 -4
- package/dist/Fx/constructors/fn.js +1 -1
- package/dist/Fx/constructors/fromEffect.d.ts +2 -2
- package/dist/Fx/constructors/fromEffect.js +2 -2
- package/dist/Fx/constructors/fromFailures.d.ts +1 -1
- package/dist/Fx/constructors/fromFailures.js +1 -1
- package/dist/Fx/constructors/fromIterable.d.ts +1 -1
- package/dist/Fx/constructors/fromIterable.js +1 -1
- package/dist/Fx/constructors/fromSchedule.d.ts +6 -4
- package/dist/Fx/constructors/fromSchedule.d.ts.map +1 -1
- package/dist/Fx/constructors/fromSchedule.js +6 -4
- package/dist/Fx/constructors/interrupt.d.ts +1 -1
- package/dist/Fx/constructors/interrupt.js +1 -1
- package/dist/Fx/constructors/make.d.ts +9 -7
- package/dist/Fx/constructors/make.d.ts.map +1 -1
- package/dist/Fx/constructors/make.js +8 -6
- package/dist/Fx/constructors/periodic.d.ts +1 -1
- package/dist/Fx/constructors/periodic.js +1 -1
- package/dist/Fx/constructors/succeed.d.ts +4 -4
- package/dist/Fx/constructors/succeed.js +4 -4
- package/dist/Fx/constructors/suspend.d.ts +1 -1
- package/dist/Fx/constructors/suspend.js +1 -1
- package/dist/Fx/constructors/sync.d.ts +1 -1
- package/dist/Fx/constructors/sync.js +1 -1
- package/dist/Fx/run/collect.d.ts +4 -4
- package/dist/Fx/run/collect.js +4 -4
- package/dist/Fx/run/first.d.ts +1 -1
- package/dist/Fx/run/first.js +1 -1
- package/dist/Fx/run/fork.d.ts +2 -2
- package/dist/Fx/run/fork.js +2 -2
- package/dist/Fx/run/observe.d.ts +7 -5
- package/dist/Fx/run/observe.d.ts.map +1 -1
- package/dist/Fx/run/observe.js +30 -15
- package/dist/Fx/run/runPromise.d.ts +2 -2
- package/dist/Fx/run/runPromise.js +2 -2
- package/dist/Fx/stream.d.ts +4 -4
- package/dist/Fx/stream.js +2 -2
- package/dist/Push/Push.d.ts +30 -30
- package/dist/Push/Push.js +26 -26
- package/dist/RefSubject/Hydration.d.ts +24 -24
- package/dist/RefSubject/Hydration.js +5 -5
- package/dist/RefSubject/RefArray.d.ts +31 -31
- package/dist/RefSubject/RefArray.js +30 -30
- package/dist/RefSubject/RefBigDecimal.d.ts +20 -20
- package/dist/RefSubject/RefBigDecimal.js +19 -19
- package/dist/RefSubject/RefBigInt.d.ts +15 -15
- package/dist/RefSubject/RefBigInt.js +14 -14
- package/dist/RefSubject/RefBoolean.d.ts +15 -15
- package/dist/RefSubject/RefBoolean.js +14 -14
- package/dist/RefSubject/RefCause.d.ts +11 -11
- package/dist/RefSubject/RefCause.js +10 -10
- package/dist/RefSubject/RefChunk.d.ts +37 -37
- package/dist/RefSubject/RefChunk.js +36 -36
- package/dist/RefSubject/RefDateTime.d.ts +11 -11
- package/dist/RefSubject/RefDateTime.js +10 -10
- package/dist/RefSubject/RefDuration.d.ts +14 -14
- package/dist/RefSubject/RefDuration.js +13 -13
- package/dist/RefSubject/RefGraph.d.ts +29 -29
- package/dist/RefSubject/RefGraph.js +28 -28
- package/dist/RefSubject/RefHashMap.d.ts +27 -27
- package/dist/RefSubject/RefHashMap.js +26 -26
- package/dist/RefSubject/RefHashRing.d.ts +13 -13
- package/dist/RefSubject/RefHashRing.js +12 -12
- package/dist/RefSubject/RefHashSet.d.ts +21 -21
- package/dist/RefSubject/RefHashSet.js +20 -20
- package/dist/RefSubject/RefIterable.d.ts +30 -30
- package/dist/RefSubject/RefIterable.js +29 -29
- package/dist/RefSubject/RefOption.d.ts +13 -13
- package/dist/RefSubject/RefOption.js +12 -12
- package/dist/RefSubject/RefRecord.d.ts +31 -31
- package/dist/RefSubject/RefRecord.js +30 -30
- package/dist/RefSubject/RefResult.d.ts +12 -12
- package/dist/RefSubject/RefResult.js +11 -11
- package/dist/RefSubject/RefString.d.ts +17 -17
- package/dist/RefSubject/RefString.js +16 -16
- package/dist/RefSubject/RefStruct.d.ts +13 -13
- package/dist/RefSubject/RefStruct.js +12 -12
- package/dist/RefSubject/RefSubject.d.ts +93 -94
- package/dist/RefSubject/RefSubject.d.ts.map +1 -1
- package/dist/RefSubject/RefSubject.js +132 -77
- package/dist/RefSubject/RefTrie.d.ts +26 -26
- package/dist/RefSubject/RefTrie.js +25 -25
- package/dist/RefSubject/RefTuple.d.ts +11 -11
- package/dist/RefSubject/RefTuple.js +9 -9
- package/dist/Sink/Sink.d.ts +21 -19
- package/dist/Sink/Sink.d.ts.map +1 -1
- package/dist/Sink/Sink.js +5 -4
- package/dist/Sink/combinators.d.ts +33 -33
- package/dist/Sink/combinators.js +32 -32
- package/dist/Subject/Subject.d.ts +14 -13
- package/dist/Subject/Subject.d.ts.map +1 -1
- package/dist/Subject/Subject.js +11 -10
- package/dist/Versioned/Versioned.d.ts +31 -28
- package/dist/Versioned/Versioned.d.ts.map +1 -1
- package/dist/Versioned/Versioned.js +45 -37
- package/package.json +2 -1
|
@@ -23,7 +23,7 @@ import type { Fx } from "../Fx.js";
|
|
|
23
23
|
* @param predicate - The predicate function.
|
|
24
24
|
* @returns An `Fx` that emits once the predicate first matches.
|
|
25
25
|
* @since 1.0.0
|
|
26
|
-
* @category
|
|
26
|
+
* @category Selecting values
|
|
27
27
|
*/
|
|
28
28
|
export declare const dropUntil: {
|
|
29
29
|
<A>(predicate: (a: A) => boolean): <E, R>(fx: Fx<A, E, R>) => Fx<A, E, R>;
|
|
@@ -62,7 +62,7 @@ export declare const dropUntil: {
|
|
|
62
62
|
* @param predicate - Effectful predicate function.
|
|
63
63
|
* @returns An `Fx` that emits once the predicate first matches.
|
|
64
64
|
* @since 1.0.0
|
|
65
|
-
* @category
|
|
65
|
+
* @category Selecting values
|
|
66
66
|
*/
|
|
67
67
|
export declare const dropUntilEffect: {
|
|
68
68
|
<A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;
|
|
@@ -24,7 +24,7 @@ import { skipWhile, skipWhileEffect } from "./skipWhile.js";
|
|
|
24
24
|
* @param predicate - The predicate function.
|
|
25
25
|
* @returns An `Fx` that emits once the predicate first matches.
|
|
26
26
|
* @since 1.0.0
|
|
27
|
-
* @category
|
|
27
|
+
* @category Selecting values
|
|
28
28
|
*/
|
|
29
29
|
export const dropUntil = dual(2, (fx, predicate) => skipWhile(fx, (a) => !predicate(a)));
|
|
30
30
|
/**
|
|
@@ -60,6 +60,6 @@ export const dropUntil = dual(2, (fx, predicate) => skipWhile(fx, (a) => !predic
|
|
|
60
60
|
* @param predicate - Effectful predicate function.
|
|
61
61
|
* @returns An `Fx` that emits once the predicate first matches.
|
|
62
62
|
* @since 1.0.0
|
|
63
|
-
* @category
|
|
63
|
+
* @category Selecting values
|
|
64
64
|
*/
|
|
65
65
|
export const dropUntilEffect = dual(2, (fx, predicate) => skipWhileEffect(fx, (a) => Effect.map(predicate(a), (b) => !b)));
|
|
@@ -32,7 +32,7 @@ import type { Fx } from "../Fx.js";
|
|
|
32
32
|
* ```
|
|
33
33
|
*
|
|
34
34
|
* @since 1.0.0
|
|
35
|
-
* @category
|
|
35
|
+
* @category Time and rate
|
|
36
36
|
*/
|
|
37
37
|
export declare function during<A, E, R, Start extends Fx.Any, E2, R2>(events: Fx<A, E, R>, signals: Fx<Start, E2, R2>): Fx<A, E | E2 | Fx.Error<Start>, R | R2 | Fx.Services<Start> | Scope.Scope>;
|
|
38
38
|
//# sourceMappingURL=during.d.ts.map
|
|
@@ -37,7 +37,7 @@ import type { Fx } from "../Fx.js";
|
|
|
37
37
|
* ```
|
|
38
38
|
*
|
|
39
39
|
* @since 1.0.0
|
|
40
|
-
* @category
|
|
40
|
+
* @category Resource lifetime
|
|
41
41
|
*/
|
|
42
42
|
export declare const ensuring: {
|
|
43
43
|
<R2>(finalizer: Effect.Effect<void, never, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E, R | R2>;
|
|
@@ -38,6 +38,6 @@ import { make } from "../constructors/make.js";
|
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
40
|
* @since 1.0.0
|
|
41
|
-
* @category
|
|
41
|
+
* @category Resource lifetime
|
|
42
42
|
*/
|
|
43
43
|
export const ensuring = dual(2, (self, finalizer) => make((sink) => self.run(sink).pipe(Effect.ensuring(finalizer))));
|
|
@@ -45,7 +45,7 @@ import type { FlatMapLike } from "./flatMap.js";
|
|
|
45
45
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
46
46
|
* @returns An `Fx` that emits values from the inner streams.
|
|
47
47
|
* @since 1.0.0
|
|
48
|
-
* @category
|
|
48
|
+
* @category Concurrent work
|
|
49
49
|
*/
|
|
50
50
|
export declare const exhaustLatestMap: FlatMapLike;
|
|
51
51
|
//# sourceMappingURL=exhaustLatestMap.d.ts.map
|
|
@@ -50,7 +50,7 @@ import { extendScope } from "../internal/scope.js";
|
|
|
50
50
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
51
51
|
* @returns An `Fx` that emits values from the inner streams.
|
|
52
52
|
* @since 1.0.0
|
|
53
|
-
* @category
|
|
53
|
+
* @category Concurrent work
|
|
54
54
|
*/
|
|
55
55
|
export const exhaustLatestMap = dual(2, (self, f) => {
|
|
56
56
|
return make(Effect.fn(function* (sink) {
|
|
@@ -43,7 +43,7 @@ import type { FlatMapEffectLike } from "./flatMapEffect.js";
|
|
|
43
43
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
44
44
|
* @returns An `Fx` that emits the results of the effects.
|
|
45
45
|
* @since 1.0.0
|
|
46
|
-
* @category
|
|
46
|
+
* @category Concurrent work
|
|
47
47
|
*/
|
|
48
48
|
export declare const exhaustLatestMapEffect: FlatMapEffectLike;
|
|
49
49
|
//# sourceMappingURL=exhaustLatestMapEffect.d.ts.map
|
|
@@ -45,6 +45,6 @@ import { exhaustLatestMap } from "./exhaustLatestMap.js";
|
|
|
45
45
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
46
46
|
* @returns An `Fx` that emits the results of the effects.
|
|
47
47
|
* @since 1.0.0
|
|
48
|
-
* @category
|
|
48
|
+
* @category Concurrent work
|
|
49
49
|
*/
|
|
50
50
|
export const exhaustLatestMapEffect = dual(2, (self, f) => exhaustLatestMap(self, flow(f, fromEffect)));
|
|
@@ -42,7 +42,7 @@ import type { FlatMapLike } from "./flatMap.js";
|
|
|
42
42
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
43
43
|
* @returns An `Fx` that emits values from the active inner stream.
|
|
44
44
|
* @since 1.0.0
|
|
45
|
-
* @category
|
|
45
|
+
* @category Concurrent work
|
|
46
46
|
*/
|
|
47
47
|
export declare const exhaustMap: FlatMapLike;
|
|
48
48
|
//# sourceMappingURL=exhaustMap.d.ts.map
|
|
@@ -47,7 +47,7 @@ import { extendScope } from "../internal/scope.js";
|
|
|
47
47
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
48
48
|
* @returns An `Fx` that emits values from the active inner stream.
|
|
49
49
|
* @since 1.0.0
|
|
50
|
-
* @category
|
|
50
|
+
* @category Concurrent work
|
|
51
51
|
*/
|
|
52
52
|
export const exhaustMap = dual(2, (self, f) => make(Effect.fn(function* (sink) {
|
|
53
53
|
const handle = yield* FiberHandle.make();
|
|
@@ -37,7 +37,7 @@ import type { FlatMapEffectLike } from "./flatMapEffect.js";
|
|
|
37
37
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
38
38
|
* @returns An `Fx` that emits the results of the active effect.
|
|
39
39
|
* @since 1.0.0
|
|
40
|
-
* @category
|
|
40
|
+
* @category Concurrent work
|
|
41
41
|
*/
|
|
42
42
|
export declare const exhaustMapEffect: FlatMapEffectLike;
|
|
43
43
|
//# sourceMappingURL=exhaustMapEffect.d.ts.map
|
|
@@ -39,6 +39,6 @@ import { exhaustMap } from "./exhaustMap.js";
|
|
|
39
39
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
40
40
|
* @returns An `Fx` that emits the results of the active effect.
|
|
41
41
|
* @since 1.0.0
|
|
42
|
-
* @category
|
|
42
|
+
* @category Concurrent work
|
|
43
43
|
*/
|
|
44
44
|
export const exhaustMapEffect = dual(2, (self, f) => exhaustMap(self, flow(f, fromEffect)));
|
|
@@ -27,7 +27,7 @@ import type { Fx } from "../Fx.js";
|
|
|
27
27
|
* @param fx - The `Fx` stream.
|
|
28
28
|
* @returns An `Fx` emitting `Exit<A, E>`.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Errors and recovery
|
|
31
31
|
*/
|
|
32
32
|
export declare const exit: <A, E, R>(fx: Fx<A, E, R>) => Fx<Exit.Exit<A, E>, never, R>;
|
|
33
33
|
//# sourceMappingURL=exit.d.ts.map
|
|
@@ -27,6 +27,6 @@ import { make } from "../constructors/make.js";
|
|
|
27
27
|
* @param fx - The `Fx` stream.
|
|
28
28
|
* @returns An `Fx` emitting `Exit<A, E>`.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Errors and recovery
|
|
31
31
|
*/
|
|
32
32
|
export const exit = (fx) => make((sink) => fx.run(sinkCore.exit(sink)));
|
|
@@ -21,7 +21,7 @@ import type { Fx } from "../Fx.js";
|
|
|
21
21
|
* @param f - A predicate function.
|
|
22
22
|
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
23
23
|
* @since 1.0.0
|
|
24
|
-
* @category
|
|
24
|
+
* @category Selecting values
|
|
25
25
|
*/
|
|
26
26
|
export declare const filter: {
|
|
27
27
|
<A>(f: (a: A) => boolean): <E, R>(self: Fx<A, E, R>) => Fx<A, E, R>;
|
|
@@ -23,6 +23,6 @@ import { make } from "../constructors/make.js";
|
|
|
23
23
|
* @param f - A predicate function.
|
|
24
24
|
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
25
25
|
* @since 1.0.0
|
|
26
|
-
* @category
|
|
26
|
+
* @category Selecting values
|
|
27
27
|
*/
|
|
28
28
|
export const filter = dual(2, (self, f) => make((sink) => self.run(sinkCore.filter(sink, f))));
|
|
@@ -27,7 +27,7 @@ import type { Fx } from "../Fx.js";
|
|
|
27
27
|
* @param f - An effectful predicate function.
|
|
28
28
|
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Selecting values
|
|
31
31
|
*/
|
|
32
32
|
export declare const filterEffect: {
|
|
33
33
|
<A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;
|
|
@@ -28,6 +28,6 @@ import { make } from "../constructors/make.js";
|
|
|
28
28
|
* @param f - An effectful predicate function.
|
|
29
29
|
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
* @category
|
|
31
|
+
* @category Selecting values
|
|
32
32
|
*/
|
|
33
33
|
export const filterEffect = dual(2, (self, f) => make((sink) => self.run(sinkCore.filterEffect(f)(sink))));
|
|
@@ -25,7 +25,7 @@ import type { Fx } from "../Fx.js";
|
|
|
25
25
|
* @param f - A function that returns an `Option` for each element.
|
|
26
26
|
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
27
27
|
* @since 1.0.0
|
|
28
|
-
* @category
|
|
28
|
+
* @category Selecting values
|
|
29
29
|
*/
|
|
30
30
|
export declare const filterMap: {
|
|
31
31
|
<A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;
|
|
@@ -26,6 +26,6 @@ import { make } from "../constructors/make.js";
|
|
|
26
26
|
* @param f - A function that returns an `Option` for each element.
|
|
27
27
|
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
28
28
|
* @since 1.0.0
|
|
29
|
-
* @category
|
|
29
|
+
* @category Selecting values
|
|
30
30
|
*/
|
|
31
31
|
export const filterMap = dual(2, (self, f) => make((sink) => self.run(sinkCore.filterMap(sink, f))));
|
|
@@ -27,7 +27,7 @@ import type { Fx } from "../Fx.js";
|
|
|
27
27
|
* @param f - An effectful function that returns an `Option` for each element.
|
|
28
28
|
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Selecting values
|
|
31
31
|
*/
|
|
32
32
|
export declare const filterMapEffect: {
|
|
33
33
|
<A, B, E2, R2>(f: (a: A) => Effect.Effect<Option.Option<B>, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<B, E | E2, R | R2>;
|
|
@@ -27,6 +27,6 @@ import { make } from "../constructors/make.js";
|
|
|
27
27
|
* @param f - An effectful function that returns an `Option` for each element.
|
|
28
28
|
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Selecting values
|
|
31
31
|
*/
|
|
32
32
|
export const filterMapEffect = dual(2, (self, f) => make((sink) => self.run(sinkCore.filterMapEffect(f)(sink))));
|
|
@@ -27,7 +27,7 @@ import type { Fx } from "../Fx.js";
|
|
|
27
27
|
* @param f - The loop function returning `Option<C>` and the new state.
|
|
28
28
|
* @returns An `Fx` emitting the transformed values.
|
|
29
29
|
* @since 1.0.0
|
|
30
|
-
* @category
|
|
30
|
+
* @category Stateful transforms
|
|
31
31
|
*/
|
|
32
32
|
export declare const filterMapLoop: {
|
|
33
33
|
<B, A, C>(seed: B, f: (acc: B, a: A) => readonly [Option.Option<C>, B]): <E, R>(self: Fx<A, E, R>) => Fx<C, E, R>;
|
|
@@ -28,6 +28,6 @@ import { make } from "../constructors/make.js";
|
|
|
28
28
|
* @param f - The loop function returning `Option<C>` and the new state.
|
|
29
29
|
* @returns An `Fx` emitting the transformed values.
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
* @category
|
|
31
|
+
* @category Stateful transforms
|
|
32
32
|
*/
|
|
33
33
|
export const filterMapLoop = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.filterMapLoop(sink, seed, f))));
|
|
@@ -29,7 +29,7 @@ import type { Fx } from "../Fx.js";
|
|
|
29
29
|
* @param f - The loop function for causes.
|
|
30
30
|
* @returns An `Fx` with transformed errors.
|
|
31
31
|
* @since 1.0.0
|
|
32
|
-
* @category
|
|
32
|
+
* @category Stateful transforms
|
|
33
33
|
*/
|
|
34
34
|
export declare const filterMapLoopCause: {
|
|
35
35
|
<B, A, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => readonly [Option.Option<Cause.Cause<C>>, B]): <E, R>(self: Fx<A, E, R>) => Fx<A, C, R>;
|
|
@@ -29,6 +29,6 @@ import { make } from "../constructors/make.js";
|
|
|
29
29
|
* @param f - The loop function for causes.
|
|
30
30
|
* @returns An `Fx` with transformed errors.
|
|
31
31
|
* @since 1.0.0
|
|
32
|
-
* @category
|
|
32
|
+
* @category Stateful transforms
|
|
33
33
|
*/
|
|
34
34
|
export const filterMapLoopCause = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.filterMapLoopCause(sink, seed, f))));
|
|
@@ -29,7 +29,7 @@ import type { Fx } from "../Fx.js";
|
|
|
29
29
|
* @param f - The effectful loop function for causes.
|
|
30
30
|
* @returns An `Fx` with transformed errors.
|
|
31
31
|
* @since 1.0.0
|
|
32
|
-
* @category
|
|
32
|
+
* @category Stateful transforms
|
|
33
33
|
*/
|
|
34
34
|
export declare const filterMapLoopCauseEffect: {
|
|
35
35
|
<B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [Option.Option<Cause.Cause<C>>, B], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;
|
|
@@ -28,6 +28,6 @@ import { make } from "../constructors/make.js";
|
|
|
28
28
|
* @param f - The effectful loop function for causes.
|
|
29
29
|
* @returns An `Fx` with transformed errors.
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
* @category
|
|
31
|
+
* @category Stateful transforms
|
|
32
32
|
*/
|
|
33
33
|
export const filterMapLoopCauseEffect = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.filterMapLoopCauseEffect(sink, seed, f))));
|
|
@@ -28,7 +28,7 @@ import type { Fx } from "../Fx.js";
|
|
|
28
28
|
* @param f - The effectful loop function.
|
|
29
29
|
* @returns An `Fx` emitting the transformed values.
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
* @category
|
|
31
|
+
* @category Stateful transforms
|
|
32
32
|
*/
|
|
33
33
|
export declare const filterMapLoopEffect: {
|
|
34
34
|
<B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [Option.Option<C>, B], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;
|
|
@@ -28,6 +28,6 @@ import { make } from "../constructors/make.js";
|
|
|
28
28
|
* @param f - The effectful loop function.
|
|
29
29
|
* @returns An `Fx` emitting the transformed values.
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
* @category
|
|
31
|
+
* @category Stateful transforms
|
|
32
32
|
*/
|
|
33
33
|
export const filterMapLoopEffect = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.filterMapLoopEffect(sink, seed, f))));
|
|
@@ -15,7 +15,7 @@ import type { Fx } from "../Fx.js";
|
|
|
15
15
|
* The type acquires no resources. Implementations return an Fx requiring
|
|
16
16
|
* `Scope`; that Scope owns any admitted inner subscriptions and their cleanup.
|
|
17
17
|
* @since 1.0.0
|
|
18
|
-
* @category
|
|
18
|
+
* @category Type contracts
|
|
19
19
|
*/
|
|
20
20
|
export type FlatMapLike<Args extends ReadonlyArray<any> = []> = {
|
|
21
21
|
<A, B, E2, R2>(f: (a: A) => Fx<B, E2, R2>, ...args: Args): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
@@ -62,7 +62,7 @@ export type FlatMapLike<Args extends ReadonlyArray<any> = []> = {
|
|
|
62
62
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
63
63
|
* @returns An `Fx` that emits values from all inner streams.
|
|
64
64
|
* @since 1.0.0
|
|
65
|
-
* @category
|
|
65
|
+
* @category Concurrent work
|
|
66
66
|
*/
|
|
67
67
|
export declare const flatMap: FlatMapLike;
|
|
68
68
|
//# sourceMappingURL=flatMap.d.ts.map
|
|
@@ -45,7 +45,7 @@ import { extendScope } from "../internal/scope.js";
|
|
|
45
45
|
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
46
46
|
* @returns An `Fx` that emits values from all inner streams.
|
|
47
47
|
* @since 1.0.0
|
|
48
|
-
* @category
|
|
48
|
+
* @category Concurrent work
|
|
49
49
|
*/
|
|
50
50
|
export const flatMap = dual(2, (self, f) => make(Effect.fn(function* (sink) {
|
|
51
51
|
const set = yield* FiberSet.make();
|
|
@@ -50,7 +50,7 @@ import type { Fx } from "../Fx.js";
|
|
|
50
50
|
* @param concurrency - A positive safe-integer limit for concurrent inner streams. Invalid limits fail with `Cause.IllegalArgumentError`.
|
|
51
51
|
* @returns An `Fx` that emits values from the inner streams.
|
|
52
52
|
* @since 1.0.0
|
|
53
|
-
* @category
|
|
53
|
+
* @category Concurrent work
|
|
54
54
|
*/
|
|
55
55
|
export declare const flatMapConcurrently: {
|
|
56
56
|
<A, B, E2, R2>(f: (a: A) => Fx<B, E2, R2>, concurrency: number): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2 | Cause.IllegalArgumentError, R | R2 | Scope.Scope>;
|
|
@@ -55,7 +55,7 @@ import { extendScope } from "../internal/scope.js";
|
|
|
55
55
|
* @param concurrency - A positive safe-integer limit for concurrent inner streams. Invalid limits fail with `Cause.IllegalArgumentError`.
|
|
56
56
|
* @returns An `Fx` that emits values from the inner streams.
|
|
57
57
|
* @since 1.0.0
|
|
58
|
-
* @category
|
|
58
|
+
* @category Concurrent work
|
|
59
59
|
*/
|
|
60
60
|
export const flatMapConcurrently = dual(3, (self, f, concurrency) => make(Effect.fn(function* (sink) {
|
|
61
61
|
if (!Number.isSafeInteger(concurrency) || concurrency <= 0) {
|
|
@@ -47,7 +47,7 @@ import type { Fx } from "../Fx.js";
|
|
|
47
47
|
* @param concurrency - A positive safe-integer limit for concurrent effects. Invalid limits fail with `Cause.IllegalArgumentError`.
|
|
48
48
|
* @returns An `Fx` that emits the results of the effects.
|
|
49
49
|
* @since 1.0.0
|
|
50
|
-
* @category
|
|
50
|
+
* @category Concurrent work
|
|
51
51
|
*/
|
|
52
52
|
export declare const flatMapConcurrentlyEffect: {
|
|
53
53
|
<A, B, E2, R2>(f: (a: A) => Effect.Effect<B, E2, R2>, concurrency: number): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2 | Cause.IllegalArgumentError, R | R2 | Scope.Scope>;
|
|
@@ -46,6 +46,6 @@ import { flatMapConcurrently } from "./flatMapConcurrently.js";
|
|
|
46
46
|
* @param concurrency - A positive safe-integer limit for concurrent effects. Invalid limits fail with `Cause.IllegalArgumentError`.
|
|
47
47
|
* @returns An `Fx` that emits the results of the effects.
|
|
48
48
|
* @since 1.0.0
|
|
49
|
-
* @category
|
|
49
|
+
* @category Concurrent work
|
|
50
50
|
*/
|
|
51
51
|
export const flatMapConcurrentlyEffect = dual(3, (self, f, concurrency) => flatMapConcurrently(self, flow(f, fromEffect), concurrency));
|
|
@@ -16,7 +16,7 @@ import type { Fx } from "../Fx.js";
|
|
|
16
16
|
* The type acquires no resources. Implementations adapt each Effect to a
|
|
17
17
|
* one-value Fx whose execution is owned by the returned Fx's required `Scope`.
|
|
18
18
|
* @since 1.0.0
|
|
19
|
-
* @category
|
|
19
|
+
* @category Type contracts
|
|
20
20
|
*/
|
|
21
21
|
export type FlatMapEffectLike<Args extends ReadonlyArray<any> = []> = {
|
|
22
22
|
<A, B, E2, R2>(f: (a: A) => Effect.Effect<B, E2, R2>, ...args: Args): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
@@ -60,7 +60,7 @@ export type FlatMapEffectLike<Args extends ReadonlyArray<any> = []> = {
|
|
|
60
60
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
61
61
|
* @returns An `Fx` that emits the results of the effects.
|
|
62
62
|
* @since 1.0.0
|
|
63
|
-
* @category
|
|
63
|
+
* @category Concurrent work
|
|
64
64
|
*/
|
|
65
65
|
export declare const flatMapEffect: FlatMapEffectLike;
|
|
66
66
|
//# sourceMappingURL=flatMapEffect.d.ts.map
|
|
@@ -39,6 +39,6 @@ import { flatMap } from "./flatMap.js";
|
|
|
39
39
|
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
40
40
|
* @returns An `Fx` that emits the results of the effects.
|
|
41
41
|
* @since 1.0.0
|
|
42
|
-
* @category
|
|
42
|
+
* @category Concurrent work
|
|
43
43
|
*/
|
|
44
44
|
export const flatMapEffect = dual(2, (self, f) => flatMap(self, flow(f, fromEffect)));
|
|
@@ -37,7 +37,7 @@ import type { Fx } from "../Fx.js";
|
|
|
37
37
|
* @param fx - The `Fx` stream.
|
|
38
38
|
* @returns An `Fx` where errors are successes and successes are errors.
|
|
39
39
|
* @since 1.0.0
|
|
40
|
-
* @category
|
|
40
|
+
* @category Errors and recovery
|
|
41
41
|
*/
|
|
42
42
|
export declare const flip: <A, E, R>(fx: Fx<A, E, R>) => Fx<E, A, R>;
|
|
43
43
|
//# sourceMappingURL=flip.d.ts.map
|
|
@@ -38,6 +38,6 @@ import { make } from "../constructors/make.js";
|
|
|
38
38
|
* @param fx - The `Fx` stream.
|
|
39
39
|
* @returns An `Fx` where errors are successes and successes are errors.
|
|
40
40
|
* @since 1.0.0
|
|
41
|
-
* @category
|
|
41
|
+
* @category Errors and recovery
|
|
42
42
|
*/
|
|
43
43
|
export const flip = (fx) => make((sink) => fx.run(sinkCore.flip(sink)));
|
|
@@ -33,7 +33,7 @@ import type { Fx } from "../Fx.js";
|
|
|
33
33
|
* @param f - The generator function.
|
|
34
34
|
* @returns An `Fx` representing the result of the generator.
|
|
35
35
|
* @since 1.0.0
|
|
36
|
-
* @category
|
|
36
|
+
* @category Generator composition
|
|
37
37
|
*/
|
|
38
38
|
export declare const gen: <Yield extends Effect.Effect<any, any, any>, Return extends Fx.Any>(f: () => Generator<Yield, Return, any>) => Fx<Fx.Success<Return>, Fx.Error<Return> | ([Yield] extends [never] ? never : Effect.Error<Yield>), Fx.Services<Return> | ([Yield] extends [never] ? never : Effect.Services<Yield>)>;
|
|
39
39
|
//# sourceMappingURL=gen.d.ts.map
|
|
@@ -33,6 +33,6 @@ import { unwrap } from "./unwrap.js";
|
|
|
33
33
|
* @param f - The generator function.
|
|
34
34
|
* @returns An `Fx` representing the result of the generator.
|
|
35
35
|
* @since 1.0.0
|
|
36
|
-
* @category
|
|
36
|
+
* @category Generator composition
|
|
37
37
|
*/
|
|
38
38
|
export const gen = (f) => unwrap(Effect.gen(f));
|
|
@@ -37,7 +37,7 @@ import { Scope } from "effect";
|
|
|
37
37
|
* @param f - The generator function.
|
|
38
38
|
* @returns An `Fx` representing the result of the generator.
|
|
39
39
|
* @since 1.0.0
|
|
40
|
-
* @category
|
|
40
|
+
* @category Generator composition
|
|
41
41
|
*/
|
|
42
42
|
export declare const genScoped: <Yield extends Effect.Effect<any, any, any>, Return extends Fx.Any>(f: () => Generator<Yield, Return, any>) => Fx<Fx.Success<Return>, Fx.Error<Return> | ([Yield] extends [never] ? never : Effect.Error<Yield>), Exclude<Fx.Services<Return> | ([Yield] extends [never] ? never : Effect.Services<Yield>), Scope.Scope>>;
|
|
43
43
|
//# sourceMappingURL=genScoped.d.ts.map
|
|
@@ -36,6 +36,6 @@ import { unwrapScoped } from "./unwrapScoped.js";
|
|
|
36
36
|
* @param f - The generator function.
|
|
37
37
|
* @returns An `Fx` representing the result of the generator.
|
|
38
38
|
* @since 1.0.0
|
|
39
|
-
* @category
|
|
39
|
+
* @category Generator composition
|
|
40
40
|
*/
|
|
41
41
|
export const genScoped = (f) => unwrapScoped(Effect.gen(f));
|
|
@@ -41,7 +41,7 @@ import type { Fx } from "../Fx.js";
|
|
|
41
41
|
* ```
|
|
42
42
|
*
|
|
43
43
|
* @since 1.0.0
|
|
44
|
-
* @category
|
|
44
|
+
* @category Stateful transforms
|
|
45
45
|
*/
|
|
46
46
|
export declare const grouped: {
|
|
47
47
|
(n: number): <A, E, R>(self: Fx<A, E, R>) => Fx<NonEmptyReadonlyArray<A>, E | Cause.IllegalArgumentError, R>;
|
|
@@ -80,7 +80,7 @@ export declare const grouped: {
|
|
|
80
80
|
* ```
|
|
81
81
|
*
|
|
82
82
|
* @since 1.0.0
|
|
83
|
-
* @category
|
|
83
|
+
* @category Time and rate
|
|
84
84
|
*/
|
|
85
85
|
export declare const groupedWithin: {
|
|
86
86
|
(n: number, duration: Duration.Input): <A, E, R>(self: Fx<A, E, R>) => Fx<NonEmptyReadonlyArray<A>, E | Cause.IllegalArgumentError, R | Scope.Scope>;
|
|
@@ -49,7 +49,7 @@ const invalidGroupSize = () => new Cause.IllegalArgumentError("Group size must b
|
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
51
|
* @since 1.0.0
|
|
52
|
-
* @category
|
|
52
|
+
* @category Stateful transforms
|
|
53
53
|
*/
|
|
54
54
|
export const grouped = dual(2, (self, n) => {
|
|
55
55
|
if (!isGroupSize(n)) {
|
|
@@ -104,7 +104,7 @@ export const grouped = dual(2, (self, n) => {
|
|
|
104
104
|
* ```
|
|
105
105
|
*
|
|
106
106
|
* @since 1.0.0
|
|
107
|
-
* @category
|
|
107
|
+
* @category Time and rate
|
|
108
108
|
*/
|
|
109
109
|
export const groupedWithin = dual(3, (self, n, duration) => {
|
|
110
110
|
if (!isGroupSize(n)) {
|
|
@@ -32,7 +32,7 @@ import type { Fx } from "../Fx.js";
|
|
|
32
32
|
* ```
|
|
33
33
|
*
|
|
34
34
|
* @since 1.0.0
|
|
35
|
-
* @category
|
|
35
|
+
* @category Operator options
|
|
36
36
|
*/
|
|
37
37
|
export interface KeyedOptions<A, B, C, E2, R2> {
|
|
38
38
|
/**
|
|
@@ -149,7 +149,7 @@ export interface KeyedOptions<A, B, C, E2, R2> {
|
|
|
149
149
|
* @param options - Configuration options.
|
|
150
150
|
* @returns An `Fx` emitting an array of results.
|
|
151
151
|
* @since 1.0.0
|
|
152
|
-
* @category
|
|
152
|
+
* @category Keyed work
|
|
153
153
|
*/
|
|
154
154
|
export declare const keyed: {
|
|
155
155
|
<A, B extends PropertyKey, C, E2, R2>(options: KeyedOptions<A, B, C, E2, R2>): <E, R>(fx: Fx<ReadonlyArray<A>, E, R>) => Fx<ReadonlyArray<C>, E | E2 | Cause.IllegalArgumentError, R | R2 | Scope.Scope>;
|
|
@@ -68,7 +68,7 @@ import { FxTypeId } from "../TypeId.js";
|
|
|
68
68
|
* @param options - Configuration options.
|
|
69
69
|
* @returns An `Fx` emitting an array of results.
|
|
70
70
|
* @since 1.0.0
|
|
71
|
-
* @category
|
|
71
|
+
* @category Keyed work
|
|
72
72
|
*/
|
|
73
73
|
export const keyed = dual(2, function keyed(fx, options) {
|
|
74
74
|
return new Keyed(fx, options);
|
|
@@ -23,7 +23,7 @@ import type { Fx } from "../Fx.js";
|
|
|
23
23
|
* @param f - A function that takes the accumulator and an element, returning a tuple of the emitted value and the new accumulator.
|
|
24
24
|
* @returns An `Fx` that emits the transformed values.
|
|
25
25
|
* @since 1.0.0
|
|
26
|
-
* @category
|
|
26
|
+
* @category Stateful transforms
|
|
27
27
|
*/
|
|
28
28
|
export declare const loop: {
|
|
29
29
|
<B, A, C>(seed: B, f: (acc: B, a: A) => readonly [C, B]): <E, R>(self: Fx<A, E, R>) => Fx<C, E, R>;
|
|
@@ -25,6 +25,6 @@ import { make } from "../constructors/make.js";
|
|
|
25
25
|
* @param f - A function that takes the accumulator and an element, returning a tuple of the emitted value and the new accumulator.
|
|
26
26
|
* @returns An `Fx` that emits the transformed values.
|
|
27
27
|
* @since 1.0.0
|
|
28
|
-
* @category
|
|
28
|
+
* @category Stateful transforms
|
|
29
29
|
*/
|
|
30
30
|
export const loop = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.loop(sink, seed, f))));
|
|
@@ -24,7 +24,7 @@ import type { Fx } from "../Fx.js";
|
|
|
24
24
|
* @param f - The loop function for causes.
|
|
25
25
|
* @returns An `Fx` with transformed errors.
|
|
26
26
|
* @since 1.0.0
|
|
27
|
-
* @category
|
|
27
|
+
* @category Stateful transforms
|
|
28
28
|
*/
|
|
29
29
|
export declare const loopCause: {
|
|
30
30
|
<B, A, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => readonly [Cause.Cause<C>, B]): <E, R>(self: Fx<A, E, R>) => Fx<A, C, R>;
|
|
@@ -25,6 +25,6 @@ import { make } from "../constructors/make.js";
|
|
|
25
25
|
* @param f - The loop function for causes.
|
|
26
26
|
* @returns An `Fx` with transformed errors.
|
|
27
27
|
* @since 1.0.0
|
|
28
|
-
* @category
|
|
28
|
+
* @category Stateful transforms
|
|
29
29
|
*/
|
|
30
30
|
export const loopCause = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.loopCause(sink, seed, f))));
|
|
@@ -26,7 +26,7 @@ import type { Fx } from "../Fx.js";
|
|
|
26
26
|
* @param f - The effectful loop function for causes.
|
|
27
27
|
* @returns An `Fx` with transformed errors.
|
|
28
28
|
* @since 1.0.0
|
|
29
|
-
* @category
|
|
29
|
+
* @category Stateful transforms
|
|
30
30
|
*/
|
|
31
31
|
export declare const loopCauseEffect: {
|
|
32
32
|
<B, A, E, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [Cause.Cause<C>, B], R2>): <R>(self: Fx<A, E, R>) => Fx<A, C | E, R | R2>;
|
|
@@ -26,6 +26,6 @@ import { make } from "../constructors/make.js";
|
|
|
26
26
|
* @param f - The effectful loop function for causes.
|
|
27
27
|
* @returns An `Fx` with transformed errors.
|
|
28
28
|
* @since 1.0.0
|
|
29
|
-
* @category
|
|
29
|
+
* @category Stateful transforms
|
|
30
30
|
*/
|
|
31
31
|
export const loopCauseEffect = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.loopCauseEffect(sink, seed, f))));
|
|
@@ -30,7 +30,7 @@ import type { Fx } from "../Fx.js";
|
|
|
30
30
|
* @param f - The effectful loop function.
|
|
31
31
|
* @returns An `Fx` emitting the transformed values.
|
|
32
32
|
* @since 1.0.0
|
|
33
|
-
* @category
|
|
33
|
+
* @category Stateful transforms
|
|
34
34
|
*/
|
|
35
35
|
export declare const loopEffect: {
|
|
36
36
|
<B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [C, B], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;
|