@typed/fx 2.0.0-beta.5 → 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
|
@@ -20,7 +20,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
20
20
|
* and cleanup; source failures and services stay on reads and pushes.
|
|
21
21
|
*
|
|
22
22
|
* @since 1.18.0
|
|
23
|
-
* @category
|
|
23
|
+
* @category Constructors
|
|
24
24
|
*/
|
|
25
25
|
export function make(initial) {
|
|
26
26
|
return RefSubject.make(initial, { eq: equals });
|
|
@@ -42,7 +42,7 @@ export function make(initial) {
|
|
|
42
42
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
43
43
|
*
|
|
44
44
|
* @since 1.18.0
|
|
45
|
-
* @category
|
|
45
|
+
* @category State updates
|
|
46
46
|
*/
|
|
47
47
|
export const add = dual(2, function add(ref, value) {
|
|
48
48
|
return RefSubject.update(ref, HashSet.add(value));
|
|
@@ -61,7 +61,7 @@ export const add = dual(2, function add(ref, value) {
|
|
|
61
61
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
62
62
|
*
|
|
63
63
|
* @since 1.18.0
|
|
64
|
-
* @category
|
|
64
|
+
* @category State updates
|
|
65
65
|
*/
|
|
66
66
|
export const remove = dual(2, function remove(ref, value) {
|
|
67
67
|
return RefSubject.update(ref, HashSet.remove(value));
|
|
@@ -80,7 +80,7 @@ export const remove = dual(2, function remove(ref, value) {
|
|
|
80
80
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
81
81
|
*
|
|
82
82
|
* @since 1.18.0
|
|
83
|
-
* @category
|
|
83
|
+
* @category State updates
|
|
84
84
|
*/
|
|
85
85
|
export const clear = (ref) => RefSubject.update(ref, () => HashSet.empty());
|
|
86
86
|
/**
|
|
@@ -97,7 +97,7 @@ export const clear = (ref) => RefSubject.update(ref, () => HashSet.empty());
|
|
|
97
97
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
98
98
|
*
|
|
99
99
|
* @since 1.18.0
|
|
100
|
-
* @category
|
|
100
|
+
* @category State updates
|
|
101
101
|
*/
|
|
102
102
|
export const union = dual(2, function union(ref, that) {
|
|
103
103
|
return RefSubject.update(ref, HashSet.union(that));
|
|
@@ -116,7 +116,7 @@ export const union = dual(2, function union(ref, that) {
|
|
|
116
116
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
117
117
|
*
|
|
118
118
|
* @since 1.18.0
|
|
119
|
-
* @category
|
|
119
|
+
* @category State updates
|
|
120
120
|
*/
|
|
121
121
|
export const intersection = dual(2, function intersection(ref, that) {
|
|
122
122
|
return RefSubject.update(ref, HashSet.intersection(that));
|
|
@@ -135,7 +135,7 @@ export const intersection = dual(2, function intersection(ref, that) {
|
|
|
135
135
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
136
136
|
*
|
|
137
137
|
* @since 1.18.0
|
|
138
|
-
* @category
|
|
138
|
+
* @category State updates
|
|
139
139
|
*/
|
|
140
140
|
export const difference = dual(2, function difference(ref, that) {
|
|
141
141
|
return RefSubject.update(ref, HashSet.difference(that));
|
|
@@ -153,7 +153,7 @@ export const difference = dual(2, function difference(ref, that) {
|
|
|
153
153
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
154
154
|
* acquires no resource. It returns the committed HashSet and retains the ref's E and R channels.
|
|
155
155
|
* @since 1.18.0
|
|
156
|
-
* @category
|
|
156
|
+
* @category State updates
|
|
157
157
|
*/
|
|
158
158
|
export const filter = dual(2, function filter(ref, predicate) {
|
|
159
159
|
return RefSubject.update(ref, HashSet.filter(predicate));
|
|
@@ -171,7 +171,7 @@ export const filter = dual(2, function filter(ref, predicate) {
|
|
|
171
171
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
172
172
|
* acquires no resource. It returns the committed HashSet and retains the ref's E and R channels.
|
|
173
173
|
* @since 1.18.0
|
|
174
|
-
* @category
|
|
174
|
+
* @category State updates
|
|
175
175
|
*/
|
|
176
176
|
export const map = dual(2, function map(ref, f) {
|
|
177
177
|
return RefSubject.update(ref, HashSet.map(f));
|
|
@@ -193,7 +193,7 @@ export const map = dual(2, function map(ref, f) {
|
|
|
193
193
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
194
194
|
*
|
|
195
195
|
* @since 1.18.0
|
|
196
|
-
* @category
|
|
196
|
+
* @category Derived queries
|
|
197
197
|
*/
|
|
198
198
|
export const size = (ref) => RefSubject.map(ref, HashSet.size);
|
|
199
199
|
/**
|
|
@@ -210,7 +210,7 @@ export const size = (ref) => RefSubject.map(ref, HashSet.size);
|
|
|
210
210
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
211
211
|
*
|
|
212
212
|
* @since 1.18.0
|
|
213
|
-
* @category
|
|
213
|
+
* @category State predicates
|
|
214
214
|
*/
|
|
215
215
|
export const isEmpty = (ref) => RefSubject.map(ref, HashSet.isEmpty);
|
|
216
216
|
/**
|
|
@@ -227,7 +227,7 @@ export const isEmpty = (ref) => RefSubject.map(ref, HashSet.isEmpty);
|
|
|
227
227
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
228
228
|
*
|
|
229
229
|
* @since 1.18.0
|
|
230
|
-
* @category
|
|
230
|
+
* @category State predicates
|
|
231
231
|
*/
|
|
232
232
|
export const isNonEmpty = (ref) => RefSubject.map(ref, (s) => !HashSet.isEmpty(s));
|
|
233
233
|
/**
|
|
@@ -244,7 +244,7 @@ export const isNonEmpty = (ref) => RefSubject.map(ref, (s) => !HashSet.isEmpty(s
|
|
|
244
244
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
245
245
|
*
|
|
246
246
|
* @since 1.18.0
|
|
247
|
-
* @category
|
|
247
|
+
* @category State predicates
|
|
248
248
|
*/
|
|
249
249
|
export const has = dual(2, function has(ref, value) {
|
|
250
250
|
return RefSubject.map(ref, HashSet.has(value));
|
|
@@ -263,7 +263,7 @@ export const has = dual(2, function has(ref, value) {
|
|
|
263
263
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
264
264
|
*
|
|
265
265
|
* @since 1.18.0
|
|
266
|
-
* @category
|
|
266
|
+
* @category State predicates
|
|
267
267
|
*/
|
|
268
268
|
export const some = dual(2, function some(ref, predicate) {
|
|
269
269
|
return RefSubject.map(ref, HashSet.some(predicate));
|
|
@@ -282,7 +282,7 @@ export const some = dual(2, function some(ref, predicate) {
|
|
|
282
282
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
283
283
|
*
|
|
284
284
|
* @since 1.18.0
|
|
285
|
-
* @category
|
|
285
|
+
* @category State predicates
|
|
286
286
|
*/
|
|
287
287
|
export const every = dual(2, function every(ref, predicate) {
|
|
288
288
|
return RefSubject.map(ref, HashSet.every(predicate));
|
|
@@ -301,7 +301,7 @@ export const every = dual(2, function every(ref, predicate) {
|
|
|
301
301
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
302
302
|
*
|
|
303
303
|
* @since 1.18.0
|
|
304
|
-
* @category
|
|
304
|
+
* @category State predicates
|
|
305
305
|
*/
|
|
306
306
|
export const isSubset = dual(2, function isSubset(ref, that) {
|
|
307
307
|
return RefSubject.map(ref, HashSet.isSubset(that));
|
|
@@ -320,7 +320,7 @@ export const isSubset = dual(2, function isSubset(ref, that) {
|
|
|
320
320
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
321
321
|
*
|
|
322
322
|
* @since 1.18.0
|
|
323
|
-
* @category
|
|
323
|
+
* @category Derived queries
|
|
324
324
|
*/
|
|
325
325
|
export const mapValues = dual(2, function mapValues(ref, f) {
|
|
326
326
|
return RefSubject.map(ref, HashSet.map(f));
|
|
@@ -339,7 +339,7 @@ export const mapValues = dual(2, function mapValues(ref, f) {
|
|
|
339
339
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
340
340
|
*
|
|
341
341
|
* @since 1.18.0
|
|
342
|
-
* @category
|
|
342
|
+
* @category Derived queries
|
|
343
343
|
*/
|
|
344
344
|
export const filterValues = dual(2, function filterValues(ref, predicate) {
|
|
345
345
|
return RefSubject.map(ref, HashSet.filter(predicate));
|
|
@@ -358,7 +358,7 @@ export const filterValues = dual(2, function filterValues(ref, predicate) {
|
|
|
358
358
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
359
359
|
*
|
|
360
360
|
* @since 1.18.0
|
|
361
|
-
* @category
|
|
361
|
+
* @category Derived queries
|
|
362
362
|
*/
|
|
363
363
|
export const reduce = dual(3, function reduce(ref, b, f) {
|
|
364
364
|
return RefSubject.map(ref, HashSet.reduce(b, f));
|
|
@@ -377,6 +377,6 @@ export const reduce = dual(3, function reduce(ref, b, f) {
|
|
|
377
377
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
378
378
|
*
|
|
379
379
|
* @since 1.18.0
|
|
380
|
-
* @category
|
|
380
|
+
* @category Derived queries
|
|
381
381
|
*/
|
|
382
382
|
export const values = (ref) => RefSubject.map(ref, (s) => Array.from(s));
|
|
@@ -21,7 +21,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
21
21
|
* services, interruption, and Scope requirements expressed by its members.
|
|
22
22
|
*
|
|
23
23
|
* @since 1.18.0
|
|
24
|
-
* @category models
|
|
24
|
+
* @category State models
|
|
25
25
|
*/
|
|
26
26
|
export interface RefIterable<in out A, in out E = never, out R = never> extends RefSubject.RefSubject<Iterable<A>, E, R> {
|
|
27
27
|
}
|
|
@@ -39,7 +39,7 @@ export interface RefIterable<in out A, in out E = never, out R = never> extends
|
|
|
39
39
|
* and cleanup; source failures and services stay on reads and pushes.
|
|
40
40
|
*
|
|
41
41
|
* @since 1.18.0
|
|
42
|
-
* @category
|
|
42
|
+
* @category Constructors
|
|
43
43
|
*/
|
|
44
44
|
export declare function make<A, E = never, R = never>(initial: Iterable<A> | Effect.Effect<Iterable<A>, E, R> | Fx.Fx<Iterable<A>, E, R>): Effect.Effect<RefIterable<A, E>, never, R | Scope.Scope>;
|
|
45
45
|
/**
|
|
@@ -56,7 +56,7 @@ export declare function make<A, E = never, R = never>(initial: Iterable<A> | Eff
|
|
|
56
56
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
57
57
|
*
|
|
58
58
|
* @since 1.18.0
|
|
59
|
-
* @category
|
|
59
|
+
* @category State updates
|
|
60
60
|
*/
|
|
61
61
|
export declare const prepend: {
|
|
62
62
|
<A>(value: A): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -76,7 +76,7 @@ export declare const prepend: {
|
|
|
76
76
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
77
77
|
*
|
|
78
78
|
* @since 1.18.0
|
|
79
|
-
* @category
|
|
79
|
+
* @category State updates
|
|
80
80
|
*/
|
|
81
81
|
export declare const prependAll: {
|
|
82
82
|
<A>(value: Iterable<A>): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -96,7 +96,7 @@ export declare const prependAll: {
|
|
|
96
96
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
97
97
|
*
|
|
98
98
|
* @since 1.18.0
|
|
99
|
-
* @category
|
|
99
|
+
* @category State updates
|
|
100
100
|
*/
|
|
101
101
|
export declare const append: {
|
|
102
102
|
<A>(value: A): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -116,7 +116,7 @@ export declare const append: {
|
|
|
116
116
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
117
117
|
*
|
|
118
118
|
* @since 1.18.0
|
|
119
|
-
* @category
|
|
119
|
+
* @category State updates
|
|
120
120
|
*/
|
|
121
121
|
export declare const appendAll: {
|
|
122
122
|
<A>(value: Iterable<A>): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -136,7 +136,7 @@ export declare const appendAll: {
|
|
|
136
136
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
137
137
|
*
|
|
138
138
|
* @since 1.18.0
|
|
139
|
-
* @category
|
|
139
|
+
* @category State updates
|
|
140
140
|
*/
|
|
141
141
|
export declare const drop: {
|
|
142
142
|
(n: number): <A, E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -156,7 +156,7 @@ export declare const drop: {
|
|
|
156
156
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
157
157
|
*
|
|
158
158
|
* @since 1.18.0
|
|
159
|
-
* @category
|
|
159
|
+
* @category State updates
|
|
160
160
|
*/
|
|
161
161
|
export declare const take: {
|
|
162
162
|
(n: number): <A, E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -176,7 +176,7 @@ export declare const take: {
|
|
|
176
176
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
177
177
|
*
|
|
178
178
|
* @since 1.18.0
|
|
179
|
-
* @category
|
|
179
|
+
* @category State updates
|
|
180
180
|
*/
|
|
181
181
|
export declare const takeWhile: {
|
|
182
182
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -195,7 +195,7 @@ export declare const takeWhile: {
|
|
|
195
195
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
196
196
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
197
197
|
* @since 1.18.0
|
|
198
|
-
* @category
|
|
198
|
+
* @category State updates
|
|
199
199
|
*/
|
|
200
200
|
export declare const filter: {
|
|
201
201
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -214,7 +214,7 @@ export declare const filter: {
|
|
|
214
214
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
215
215
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
216
216
|
* @since 1.18.0
|
|
217
|
-
* @category
|
|
217
|
+
* @category State updates
|
|
218
218
|
*/
|
|
219
219
|
export declare const map: {
|
|
220
220
|
<A>(f: (a: A, index: number) => A): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -234,7 +234,7 @@ export declare const map: {
|
|
|
234
234
|
* committed value. It acquires no resource; failures and services remain those of the source ref.
|
|
235
235
|
*
|
|
236
236
|
* @since 1.18.0
|
|
237
|
-
* @category
|
|
237
|
+
* @category State updates
|
|
238
238
|
*/
|
|
239
239
|
export declare const dedupeAdjacent: <A, E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
240
240
|
/**
|
|
@@ -251,7 +251,7 @@ export declare const dedupeAdjacent: <A, E, R>(ref: RefIterable<A, E, R>) => Eff
|
|
|
251
251
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
252
252
|
*
|
|
253
253
|
* @since 1.18.0
|
|
254
|
-
* @category
|
|
254
|
+
* @category State updates
|
|
255
255
|
*/
|
|
256
256
|
export declare const intersperse: {
|
|
257
257
|
<A>(middle: A): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -271,7 +271,7 @@ export declare const intersperse: {
|
|
|
271
271
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
272
272
|
*
|
|
273
273
|
* @since 1.18.0
|
|
274
|
-
* @category
|
|
274
|
+
* @category State updates
|
|
275
275
|
*/
|
|
276
276
|
export declare const repeat: {
|
|
277
277
|
(n: number): <A, E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -291,7 +291,7 @@ export declare const repeat: {
|
|
|
291
291
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
292
292
|
*
|
|
293
293
|
* @since 1.18.0
|
|
294
|
-
* @category
|
|
294
|
+
* @category State updates
|
|
295
295
|
*/
|
|
296
296
|
export declare const flatMap: {
|
|
297
297
|
<A>(f: (a: A, index: number) => Iterable<A>): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -310,7 +310,7 @@ export declare const flatMap: {
|
|
|
310
310
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
311
311
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
312
312
|
* @since 1.18.0
|
|
313
|
-
* @category
|
|
313
|
+
* @category State updates
|
|
314
314
|
*/
|
|
315
315
|
export declare const filterMap: {
|
|
316
316
|
<A>(f: (a: A, index: number) => Option.Option<A>): <E, R>(ref: RefIterable<A, E, R>) => Effect.Effect<Iterable<A>, E, R>;
|
|
@@ -329,7 +329,7 @@ export declare const filterMap: {
|
|
|
329
329
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
330
330
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
331
331
|
* @since 1.18.0
|
|
332
|
-
* @category
|
|
332
|
+
* @category State updates
|
|
333
333
|
*/
|
|
334
334
|
export declare const getSomes: <A, E, R>(ref: RefIterable<Option.Option<A>, E, R>) => Effect.Effect<Iterable<Option.Option<A>>, E, R>;
|
|
335
335
|
/**
|
|
@@ -346,7 +346,7 @@ export declare const getSomes: <A, E, R>(ref: RefIterable<Option.Option<A>, E, R
|
|
|
346
346
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
347
347
|
*
|
|
348
348
|
* @since 1.18.0
|
|
349
|
-
* @category
|
|
349
|
+
* @category State predicates
|
|
350
350
|
*/
|
|
351
351
|
export declare const isEmpty: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
352
352
|
/**
|
|
@@ -363,7 +363,7 @@ export declare const isEmpty: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject
|
|
|
363
363
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
364
364
|
*
|
|
365
365
|
* @since 1.18.0
|
|
366
|
-
* @category
|
|
366
|
+
* @category Derived queries
|
|
367
367
|
*/
|
|
368
368
|
export declare const size: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<number, E, R>;
|
|
369
369
|
/**
|
|
@@ -380,7 +380,7 @@ export declare const size: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Co
|
|
|
380
380
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
381
381
|
*
|
|
382
382
|
* @since 1.18.0
|
|
383
|
-
* @category
|
|
383
|
+
* @category Derived queries
|
|
384
384
|
*/
|
|
385
385
|
export declare const mapValues: {
|
|
386
386
|
<A, B>(f: (a: A, index: number) => B): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<Iterable<B>, E, R>;
|
|
@@ -400,7 +400,7 @@ export declare const mapValues: {
|
|
|
400
400
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
401
401
|
*
|
|
402
402
|
* @since 1.18.0
|
|
403
|
-
* @category
|
|
403
|
+
* @category Derived queries
|
|
404
404
|
*/
|
|
405
405
|
export declare const filterValues: {
|
|
406
406
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<Iterable<A>, E, R>;
|
|
@@ -420,7 +420,7 @@ export declare const filterValues: {
|
|
|
420
420
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
421
421
|
*
|
|
422
422
|
* @since 1.18.0
|
|
423
|
-
* @category
|
|
423
|
+
* @category Derived queries
|
|
424
424
|
*/
|
|
425
425
|
export declare const groupBy: {
|
|
426
426
|
<A>(f: (a: A) => string): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<Record<string, Array<A>>, E, R>;
|
|
@@ -440,7 +440,7 @@ export declare const groupBy: {
|
|
|
440
440
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
441
441
|
*
|
|
442
442
|
* @since 1.18.0
|
|
443
|
-
* @category
|
|
443
|
+
* @category Derived queries
|
|
444
444
|
*/
|
|
445
445
|
export declare const reduce: {
|
|
446
446
|
<A, B>(b: B, f: (b: B, a: A, index: number) => B): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<B, E, R>;
|
|
@@ -460,7 +460,7 @@ export declare const reduce: {
|
|
|
460
460
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
461
461
|
*
|
|
462
462
|
* @since 1.18.0
|
|
463
|
-
* @category
|
|
463
|
+
* @category State predicates
|
|
464
464
|
*/
|
|
465
465
|
export declare const some: {
|
|
466
466
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
@@ -480,7 +480,7 @@ export declare const some: {
|
|
|
480
480
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
481
481
|
*
|
|
482
482
|
* @since 1.18.0
|
|
483
|
-
* @category
|
|
483
|
+
* @category State predicates
|
|
484
484
|
*/
|
|
485
485
|
export declare const contains: {
|
|
486
486
|
<A>(value: A): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
@@ -500,7 +500,7 @@ export declare const contains: {
|
|
|
500
500
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
501
501
|
*
|
|
502
502
|
* @since 1.18.0
|
|
503
|
-
* @category
|
|
503
|
+
* @category Derived queries
|
|
504
504
|
*/
|
|
505
505
|
export declare const countBy: {
|
|
506
506
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<number, E, R>;
|
|
@@ -520,7 +520,7 @@ export declare const countBy: {
|
|
|
520
520
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
521
521
|
*
|
|
522
522
|
* @since 1.18.0
|
|
523
|
-
* @category
|
|
523
|
+
* @category Derived queries
|
|
524
524
|
*/
|
|
525
525
|
export declare const toArray: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Computed<Array<A>, E, R>;
|
|
526
526
|
/**
|
|
@@ -537,7 +537,7 @@ export declare const toArray: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject
|
|
|
537
537
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
538
538
|
*
|
|
539
539
|
* @since 1.18.0
|
|
540
|
-
* @category
|
|
540
|
+
* @category Optional queries
|
|
541
541
|
*/
|
|
542
542
|
export declare const head: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Filtered<A, E, R>;
|
|
543
543
|
/**
|
|
@@ -554,7 +554,7 @@ export declare const head: <A, E, R>(ref: RefIterable<A, E, R>) => RefSubject.Fi
|
|
|
554
554
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
555
555
|
*
|
|
556
556
|
* @since 1.18.0
|
|
557
|
-
* @category
|
|
557
|
+
* @category Optional queries
|
|
558
558
|
*/
|
|
559
559
|
export declare const findFirst: {
|
|
560
560
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Filtered<A, E, R>;
|
|
@@ -574,7 +574,7 @@ export declare const findFirst: {
|
|
|
574
574
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
575
575
|
*
|
|
576
576
|
* @since 1.18.0
|
|
577
|
-
* @category
|
|
577
|
+
* @category Optional queries
|
|
578
578
|
*/
|
|
579
579
|
export declare const findLast: {
|
|
580
580
|
<A>(predicate: (a: A) => boolean): <E, R>(ref: RefIterable<A, E, R>) => RefSubject.Filtered<A, E, R>;
|
|
@@ -22,7 +22,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
22
22
|
* and cleanup; source failures and services stay on reads and pushes.
|
|
23
23
|
*
|
|
24
24
|
* @since 1.18.0
|
|
25
|
-
* @category
|
|
25
|
+
* @category Constructors
|
|
26
26
|
*/
|
|
27
27
|
export function make(initial) {
|
|
28
28
|
return RefSubject.make(initial, { eq: equals });
|
|
@@ -44,7 +44,7 @@ export function make(initial) {
|
|
|
44
44
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
45
45
|
*
|
|
46
46
|
* @since 1.18.0
|
|
47
|
-
* @category
|
|
47
|
+
* @category State updates
|
|
48
48
|
*/
|
|
49
49
|
export const prepend = dual(2, function prepend(ref, value) {
|
|
50
50
|
return RefSubject.update(ref, Iterable.prepend(value));
|
|
@@ -63,7 +63,7 @@ export const prepend = dual(2, function prepend(ref, value) {
|
|
|
63
63
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
64
64
|
*
|
|
65
65
|
* @since 1.18.0
|
|
66
|
-
* @category
|
|
66
|
+
* @category State updates
|
|
67
67
|
*/
|
|
68
68
|
export const prependAll = dual(2, function prependAll(ref, value) {
|
|
69
69
|
return RefSubject.update(ref, Iterable.prependAll(value));
|
|
@@ -82,7 +82,7 @@ export const prependAll = dual(2, function prependAll(ref, value) {
|
|
|
82
82
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
83
83
|
*
|
|
84
84
|
* @since 1.18.0
|
|
85
|
-
* @category
|
|
85
|
+
* @category State updates
|
|
86
86
|
*/
|
|
87
87
|
export const append = dual(2, function append(ref, value) {
|
|
88
88
|
return RefSubject.update(ref, Iterable.append(value));
|
|
@@ -101,7 +101,7 @@ export const append = dual(2, function append(ref, value) {
|
|
|
101
101
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
102
102
|
*
|
|
103
103
|
* @since 1.18.0
|
|
104
|
-
* @category
|
|
104
|
+
* @category State updates
|
|
105
105
|
*/
|
|
106
106
|
export const appendAll = dual(2, function appendAll(ref, value) {
|
|
107
107
|
return RefSubject.update(ref, Iterable.appendAll(value));
|
|
@@ -120,7 +120,7 @@ export const appendAll = dual(2, function appendAll(ref, value) {
|
|
|
120
120
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
121
121
|
*
|
|
122
122
|
* @since 1.18.0
|
|
123
|
-
* @category
|
|
123
|
+
* @category State updates
|
|
124
124
|
*/
|
|
125
125
|
export const drop = dual(2, function drop(ref, n) {
|
|
126
126
|
return RefSubject.update(ref, Iterable.drop(n));
|
|
@@ -139,7 +139,7 @@ export const drop = dual(2, function drop(ref, n) {
|
|
|
139
139
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
140
140
|
*
|
|
141
141
|
* @since 1.18.0
|
|
142
|
-
* @category
|
|
142
|
+
* @category State updates
|
|
143
143
|
*/
|
|
144
144
|
export const take = dual(2, function take(ref, n) {
|
|
145
145
|
return RefSubject.update(ref, Iterable.take(n));
|
|
@@ -158,7 +158,7 @@ export const take = dual(2, function take(ref, n) {
|
|
|
158
158
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
159
159
|
*
|
|
160
160
|
* @since 1.18.0
|
|
161
|
-
* @category
|
|
161
|
+
* @category State updates
|
|
162
162
|
*/
|
|
163
163
|
export const takeWhile = dual(2, function takeWhile(ref, predicate) {
|
|
164
164
|
return RefSubject.update(ref, Iterable.takeWhile(predicate));
|
|
@@ -176,7 +176,7 @@ export const takeWhile = dual(2, function takeWhile(ref, predicate) {
|
|
|
176
176
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
177
177
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
178
178
|
* @since 1.18.0
|
|
179
|
-
* @category
|
|
179
|
+
* @category State updates
|
|
180
180
|
*/
|
|
181
181
|
export const filter = dual(2, function filter(ref, predicate) {
|
|
182
182
|
return RefSubject.update(ref, Iterable.filter(predicate));
|
|
@@ -194,7 +194,7 @@ export const filter = dual(2, function filter(ref, predicate) {
|
|
|
194
194
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
195
195
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
196
196
|
* @since 1.18.0
|
|
197
|
-
* @category
|
|
197
|
+
* @category State updates
|
|
198
198
|
*/
|
|
199
199
|
export const map = dual(2, function map(ref, f) {
|
|
200
200
|
return RefSubject.update(ref, Iterable.map(f));
|
|
@@ -213,7 +213,7 @@ export const map = dual(2, function map(ref, f) {
|
|
|
213
213
|
* committed value. It acquires no resource; failures and services remain those of the source ref.
|
|
214
214
|
*
|
|
215
215
|
* @since 1.18.0
|
|
216
|
-
* @category
|
|
216
|
+
* @category State updates
|
|
217
217
|
*/
|
|
218
218
|
export const dedupeAdjacent = (ref) => RefSubject.update(ref, Iterable.dedupeAdjacent);
|
|
219
219
|
/**
|
|
@@ -230,7 +230,7 @@ export const dedupeAdjacent = (ref) => RefSubject.update(ref, Iterable.dedupeAdj
|
|
|
230
230
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
231
231
|
*
|
|
232
232
|
* @since 1.18.0
|
|
233
|
-
* @category
|
|
233
|
+
* @category State updates
|
|
234
234
|
*/
|
|
235
235
|
export const intersperse = dual(2, function intersperse(ref, middle) {
|
|
236
236
|
return RefSubject.update(ref, Iterable.intersperse(middle));
|
|
@@ -249,7 +249,7 @@ export const intersperse = dual(2, function intersperse(ref, middle) {
|
|
|
249
249
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
250
250
|
*
|
|
251
251
|
* @since 1.18.0
|
|
252
|
-
* @category
|
|
252
|
+
* @category State updates
|
|
253
253
|
*/
|
|
254
254
|
export const repeat = dual(2, function repeat(ref, n) {
|
|
255
255
|
return RefSubject.update(ref, Iterable.repeat(n));
|
|
@@ -268,7 +268,7 @@ export const repeat = dual(2, function repeat(ref, n) {
|
|
|
268
268
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
269
269
|
*
|
|
270
270
|
* @since 1.18.0
|
|
271
|
-
* @category
|
|
271
|
+
* @category State updates
|
|
272
272
|
*/
|
|
273
273
|
export const flatMap = dual(2, function flatMap(ref, f) {
|
|
274
274
|
return RefSubject.update(ref, Iterable.flatMap(f));
|
|
@@ -286,7 +286,7 @@ export const flatMap = dual(2, function flatMap(ref, f) {
|
|
|
286
286
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
287
287
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
288
288
|
* @since 1.18.0
|
|
289
|
-
* @category
|
|
289
|
+
* @category State updates
|
|
290
290
|
*/
|
|
291
291
|
export const filterMap = dual(2, function filterMap(ref, f) {
|
|
292
292
|
return RefSubject.update(ref, Iterable.filterMap((a, index) => Option.match(f(a, index), {
|
|
@@ -307,7 +307,7 @@ export const filterMap = dual(2, function filterMap(ref, f) {
|
|
|
307
307
|
* The Effect starts when run, participates in the source ref's serialized update boundary, and
|
|
308
308
|
* acquires no resource. It returns the committed Iterable and retains the ref's E and R channels.
|
|
309
309
|
* @since 1.18.0
|
|
310
|
-
* @category
|
|
310
|
+
* @category State updates
|
|
311
311
|
*/
|
|
312
312
|
export const getSomes = (ref) => RefSubject.update(ref, (iter) => Iterable.getSomes(iter));
|
|
313
313
|
// ========================================
|
|
@@ -327,7 +327,7 @@ export const getSomes = (ref) => RefSubject.update(ref, (iter) => Iterable.getSo
|
|
|
327
327
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
328
328
|
*
|
|
329
329
|
* @since 1.18.0
|
|
330
|
-
* @category
|
|
330
|
+
* @category State predicates
|
|
331
331
|
*/
|
|
332
332
|
export const isEmpty = (ref) => RefSubject.map(ref, Iterable.isEmpty);
|
|
333
333
|
/**
|
|
@@ -344,7 +344,7 @@ export const isEmpty = (ref) => RefSubject.map(ref, Iterable.isEmpty);
|
|
|
344
344
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
345
345
|
*
|
|
346
346
|
* @since 1.18.0
|
|
347
|
-
* @category
|
|
347
|
+
* @category Derived queries
|
|
348
348
|
*/
|
|
349
349
|
export const size = (ref) => RefSubject.map(ref, Iterable.size);
|
|
350
350
|
/**
|
|
@@ -361,7 +361,7 @@ export const size = (ref) => RefSubject.map(ref, Iterable.size);
|
|
|
361
361
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
362
362
|
*
|
|
363
363
|
* @since 1.18.0
|
|
364
|
-
* @category
|
|
364
|
+
* @category Derived queries
|
|
365
365
|
*/
|
|
366
366
|
export const mapValues = dual(2, function mapValues(ref, f) {
|
|
367
367
|
return RefSubject.map(ref, Iterable.map(f));
|
|
@@ -380,7 +380,7 @@ export const mapValues = dual(2, function mapValues(ref, f) {
|
|
|
380
380
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
381
381
|
*
|
|
382
382
|
* @since 1.18.0
|
|
383
|
-
* @category
|
|
383
|
+
* @category Derived queries
|
|
384
384
|
*/
|
|
385
385
|
export const filterValues = dual(2, function filterValues(ref, predicate) {
|
|
386
386
|
return RefSubject.map(ref, Iterable.filter(predicate));
|
|
@@ -399,7 +399,7 @@ export const filterValues = dual(2, function filterValues(ref, predicate) {
|
|
|
399
399
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
400
400
|
*
|
|
401
401
|
* @since 1.18.0
|
|
402
|
-
* @category
|
|
402
|
+
* @category Derived queries
|
|
403
403
|
*/
|
|
404
404
|
export const groupBy = dual(2, function groupBy(ref, f) {
|
|
405
405
|
return RefSubject.map(ref, Iterable.groupBy(f));
|
|
@@ -418,7 +418,7 @@ export const groupBy = dual(2, function groupBy(ref, f) {
|
|
|
418
418
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
419
419
|
*
|
|
420
420
|
* @since 1.18.0
|
|
421
|
-
* @category
|
|
421
|
+
* @category Derived queries
|
|
422
422
|
*/
|
|
423
423
|
export const reduce = dual(3, function reduce(ref, b, f) {
|
|
424
424
|
return RefSubject.map(ref, Iterable.reduce(b, f));
|
|
@@ -437,7 +437,7 @@ export const reduce = dual(3, function reduce(ref, b, f) {
|
|
|
437
437
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
438
438
|
*
|
|
439
439
|
* @since 1.18.0
|
|
440
|
-
* @category
|
|
440
|
+
* @category State predicates
|
|
441
441
|
*/
|
|
442
442
|
export const some = dual(2, function some(ref, predicate) {
|
|
443
443
|
return RefSubject.map(ref, Iterable.some(predicate));
|
|
@@ -456,7 +456,7 @@ export const some = dual(2, function some(ref, predicate) {
|
|
|
456
456
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
457
457
|
*
|
|
458
458
|
* @since 1.18.0
|
|
459
|
-
* @category
|
|
459
|
+
* @category State predicates
|
|
460
460
|
*/
|
|
461
461
|
export const contains = dual(2, function contains(ref, value) {
|
|
462
462
|
return RefSubject.map(ref, Iterable.contains(value));
|
|
@@ -475,7 +475,7 @@ export const contains = dual(2, function contains(ref, value) {
|
|
|
475
475
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
476
476
|
*
|
|
477
477
|
* @since 1.18.0
|
|
478
|
-
* @category
|
|
478
|
+
* @category Derived queries
|
|
479
479
|
*/
|
|
480
480
|
export const countBy = dual(2, function countBy(ref, predicate) {
|
|
481
481
|
return RefSubject.map(ref, Iterable.countBy(predicate));
|
|
@@ -494,7 +494,7 @@ export const countBy = dual(2, function countBy(ref, predicate) {
|
|
|
494
494
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
495
495
|
*
|
|
496
496
|
* @since 1.18.0
|
|
497
|
-
* @category
|
|
497
|
+
* @category Derived queries
|
|
498
498
|
*/
|
|
499
499
|
export const toArray = (ref) => RefSubject.map(ref, (iter) => Array.from(iter));
|
|
500
500
|
// ========================================
|
|
@@ -514,7 +514,7 @@ export const toArray = (ref) => RefSubject.map(ref, (iter) => Array.from(iter));
|
|
|
514
514
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
515
515
|
*
|
|
516
516
|
* @since 1.18.0
|
|
517
|
-
* @category
|
|
517
|
+
* @category Optional queries
|
|
518
518
|
*/
|
|
519
519
|
export const head = (ref) => RefSubject.filterMap(ref, Iterable.head);
|
|
520
520
|
/**
|
|
@@ -531,7 +531,7 @@ export const head = (ref) => RefSubject.filterMap(ref, Iterable.head);
|
|
|
531
531
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
532
532
|
*
|
|
533
533
|
* @since 1.18.0
|
|
534
|
-
* @category
|
|
534
|
+
* @category Optional queries
|
|
535
535
|
*/
|
|
536
536
|
export const findFirst = dual(2, function findFirst(ref, predicate) {
|
|
537
537
|
return RefSubject.filterMap(ref, Iterable.findFirst(predicate));
|
|
@@ -550,7 +550,7 @@ export const findFirst = dual(2, function findFirst(ref, predicate) {
|
|
|
550
550
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
551
551
|
*
|
|
552
552
|
* @since 1.18.0
|
|
553
|
-
* @category
|
|
553
|
+
* @category Optional queries
|
|
554
554
|
*/
|
|
555
555
|
export const findLast = dual(2, function findLast(ref, predicate) {
|
|
556
556
|
return RefSubject.filterMap(ref, Iterable.findLast(predicate));
|