@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
|
@@ -22,7 +22,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
22
22
|
* interruption, and Scope requirements expressed by its members.
|
|
23
23
|
*
|
|
24
24
|
* @since 1.18.0
|
|
25
|
-
* @category models
|
|
25
|
+
* @category State models
|
|
26
26
|
*/
|
|
27
27
|
export interface RefTrie<in out V, in out E = never, out R = never> extends RefSubject.RefSubject<Trie.Trie<V>, E, R> {
|
|
28
28
|
}
|
|
@@ -40,7 +40,7 @@ export interface RefTrie<in out V, in out E = never, out R = never> extends RefS
|
|
|
40
40
|
* and cleanup; source failures and services stay on reads and pushes.
|
|
41
41
|
*
|
|
42
42
|
* @since 1.18.0
|
|
43
|
-
* @category
|
|
43
|
+
* @category Constructors
|
|
44
44
|
*/
|
|
45
45
|
export declare function make<V, E = never, R = never>(initial: Trie.Trie<V> | Effect.Effect<Trie.Trie<V>, E, R> | Fx.Fx<Trie.Trie<V>, E, R>): Effect.Effect<RefTrie<V, E>, never, R | Scope.Scope>;
|
|
46
46
|
/**
|
|
@@ -57,7 +57,7 @@ export declare function make<V, E = never, R = never>(initial: Trie.Trie<V> | Ef
|
|
|
57
57
|
* acquires no resource; failures and services remain those of the source ref.
|
|
58
58
|
*
|
|
59
59
|
* @since 1.18.0
|
|
60
|
-
* @category
|
|
60
|
+
* @category State updates
|
|
61
61
|
*/
|
|
62
62
|
export declare const insert: {
|
|
63
63
|
<V>(key: string, value: V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
@@ -77,7 +77,7 @@ export declare const insert: {
|
|
|
77
77
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
78
78
|
*
|
|
79
79
|
* @since 1.18.0
|
|
80
|
-
* @category
|
|
80
|
+
* @category State updates
|
|
81
81
|
*/
|
|
82
82
|
export declare const insertMany: {
|
|
83
83
|
<V>(entries: Iterable<[string, V]>): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
@@ -97,7 +97,7 @@ export declare const insertMany: {
|
|
|
97
97
|
* 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 declare const remove: {
|
|
103
103
|
(key: string): <V, E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
@@ -117,7 +117,7 @@ export declare const remove: {
|
|
|
117
117
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
118
118
|
*
|
|
119
119
|
* @since 1.18.0
|
|
120
|
-
* @category
|
|
120
|
+
* @category State updates
|
|
121
121
|
*/
|
|
122
122
|
export declare const removeMany: {
|
|
123
123
|
(keys: Iterable<string>): <V, E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
@@ -137,7 +137,7 @@ export declare const removeMany: {
|
|
|
137
137
|
* acquires no resource; failures and services remain those of the source ref.
|
|
138
138
|
*
|
|
139
139
|
* @since 1.18.0
|
|
140
|
-
* @category
|
|
140
|
+
* @category State updates
|
|
141
141
|
*/
|
|
142
142
|
export declare const modify: {
|
|
143
143
|
<V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
@@ -157,7 +157,7 @@ export declare const modify: {
|
|
|
157
157
|
* acquires no resource; failures and services remain those of the source ref.
|
|
158
158
|
*
|
|
159
159
|
* @since 1.18.0
|
|
160
|
-
* @category
|
|
160
|
+
* @category State updates
|
|
161
161
|
*/
|
|
162
162
|
export declare const clear: <V, E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;
|
|
163
163
|
/**
|
|
@@ -174,7 +174,7 @@ export declare const clear: <V, E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Tr
|
|
|
174
174
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
175
175
|
*
|
|
176
176
|
* @since 1.18.0
|
|
177
|
-
* @category
|
|
177
|
+
* @category State updates
|
|
178
178
|
*/
|
|
179
179
|
export declare const map: {
|
|
180
180
|
<V>(f: (value: V, key: string) => V): <E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Trie.Trie<V>, E, R>;
|
|
@@ -194,7 +194,7 @@ export declare const map: {
|
|
|
194
194
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
195
195
|
*
|
|
196
196
|
* @since 1.18.0
|
|
197
|
-
* @category
|
|
197
|
+
* @category State updates
|
|
198
198
|
*/
|
|
199
199
|
export declare const filter: {
|
|
200
200
|
<V>(predicate: (value: V, key: string) => boolean): <E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Trie.Trie<V>, E, R>;
|
|
@@ -214,7 +214,7 @@ export declare const filter: {
|
|
|
214
214
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
215
215
|
*
|
|
216
216
|
* @since 1.18.0
|
|
217
|
-
* @category
|
|
217
|
+
* @category State updates
|
|
218
218
|
*/
|
|
219
219
|
export declare const filterMap: {
|
|
220
220
|
<V>(f: (value: V, key: string) => Option.Option<V>): <E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Trie.Trie<V>, E, R>;
|
|
@@ -234,7 +234,7 @@ export declare const filterMap: {
|
|
|
234
234
|
* source errors, services, and lifetime.
|
|
235
235
|
*
|
|
236
236
|
* @since 1.18.0
|
|
237
|
-
* @category
|
|
237
|
+
* @category Derived queries
|
|
238
238
|
*/
|
|
239
239
|
export declare const compact: <V, E, R>(ref: RefTrie<Option.Option<V>, E, R>) => RefSubject.Computed<Trie.Trie<V>, E, R>;
|
|
240
240
|
/**
|
|
@@ -251,7 +251,7 @@ export declare const compact: <V, E, R>(ref: RefTrie<Option.Option<V>, E, R>) =>
|
|
|
251
251
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
252
252
|
*
|
|
253
253
|
* @since 1.18.0
|
|
254
|
-
* @category
|
|
254
|
+
* @category Derived queries
|
|
255
255
|
*/
|
|
256
256
|
export declare const size: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<number, E, R>;
|
|
257
257
|
/**
|
|
@@ -268,7 +268,7 @@ export declare const size: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Comput
|
|
|
268
268
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
269
269
|
*
|
|
270
270
|
* @since 1.18.0
|
|
271
|
-
* @category
|
|
271
|
+
* @category State predicates
|
|
272
272
|
*/
|
|
273
273
|
export declare const isEmpty: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
274
274
|
/**
|
|
@@ -285,7 +285,7 @@ export declare const isEmpty: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Com
|
|
|
285
285
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
286
286
|
*
|
|
287
287
|
* @since 1.18.0
|
|
288
|
-
* @category
|
|
288
|
+
* @category State predicates
|
|
289
289
|
*/
|
|
290
290
|
export declare const isNonEmpty: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
291
291
|
/**
|
|
@@ -302,7 +302,7 @@ export declare const isNonEmpty: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.
|
|
|
302
302
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
303
303
|
*
|
|
304
304
|
* @since 1.18.0
|
|
305
|
-
* @category
|
|
305
|
+
* @category State predicates
|
|
306
306
|
*/
|
|
307
307
|
export declare const has: {
|
|
308
308
|
(key: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<boolean, E, R>;
|
|
@@ -322,7 +322,7 @@ export declare const has: {
|
|
|
322
322
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
323
323
|
*
|
|
324
324
|
* @since 1.18.0
|
|
325
|
-
* @category
|
|
325
|
+
* @category Derived queries
|
|
326
326
|
*/
|
|
327
327
|
export declare const keys: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<string>, E, R>;
|
|
328
328
|
/**
|
|
@@ -339,7 +339,7 @@ export declare const keys: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Comput
|
|
|
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 declare const values: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<V>, E, R>;
|
|
345
345
|
/**
|
|
@@ -356,7 +356,7 @@ export declare const values: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Comp
|
|
|
356
356
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
357
357
|
*
|
|
358
358
|
* @since 1.18.0
|
|
359
|
-
* @category
|
|
359
|
+
* @category Derived queries
|
|
360
360
|
*/
|
|
361
361
|
export declare const entries: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<[string, V]>, E, R>;
|
|
362
362
|
/**
|
|
@@ -373,7 +373,7 @@ export declare const entries: <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Com
|
|
|
373
373
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
374
374
|
*
|
|
375
375
|
* @since 1.18.0
|
|
376
|
-
* @category
|
|
376
|
+
* @category Derived queries
|
|
377
377
|
*/
|
|
378
378
|
export declare const keysWithPrefix: {
|
|
379
379
|
(prefix: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<string>, E, R>;
|
|
@@ -393,7 +393,7 @@ export declare const keysWithPrefix: {
|
|
|
393
393
|
* once; Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
394
394
|
*
|
|
395
395
|
* @since 1.18.0
|
|
396
|
-
* @category
|
|
396
|
+
* @category Derived queries
|
|
397
397
|
*/
|
|
398
398
|
export declare const valuesWithPrefix: {
|
|
399
399
|
(prefix: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<V>, E, R>;
|
|
@@ -413,7 +413,7 @@ export declare const valuesWithPrefix: {
|
|
|
413
413
|
* once; Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
414
414
|
*
|
|
415
415
|
* @since 1.18.0
|
|
416
|
-
* @category
|
|
416
|
+
* @category Derived queries
|
|
417
417
|
*/
|
|
418
418
|
export declare const entriesWithPrefix: {
|
|
419
419
|
(prefix: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Array<[string, V]>, E, R>;
|
|
@@ -433,7 +433,7 @@ export declare const entriesWithPrefix: {
|
|
|
433
433
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
434
434
|
*
|
|
435
435
|
* @since 1.18.0
|
|
436
|
-
* @category
|
|
436
|
+
* @category Derived queries
|
|
437
437
|
*/
|
|
438
438
|
export declare const longestPrefixOf: {
|
|
439
439
|
(key: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<[string, V] | undefined, E, R>;
|
|
@@ -453,7 +453,7 @@ export declare const longestPrefixOf: {
|
|
|
453
453
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
454
454
|
*
|
|
455
455
|
* @since 1.18.0
|
|
456
|
-
* @category
|
|
456
|
+
* @category Derived queries
|
|
457
457
|
*/
|
|
458
458
|
export declare const mapValues: {
|
|
459
459
|
<V, B>(f: (value: V, key: string) => B): <E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<Trie.Trie<B>, E, R>;
|
|
@@ -473,7 +473,7 @@ export declare const mapValues: {
|
|
|
473
473
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
474
474
|
*
|
|
475
475
|
* @since 1.18.0
|
|
476
|
-
* @category
|
|
476
|
+
* @category Derived queries
|
|
477
477
|
*/
|
|
478
478
|
export declare const reduce: {
|
|
479
479
|
<V, B>(b: B, f: (b: B, value: V, key: string) => B): <E, R>(ref: RefTrie<V, E, R>) => RefSubject.Computed<B, E, R>;
|
|
@@ -493,7 +493,7 @@ export declare const reduce: {
|
|
|
493
493
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
494
494
|
*
|
|
495
495
|
* @since 1.18.0
|
|
496
|
-
* @category
|
|
496
|
+
* @category Optional queries
|
|
497
497
|
*/
|
|
498
498
|
export declare const get: {
|
|
499
499
|
(key: string): <V, E, R>(ref: RefTrie<V, E, R>) => RefSubject.Filtered<V, E, R>;
|
|
@@ -22,7 +22,7 @@ import { Result } from "effect";
|
|
|
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
|
* 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 insert = dual(3, function insert(ref, key, value) {
|
|
50
50
|
return RefSubject.update(ref, Trie.insert(key, value));
|
|
@@ -63,7 +63,7 @@ export const insert = dual(3, function insert(ref, key, 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 insertMany = dual(2, function insertMany(ref, entries) {
|
|
69
69
|
return RefSubject.update(ref, Trie.insertMany(entries));
|
|
@@ -82,7 +82,7 @@ export const insertMany = dual(2, function insertMany(ref, entries) {
|
|
|
82
82
|
* 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 remove = dual(2, function remove(ref, key) {
|
|
88
88
|
return RefSubject.update(ref, Trie.remove(key));
|
|
@@ -101,7 +101,7 @@ export const remove = dual(2, function remove(ref, key) {
|
|
|
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 removeMany = dual(2, function removeMany(ref, keys) {
|
|
107
107
|
return RefSubject.update(ref, Trie.removeMany(keys));
|
|
@@ -120,7 +120,7 @@ export const removeMany = dual(2, function removeMany(ref, keys) {
|
|
|
120
120
|
* 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 modify = dual(3, function modify(ref, key, f) {
|
|
126
126
|
return RefSubject.update(ref, Trie.modify(key, f));
|
|
@@ -139,7 +139,7 @@ export const modify = dual(3, function modify(ref, key, f) {
|
|
|
139
139
|
* 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 clear = (ref) => RefSubject.update(ref, () => Trie.empty());
|
|
145
145
|
/**
|
|
@@ -156,7 +156,7 @@ export const clear = (ref) => RefSubject.update(ref, () => Trie.empty());
|
|
|
156
156
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
157
157
|
*
|
|
158
158
|
* @since 1.18.0
|
|
159
|
-
* @category
|
|
159
|
+
* @category State updates
|
|
160
160
|
*/
|
|
161
161
|
export const map = dual(2, function map(ref, f) {
|
|
162
162
|
return RefSubject.map(ref, Trie.map(f));
|
|
@@ -175,7 +175,7 @@ export const map = dual(2, function map(ref, f) {
|
|
|
175
175
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
176
176
|
*
|
|
177
177
|
* @since 1.18.0
|
|
178
|
-
* @category
|
|
178
|
+
* @category State updates
|
|
179
179
|
*/
|
|
180
180
|
export const filter = dual(2, function filter(ref, predicate) {
|
|
181
181
|
return RefSubject.map(ref, Trie.filter(predicate));
|
|
@@ -194,7 +194,7 @@ export const filter = dual(2, function filter(ref, predicate) {
|
|
|
194
194
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
195
195
|
*
|
|
196
196
|
* @since 1.18.0
|
|
197
|
-
* @category
|
|
197
|
+
* @category State updates
|
|
198
198
|
*/
|
|
199
199
|
export const filterMap = dual(2, function filterMap(ref, f) {
|
|
200
200
|
return RefSubject.map(ref, Trie.filterMap((value, key) => Option.match(f(value, key), {
|
|
@@ -219,7 +219,7 @@ export const filterMap = dual(2, function filterMap(ref, f) {
|
|
|
219
219
|
* source errors, services, and lifetime.
|
|
220
220
|
*
|
|
221
221
|
* @since 1.18.0
|
|
222
|
-
* @category
|
|
222
|
+
* @category Derived queries
|
|
223
223
|
*/
|
|
224
224
|
export const compact = (ref) => RefSubject.map(ref, Trie.compact);
|
|
225
225
|
/**
|
|
@@ -236,7 +236,7 @@ export const compact = (ref) => RefSubject.map(ref, Trie.compact);
|
|
|
236
236
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
237
237
|
*
|
|
238
238
|
* @since 1.18.0
|
|
239
|
-
* @category
|
|
239
|
+
* @category Derived queries
|
|
240
240
|
*/
|
|
241
241
|
export const size = (ref) => RefSubject.map(ref, Trie.size);
|
|
242
242
|
/**
|
|
@@ -253,7 +253,7 @@ export const size = (ref) => RefSubject.map(ref, Trie.size);
|
|
|
253
253
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
254
254
|
*
|
|
255
255
|
* @since 1.18.0
|
|
256
|
-
* @category
|
|
256
|
+
* @category State predicates
|
|
257
257
|
*/
|
|
258
258
|
export const isEmpty = (ref) => RefSubject.map(ref, Trie.isEmpty);
|
|
259
259
|
/**
|
|
@@ -270,7 +270,7 @@ export const isEmpty = (ref) => RefSubject.map(ref, Trie.isEmpty);
|
|
|
270
270
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
271
271
|
*
|
|
272
272
|
* @since 1.18.0
|
|
273
|
-
* @category
|
|
273
|
+
* @category State predicates
|
|
274
274
|
*/
|
|
275
275
|
export const isNonEmpty = (ref) => RefSubject.map(ref, (t) => !Trie.isEmpty(t));
|
|
276
276
|
/**
|
|
@@ -287,7 +287,7 @@ export const isNonEmpty = (ref) => RefSubject.map(ref, (t) => !Trie.isEmpty(t));
|
|
|
287
287
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
288
288
|
*
|
|
289
289
|
* @since 1.18.0
|
|
290
|
-
* @category
|
|
290
|
+
* @category State predicates
|
|
291
291
|
*/
|
|
292
292
|
export const has = dual(2, function has(ref, key) {
|
|
293
293
|
return RefSubject.map(ref, Trie.has(key));
|
|
@@ -306,7 +306,7 @@ export const has = dual(2, function has(ref, key) {
|
|
|
306
306
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
307
307
|
*
|
|
308
308
|
* @since 1.18.0
|
|
309
|
-
* @category
|
|
309
|
+
* @category Derived queries
|
|
310
310
|
*/
|
|
311
311
|
export const keys = (ref) => RefSubject.map(ref, (t) => Array.from(Trie.keys(t)));
|
|
312
312
|
/**
|
|
@@ -323,7 +323,7 @@ export const keys = (ref) => RefSubject.map(ref, (t) => Array.from(Trie.keys(t))
|
|
|
323
323
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
324
324
|
*
|
|
325
325
|
* @since 1.18.0
|
|
326
|
-
* @category
|
|
326
|
+
* @category Derived queries
|
|
327
327
|
*/
|
|
328
328
|
export const values = (ref) => RefSubject.map(ref, (t) => Array.from(Trie.values(t)));
|
|
329
329
|
/**
|
|
@@ -340,7 +340,7 @@ export const values = (ref) => RefSubject.map(ref, (t) => Array.from(Trie.values
|
|
|
340
340
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
341
341
|
*
|
|
342
342
|
* @since 1.18.0
|
|
343
|
-
* @category
|
|
343
|
+
* @category Derived queries
|
|
344
344
|
*/
|
|
345
345
|
export const entries = (ref) => RefSubject.map(ref, Trie.toEntries);
|
|
346
346
|
/**
|
|
@@ -357,7 +357,7 @@ export const entries = (ref) => RefSubject.map(ref, Trie.toEntries);
|
|
|
357
357
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
358
358
|
*
|
|
359
359
|
* @since 1.18.0
|
|
360
|
-
* @category
|
|
360
|
+
* @category Derived queries
|
|
361
361
|
*/
|
|
362
362
|
export const keysWithPrefix = dual(2, function keysWithPrefix(ref, prefix) {
|
|
363
363
|
return RefSubject.map(ref, (t) => Array.from(Trie.keysWithPrefix(t, prefix)));
|
|
@@ -376,7 +376,7 @@ export const keysWithPrefix = dual(2, function keysWithPrefix(ref, prefix) {
|
|
|
376
376
|
* once; Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
377
377
|
*
|
|
378
378
|
* @since 1.18.0
|
|
379
|
-
* @category
|
|
379
|
+
* @category Derived queries
|
|
380
380
|
*/
|
|
381
381
|
export const valuesWithPrefix = dual(2, function valuesWithPrefix(ref, prefix) {
|
|
382
382
|
return RefSubject.map(ref, (t) => Array.from(Trie.valuesWithPrefix(t, prefix)));
|
|
@@ -395,7 +395,7 @@ export const valuesWithPrefix = dual(2, function valuesWithPrefix(ref, prefix) {
|
|
|
395
395
|
* once; Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
396
396
|
*
|
|
397
397
|
* @since 1.18.0
|
|
398
|
-
* @category
|
|
398
|
+
* @category Derived queries
|
|
399
399
|
*/
|
|
400
400
|
export const entriesWithPrefix = dual(2, function entriesWithPrefix(ref, prefix) {
|
|
401
401
|
return RefSubject.map(ref, Trie.toEntriesWithPrefix(prefix));
|
|
@@ -414,7 +414,7 @@ export const entriesWithPrefix = dual(2, function entriesWithPrefix(ref, prefix)
|
|
|
414
414
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
415
415
|
*
|
|
416
416
|
* @since 1.18.0
|
|
417
|
-
* @category
|
|
417
|
+
* @category Derived queries
|
|
418
418
|
*/
|
|
419
419
|
export const longestPrefixOf = dual(2, function longestPrefixOf(ref, key) {
|
|
420
420
|
return RefSubject.map(ref, Trie.longestPrefixOf(key));
|
|
@@ -433,7 +433,7 @@ export const longestPrefixOf = dual(2, function longestPrefixOf(ref, key) {
|
|
|
433
433
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
434
434
|
*
|
|
435
435
|
* @since 1.18.0
|
|
436
|
-
* @category
|
|
436
|
+
* @category Derived queries
|
|
437
437
|
*/
|
|
438
438
|
export const mapValues = dual(2, function mapValues(ref, f) {
|
|
439
439
|
return RefSubject.map(ref, Trie.map(f));
|
|
@@ -452,7 +452,7 @@ export const mapValues = dual(2, function mapValues(ref, f) {
|
|
|
452
452
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
453
453
|
*
|
|
454
454
|
* @since 1.18.0
|
|
455
|
-
* @category
|
|
455
|
+
* @category Derived queries
|
|
456
456
|
*/
|
|
457
457
|
export const reduce = dual(3, function reduce(ref, b, f) {
|
|
458
458
|
return RefSubject.map(ref, Trie.reduce(b, f));
|
|
@@ -474,7 +474,7 @@ export const reduce = dual(3, function reduce(ref, b, f) {
|
|
|
474
474
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
475
475
|
*
|
|
476
476
|
* @since 1.18.0
|
|
477
|
-
* @category
|
|
477
|
+
* @category Optional queries
|
|
478
478
|
*/
|
|
479
479
|
export const get = dual(2, function get(ref, key) {
|
|
480
480
|
return RefSubject.filterMap(ref, Trie.get(key));
|
|
@@ -21,7 +21,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
21
21
|
* 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 RefTuple<in out T extends ReadonlyArray<unknown>, in out E = never, out R = never> extends RefSubject.RefSubject<T, E, R> {
|
|
27
27
|
}
|
|
@@ -52,7 +52,7 @@ export interface RefTuple<in out T extends ReadonlyArray<unknown>, in out E = ne
|
|
|
52
52
|
* ```
|
|
53
53
|
*
|
|
54
54
|
* @since 1.18.0
|
|
55
|
-
* @category
|
|
55
|
+
* @category Constructors
|
|
56
56
|
*/
|
|
57
57
|
export declare function make<T extends ReadonlyArray<unknown>, E = never, R = never>(initial: T | Effect.Effect<T, E, R> | Fx.Fx<T, E, R>, eq?: Equivalence<T>): Effect.Effect<RefTuple<T, E>, never, R | Scope.Scope>;
|
|
58
58
|
/**
|
|
@@ -69,7 +69,7 @@ export declare function make<T extends ReadonlyArray<unknown>, E = never, R = ne
|
|
|
69
69
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
70
70
|
*
|
|
71
71
|
* @since 1.18.0
|
|
72
|
-
* @category
|
|
72
|
+
* @category State updates
|
|
73
73
|
*/
|
|
74
74
|
export declare const setAt: {
|
|
75
75
|
<T extends ReadonlyArray<unknown>, I extends number>(index: I, value: T[I]): <E, R>(ref: RefTuple<T, E, R>) => Effect.Effect<T, E, R>;
|
|
@@ -89,7 +89,7 @@ export declare const setAt: {
|
|
|
89
89
|
* value. It acquires no resource; failures and services remain those of the source ref.
|
|
90
90
|
*
|
|
91
91
|
* @since 1.18.0
|
|
92
|
-
* @category
|
|
92
|
+
* @category State updates
|
|
93
93
|
*/
|
|
94
94
|
export declare const updateAt: {
|
|
95
95
|
<T extends ReadonlyArray<unknown>, I extends number>(index: I, f: (value: T[I]) => T[I]): <E, R>(ref: RefTuple<T, E, R>) => Effect.Effect<T, E, R>;
|
|
@@ -109,7 +109,7 @@ export declare const updateAt: {
|
|
|
109
109
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
110
110
|
*
|
|
111
111
|
* @since 1.18.0
|
|
112
|
-
* @category
|
|
112
|
+
* @category Derived queries
|
|
113
113
|
*/
|
|
114
114
|
export declare const appendElement: {
|
|
115
115
|
<E>(element: E): <T extends ReadonlyArray<unknown>, Err, R>(ref: RefTuple<T, Err, R>) => RefSubject.Computed<[...T, E], Err, R>;
|
|
@@ -129,7 +129,7 @@ export declare const appendElement: {
|
|
|
129
129
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
130
130
|
*
|
|
131
131
|
* @since 1.18.0
|
|
132
|
-
* @category
|
|
132
|
+
* @category Derived queries
|
|
133
133
|
*/
|
|
134
134
|
export declare const prependElement: {
|
|
135
135
|
<E>(element: E): <T extends ReadonlyArray<unknown>, Err, R>(ref: RefTuple<T, Err, R>) => RefSubject.Computed<[E, ...T], Err, R>;
|
|
@@ -138,7 +138,7 @@ export declare const prependElement: {
|
|
|
138
138
|
/**
|
|
139
139
|
* Get the element at a specific index from the current state of a RefTuple.
|
|
140
140
|
* @since 1.18.0
|
|
141
|
-
* @category
|
|
141
|
+
* @category Type utilities
|
|
142
142
|
*/
|
|
143
143
|
type Indices<T extends ReadonlyArray<unknown>> = Exclude<Partial<T>["length"], T["length"]>;
|
|
144
144
|
/**
|
|
@@ -156,7 +156,7 @@ type Indices<T extends ReadonlyArray<unknown>> = Exclude<Partial<T>["length"], T
|
|
|
156
156
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
157
157
|
*
|
|
158
158
|
* @since 1.18.0
|
|
159
|
-
* @category
|
|
159
|
+
* @category Derived queries
|
|
160
160
|
*/
|
|
161
161
|
export declare const get: {
|
|
162
162
|
<T extends ReadonlyArray<unknown>, I extends Indices<T> & keyof T>(index: I): <E, R>(ref: RefTuple<T, E, R>) => RefSubject.Computed<T[I], E, R>;
|
|
@@ -176,7 +176,7 @@ export declare const get: {
|
|
|
176
176
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
177
177
|
*
|
|
178
178
|
* @since 1.18.0
|
|
179
|
-
* @category
|
|
179
|
+
* @category Derived queries
|
|
180
180
|
*/
|
|
181
181
|
export declare const length: <T extends ReadonlyArray<unknown>, E, R>(ref: RefTuple<T, E, R>) => RefSubject.Computed<number, E, R>;
|
|
182
182
|
/**
|
|
@@ -193,7 +193,7 @@ export declare const length: <T extends ReadonlyArray<unknown>, E, R>(ref: RefTu
|
|
|
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 declare const pick: {
|
|
199
199
|
<T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(indices: I): <E, R>(ref: RefTuple<T, E, R>) => RefSubject.Computed<Array<T[number]>, E, R>;
|
|
@@ -213,7 +213,7 @@ export declare const pick: {
|
|
|
213
213
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
214
214
|
*
|
|
215
215
|
* @since 1.18.0
|
|
216
|
-
* @category
|
|
216
|
+
* @category Derived queries
|
|
217
217
|
*/
|
|
218
218
|
export declare const omit: {
|
|
219
219
|
<T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(indices: I): <E, R>(ref: RefTuple<T, E, R>) => RefSubject.Computed<Array<T[number]>, E, R>;
|
|
@@ -34,7 +34,7 @@ import * as RefSubject from "./RefSubject.js";
|
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
36
|
* @since 1.18.0
|
|
37
|
-
* @category
|
|
37
|
+
* @category Constructors
|
|
38
38
|
*/
|
|
39
39
|
export function make(initial, eq = Equivalence_.make((a, b) => equals(a, b))) {
|
|
40
40
|
return RefSubject.make(initial, { eq });
|
|
@@ -53,7 +53,7 @@ export function make(initial, eq = Equivalence_.make((a, b) => equals(a, b))) {
|
|
|
53
53
|
* It acquires no resource; failures and services remain those of the source ref.
|
|
54
54
|
*
|
|
55
55
|
* @since 1.18.0
|
|
56
|
-
* @category
|
|
56
|
+
* @category State updates
|
|
57
57
|
*/
|
|
58
58
|
export const setAt = dual(3, function setAt(ref, index, value) {
|
|
59
59
|
return RefSubject.update(ref, (self) => {
|
|
@@ -76,7 +76,7 @@ export const setAt = dual(3, function setAt(ref, index, value) {
|
|
|
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 const updateAt = dual(3, function updateAt(ref, index, f) {
|
|
82
82
|
return RefSubject.update(ref, (self) => Tuple.evolve(self, { [index]: f }));
|
|
@@ -98,7 +98,7 @@ export const updateAt = dual(3, function updateAt(ref, index, f) {
|
|
|
98
98
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
99
99
|
*
|
|
100
100
|
* @since 1.18.0
|
|
101
|
-
* @category
|
|
101
|
+
* @category Derived queries
|
|
102
102
|
*/
|
|
103
103
|
export const appendElement = dual(2, function appendElement(ref, element) {
|
|
104
104
|
return RefSubject.map(ref, (self) => Tuple.appendElement(self, element));
|
|
@@ -117,7 +117,7 @@ export const appendElement = dual(2, function appendElement(ref, element) {
|
|
|
117
117
|
* Fx observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
118
118
|
*
|
|
119
119
|
* @since 1.18.0
|
|
120
|
-
* @category
|
|
120
|
+
* @category Derived queries
|
|
121
121
|
*/
|
|
122
122
|
export const prependElement = dual(2, function prependElement(ref, element) {
|
|
123
123
|
return RefSubject.map(ref, (self) => [element, ...self]);
|
|
@@ -137,7 +137,7 @@ export const prependElement = dual(2, function prependElement(ref, element) {
|
|
|
137
137
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
138
138
|
*
|
|
139
139
|
* @since 1.18.0
|
|
140
|
-
* @category
|
|
140
|
+
* @category Derived queries
|
|
141
141
|
*/
|
|
142
142
|
export const get = dual(2, function get(ref, index) {
|
|
143
143
|
return RefSubject.map(ref, (self) => Tuple.get(self, index));
|
|
@@ -156,7 +156,7 @@ export const get = dual(2, function get(ref, index) {
|
|
|
156
156
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
157
157
|
*
|
|
158
158
|
* @since 1.18.0
|
|
159
|
-
* @category
|
|
159
|
+
* @category Derived queries
|
|
160
160
|
*/
|
|
161
161
|
export const length = (ref) => RefSubject.map(ref, (self) => self.length);
|
|
162
162
|
/**
|
|
@@ -173,7 +173,7 @@ export const length = (ref) => RefSubject.map(ref, (self) => self.length);
|
|
|
173
173
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
174
174
|
*
|
|
175
175
|
* @since 1.18.0
|
|
176
|
-
* @category
|
|
176
|
+
* @category Derived queries
|
|
177
177
|
*/
|
|
178
178
|
export const pick = dual(2, function pick(ref, indices) {
|
|
179
179
|
return RefSubject.map(ref, (self) => Tuple.pick(self, indices));
|
|
@@ -192,7 +192,7 @@ export const pick = dual(2, function pick(ref, indices) {
|
|
|
192
192
|
* observation follows later pushes and its observing Scope owns subscription cleanup.
|
|
193
193
|
*
|
|
194
194
|
* @since 1.18.0
|
|
195
|
-
* @category
|
|
195
|
+
* @category Derived queries
|
|
196
196
|
*/
|
|
197
197
|
export const omit = dual(2, function omit(ref, indices) {
|
|
198
198
|
return RefSubject.map(ref, (self) => Tuple.omit(self, indices));
|