@typed/fx 2.0.0-beta.6 → 2.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- 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 +5 -4
package/dist/Push/Push.js
CHANGED
|
@@ -49,7 +49,7 @@ import * as Sink from "../Sink.js";
|
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
51
|
* @since 1.0.0
|
|
52
|
-
* @category
|
|
52
|
+
* @category Push construction
|
|
53
53
|
*/
|
|
54
54
|
export const make = dual(2, (sink, fx) => new PushImpl(sink, fx));
|
|
55
55
|
const VARIANCE = {
|
|
@@ -124,7 +124,7 @@ class PushImpl {
|
|
|
124
124
|
* ```
|
|
125
125
|
*
|
|
126
126
|
* @since 1.0.0
|
|
127
|
-
* @category
|
|
127
|
+
* @category Transforming inputs
|
|
128
128
|
*/
|
|
129
129
|
export const mapInput = dual(2, function mapInput(push, f) {
|
|
130
130
|
return make(Sink.map(push, f), push);
|
|
@@ -171,7 +171,7 @@ export const mapInput = dual(2, function mapInput(push, f) {
|
|
|
171
171
|
* ```
|
|
172
172
|
*
|
|
173
173
|
* @since 1.0.0
|
|
174
|
-
* @category
|
|
174
|
+
* @category Transforming inputs
|
|
175
175
|
*/
|
|
176
176
|
export const mapInputEffect = dual(2, function mapInputEffect(push, f) {
|
|
177
177
|
return make(Sink.mapEffect(push, f), push);
|
|
@@ -213,7 +213,7 @@ export const mapInputEffect = dual(2, function mapInputEffect(push, f) {
|
|
|
213
213
|
* ```
|
|
214
214
|
*
|
|
215
215
|
* @since 1.0.0
|
|
216
|
-
* @category
|
|
216
|
+
* @category Selecting inputs
|
|
217
217
|
*/
|
|
218
218
|
export const filterInput = dual(2, function filterInput(push, f) {
|
|
219
219
|
return make(Sink.filter(push, f), push);
|
|
@@ -255,7 +255,7 @@ export const filterInput = dual(2, function filterInput(push, f) {
|
|
|
255
255
|
* ```
|
|
256
256
|
*
|
|
257
257
|
* @since 1.0.0
|
|
258
|
-
* @category
|
|
258
|
+
* @category Selecting inputs
|
|
259
259
|
*/
|
|
260
260
|
export const filterInputEffect = dual(2, function filterInputEffect(push, f) {
|
|
261
261
|
return make(Sink.filterEffect(push, f), push);
|
|
@@ -300,7 +300,7 @@ export const filterInputEffect = dual(2, function filterInputEffect(push, f) {
|
|
|
300
300
|
* ```
|
|
301
301
|
*
|
|
302
302
|
* @since 1.0.0
|
|
303
|
-
* @category
|
|
303
|
+
* @category Selecting inputs
|
|
304
304
|
*/
|
|
305
305
|
export const filterMapInput = dual(2, function filterMapInput(push, f) {
|
|
306
306
|
return make(Sink.filterMap(push, f), push);
|
|
@@ -342,7 +342,7 @@ export const filterMapInput = dual(2, function filterMapInput(push, f) {
|
|
|
342
342
|
* ```
|
|
343
343
|
*
|
|
344
344
|
* @since 1.0.0
|
|
345
|
-
* @category
|
|
345
|
+
* @category Selecting inputs
|
|
346
346
|
*/
|
|
347
347
|
export const filterMapInputEffect = dual(2, function filterMapInputEffect(push, f) {
|
|
348
348
|
return make(Sink.filterMapEffect(push, f), push);
|
|
@@ -393,7 +393,7 @@ export const filterMapInputEffect = dual(2, function filterMapInputEffect(push,
|
|
|
393
393
|
* ```
|
|
394
394
|
*
|
|
395
395
|
* @since 1.0.0
|
|
396
|
-
* @category
|
|
396
|
+
* @category Transforming outputs
|
|
397
397
|
*/
|
|
398
398
|
export const map = dual(2, function map(push, f) {
|
|
399
399
|
return make(push, Fx.map(push, f));
|
|
@@ -429,7 +429,7 @@ export const map = dual(2, function map(push, f) {
|
|
|
429
429
|
* ```
|
|
430
430
|
*
|
|
431
431
|
* @since 1.0.0
|
|
432
|
-
* @category
|
|
432
|
+
* @category Transforming outputs
|
|
433
433
|
*/
|
|
434
434
|
export const mapEffect = dual(2, function mapEffect(push, f) {
|
|
435
435
|
return make(push, Fx.mapEffect(push, f));
|
|
@@ -467,7 +467,7 @@ export const mapEffect = dual(2, function mapEffect(push, f) {
|
|
|
467
467
|
* ```
|
|
468
468
|
*
|
|
469
469
|
* @since 1.0.0
|
|
470
|
-
* @category
|
|
470
|
+
* @category Output failures
|
|
471
471
|
*/
|
|
472
472
|
export const mapError = dual(2, function mapError(push, f) {
|
|
473
473
|
return make(push, Fx.mapError(push, f));
|
|
@@ -505,7 +505,7 @@ export const mapError = dual(2, function mapError(push, f) {
|
|
|
505
505
|
* ```
|
|
506
506
|
*
|
|
507
507
|
* @since 1.0.0
|
|
508
|
-
* @category
|
|
508
|
+
* @category Transforming outputs
|
|
509
509
|
*/
|
|
510
510
|
export const mapBoth = dual(2, function mapBoth(push, options) {
|
|
511
511
|
return make(push, Fx.mapBoth(push, options));
|
|
@@ -542,7 +542,7 @@ export const mapBoth = dual(2, function mapBoth(push, options) {
|
|
|
542
542
|
* ```
|
|
543
543
|
*
|
|
544
544
|
* @since 1.0.0
|
|
545
|
-
* @category
|
|
545
|
+
* @category Selecting outputs
|
|
546
546
|
*/
|
|
547
547
|
export const filter = dual(2, function filter(push, f) {
|
|
548
548
|
return make(push, Fx.filter(push, f));
|
|
@@ -579,7 +579,7 @@ export const filter = dual(2, function filter(push, f) {
|
|
|
579
579
|
* ```
|
|
580
580
|
*
|
|
581
581
|
* @since 1.0.0
|
|
582
|
-
* @category
|
|
582
|
+
* @category Selecting outputs
|
|
583
583
|
*/
|
|
584
584
|
export const filterEffect = dual(2, function filterEffect(push, f) {
|
|
585
585
|
return make(push, Fx.filterEffect(push, f));
|
|
@@ -615,7 +615,7 @@ export const filterEffect = dual(2, function filterEffect(push, f) {
|
|
|
615
615
|
* ```
|
|
616
616
|
*
|
|
617
617
|
* @since 1.0.0
|
|
618
|
-
* @category
|
|
618
|
+
* @category Selecting outputs
|
|
619
619
|
*/
|
|
620
620
|
export const filterMap = dual(2, function filterMap(push, f) {
|
|
621
621
|
return make(push, Fx.filterMap(push, f));
|
|
@@ -651,7 +651,7 @@ export const filterMap = dual(2, function filterMap(push, f) {
|
|
|
651
651
|
* ```
|
|
652
652
|
*
|
|
653
653
|
* @since 1.0.0
|
|
654
|
-
* @category
|
|
654
|
+
* @category Selecting outputs
|
|
655
655
|
*/
|
|
656
656
|
export const filterMapEffect = dual(2, function filterMapEffect(push, f) {
|
|
657
657
|
return make(push, Fx.filterMapEffect(push, f));
|
|
@@ -709,7 +709,7 @@ export const filterMapEffect = dual(2, function filterMapEffect(push, f) {
|
|
|
709
709
|
* ```
|
|
710
710
|
*
|
|
711
711
|
* @since 1.0.0
|
|
712
|
-
* @category
|
|
712
|
+
* @category Concurrent output work
|
|
713
713
|
*/
|
|
714
714
|
export const switchMap = dual(2, function switchMap(push, f) {
|
|
715
715
|
return make(push, Fx.switchMap(push, f));
|
|
@@ -762,7 +762,7 @@ export const switchMap = dual(2, function switchMap(push, f) {
|
|
|
762
762
|
* ```
|
|
763
763
|
*
|
|
764
764
|
* @since 1.0.0
|
|
765
|
-
* @category
|
|
765
|
+
* @category Concurrent output work
|
|
766
766
|
*/
|
|
767
767
|
export const switchMapEffect = dual(2, function switchMapEffect(push, f) {
|
|
768
768
|
return make(push, Fx.switchMapEffect(push, f));
|
|
@@ -817,7 +817,7 @@ export const switchMapEffect = dual(2, function switchMapEffect(push, f) {
|
|
|
817
817
|
* ```
|
|
818
818
|
*
|
|
819
819
|
* @since 1.0.0
|
|
820
|
-
* @category
|
|
820
|
+
* @category Concurrent output work
|
|
821
821
|
*/
|
|
822
822
|
export const flatMap = dual(2, function flatMap(push, f) {
|
|
823
823
|
return make(push, Fx.flatMap(push, f));
|
|
@@ -867,7 +867,7 @@ export const flatMap = dual(2, function flatMap(push, f) {
|
|
|
867
867
|
* ```
|
|
868
868
|
*
|
|
869
869
|
* @since 1.0.0
|
|
870
|
-
* @category
|
|
870
|
+
* @category Concurrent output work
|
|
871
871
|
*/
|
|
872
872
|
export const flatMapEffect = dual(2, function flatMapEffect(push, f) {
|
|
873
873
|
return make(push, Fx.flatMapEffect(push, f));
|
|
@@ -926,7 +926,7 @@ export const flatMapEffect = dual(2, function flatMapEffect(push, f) {
|
|
|
926
926
|
* ```
|
|
927
927
|
*
|
|
928
928
|
* @since 1.0.0
|
|
929
|
-
* @category
|
|
929
|
+
* @category Concurrent output work
|
|
930
930
|
*/
|
|
931
931
|
export const exhaustMap = dual(2, function exhaustMap(push, f) {
|
|
932
932
|
return make(push, Fx.exhaustMap(push, f));
|
|
@@ -978,7 +978,7 @@ export const exhaustMap = dual(2, function exhaustMap(push, f) {
|
|
|
978
978
|
* ```
|
|
979
979
|
*
|
|
980
980
|
* @since 1.0.0
|
|
981
|
-
* @category
|
|
981
|
+
* @category Concurrent output work
|
|
982
982
|
*/
|
|
983
983
|
export const exhaustMapEffect = dual(2, function exhaustMapEffect(push, f) {
|
|
984
984
|
return make(push, Fx.exhaustMapEffect(push, f));
|
|
@@ -1038,7 +1038,7 @@ export const exhaustMapEffect = dual(2, function exhaustMapEffect(push, f) {
|
|
|
1038
1038
|
* ```
|
|
1039
1039
|
*
|
|
1040
1040
|
* @since 1.0.0
|
|
1041
|
-
* @category
|
|
1041
|
+
* @category Concurrent output work
|
|
1042
1042
|
*/
|
|
1043
1043
|
export const exhaustLatestMap = dual(2, function exhaustLatestMap(push, f) {
|
|
1044
1044
|
return make(push, Fx.exhaustLatestMap(push, f));
|
|
@@ -1091,7 +1091,7 @@ export const exhaustLatestMap = dual(2, function exhaustLatestMap(push, f) {
|
|
|
1091
1091
|
* ```
|
|
1092
1092
|
*
|
|
1093
1093
|
* @since 1.0.0
|
|
1094
|
-
* @category
|
|
1094
|
+
* @category Concurrent output work
|
|
1095
1095
|
*/
|
|
1096
1096
|
export const exhaustLatestMapEffect = dual(2, function exhaustLatestMapEffect(push, f) {
|
|
1097
1097
|
return make(push, Fx.exhaustLatestMapEffect(push, f));
|
|
@@ -1129,7 +1129,7 @@ export const exhaustLatestMapEffect = dual(2, function exhaustLatestMapEffect(pu
|
|
|
1129
1129
|
* @param f - Reducer `(state, value) => [nextState, emitted]`.
|
|
1130
1130
|
* @returns A `Push` whose Fx side emits the accumulated/mapped values.
|
|
1131
1131
|
* @since 1.0.0
|
|
1132
|
-
* @category
|
|
1132
|
+
* @category Stateful outputs
|
|
1133
1133
|
*/
|
|
1134
1134
|
export const mapAccum = dual(3, function mapAccum(push, initial, f) {
|
|
1135
1135
|
return make(push, Fx.make((sink) => push.run(Sink.loop(sink, initial, (s, b) => {
|
|
@@ -1206,7 +1206,7 @@ export const mapAccum = dual(3, function mapAccum(push, initial, f) {
|
|
|
1206
1206
|
* @param f - Effectful reducer `(state, value) => Effect<[nextState, emitted]>`.
|
|
1207
1207
|
* @returns A `Push` whose Fx side emits the accumulated/mapped values.
|
|
1208
1208
|
* @since 1.0.0
|
|
1209
|
-
* @category
|
|
1209
|
+
* @category Stateful outputs
|
|
1210
1210
|
*/
|
|
1211
1211
|
export const mapAccumEffect = dual(3, function mapAccumEffect(push, initial, f) {
|
|
1212
1212
|
return make(push, Fx.make((sink) => push.run(Sink.filterMapLoopEffect(sink, initial, (s, b) => f(s, b).pipe(Effect.map(([sNext, c]) => [Option.some(c), sNext]), Effect.catchCause((cause) => sink.onFailure(cause).pipe(Effect.as([Option.none(), s]))))))));
|
|
@@ -1248,7 +1248,7 @@ export const mapAccumEffect = dual(3, function mapAccumEffect(push, initial, f)
|
|
|
1248
1248
|
* ```
|
|
1249
1249
|
*
|
|
1250
1250
|
* @since 1.0.0
|
|
1251
|
-
* @category services
|
|
1251
|
+
* @category Push services
|
|
1252
1252
|
*/
|
|
1253
1253
|
export function Service() {
|
|
1254
1254
|
return (id) => {
|
|
@@ -19,7 +19,7 @@ import { type RefSubject, type RefSubjectOptions } from "./RefSubject.js";
|
|
|
19
19
|
* services and Scope requirements.
|
|
20
20
|
*
|
|
21
21
|
* @since 2.0.0
|
|
22
|
-
* @category
|
|
22
|
+
* @category Hydration protocol
|
|
23
23
|
*/
|
|
24
24
|
export declare const HydrationRefTypeId: unique symbol;
|
|
25
25
|
/**
|
|
@@ -37,7 +37,7 @@ export declare const HydrationRefTypeId: unique symbol;
|
|
|
37
37
|
* services, interruption, and Scope requirements expressed by its members.
|
|
38
38
|
*
|
|
39
39
|
* @since 2.0.0
|
|
40
|
-
* @category
|
|
40
|
+
* @category Hydration types
|
|
41
41
|
*/
|
|
42
42
|
export type HydrationRefTypeId = typeof HydrationRefTypeId;
|
|
43
43
|
/**
|
|
@@ -55,7 +55,7 @@ export type HydrationRefTypeId = typeof HydrationRefTypeId;
|
|
|
55
55
|
* services and Scope requirements.
|
|
56
56
|
*
|
|
57
57
|
* @since 2.0.0
|
|
58
|
-
* @category
|
|
58
|
+
* @category Hydration protocol
|
|
59
59
|
*/
|
|
60
60
|
export declare const HYDRATION_ATTRIBUTE = "data-typed-refsubject";
|
|
61
61
|
/**
|
|
@@ -73,7 +73,7 @@ export declare const HYDRATION_ATTRIBUTE = "data-typed-refsubject";
|
|
|
73
73
|
* services, interruption, and Scope requirements expressed by its members.
|
|
74
74
|
*
|
|
75
75
|
* @since 2.0.0
|
|
76
|
-
* @category
|
|
76
|
+
* @category Hydration protocol
|
|
77
77
|
*/
|
|
78
78
|
export interface HydrationAttribute {
|
|
79
79
|
/**
|
|
@@ -90,7 +90,7 @@ export interface HydrationAttribute {
|
|
|
90
90
|
* services and Scope requirements.
|
|
91
91
|
*
|
|
92
92
|
* @since 2.0.0
|
|
93
|
-
* @category
|
|
93
|
+
* @category Hydration protocol
|
|
94
94
|
*/
|
|
95
95
|
readonly name: string;
|
|
96
96
|
/**
|
|
@@ -108,7 +108,7 @@ export interface HydrationAttribute {
|
|
|
108
108
|
* services and Scope requirements.
|
|
109
109
|
*
|
|
110
110
|
* @since 2.0.0
|
|
111
|
-
* @category
|
|
111
|
+
* @category Hydration protocol
|
|
112
112
|
*/
|
|
113
113
|
readonly value: string;
|
|
114
114
|
}
|
|
@@ -127,7 +127,7 @@ export interface HydrationAttribute {
|
|
|
127
127
|
* services, interruption, and Scope requirements expressed by its members.
|
|
128
128
|
*
|
|
129
129
|
* @since 2.0.0
|
|
130
|
-
* @category
|
|
130
|
+
* @category Hydration protocol
|
|
131
131
|
*/
|
|
132
132
|
export interface HydrationElement {
|
|
133
133
|
/**
|
|
@@ -144,7 +144,7 @@ export interface HydrationElement {
|
|
|
144
144
|
* services and Scope requirements.
|
|
145
145
|
*
|
|
146
146
|
* @since 2.0.0
|
|
147
|
-
* @category
|
|
147
|
+
* @category DOM attribute protocol
|
|
148
148
|
*/
|
|
149
149
|
getAttribute(name: string): string | null;
|
|
150
150
|
/**
|
|
@@ -161,7 +161,7 @@ export interface HydrationElement {
|
|
|
161
161
|
* services and Scope requirements.
|
|
162
162
|
*
|
|
163
163
|
* @since 2.0.0
|
|
164
|
-
* @category
|
|
164
|
+
* @category DOM attribute protocol
|
|
165
165
|
*/
|
|
166
166
|
setAttribute(name: string, value: string): void;
|
|
167
167
|
/**
|
|
@@ -178,7 +178,7 @@ export interface HydrationElement {
|
|
|
178
178
|
* services and Scope requirements.
|
|
179
179
|
*
|
|
180
180
|
* @since 2.0.0
|
|
181
|
-
* @category
|
|
181
|
+
* @category DOM attribute protocol
|
|
182
182
|
*/
|
|
183
183
|
removeAttribute(name: string): void;
|
|
184
184
|
}
|
|
@@ -204,7 +204,7 @@ interface HydrationMember {
|
|
|
204
204
|
* services, interruption, and Scope requirements expressed by its members.
|
|
205
205
|
*
|
|
206
206
|
* @since 2.0.0
|
|
207
|
-
* @category
|
|
207
|
+
* @category Hydration protocol
|
|
208
208
|
*/
|
|
209
209
|
export interface HydrationRef<E = never, R = never> {
|
|
210
210
|
/**
|
|
@@ -223,7 +223,7 @@ export interface HydrationRef<E = never, R = never> {
|
|
|
223
223
|
* member metadata rather than becoming DOM exceptions.
|
|
224
224
|
*
|
|
225
225
|
* @since 2.0.0
|
|
226
|
-
* @category
|
|
226
|
+
* @category Hydration types
|
|
227
227
|
*/
|
|
228
228
|
(element: HydrationElement): Effect.Effect<void, never, R | Scope.Scope>;
|
|
229
229
|
/**
|
|
@@ -241,7 +241,7 @@ export interface HydrationRef<E = never, R = never> {
|
|
|
241
241
|
* finalized by the required Scope.
|
|
242
242
|
*
|
|
243
243
|
* @since 2.0.0
|
|
244
|
-
* @category
|
|
244
|
+
* @category Hydration protocol
|
|
245
245
|
*/
|
|
246
246
|
readonly [HydrationRefTypeId]: {
|
|
247
247
|
readonly members: ReadonlyArray<HydrationMember>;
|
|
@@ -264,7 +264,7 @@ export interface HydrationRef<E = never, R = never> {
|
|
|
264
264
|
* services, interruption, and Scope requirements expressed by its members.
|
|
265
265
|
*
|
|
266
266
|
* @since 2.0.0
|
|
267
|
-
* @category
|
|
267
|
+
* @category Hydration protocol
|
|
268
268
|
*/
|
|
269
269
|
export interface HydratedRefSubject<A, E = never, R = never, RH = R> extends RefSubject<A, E, R>, HydrationRef<E, RH> {
|
|
270
270
|
}
|
|
@@ -283,7 +283,7 @@ export interface HydratedRefSubject<A, E = never, R = never, RH = R> extends Ref
|
|
|
283
283
|
* finalized by the required Scope.
|
|
284
284
|
*
|
|
285
285
|
* @since 2.0.0
|
|
286
|
-
* @category
|
|
286
|
+
* @category Hydration protocol
|
|
287
287
|
*/
|
|
288
288
|
export declare namespace HydratedRefSubject {
|
|
289
289
|
/**
|
|
@@ -300,7 +300,7 @@ export declare namespace HydratedRefSubject {
|
|
|
300
300
|
* interruption, and Scope requirements expressed by its members.
|
|
301
301
|
*
|
|
302
302
|
* @since 2.0.0
|
|
303
|
-
* @category
|
|
303
|
+
* @category Hydration types
|
|
304
304
|
*/
|
|
305
305
|
type Any = HydratedRefSubject<any, any, any, any>;
|
|
306
306
|
/**
|
|
@@ -317,7 +317,7 @@ export declare namespace HydratedRefSubject {
|
|
|
317
317
|
* services, interruption, and Scope requirements expressed by its members.
|
|
318
318
|
*
|
|
319
319
|
* @since 2.0.0
|
|
320
|
-
* @category
|
|
320
|
+
* @category Hydration types
|
|
321
321
|
*/
|
|
322
322
|
type HydrationError<T> = T extends HydrationRef<infer E, any> ? E : never;
|
|
323
323
|
/**
|
|
@@ -334,7 +334,7 @@ export declare namespace HydratedRefSubject {
|
|
|
334
334
|
* errors, services, interruption, and Scope requirements expressed by its members.
|
|
335
335
|
*
|
|
336
336
|
* @since 2.0.0
|
|
337
|
-
* @category
|
|
337
|
+
* @category Hydration types
|
|
338
338
|
*/
|
|
339
339
|
type HydrationServices<T> = T extends HydrationRef<any, infer R> ? R : never;
|
|
340
340
|
}
|
|
@@ -353,7 +353,7 @@ export declare namespace HydratedRefSubject {
|
|
|
353
353
|
* services and Scope requirements.
|
|
354
354
|
*
|
|
355
355
|
* @since 2.0.0
|
|
356
|
-
* @category guards
|
|
356
|
+
* @category Type guards
|
|
357
357
|
*/
|
|
358
358
|
export declare function isHydrationRef(value: unknown): value is HydrationRef<any, any>;
|
|
359
359
|
/**
|
|
@@ -371,7 +371,7 @@ export declare function isHydrationRef(value: unknown): value is HydrationRef<an
|
|
|
371
371
|
* services, interruption, and Scope requirements expressed by its members.
|
|
372
372
|
*
|
|
373
373
|
* @since 2.0.0
|
|
374
|
-
* @category
|
|
374
|
+
* @category Hydration protocol
|
|
375
375
|
*/
|
|
376
376
|
export interface HydrateOptions<A> extends RefSubjectOptions<A> {
|
|
377
377
|
/**
|
|
@@ -388,7 +388,7 @@ export interface HydrateOptions<A> extends RefSubjectOptions<A> {
|
|
|
388
388
|
* services and Scope requirements.
|
|
389
389
|
*
|
|
390
390
|
* @since 2.0.0
|
|
391
|
-
* @category
|
|
391
|
+
* @category Hydration protocol
|
|
392
392
|
*/
|
|
393
393
|
readonly name?: string;
|
|
394
394
|
}
|
|
@@ -434,7 +434,7 @@ type HydrateEffect<S extends Schema.Top, E, R> = Effect.Effect<HydratedRefSubjec
|
|
|
434
434
|
* ```
|
|
435
435
|
*
|
|
436
436
|
* @since 2.0.0
|
|
437
|
-
* @category
|
|
437
|
+
* @category Hydration construction
|
|
438
438
|
*/
|
|
439
439
|
export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options: HydrateOptions<Schema.Schema.Type<S>> & {
|
|
440
440
|
readonly name: string;
|
|
@@ -454,7 +454,7 @@ export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E
|
|
|
454
454
|
* server/client coordination. Schema errors and codec services remain typed.
|
|
455
455
|
*
|
|
456
456
|
* @since 2.0.0
|
|
457
|
-
* @category
|
|
457
|
+
* @category Hydration construction
|
|
458
458
|
*/
|
|
459
459
|
export declare function hydrate<S extends Schema.Top, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options?: HydrateOptions<Schema.Schema.Type<S>> & {
|
|
460
460
|
readonly name?: undefined;
|
|
@@ -497,7 +497,7 @@ export declare function hydrate<S extends Schema.Top, E = never, R = never>(sche
|
|
|
497
497
|
* ```
|
|
498
498
|
*
|
|
499
499
|
* @since 2.0.0
|
|
500
|
-
* @category
|
|
500
|
+
* @category Hydration construction
|
|
501
501
|
*/
|
|
502
502
|
export declare function hydrateAll<const Refs extends readonly [HydratedRefSubject.Any, ...HydratedRefSubject.Any[]]>(...refs: Refs): HydrationRef<HydratedRefSubject.HydrationError<Refs[number]>, HydratedRefSubject.HydrationServices<Refs[number]>>;
|
|
503
503
|
export {};
|
|
@@ -25,7 +25,7 @@ import { CurrentComputedBehavior, make, } from "./RefSubject.js";
|
|
|
25
25
|
* services and Scope requirements.
|
|
26
26
|
*
|
|
27
27
|
* @since 2.0.0
|
|
28
|
-
* @category
|
|
28
|
+
* @category Hydration protocol
|
|
29
29
|
*/
|
|
30
30
|
export const HydrationRefTypeId = Symbol.for("@typed/fx/RefSubjectRef");
|
|
31
31
|
/**
|
|
@@ -43,7 +43,7 @@ export const HydrationRefTypeId = Symbol.for("@typed/fx/RefSubjectRef");
|
|
|
43
43
|
* services and Scope requirements.
|
|
44
44
|
*
|
|
45
45
|
* @since 2.0.0
|
|
46
|
-
* @category
|
|
46
|
+
* @category Hydration protocol
|
|
47
47
|
*/
|
|
48
48
|
export const HYDRATION_ATTRIBUTE = "data-typed-refsubject";
|
|
49
49
|
const allUnbounded = (effects) => Effect.all(effects, { concurrency: "unbounded" });
|
|
@@ -62,7 +62,7 @@ const allUnbounded = (effects) => Effect.all(effects, { concurrency: "unbounded"
|
|
|
62
62
|
* services and Scope requirements.
|
|
63
63
|
*
|
|
64
64
|
* @since 2.0.0
|
|
65
|
-
* @category guards
|
|
65
|
+
* @category Type guards
|
|
66
66
|
*/
|
|
67
67
|
export function isHydrationRef(value) {
|
|
68
68
|
return (typeof value === "function" &&
|
|
@@ -85,7 +85,7 @@ export function isHydrationRef(value) {
|
|
|
85
85
|
* server/client coordination. Schema errors and codec services remain typed.
|
|
86
86
|
*
|
|
87
87
|
* @since 2.0.0
|
|
88
|
-
* @category
|
|
88
|
+
* @category Hydration construction
|
|
89
89
|
*/
|
|
90
90
|
export function hydrate(schema, effect, options) {
|
|
91
91
|
const attributeName = options?.name === undefined ? undefined : toHydrationAttributeName(options.name);
|
|
@@ -205,7 +205,7 @@ function normalizeHydrationInitializer(value) {
|
|
|
205
205
|
* ```
|
|
206
206
|
*
|
|
207
207
|
* @since 2.0.0
|
|
208
|
-
* @category
|
|
208
|
+
* @category Hydration construction
|
|
209
209
|
*/
|
|
210
210
|
export function hydrateAll(...refs) {
|
|
211
211
|
return makeHydrationRef(refs.flatMap((ref) => ref[HydrationRefTypeId].members));
|