@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
|
@@ -26,7 +26,7 @@ import * as Versioned from "../Versioned/Versioned.js";
|
|
|
26
26
|
* source errors, services, and lifetime.
|
|
27
27
|
*
|
|
28
28
|
* @since 1.18.0
|
|
29
|
-
* @category
|
|
29
|
+
* @category Type identity
|
|
30
30
|
*/
|
|
31
31
|
export declare const RefSubjectTypeId: unique symbol;
|
|
32
32
|
/**
|
|
@@ -43,7 +43,7 @@ export declare const RefSubjectTypeId: unique symbol;
|
|
|
43
43
|
* services, interruption, and Scope requirements expressed by its members.
|
|
44
44
|
*
|
|
45
45
|
* @since 1.18.0
|
|
46
|
-
* @category
|
|
46
|
+
* @category Type utilities
|
|
47
47
|
*/
|
|
48
48
|
export type RefSubjectTypeId = typeof RefSubjectTypeId;
|
|
49
49
|
/**
|
|
@@ -60,7 +60,7 @@ export type RefSubjectTypeId = typeof RefSubjectTypeId;
|
|
|
60
60
|
* source errors, services, and lifetime.
|
|
61
61
|
*
|
|
62
62
|
* @since 1.18.0
|
|
63
|
-
* @category
|
|
63
|
+
* @category Type identity
|
|
64
64
|
*/
|
|
65
65
|
export declare const ComputedTypeId: unique symbol;
|
|
66
66
|
/**
|
|
@@ -77,7 +77,7 @@ export declare const ComputedTypeId: unique symbol;
|
|
|
77
77
|
* services, interruption, and Scope requirements expressed by its members.
|
|
78
78
|
*
|
|
79
79
|
* @since 1.18.0
|
|
80
|
-
* @category
|
|
80
|
+
* @category Type utilities
|
|
81
81
|
*/
|
|
82
82
|
export type ComputedTypeId = typeof ComputedTypeId;
|
|
83
83
|
/**
|
|
@@ -94,7 +94,7 @@ export type ComputedTypeId = typeof ComputedTypeId;
|
|
|
94
94
|
* source errors, services, and lifetime.
|
|
95
95
|
*
|
|
96
96
|
* @since 1.18.0
|
|
97
|
-
* @category
|
|
97
|
+
* @category Type identity
|
|
98
98
|
*/
|
|
99
99
|
export declare const FilteredTypeId: unique symbol;
|
|
100
100
|
/**
|
|
@@ -111,7 +111,7 @@ export declare const FilteredTypeId: unique symbol;
|
|
|
111
111
|
* services, interruption, and Scope requirements expressed by its members.
|
|
112
112
|
*
|
|
113
113
|
* @since 1.18.0
|
|
114
|
-
* @category
|
|
114
|
+
* @category Type utilities
|
|
115
115
|
*/
|
|
116
116
|
export type FilteredTypeId = typeof FilteredTypeId;
|
|
117
117
|
/**
|
|
@@ -157,7 +157,7 @@ export type FilteredTypeId = typeof FilteredTypeId;
|
|
|
157
157
|
* ```
|
|
158
158
|
*
|
|
159
159
|
* @since 1.0.0
|
|
160
|
-
* @category
|
|
160
|
+
* @category Read-only state
|
|
161
161
|
*/
|
|
162
162
|
export interface Computed<out A, out E = never, out R = never> extends Versioned.Versioned<R, E, A, E, R | Scope.Scope, A, E, R> {
|
|
163
163
|
/**
|
|
@@ -175,7 +175,7 @@ export interface Computed<out A, out E = never, out R = never> extends Versioned
|
|
|
175
175
|
* source errors, services, and lifetime.
|
|
176
176
|
*
|
|
177
177
|
* @since 1.18.0
|
|
178
|
-
* @category
|
|
178
|
+
* @category State protocol
|
|
179
179
|
*/
|
|
180
180
|
readonly [ComputedTypeId]: ComputedTypeId;
|
|
181
181
|
}
|
|
@@ -194,7 +194,7 @@ export interface Computed<out A, out E = never, out R = never> extends Versioned
|
|
|
194
194
|
* members retain their own errors, services, and Scope-owned observation lifetimes.
|
|
195
195
|
*
|
|
196
196
|
* @since 1.18.0
|
|
197
|
-
* @category
|
|
197
|
+
* @category Read-only state
|
|
198
198
|
*/
|
|
199
199
|
export declare namespace Computed {
|
|
200
200
|
/**
|
|
@@ -211,7 +211,7 @@ export declare namespace Computed {
|
|
|
211
211
|
* interruption, and Scope requirements expressed by its members.
|
|
212
212
|
*
|
|
213
213
|
* @since 1.18.0
|
|
214
|
-
* @category
|
|
214
|
+
* @category Type utilities
|
|
215
215
|
*/
|
|
216
216
|
type Any = Computed<any, any, any> | Computed<never, any, any> | Computed<any, never, any> | Computed<never, never, any>;
|
|
217
217
|
}
|
|
@@ -257,7 +257,7 @@ export declare namespace Computed {
|
|
|
257
257
|
* ```
|
|
258
258
|
*
|
|
259
259
|
* @since 1.0.0
|
|
260
|
-
* @category
|
|
260
|
+
* @category Read-only state
|
|
261
261
|
*/
|
|
262
262
|
export interface Filtered<out A, out E = never, out R = never> extends Versioned.Versioned<R, E, A, E, R | Scope.Scope, A, E | Cause.NoSuchElementError, R> {
|
|
263
263
|
/**
|
|
@@ -275,7 +275,7 @@ export interface Filtered<out A, out E = never, out R = never> extends Versioned
|
|
|
275
275
|
* source errors, services, and lifetime.
|
|
276
276
|
*
|
|
277
277
|
* @since 1.18.0
|
|
278
|
-
* @category
|
|
278
|
+
* @category State protocol
|
|
279
279
|
*/
|
|
280
280
|
readonly [FilteredTypeId]: FilteredTypeId;
|
|
281
281
|
/**
|
|
@@ -298,7 +298,7 @@ export interface Filtered<out A, out E = never, out R = never> extends Versioned
|
|
|
298
298
|
* console.log(Option.isNone(option)) // true (no number > 5)
|
|
299
299
|
* })
|
|
300
300
|
* ```
|
|
301
|
-
* @category
|
|
301
|
+
* @category Optional queries
|
|
302
302
|
* @since 1.18.0
|
|
303
303
|
* @remarks
|
|
304
304
|
* ## Why
|
|
@@ -329,7 +329,7 @@ export interface Filtered<out A, out E = never, out R = never> extends Versioned
|
|
|
329
329
|
* current reads with `NoSuchElementError` while absent; their observing Scope owns Fx cleanup.
|
|
330
330
|
*
|
|
331
331
|
* @since 1.18.0
|
|
332
|
-
* @category
|
|
332
|
+
* @category Read-only state
|
|
333
333
|
*/
|
|
334
334
|
export declare namespace Filtered {
|
|
335
335
|
/**
|
|
@@ -347,7 +347,7 @@ export declare namespace Filtered {
|
|
|
347
347
|
* interruption, and Scope requirements expressed by its members.
|
|
348
348
|
*
|
|
349
349
|
* @since 1.18.0
|
|
350
|
-
* @category
|
|
350
|
+
* @category Type utilities
|
|
351
351
|
*/
|
|
352
352
|
type Any = Filtered<any, any, any> | Filtered<never, any, any> | Filtered<any, never, any> | Filtered<never, never, any>;
|
|
353
353
|
}
|
|
@@ -364,7 +364,7 @@ export declare namespace Filtered {
|
|
|
364
364
|
* services, interruption, and Scope requirements expressed by its members.
|
|
365
365
|
*
|
|
366
366
|
* @since 1.0.0
|
|
367
|
-
* @category
|
|
367
|
+
* @category Transactions
|
|
368
368
|
*/
|
|
369
369
|
export interface GetSetDelete<A, E = never, R = never> {
|
|
370
370
|
/**
|
|
@@ -381,7 +381,7 @@ export interface GetSetDelete<A, E = never, R = never> {
|
|
|
381
381
|
* used by `updates`, it observes that transaction's buffered value.
|
|
382
382
|
*
|
|
383
383
|
* @since 1.18.0
|
|
384
|
-
* @category
|
|
384
|
+
* @category Current reads
|
|
385
385
|
*/
|
|
386
386
|
readonly get: Effect.Effect<A, E, R>;
|
|
387
387
|
/**
|
|
@@ -399,7 +399,7 @@ export interface GetSetDelete<A, E = never, R = never> {
|
|
|
399
399
|
* acquires no resource and preserves source failures and services.
|
|
400
400
|
*
|
|
401
401
|
* @since 1.18.0
|
|
402
|
-
* @category
|
|
402
|
+
* @category State updates
|
|
403
403
|
*/
|
|
404
404
|
readonly set: (a: A) => Effect.Effect<A, E, R>;
|
|
405
405
|
/**
|
|
@@ -417,7 +417,7 @@ export interface GetSetDelete<A, E = never, R = never> {
|
|
|
417
417
|
* It acquires no resource and preserves source failures and services.
|
|
418
418
|
*
|
|
419
419
|
* @since 1.18.0
|
|
420
|
-
* @category
|
|
420
|
+
* @category State updates
|
|
421
421
|
*/
|
|
422
422
|
readonly delete: Effect.Effect<Option.Option<A>, E, R>;
|
|
423
423
|
}
|
|
@@ -467,7 +467,7 @@ export interface GetSetDelete<A, E = never, R = never> {
|
|
|
467
467
|
* ```
|
|
468
468
|
*
|
|
469
469
|
* @since 1.0.0
|
|
470
|
-
* @category
|
|
470
|
+
* @category Writable state
|
|
471
471
|
*/
|
|
472
472
|
export interface RefSubject<A, E = never, R = never> extends Computed<A, E, R>, Subject.Subject<A, E, R> {
|
|
473
473
|
/**
|
|
@@ -485,7 +485,7 @@ export interface RefSubject<A, E = never, R = never> extends Computed<A, E, R>,
|
|
|
485
485
|
* source errors, services, and lifetime.
|
|
486
486
|
*
|
|
487
487
|
* @since 1.18.0
|
|
488
|
-
* @category
|
|
488
|
+
* @category State protocol
|
|
489
489
|
*/
|
|
490
490
|
readonly [RefSubjectTypeId]: RefSubjectTypeId;
|
|
491
491
|
/**
|
|
@@ -513,7 +513,7 @@ export interface RefSubject<A, E = never, R = never> extends Computed<A, E, R>,
|
|
|
513
513
|
* )
|
|
514
514
|
* })
|
|
515
515
|
* ```
|
|
516
|
-
* @category
|
|
516
|
+
* @category Transactions
|
|
517
517
|
* @since 1.18.0
|
|
518
518
|
* @remarks
|
|
519
519
|
* ## Why
|
|
@@ -544,7 +544,7 @@ export interface RefSubject<A, E = never, R = never> extends Computed<A, E, R>,
|
|
|
544
544
|
* yield* ref.interrupt
|
|
545
545
|
* })
|
|
546
546
|
* ```
|
|
547
|
-
* @category
|
|
547
|
+
* @category Lifetime
|
|
548
548
|
* @since 1.18.0
|
|
549
549
|
* @remarks
|
|
550
550
|
* ## Why
|
|
@@ -576,7 +576,7 @@ export interface RefSubject<A, E = never, R = never> extends Computed<A, E, R>,
|
|
|
576
576
|
* update boundary.
|
|
577
577
|
*
|
|
578
578
|
* @since 1.18.0
|
|
579
|
-
* @category
|
|
579
|
+
* @category Writable state
|
|
580
580
|
*/
|
|
581
581
|
export declare namespace RefSubject {
|
|
582
582
|
/**
|
|
@@ -594,7 +594,7 @@ export declare namespace RefSubject {
|
|
|
594
594
|
* interruption, and Scope requirements expressed by its members.
|
|
595
595
|
*
|
|
596
596
|
* @since 1.18.0
|
|
597
|
-
* @category
|
|
597
|
+
* @category Type utilities
|
|
598
598
|
*/
|
|
599
599
|
type Any = RefSubject<any, any, any> | RefSubject<any, any> | RefSubject<any, never, any> | RefSubject<any>;
|
|
600
600
|
/**
|
|
@@ -613,7 +613,7 @@ export declare namespace RefSubject {
|
|
|
613
613
|
* ownership to that installed subject.
|
|
614
614
|
*
|
|
615
615
|
* @since 1.18.0
|
|
616
|
-
* @category
|
|
616
|
+
* @category Services
|
|
617
617
|
*/
|
|
618
618
|
interface Service<Self, Id extends string, A, E> extends RefSubject<A, E, Self> {
|
|
619
619
|
/**
|
|
@@ -630,7 +630,7 @@ export declare namespace RefSubject {
|
|
|
630
630
|
* source errors, services, and lifetime.
|
|
631
631
|
*
|
|
632
632
|
* @since 1.18.0
|
|
633
|
-
* @category
|
|
633
|
+
* @category Services
|
|
634
634
|
*/
|
|
635
635
|
readonly id: Id;
|
|
636
636
|
/**
|
|
@@ -648,7 +648,7 @@ export declare namespace RefSubject {
|
|
|
648
648
|
* RefSubject and its scoped initializer; operations retrieving it require `Self`.
|
|
649
649
|
*
|
|
650
650
|
* @since 1.18.0
|
|
651
|
-
* @category
|
|
651
|
+
* @category Services
|
|
652
652
|
*/
|
|
653
653
|
readonly service: Context.Service<Self, RefSubject<A, E>>;
|
|
654
654
|
/**
|
|
@@ -666,7 +666,7 @@ export declare namespace RefSubject {
|
|
|
666
666
|
* and cleanup; source failures and services stay on reads and pushes.
|
|
667
667
|
*
|
|
668
668
|
* @since 1.18.0
|
|
669
|
-
* @category
|
|
669
|
+
* @category Constructors
|
|
670
670
|
*/
|
|
671
671
|
readonly make: <R = never>(value: A | Effect.Effect<A, E, R> | Fx<A, E, R>, options?: RefSubjectOptions<A> & {
|
|
672
672
|
readonly skip?: number;
|
|
@@ -687,7 +687,7 @@ export declare namespace RefSubject {
|
|
|
687
687
|
* `E2` is a Layer-construction failure, while the subject's `E` remains on later state access.
|
|
688
688
|
*
|
|
689
689
|
* @since 1.18.0
|
|
690
|
-
* @category
|
|
690
|
+
* @category Service layers
|
|
691
691
|
*/
|
|
692
692
|
readonly layer: <E2, R2>(make: Effect.Effect<RefSubject<A, E>, E2, R2 | Scope.Scope>) => Layer.Layer<Self, E2, Exclude<R2, Scope.Scope>>;
|
|
693
693
|
}
|
|
@@ -705,7 +705,7 @@ export declare namespace RefSubject {
|
|
|
705
705
|
* services, interruption, and Scope requirements expressed by its members.
|
|
706
706
|
*
|
|
707
707
|
* @since 1.18.0
|
|
708
|
-
* @category
|
|
708
|
+
* @category Services
|
|
709
709
|
*/
|
|
710
710
|
interface Class<Self, Id extends string, A, E> extends RefSubject.Service<Self, Id, A, E> {
|
|
711
711
|
/**
|
|
@@ -723,7 +723,7 @@ export declare namespace RefSubject {
|
|
|
723
723
|
* acquire a RefSubject. The matching Layer owns the installed state and its Scope.
|
|
724
724
|
*
|
|
725
725
|
* @since 1.18.0
|
|
726
|
-
* @category
|
|
726
|
+
* @category Type utilities
|
|
727
727
|
*/
|
|
728
728
|
new (): RefSubject.Service<Self, Id, A, E>;
|
|
729
729
|
}
|
|
@@ -745,7 +745,7 @@ export declare namespace RefSubject {
|
|
|
745
745
|
* still owns any subscription created by `"multiple"`.
|
|
746
746
|
*
|
|
747
747
|
* @since 1.18.0
|
|
748
|
-
* @category
|
|
748
|
+
* @category Observation policy
|
|
749
749
|
*/
|
|
750
750
|
export declare const CurrentComputedBehavior: Context.Reference<"multiple" | "one">;
|
|
751
751
|
/**
|
|
@@ -759,12 +759,13 @@ export declare const CurrentComputedBehavior: Context.Reference<"multiple" | "on
|
|
|
759
759
|
*
|
|
760
760
|
* ## Ownership and lifetime
|
|
761
761
|
*
|
|
762
|
-
* Current reads
|
|
763
|
-
*
|
|
764
|
-
*
|
|
762
|
+
* Current reads cache the transformed input by source version within each Effect Context. The
|
|
763
|
+
* pushed channel uses `Subject.hold`: observers with the same Context object share one upstream
|
|
764
|
+
* session and its retained projection; distinct Context objects have separate sessions. The last
|
|
765
|
+
* observer ends its session and clears its held value. The observing Scope owns cleanup.
|
|
765
766
|
*
|
|
766
767
|
* @since 1.18.0
|
|
767
|
-
* @category
|
|
768
|
+
* @category Derived queries
|
|
768
769
|
*/
|
|
769
770
|
export declare function makeComputed<R0, E0, A, E, R, E2, R2, C, E3, R3>(input: Versioned.Versioned<R0, E0, A, E, R, A, E2, R2>, f: (a: A) => Effect.Effect<C, E3, R3>): Computed<C, E0 | E | E2 | E3, R0 | R2 | R3 | Exclude<R, Scope.Scope>>;
|
|
770
771
|
/**
|
|
@@ -785,16 +786,14 @@ export declare function makeComputed<R0, E0, A, E, R, E2, R2, C, E3, R3>(input:
|
|
|
785
786
|
*
|
|
786
787
|
* ## Ownership and lifetime
|
|
787
788
|
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
* value. The observing Scope owns subscription cleanup. The private read accumulator has no
|
|
794
|
-
* finalizer and is collected with the returned Computed.
|
|
789
|
+
* Each Effect Context object gets a private current-read accumulator, advanced after a successful
|
|
790
|
+
* fold for a new source version. The pushed channel runs `Fx.scanEffect` from `initial` inside
|
|
791
|
+
* `Subject.hold`: observers using the same Context share that active scan and retained result.
|
|
792
|
+
* The last observer ends its session and clears its held value. The observing Scope owns
|
|
793
|
+
* subscription cleanup. Read accumulators are weakly held by Context and need no finalizer.
|
|
795
794
|
*
|
|
796
795
|
* @since 1.0.0
|
|
797
|
-
* @category
|
|
796
|
+
* @category Accumulation
|
|
798
797
|
*/
|
|
799
798
|
export declare const scan: {
|
|
800
799
|
<S, A>(initial: S, f: (s: S, a: A) => S): <E, R>(ref: RefSubject<A, E, R> | Computed<A, E, R>) => Computed<S, E, R>;
|
|
@@ -812,16 +811,15 @@ export declare const scan: {
|
|
|
812
811
|
*
|
|
813
812
|
* ## Ownership and lifetime
|
|
814
813
|
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
* finalizer and is collected with the returned Computed.
|
|
814
|
+
* Each Effect Context object gets a private current-read accumulator. It advances only after `f`
|
|
815
|
+
* succeeds, so a typed failure leaves the previous state intact. The pushed channel runs
|
|
816
|
+
* `Fx.scanEffect` from `initial` inside `Subject.hold`: observers using the same Context share
|
|
817
|
+
* that active scan and retained result; each fold requires `R3`. The last observer ends its
|
|
818
|
+
* session and clears its held value. The observing Scope owns cleanup. Read accumulators are
|
|
819
|
+
* weakly held by Context and need no finalizer.
|
|
822
820
|
*
|
|
823
821
|
* @since 1.0.0
|
|
824
|
-
* @category
|
|
822
|
+
* @category Accumulation
|
|
825
823
|
*/
|
|
826
824
|
export declare const scanEffect: {
|
|
827
825
|
<S, A, E3, R3>(initial: S, f: (s: S, a: A) => Effect.Effect<S, E3, R3>): <E, R>(ref: RefSubject<A, E, R> | Computed<A, E, R>) => Computed<S, E | E3, R | R3>;
|
|
@@ -839,11 +837,12 @@ export declare const scanEffect: {
|
|
|
839
837
|
*
|
|
840
838
|
* ## Ownership and lifetime
|
|
841
839
|
*
|
|
842
|
-
*
|
|
843
|
-
*
|
|
840
|
+
* Sampled results and pushed sessions are isolated by Effect Context identity. Within one Context,
|
|
841
|
+
* current reads cache by source version and observers share the active held projection. Its
|
|
842
|
+
* Effect read fails with NoSuchElement while absent; the observing Scope owns its subscription.
|
|
844
843
|
*
|
|
845
844
|
* @since 1.18.0
|
|
846
|
-
* @category
|
|
845
|
+
* @category Optional queries
|
|
847
846
|
*/
|
|
848
847
|
export declare function makeFiltered<R0, E0, A, E, R, E2, R2, C, E3, R3>(input: Versioned.Versioned<R0, E0, A, E, R, A, E2, R2>, f: (a: A) => Effect.Effect<Option.Option<C>, E3, R3>): Filtered<C, E0 | E | E2 | E3, R0 | Exclude<R, Scope.Scope> | R2 | R3>;
|
|
849
848
|
/**
|
|
@@ -860,7 +859,7 @@ export declare function makeFiltered<R0, E0, A, E, R, E2, R2, C, E3, R3>(input:
|
|
|
860
859
|
* services, interruption, and Scope requirements expressed by its members.
|
|
861
860
|
*
|
|
862
861
|
* @since 1.18.0
|
|
863
|
-
* @category
|
|
862
|
+
* @category Construction options
|
|
864
863
|
*/
|
|
865
864
|
export interface RefSubjectOptions<A> {
|
|
866
865
|
/**
|
|
@@ -878,7 +877,7 @@ export interface RefSubjectOptions<A> {
|
|
|
878
877
|
* source errors, services, and lifetime.
|
|
879
878
|
*
|
|
880
879
|
* @since 1.18.0
|
|
881
|
-
* @category
|
|
880
|
+
* @category Equality
|
|
882
881
|
*/
|
|
883
882
|
readonly eq?: Equivalence<A>;
|
|
884
883
|
}
|
|
@@ -943,7 +942,7 @@ export interface RefSubjectOptions<A> {
|
|
|
943
942
|
* ```
|
|
944
943
|
*
|
|
945
944
|
* @since 1.0.0
|
|
946
|
-
* @category
|
|
945
|
+
* @category Constructors
|
|
947
946
|
*/
|
|
948
947
|
export declare function make<A, E = never, R = never>(effect: A | Effect.Effect<A, E, R> | Stream.Stream<A, E, R> | Fx<A, E, R>, options?: RefSubjectOptions<A>): Effect.Effect<RefSubject<A, E>, never, R | Scope.Scope>;
|
|
949
948
|
/**
|
|
@@ -978,7 +977,7 @@ export declare function make<A, E = never, R = never>(effect: A | Effect.Effect<
|
|
|
978
977
|
* ```
|
|
979
978
|
*
|
|
980
979
|
* @since 1.0.0
|
|
981
|
-
* @category
|
|
980
|
+
* @category Source adapters
|
|
982
981
|
*/
|
|
983
982
|
export declare function fromEffect<A, E, R>(effect: Effect.Effect<A, E, R>, options?: RefSubjectOptions<A>): Effect.Effect<RefSubject<A, E>, never, R | Scope.Scope>;
|
|
984
983
|
/**
|
|
@@ -1015,7 +1014,7 @@ export declare function fromEffect<A, E, R>(effect: Effect.Effect<A, E, R>, opti
|
|
|
1015
1014
|
* ```
|
|
1016
1015
|
*
|
|
1017
1016
|
* @since 1.0.0
|
|
1018
|
-
* @category
|
|
1017
|
+
* @category Source adapters
|
|
1019
1018
|
*/
|
|
1020
1019
|
export declare function fromFx<A, E, R>(fx: Fx<A, E, R>, options?: RefSubjectOptions<A>): Effect.Effect<RefSubject<A, E>, never, R | Scope.Scope>;
|
|
1021
1020
|
/**
|
|
@@ -1036,7 +1035,7 @@ export declare function fromFx<A, E, R>(fx: Fx<A, E, R>, options?: RefSubjectOpt
|
|
|
1036
1035
|
* expose `E`.
|
|
1037
1036
|
*
|
|
1038
1037
|
* @since 1.18.0
|
|
1039
|
-
* @category
|
|
1038
|
+
* @category Source adapters
|
|
1040
1039
|
*/
|
|
1041
1040
|
export declare function fromStream<A, E, R>(stream: Stream.Stream<A, E, R>, options?: RefSubjectOptions<A>): Effect.Effect<RefSubject<A, E>, never, R | Scope.Scope>;
|
|
1042
1041
|
/**
|
|
@@ -1067,7 +1066,7 @@ export declare function fromStream<A, E, R>(stream: Stream.Stream<A, E, R>, opti
|
|
|
1067
1066
|
* ```
|
|
1068
1067
|
*
|
|
1069
1068
|
* @since 1.0.0
|
|
1070
|
-
* @category
|
|
1069
|
+
* @category Source adapters
|
|
1071
1070
|
*/
|
|
1072
1071
|
export declare function fromOption<A>(option: Option.Option<A>, options?: RefSubjectOptions<Option.Option<A>>): Effect.Effect<RefSubject<Option.Option<A>>, never, Scope.Scope>;
|
|
1073
1072
|
/**
|
|
@@ -1086,7 +1085,7 @@ export declare function fromOption<A>(option: Option.Option<A>, options?: RefSub
|
|
|
1086
1085
|
* fail. The returned RefSubject owns and publishes subsequent Option writes.
|
|
1087
1086
|
*
|
|
1088
1087
|
* @since 1.18.0
|
|
1089
|
-
* @category
|
|
1088
|
+
* @category Source adapters
|
|
1090
1089
|
*/
|
|
1091
1090
|
export declare function fromNullable<A>(value: A | null | undefined, options?: RefSubjectOptions<Option.Option<NonNullable<A>>>): Effect.Effect<RefSubject<Option.Option<NonNullable<A>>>, never, Scope.Scope>;
|
|
1092
1091
|
/**
|
|
@@ -1124,7 +1123,7 @@ export declare function fromNullable<A>(value: A | null | undefined, options?: R
|
|
|
1124
1123
|
* ```
|
|
1125
1124
|
*
|
|
1126
1125
|
* @since 1.0.0
|
|
1127
|
-
* @category
|
|
1126
|
+
* @category State updates
|
|
1128
1127
|
*/
|
|
1129
1128
|
export declare const set: {
|
|
1130
1129
|
<A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;
|
|
@@ -1167,7 +1166,7 @@ export declare const set: {
|
|
|
1167
1166
|
* ```
|
|
1168
1167
|
*
|
|
1169
1168
|
* @since 1.0.0
|
|
1170
|
-
* @category
|
|
1169
|
+
* @category State updates
|
|
1171
1170
|
*/
|
|
1172
1171
|
export declare function reset<A, E, R>(ref: RefSubject<A, E, R>): Effect.Effect<Option.Option<A>, E, R>;
|
|
1173
1172
|
export {
|
|
@@ -1195,7 +1194,7 @@ export {
|
|
|
1195
1194
|
* ```
|
|
1196
1195
|
*
|
|
1197
1196
|
* @since 1.20.0
|
|
1198
|
-
* @category
|
|
1197
|
+
* @category State updates
|
|
1199
1198
|
*/
|
|
1200
1199
|
reset as delete, };
|
|
1201
1200
|
/**
|
|
@@ -1231,7 +1230,7 @@ reset as delete, };
|
|
|
1231
1230
|
* ```
|
|
1232
1231
|
*
|
|
1233
1232
|
* @since 1.0.0
|
|
1234
|
-
* @category
|
|
1233
|
+
* @category State updates
|
|
1235
1234
|
*/
|
|
1236
1235
|
export declare const updateEffect: {
|
|
1237
1236
|
<A, E2, R2>(f: (value: A) => Effect.Effect<A, E2, R2>): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E | E2, R | R2>;
|
|
@@ -1281,7 +1280,7 @@ export declare const updateEffect: {
|
|
|
1281
1280
|
* ```
|
|
1282
1281
|
*
|
|
1283
1282
|
* @since 1.0.0
|
|
1284
|
-
* @category
|
|
1283
|
+
* @category State updates
|
|
1285
1284
|
*/
|
|
1286
1285
|
export declare const update: {
|
|
1287
1286
|
<A>(f: (value: A) => A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;
|
|
@@ -1322,7 +1321,7 @@ export declare const update: {
|
|
|
1322
1321
|
* ```
|
|
1323
1322
|
*
|
|
1324
1323
|
* @since 1.0.0
|
|
1325
|
-
* @category
|
|
1324
|
+
* @category Transactions
|
|
1326
1325
|
*/
|
|
1327
1326
|
export declare const modifyEffect: {
|
|
1328
1327
|
<A, B, E2, R2>(f: (value: A) => Effect.Effect<readonly [B, A], E2, R2>): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<B, E | E2, R | R2>;
|
|
@@ -1360,7 +1359,7 @@ export declare const modifyEffect: {
|
|
|
1360
1359
|
* ```
|
|
1361
1360
|
*
|
|
1362
1361
|
* @since 1.0.0
|
|
1363
|
-
* @category
|
|
1362
|
+
* @category Transactions
|
|
1364
1363
|
*/
|
|
1365
1364
|
export declare const modify: {
|
|
1366
1365
|
<A, B>(f: (value: A) => readonly [B, A]): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<B, E, R>;
|
|
@@ -1396,7 +1395,7 @@ export declare const modify: {
|
|
|
1396
1395
|
* ```
|
|
1397
1396
|
*
|
|
1398
1397
|
* @since 1.0.0
|
|
1399
|
-
* @category guards
|
|
1398
|
+
* @category Type guards
|
|
1400
1399
|
*/
|
|
1401
1400
|
export declare function isRefSubject(value: any): value is RefSubject<any, any, any>;
|
|
1402
1401
|
/**
|
|
@@ -1413,7 +1412,7 @@ export declare function isRefSubject(value: any): value is RefSubject<any, any,
|
|
|
1413
1412
|
* This synchronous predicate performs no Effect, subscription, or acquisition.
|
|
1414
1413
|
*
|
|
1415
1414
|
* @since 1.18.0
|
|
1416
|
-
* @category guards
|
|
1415
|
+
* @category Type guards
|
|
1417
1416
|
*/
|
|
1418
1417
|
export declare function isComputed(value: any): value is Computed<any, any, any>;
|
|
1419
1418
|
/**
|
|
@@ -1460,7 +1459,7 @@ export declare function isComputed(value: any): value is Computed<any, any, any>
|
|
|
1460
1459
|
* ```
|
|
1461
1460
|
*
|
|
1462
1461
|
* @since 1.0.0
|
|
1463
|
-
* @category
|
|
1462
|
+
* @category Transactions
|
|
1464
1463
|
*/
|
|
1465
1464
|
export declare const runUpdates: {
|
|
1466
1465
|
<A, E, R, B, E2, R2, R3 = never, E3 = never, C = never>(f: (ref: GetSetDelete<A, E, R>) => Effect.Effect<B, E2, R2>, options?: {
|
|
@@ -1505,7 +1504,7 @@ export declare const runUpdates: {
|
|
|
1505
1504
|
* ```
|
|
1506
1505
|
*
|
|
1507
1506
|
* @since 1.0.0
|
|
1508
|
-
* @category
|
|
1507
|
+
* @category State updates
|
|
1509
1508
|
*/
|
|
1510
1509
|
export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;
|
|
1511
1510
|
/**
|
|
@@ -1541,7 +1540,7 @@ export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.E
|
|
|
1541
1540
|
* ```
|
|
1542
1541
|
*
|
|
1543
1542
|
* @since 1.0.0
|
|
1544
|
-
* @category
|
|
1543
|
+
* @category State updates
|
|
1545
1544
|
*/
|
|
1546
1545
|
export declare function decrement<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;
|
|
1547
1546
|
/**
|
|
@@ -1562,7 +1561,7 @@ export declare function decrement<E, R>(ref: RefSubject<number, E, R>): Effect.E
|
|
|
1562
1561
|
* while consumers require only the generated `Self` service.
|
|
1563
1562
|
*
|
|
1564
1563
|
* @since 1.18.0
|
|
1565
|
-
* @category
|
|
1564
|
+
* @category Services
|
|
1566
1565
|
*/
|
|
1567
1566
|
export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => RefSubject.Class<Self, Id, A, E>;
|
|
1568
1567
|
/**
|
|
@@ -1610,7 +1609,7 @@ export declare function Service<Self, A, E = never>(): <const Id extends string>
|
|
|
1610
1609
|
* ```
|
|
1611
1610
|
*
|
|
1612
1611
|
* @since 2.0.0
|
|
1613
|
-
* @category
|
|
1612
|
+
* @category Derived queries
|
|
1614
1613
|
*/
|
|
1615
1614
|
export declare const proxy: {
|
|
1616
1615
|
<A extends ReadonlyArray<any> | Readonly<Record<PropertyKey, any>>, E, R>(source: Computed<A, E, R>): {
|
|
@@ -1634,7 +1633,7 @@ export declare const proxy: {
|
|
|
1634
1633
|
* interruption, and Scope requirements expressed by its members.
|
|
1635
1634
|
*
|
|
1636
1635
|
* @since 1.18.0
|
|
1637
|
-
* @category
|
|
1636
|
+
* @category Type utilities
|
|
1638
1637
|
*/
|
|
1639
1638
|
export type Services<T> = T extends RefSubject<infer _A, infer _E, infer R> ? R : T extends Computed<infer _A, infer _E, infer R> ? R : T extends Filtered<infer _A, infer _E, infer R> ? R : never;
|
|
1640
1639
|
/**
|
|
@@ -1651,7 +1650,7 @@ export type Services<T> = T extends RefSubject<infer _A, infer _E, infer R> ? R
|
|
|
1651
1650
|
* interruption, and Scope requirements expressed by its members.
|
|
1652
1651
|
*
|
|
1653
1652
|
* @since 1.18.0
|
|
1654
|
-
* @category
|
|
1653
|
+
* @category Type utilities
|
|
1655
1654
|
*/
|
|
1656
1655
|
export type Error<T> = T extends RefSubject<infer _A, infer E, infer _R> ? E : T extends Computed<infer _A, infer E, infer _R> ? E : T extends Filtered<infer _A, infer E, infer _R> ? E : never;
|
|
1657
1656
|
/**
|
|
@@ -1668,7 +1667,7 @@ export type Error<T> = T extends RefSubject<infer _A, infer E, infer _R> ? E : T
|
|
|
1668
1667
|
* interruption, and Scope requirements expressed by its members.
|
|
1669
1668
|
*
|
|
1670
1669
|
* @since 1.18.0
|
|
1671
|
-
* @category
|
|
1670
|
+
* @category Type utilities
|
|
1672
1671
|
*/
|
|
1673
1672
|
export type Success<T> = T extends RefSubject<infer A, infer _E, infer _R> ? A : T extends Computed<infer A, infer _E, infer _R> ? A : T extends Filtered<infer A, infer _E, infer _R> ? A : never;
|
|
1674
1673
|
/**
|
|
@@ -1685,7 +1684,7 @@ export type Success<T> = T extends RefSubject<infer A, infer _E, infer _R> ? A :
|
|
|
1685
1684
|
* services, interruption, and Scope requirements expressed by its members.
|
|
1686
1685
|
*
|
|
1687
1686
|
* @since 1.18.0
|
|
1688
|
-
* @category
|
|
1687
|
+
* @category Type utilities
|
|
1689
1688
|
*/
|
|
1690
1689
|
export type Identifier<T> = T extends RefSubject.Service<infer R, infer _Id, infer _A, infer _E> ? R : never;
|
|
1691
1690
|
/**
|
|
@@ -1731,7 +1730,7 @@ export type Identifier<T> = T extends RefSubject.Service<infer R, infer _Id, inf
|
|
|
1731
1730
|
* ```
|
|
1732
1731
|
*
|
|
1733
1732
|
* @since 1.0.0
|
|
1734
|
-
* @category
|
|
1733
|
+
* @category Derived queries
|
|
1735
1734
|
*/
|
|
1736
1735
|
export declare const mapEffect: {
|
|
1737
1736
|
<T extends RefSubject.Any | Computed.Any | Filtered.Any, B, E2, R2>(f: (a: Success<T>) => Effect.Effect<B, E2, R2>): (ref: T) => T extends Filtered.Any ? Filtered<B, Error<T> | E2, Services<T> | R2> : Computed<B, Error<T> | E2, Services<T> | R2>;
|
|
@@ -1785,7 +1784,7 @@ export declare const mapEffect: {
|
|
|
1785
1784
|
* ```
|
|
1786
1785
|
*
|
|
1787
1786
|
* @since 1.0.0
|
|
1788
|
-
* @category
|
|
1787
|
+
* @category Derived queries
|
|
1789
1788
|
*/
|
|
1790
1789
|
export declare const map: {
|
|
1791
1790
|
<T extends RefSubject.Any | Computed.Any | Filtered.Any, B>(f: (a: Success<T>) => B): (ref: T) => T extends Filtered.Any ? Filtered<B, Error<T>, Services<T>> : Computed<B, Error<T>, Services<T>>;
|
|
@@ -1827,7 +1826,7 @@ export declare const map: {
|
|
|
1827
1826
|
* ```
|
|
1828
1827
|
*
|
|
1829
1828
|
* @since 1.0.0
|
|
1830
|
-
* @category
|
|
1829
|
+
* @category Optional queries
|
|
1831
1830
|
*/
|
|
1832
1831
|
export declare const filterMapEffect: {
|
|
1833
1832
|
<A, B, E2, R2>(f: (a: A) => Effect.Effect<Option.Option<B>, E2, R2>): {
|
|
@@ -1872,7 +1871,7 @@ export declare const filterMapEffect: {
|
|
|
1872
1871
|
* ```
|
|
1873
1872
|
*
|
|
1874
1873
|
* @since 1.0.0
|
|
1875
|
-
* @category
|
|
1874
|
+
* @category Optional queries
|
|
1876
1875
|
*/
|
|
1877
1876
|
export declare const filterMap: {
|
|
1878
1877
|
<A, B>(f: (a: A) => Option.Option<B>): {
|
|
@@ -1918,7 +1917,7 @@ export declare const filterMap: {
|
|
|
1918
1917
|
* ```
|
|
1919
1918
|
*
|
|
1920
1919
|
* @since 1.0.0
|
|
1921
|
-
* @category
|
|
1920
|
+
* @category Optional queries
|
|
1922
1921
|
*/
|
|
1923
1922
|
export declare const compact: {
|
|
1924
1923
|
<A, E, R>(ref: Computed<Option.Option<A>, E, R>): Filtered<A, E, R>;
|
|
@@ -1960,7 +1959,7 @@ export declare const compact: {
|
|
|
1960
1959
|
* ```
|
|
1961
1960
|
*
|
|
1962
1961
|
* @since 1.0.0
|
|
1963
|
-
* @category
|
|
1962
|
+
* @category Optional queries
|
|
1964
1963
|
*/
|
|
1965
1964
|
export declare const getOrElse: {
|
|
1966
1965
|
<A>(fallback: () => A): <E, R>(ref: Computed<Option.Option<A>, E, R> | Filtered<A, E, R>) => Computed<A, E, R>;
|
|
@@ -1983,7 +1982,7 @@ export declare const getOrElse: {
|
|
|
1983
1982
|
* source RefSubject.
|
|
1984
1983
|
*
|
|
1985
1984
|
* @since 1.18.0
|
|
1986
|
-
* @category
|
|
1985
|
+
* @category Observation policy
|
|
1987
1986
|
*/
|
|
1988
1987
|
export declare const slice: {
|
|
1989
1988
|
(skip: number, take: number): <A, E, R>(ref: RefSubject<A, E, R>) => RefSubject<A, E, R>;
|
|
@@ -2031,7 +2030,7 @@ export declare const slice: {
|
|
|
2031
2030
|
* ```
|
|
2032
2031
|
*
|
|
2033
2032
|
* @since 1.0.0
|
|
2034
|
-
* @category
|
|
2033
|
+
* @category Writable views
|
|
2035
2034
|
*/
|
|
2036
2035
|
export declare const transform: {
|
|
2037
2036
|
<A, B>(toB: (a: A) => B, toA: (b: B) => A): <E, R>(ref: RefSubject<A, E, R>) => RefSubject<B, E, R>;
|
|
@@ -2123,7 +2122,7 @@ type RefSubjectTupleFrom<Refs extends ReadonlyArray<RefSubject<any, any, any> |
|
|
|
2123
2122
|
* ```
|
|
2124
2123
|
*
|
|
2125
2124
|
* @since 1.0.0
|
|
2126
|
-
* @category
|
|
2125
|
+
* @category State composition
|
|
2127
2126
|
*/
|
|
2128
2127
|
export declare function struct<const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>>(refs: Refs): StructFrom<Refs>;
|
|
2129
2128
|
/**
|
|
@@ -2166,7 +2165,7 @@ export declare function struct<const Refs extends Readonly<Record<string, RefSub
|
|
|
2166
2165
|
* ```
|
|
2167
2166
|
*
|
|
2168
2167
|
* @since 1.0.0
|
|
2169
|
-
* @category
|
|
2168
|
+
* @category State composition
|
|
2170
2169
|
*/
|
|
2171
2170
|
export declare function tuple<const Refs extends ReadonlyArray<Ref>>(refs: Refs): TupleFrom<Refs>;
|
|
2172
2171
|
/**
|
|
@@ -2185,7 +2184,7 @@ export declare function tuple<const Refs extends ReadonlyArray<Ref>>(refs: Refs)
|
|
|
2185
2184
|
* failures remain `E`, and the observing Scope owns the delegated subscription.
|
|
2186
2185
|
*
|
|
2187
2186
|
* @since 1.18.0
|
|
2188
|
-
* @category
|
|
2187
|
+
* @category Services
|
|
2189
2188
|
*/
|
|
2190
2189
|
export declare function computedFromService<R, A, E, R2>(effect: Effect.Effect<Computed<A, E, R2>, never, R>): Computed<A, E, R | R2>;
|
|
2191
2190
|
/**
|
|
@@ -2203,7 +2202,7 @@ export declare function computedFromService<R, A, E, R2>(effect: Effect.Effect<C
|
|
|
2203
2202
|
* while absent; the observing Scope owns and finalizes its Fx subscription.
|
|
2204
2203
|
*
|
|
2205
2204
|
* @since 1.18.0
|
|
2206
|
-
* @category
|
|
2205
|
+
* @category Services
|
|
2207
2206
|
*/
|
|
2208
2207
|
export declare function filteredFromService<R, A, E, R2>(effect: Effect.Effect<Filtered<A, E, R2>, never, R>): Filtered<A, E, R | R2>;
|
|
2209
2208
|
export * from "./Hydration.js";
|