@fncts/io 0.0.24 → 0.0.26
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/FiberRef/api.d.ts +0 -63
- package/FiberRef/operations.d.ts +64 -0
- package/FiberRef.d.ts +1 -0
- package/FiberRefs/api.d.ts +6 -1
- package/FiberRefs.d.ts +0 -1
- package/IO/api/daemonChildren.d.ts +6 -0
- package/IO/api/disconnect.d.ts +17 -0
- package/IO/api/fork.d.ts +4 -0
- package/IO/api/forkDaemon.d.ts +10 -0
- package/IO/api/interrupt.d.ts +1 -20
- package/IO/api/race.d.ts +7 -1
- package/IO/api/raceWith.d.ts +17 -0
- package/IO/api/transplant.d.ts +13 -0
- package/IO/api/whenFiberRef.d.ts +10 -0
- package/IO/api/whenRef.d.ts +10 -0
- package/IO/api/zipConcurrent.d.ts +5 -4
- package/IO/api.d.ts +12 -1
- package/IO.d.ts +7 -1
- package/RefSubject/Atomic.d.ts +1 -1
- package/_cjs/Cached/api.cjs +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +17 -16
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +1 -3
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +16 -17
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +1 -1
- package/_cjs/FiberRef/api.cjs +0 -124
- package/_cjs/FiberRef/api.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +1 -1
- package/_cjs/FiberRef/operations.cjs +130 -0
- package/_cjs/FiberRef/operations.cjs.map +1 -0
- package/_cjs/FiberRef.cjs +11 -0
- package/_cjs/FiberRef.cjs.map +1 -1
- package/_cjs/FiberRefs/api.cjs +90 -0
- package/_cjs/FiberRefs/api.cjs.map +1 -1
- package/_cjs/FiberRefs.cjs +0 -11
- package/_cjs/FiberRefs.cjs.map +1 -1
- package/_cjs/Future/api.cjs +1 -3
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/IO/api/asyncIO.cjs +1 -3
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -3
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/clockWith.cjs +1 -1
- package/_cjs/IO/api/concurrency.cjs +1 -1
- package/_cjs/IO/api/consoleWith.cjs +1 -1
- package/_cjs/IO/api/daemonChildren.cjs +19 -0
- package/_cjs/IO/api/daemonChildren.cjs.map +1 -0
- package/_cjs/IO/api/disconnect.cjs +31 -0
- package/_cjs/IO/api/disconnect.cjs.map +1 -0
- package/_cjs/IO/api/environment.cjs +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +19 -20
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/fork.cjs +8 -3
- package/_cjs/IO/api/fork.cjs.map +1 -1
- package/_cjs/IO/api/forkDaemon.cjs +21 -0
- package/_cjs/IO/api/forkDaemon.cjs.map +1 -0
- package/_cjs/IO/api/forkIn.cjs +2 -4
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +2 -4
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -3
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +8 -59
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +24 -12
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/{core-scope.cjs → raceWith.cjs} +15 -56
- package/_cjs/IO/api/raceWith.cjs.map +1 -0
- package/_cjs/IO/api/randomWith.cjs +1 -1
- package/_cjs/IO/api/supervised.cjs +1 -1
- package/_cjs/IO/api/transplant.cjs +31 -0
- package/_cjs/IO/api/transplant.cjs.map +1 -0
- package/_cjs/IO/api/whenFiberRef.cjs +20 -0
- package/_cjs/IO/api/whenFiberRef.cjs.map +1 -0
- package/_cjs/IO/api/whenRef.cjs +21 -0
- package/_cjs/IO/api/whenRef.cjs.map +1 -0
- package/_cjs/IO/api/zipConcurrent.cjs +25 -19
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +21 -5
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO.cjs +70 -4
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +1 -3
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +2 -2
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/Reloadable/constructors.cjs +1 -1
- package/_cjs/Reloadable/definition.cjs +1 -1
- package/_cjs/STM/api/atomically.cjs +2 -4
- package/_cjs/STM/api/atomically.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -6
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +1 -1
- package/_cjs/Stream/api.cjs +137 -135
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +2 -6
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +1 -3
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_mjs/Cached/api.mjs +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
- package/_mjs/Channel/api/mergeWith.mjs +17 -16
- package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +1 -3
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +16 -17
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/FiberRef/api/locallyScoped.mjs +1 -1
- package/_mjs/FiberRef/api/locallyScopedWith.mjs +1 -1
- package/_mjs/FiberRef/api.mjs +0 -107
- package/_mjs/FiberRef/api.mjs.map +1 -1
- package/_mjs/FiberRef/constructors.mjs +1 -1
- package/_mjs/FiberRef/operations.mjs +109 -0
- package/_mjs/FiberRef/operations.mjs.map +1 -0
- package/_mjs/FiberRef.mjs +1 -0
- package/_mjs/FiberRef.mjs.map +1 -1
- package/_mjs/FiberRefs/api.mjs +89 -0
- package/_mjs/FiberRefs/api.mjs.map +1 -1
- package/_mjs/FiberRefs.mjs +0 -1
- package/_mjs/FiberRefs.mjs.map +1 -1
- package/_mjs/Future/api.mjs +1 -3
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/IO/api/asyncIO.mjs +1 -3
- package/_mjs/IO/api/asyncIO.mjs.map +1 -1
- package/_mjs/IO/api/bracketExit.mjs +1 -3
- package/_mjs/IO/api/bracketExit.mjs.map +1 -1
- package/_mjs/IO/api/clockWith.mjs +1 -1
- package/_mjs/IO/api/concurrency.mjs +1 -1
- package/_mjs/IO/api/consoleWith.mjs +1 -1
- package/_mjs/IO/api/daemonChildren.mjs +11 -0
- package/_mjs/IO/api/daemonChildren.mjs.map +1 -0
- package/_mjs/IO/api/disconnect.mjs +23 -0
- package/_mjs/IO/api/disconnect.mjs.map +1 -0
- package/_mjs/IO/api/environment.mjs +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +19 -20
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/fork.mjs +6 -2
- package/_mjs/IO/api/fork.mjs.map +1 -1
- package/_mjs/IO/api/forkDaemon.mjs +13 -0
- package/_mjs/IO/api/forkDaemon.mjs.map +1 -0
- package/_mjs/IO/api/forkIn.mjs +2 -4
- package/_mjs/IO/api/forkIn.mjs.map +1 -1
- package/_mjs/IO/api/forkScoped.mjs +2 -4
- package/_mjs/IO/api/forkScoped.mjs.map +1 -1
- package/_mjs/IO/api/fulfill.mjs +1 -3
- package/_mjs/IO/api/fulfill.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +6 -55
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +22 -12
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/raceWith.mjs +59 -0
- package/_mjs/IO/api/raceWith.mjs.map +1 -0
- package/_mjs/IO/api/randomWith.mjs +1 -1
- package/_mjs/IO/api/supervised.mjs +1 -1
- package/_mjs/IO/api/transplant.mjs +23 -0
- package/_mjs/IO/api/transplant.mjs.map +1 -0
- package/_mjs/IO/api/whenFiberRef.mjs +12 -0
- package/_mjs/IO/api/whenFiberRef.mjs.map +1 -0
- package/_mjs/IO/api/whenRef.mjs +13 -0
- package/_mjs/IO/api/whenRef.mjs.map +1 -0
- package/_mjs/IO/api/zipConcurrent.mjs +23 -17
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +16 -3
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO.mjs +7 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +1 -3
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/RefSubject/Atomic.mjs +1 -1
- package/_mjs/RefSubject/Atomic.mjs.map +1 -1
- package/_mjs/Reloadable/constructors.mjs +1 -1
- package/_mjs/Reloadable/definition.mjs +1 -1
- package/_mjs/STM/api/atomically.mjs +2 -4
- package/_mjs/STM/api/atomically.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +2 -6
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/State/api.mjs +1 -1
- package/_mjs/Stream/api.mjs +137 -135
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/TReentrantLock/api.mjs +2 -6
- package/_mjs/TReentrantLock/api.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +1 -3
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_src/Channel/api.ts +1 -1
- package/_src/FiberRef/api.ts +0 -114
- package/_src/FiberRef/operations.ts +115 -0
- package/_src/FiberRef.ts +1 -0
- package/_src/FiberRefs/api.ts +72 -0
- package/_src/FiberRefs.ts +0 -1
- package/_src/Future/api.ts +1 -1
- package/_src/IO/api/asyncIO.ts +1 -1
- package/_src/IO/api/bracketExit.ts +1 -1
- package/_src/IO/api/daemonChildren.ts +6 -0
- package/_src/IO/api/disconnect.ts +25 -0
- package/_src/IO/api/foreachConcurrent.ts +1 -1
- package/_src/IO/api/fork.ts +3 -0
- package/_src/IO/api/forkDaemon.ts +12 -0
- package/_src/IO/api/forkIn.ts +1 -1
- package/_src/IO/api/forkScoped.ts +1 -3
- package/_src/IO/api/fulfill.ts +1 -1
- package/_src/IO/api/interrupt.ts +5 -56
- package/_src/IO/api/race.ts +18 -8
- package/_src/IO/api/{core-scope.ts → raceWith.ts} +2 -44
- package/_src/IO/api/transplant.ts +19 -0
- package/_src/IO/api/whenFiberRef.ts +9 -0
- package/_src/IO/api/whenRef.ts +9 -0
- package/_src/IO/api/zipConcurrent.ts +41 -43
- package/_src/IO/api.ts +18 -2
- package/_src/IO.ts +7 -1
- package/_src/Layer/MemoMap.ts +1 -1
- package/_src/RefSubject/Atomic.ts +1 -1
- package/_src/STM/api/atomically.ts +1 -1
- package/_src/ScopedRef/api.ts +2 -2
- package/_src/TReentrantLock/api.ts +2 -2
- package/_src/TSemaphore/api.ts +1 -1
- package/package.json +2 -2
- package/FiberRefs/join.d.ts +0 -9
- package/IO/api/core-scope.d.ts +0 -43
- package/_cjs/FiberRefs/join.cjs +0 -104
- package/_cjs/FiberRefs/join.cjs.map +0 -1
- package/_cjs/IO/api/core-scope.cjs.map +0 -1
- package/_mjs/FiberRefs/join.mjs +0 -96
- package/_mjs/FiberRefs/join.mjs.map +0 -1
- package/_mjs/IO/api/core-scope.mjs +0 -97
- package/_mjs/IO/api/core-scope.mjs.map +0 -1
- package/_src/FiberRefs/join.ts +0 -71
package/FiberRef/api.d.ts
CHANGED
|
@@ -1,67 +1,4 @@
|
|
|
1
1
|
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
|
2
|
-
import { UIO, IO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
4
|
-
/**
|
|
5
|
-
* @tsplus pipeable fncts.io.FiberRef modify
|
|
6
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
7
|
-
*/
|
|
8
|
-
export declare function modify<A, B>(f: (a: A) => readonly [B, A], __tsplusTrace?: string): (self: FiberRef<A>) => import("../IO").UIO<B>;
|
|
9
|
-
/**
|
|
10
|
-
* @tsplus pipeable fncts.io.FiberRef update
|
|
11
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
12
|
-
*/
|
|
13
|
-
export declare function update<A>(f: (a: A) => A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<void>;
|
|
14
|
-
/**
|
|
15
|
-
* @tsplus pipeable fncts.io.FiberRef set
|
|
16
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
17
|
-
*/
|
|
18
|
-
export declare function set<A>(a: A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<void>;
|
|
19
|
-
/**
|
|
20
|
-
* @tsplus getter fncts.io.FiberRef get
|
|
21
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
22
|
-
*/
|
|
23
|
-
export declare function get<A>(fiberRef: FiberRef<A>, __tsplusTrace?: string): UIO<A>;
|
|
24
|
-
/**
|
|
25
|
-
* @tsplus pipeable fncts.io.FiberRef getAndSet
|
|
26
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
27
|
-
*/
|
|
28
|
-
export declare function getAndSet<A>(a: A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
29
|
-
/**
|
|
30
|
-
* @tsplus pipeable fncts.io.FiberRef getAndUpdate
|
|
31
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
32
|
-
*/
|
|
33
|
-
export declare function getAndUpdate<A>(f: (a: A) => A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
34
|
-
/**
|
|
35
|
-
* @tsplus pipeable fncts.io.FiberRef getAndUpdateJust
|
|
36
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
37
|
-
*/
|
|
38
|
-
export declare function getAndUpdateJust<A>(f: (a: A) => Maybe<A>, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
39
|
-
/**
|
|
40
|
-
* Returns an `IO` that runs with `value` bound to the current fiber.
|
|
41
|
-
*
|
|
42
|
-
* Guarantees that fiber data is properly restored via `bracket`.
|
|
43
|
-
* @tsplus fluent fncts.io.FiberRef locally
|
|
44
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
45
|
-
*/
|
|
46
|
-
export declare function locally<A>(fiberRef: FiberRef<A>, value: A, __tsplusTrace?: string): <R1, E1, B>(use: import("../IO").IO<R1, E1, B>) => import("../IO").IO<R1, E1, B>;
|
|
47
|
-
/**
|
|
48
|
-
* Returns an `IO` that runs with `f` applied to the current fiber.
|
|
49
|
-
*
|
|
50
|
-
* Guarantees that fiber data is properly restored via `bracket`.
|
|
51
|
-
* @tsplus fluent fncts.io.FiberRef locallyWith
|
|
52
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
53
|
-
*/
|
|
54
|
-
export declare function locallyWith<A>(self: FiberRef<A>, f: (a: A) => A, __tsplusTrace?: string): <R1, E1, B>(use: import("../IO").IO<R1, E1, B>) => import("../IO").IO<R1, E1, B>;
|
|
55
|
-
/**
|
|
56
|
-
* @tsplus pipeable fncts.io.FiberRef getWith
|
|
57
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
58
|
-
*/
|
|
59
|
-
export declare function getWith<A, R, E, B>(f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => IO<R, E, B>;
|
|
60
|
-
/**
|
|
61
|
-
* @tsplus getter fncts.io.FiberRef remove
|
|
62
|
-
* @tsplus location "@fncts/io/FiberRef/api"
|
|
63
|
-
*/
|
|
64
|
-
export declare function remove<A>(self: FiberRef<A>, __tsplusTrace?: string): UIO<void>;
|
|
65
2
|
/**
|
|
66
3
|
* @tsplus getter fncts.io.FiberRef diff
|
|
67
4
|
* @tsplus location "@fncts/io/FiberRef/api"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
|
2
|
+
import { UIO, IO } from "@fncts/io/IO/definition";
|
|
3
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
4
|
+
/**
|
|
5
|
+
* @tsplus pipeable fncts.io.FiberRef modify
|
|
6
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
7
|
+
*/
|
|
8
|
+
export declare function modify<A, B>(f: (a: A) => readonly [B, A], __tsplusTrace?: string): (self: FiberRef<A>) => import("../IO").UIO<B>;
|
|
9
|
+
/**
|
|
10
|
+
* @tsplus pipeable fncts.io.FiberRef update
|
|
11
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
12
|
+
*/
|
|
13
|
+
export declare function update<A>(f: (a: A) => A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<void>;
|
|
14
|
+
/**
|
|
15
|
+
* @tsplus pipeable fncts.io.FiberRef set
|
|
16
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
17
|
+
*/
|
|
18
|
+
export declare function set<A>(a: A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<void>;
|
|
19
|
+
/**
|
|
20
|
+
* @tsplus getter fncts.io.FiberRef get
|
|
21
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
22
|
+
*/
|
|
23
|
+
export declare function get<A>(fiberRef: FiberRef<A>, __tsplusTrace?: string): UIO<A>;
|
|
24
|
+
/**
|
|
25
|
+
* @tsplus pipeable fncts.io.FiberRef getAndSet
|
|
26
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
27
|
+
*/
|
|
28
|
+
export declare function getAndSet<A>(a: A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
29
|
+
/**
|
|
30
|
+
* @tsplus pipeable fncts.io.FiberRef getAndUpdate
|
|
31
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
32
|
+
*/
|
|
33
|
+
export declare function getAndUpdate<A>(f: (a: A) => A, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
34
|
+
/**
|
|
35
|
+
* @tsplus pipeable fncts.io.FiberRef getAndUpdateJust
|
|
36
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
37
|
+
*/
|
|
38
|
+
export declare function getAndUpdateJust<A>(f: (a: A) => Maybe<A>, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => import("../IO").UIO<A>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns an `IO` that runs with `value` bound to the current fiber.
|
|
41
|
+
*
|
|
42
|
+
* Guarantees that fiber data is properly restored via `bracket`.
|
|
43
|
+
* @tsplus fluent fncts.io.FiberRef locally
|
|
44
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
45
|
+
*/
|
|
46
|
+
export declare function locally<A>(fiberRef: FiberRef<A>, value: A, __tsplusTrace?: string): <R1, E1, B>(use: import("../IO").IO<R1, E1, B>) => import("../IO").IO<R1, E1, B>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns an `IO` that runs with `f` applied to the current fiber.
|
|
49
|
+
*
|
|
50
|
+
* Guarantees that fiber data is properly restored via `bracket`.
|
|
51
|
+
* @tsplus fluent fncts.io.FiberRef locallyWith
|
|
52
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
53
|
+
*/
|
|
54
|
+
export declare function locallyWith<A>(self: FiberRef<A>, f: (a: A) => A, __tsplusTrace?: string): <R1, E1, B>(use: import("../IO").IO<R1, E1, B>) => import("../IO").IO<R1, E1, B>;
|
|
55
|
+
/**
|
|
56
|
+
* @tsplus pipeable fncts.io.FiberRef getWith
|
|
57
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
58
|
+
*/
|
|
59
|
+
export declare function getWith<A, R, E, B>(f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): (fiberRef: FiberRef<A>) => IO<R, E, B>;
|
|
60
|
+
/**
|
|
61
|
+
* @tsplus getter fncts.io.FiberRef remove
|
|
62
|
+
* @tsplus location "@fncts/io/FiberRef/operations"
|
|
63
|
+
*/
|
|
64
|
+
export declare function remove<A>(self: FiberRef<A>, __tsplusTrace?: string): UIO<void>;
|
package/FiberRef.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./FiberRef/api.js";
|
|
2
2
|
export * from "./FiberRef/constructors.js";
|
|
3
3
|
export * from "./FiberRef/definition.js";
|
|
4
|
+
export * from "./FiberRef/operations.js";
|
|
4
5
|
export * from "./FiberRef/unsafe.js";
|
|
5
6
|
export * from "./FiberRef/api/locallyScoped.js";
|
|
6
7
|
export * from "./FiberRef/api/locallyScopedWith.js";
|
package/FiberRefs/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
|
2
2
|
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
|
3
3
|
import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
|
|
4
|
-
import { Cons } from "@fncts/base/collection/immutable/List/definition";
|
|
4
|
+
import { Cons, List } from "@fncts/base/collection/immutable/List/definition";
|
|
5
5
|
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
6
6
|
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
7
7
|
import { FiberRefs } from "@fncts/io/FiberRefs/definition";
|
|
@@ -47,3 +47,8 @@ export declare function remove(self: FiberRefs, fiberRef: FiberRef<any>): FiberR
|
|
|
47
47
|
* @tsplus location "@fncts/io/FiberRefs/api"
|
|
48
48
|
*/
|
|
49
49
|
export declare function unFiberRefs(self: FiberRefs): HashMap<FiberRef<any>, Cons<readonly [FiberId.Runtime, unknown]>>;
|
|
50
|
+
/**
|
|
51
|
+
* @tsplus pipeable fncts.io.FiberRefs join
|
|
52
|
+
* @tsplus location "@fncts/io/FiberRefs/api"
|
|
53
|
+
*/
|
|
54
|
+
export declare function join(fiberId: FiberId.Runtime, that: FiberRefs): (self: FiberRefs) => FiberRefs;
|
package/FiberRefs.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
+
/**
|
|
3
|
+
* Returns an IO whose interruption will be disconnected from the
|
|
4
|
+
* fiber's own interruption, being performed in the background without
|
|
5
|
+
* slowing down the fiber's interruption.
|
|
6
|
+
*
|
|
7
|
+
* This method is useful to create "fast interrupting" effects. For
|
|
8
|
+
* example, if you call this on a bracketed effect, then even if the
|
|
9
|
+
* effect is "stuck" in acquire or release, its interruption will return
|
|
10
|
+
* immediately, while the acquire / release are performed in the
|
|
11
|
+
* background.
|
|
12
|
+
*
|
|
13
|
+
* See timeout and race for other applications.
|
|
14
|
+
* @tsplus getter fncts.io.IO disconnect
|
|
15
|
+
* @tsplus location "@fncts/io/IO/api/disconnect"
|
|
16
|
+
*/
|
|
17
|
+
export declare function disconnect<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
package/IO/api/fork.d.ts
CHANGED
|
@@ -33,4 +33,8 @@ export declare function fork<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string):
|
|
|
33
33
|
*/
|
|
34
34
|
export declare function forkWithScopeOverride(scopeOverride: FiberScope | null, __tsplusTrace?: string): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").URIO<R, FiberRuntime<E, A>>;
|
|
35
35
|
export declare function unsafeFork<R, E, A, E1, B>(effect: IO<R, E, A>, parentFiber: FiberRuntime<E1, B>, parentRuntimeFlags: RuntimeFlags, overrideScope: FiberScope | null, trace?: string): FiberRuntime<E, A>;
|
|
36
|
+
/**
|
|
37
|
+
* @tsplus static fncts.io.IOOps unsafeMakeChildFiber
|
|
38
|
+
* @tsplus location "@fncts/io/IO/api/fork"
|
|
39
|
+
*/
|
|
36
40
|
export declare function unsafeMakeChildFiber<R, E, A, E1, B>(effect: IO<R, E, A>, parentFiber: FiberRuntime<E1, B>, parentRuntimeFlags: RuntimeFlags, overrideScope: FiberScope | null, trace?: string): FiberRuntime<E, A>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IO, URIO } from "@fncts/io/IO/definition";
|
|
2
|
+
import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
|
|
3
|
+
/**
|
|
4
|
+
* Forks the effect into a new fiber attached to the global scope. Because the
|
|
5
|
+
* new fiber is attached to the global scope, when the fiber executing the
|
|
6
|
+
* returned effect terminates, the forked fiber will continue running.
|
|
7
|
+
* @tsplus getter fncts.io.IO forkDaemon
|
|
8
|
+
* @tsplus location "@fncts/io/IO/api/forkDaemon"
|
|
9
|
+
*/
|
|
10
|
+
export declare function forkDaemon<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: string): URIO<R, FiberRuntime<E, A>>;
|
package/IO/api/interrupt.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
|
3
3
|
import { Lazy } from "@fncts/base/data/function/definition";
|
|
4
4
|
import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
|
5
5
|
import { Exit } from "@fncts/base/data/Exit/definition";
|
|
6
|
-
export
|
|
7
|
-
readonly restore: <R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string) => IO<R, E, A>;
|
|
8
|
-
readonly force: <R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string) => IO<R, E, A>;
|
|
9
|
-
}
|
|
6
|
+
export type InterruptibilityRestorer = <R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string) => IO<R, E, A>;
|
|
10
7
|
/**
|
|
11
8
|
* Returns an effect that is interrupted as if by the specified fiber.
|
|
12
9
|
* @tsplus static fncts.io.IOOps interruptAs
|
|
@@ -87,19 +84,3 @@ export declare function onInterruptWith<R1, E1>(cleanup: (interruptors: HashSet<
|
|
|
87
84
|
* @tsplus location "@fncts/io/IO/api/interrupt"
|
|
88
85
|
*/
|
|
89
86
|
export declare function onExit<E, A, R1, E1>(cleanup: (exit: Exit<E, A>) => IO<R1, E1, any>, __tsplusTrace?: string): <R>(self: import("@fncts/io/IO/definition").IO<R, E, A>) => import("@fncts/io/IO/definition").IO<R1 | R, E | E1, A>;
|
|
90
|
-
/**
|
|
91
|
-
* Returns an IO whose interruption will be disconnected from the
|
|
92
|
-
* fiber's own interruption, being performed in the background without
|
|
93
|
-
* slowing down the fiber's interruption.
|
|
94
|
-
*
|
|
95
|
-
* This method is useful to create "fast interrupting" effects. For
|
|
96
|
-
* example, if you call this on a bracketed effect, then even if the
|
|
97
|
-
* effect is "stuck" in acquire or release, its interruption will return
|
|
98
|
-
* immediately, while the acquire / release are performed in the
|
|
99
|
-
* background.
|
|
100
|
-
*
|
|
101
|
-
* See timeout and race for other applications.
|
|
102
|
-
* @tsplus getter fncts.io.IO disconnect
|
|
103
|
-
* @tsplus location "@fncts/io/IO/api/interrupt"
|
|
104
|
-
*/
|
|
105
|
-
export declare function disconnect<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
package/IO/api/race.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
+
import { InterruptStatus } from "@fncts/io/InterruptStatus";
|
|
2
3
|
/**
|
|
3
4
|
* Returns an IO that races this effect with the specified effect,
|
|
4
5
|
* returning the first successful `A` from the faster side. If one effect
|
|
@@ -10,4 +11,9 @@ import { IO } from "@fncts/io/IO/definition";
|
|
|
10
11
|
* @tsplus pipeable fncts.io.IO race
|
|
11
12
|
* @tsplus location "@fncts/io/IO/api/race"
|
|
12
13
|
*/
|
|
13
|
-
export declare function race<R1, E1, A1>(that: IO<R1, E1, A1>): <R, E, A>(
|
|
14
|
+
export declare function race<R1, E1, A1>(that: IO<R1, E1, A1>): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R1 | R, E1 | E, A1 | A>;
|
|
15
|
+
/**
|
|
16
|
+
* @tsplus pipeable fncts.io.IO raceAwait
|
|
17
|
+
* @tsplus location "@fncts/io/IO/api/race"
|
|
18
|
+
*/
|
|
19
|
+
export declare function raceAwait<R1, E1, A1>(that: IO<R1, E1, A1>): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R1 | R, E1 | E, A1 | A>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
|
2
|
+
import { IO } from "@fncts/io/IO/definition";
|
|
3
|
+
import { Exit } from "@fncts/base/data/Exit/definition";
|
|
4
|
+
import { Fiber } from "@fncts/io/Fiber/definition";
|
|
5
|
+
import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
|
|
6
|
+
/**
|
|
7
|
+
* @tsplus pipeable fncts.io.IO raceFibersWith
|
|
8
|
+
* @tsplus location "@fncts/io/IO/api/raceWith"
|
|
9
|
+
*/
|
|
10
|
+
export declare function raceFibersWith<R, E, A, R1, E1, B, R2, E2, C, R3, E3, D>(right: Lazy<IO<R1, E1, B>>, leftWins: (winner: FiberRuntime<E, A>, loser: FiberRuntime<E1, B>) => IO<R2, E2, C>, rightWins: (winner: FiberRuntime<E1, B>, loser: FiberRuntime<E, A>) => IO<R3, E3, D>, __tsplusTrace?: string): (left: IO<R, E, A>) => IO<R | R1 | R2 | R3, E2 | E3, C | D>;
|
|
11
|
+
/**
|
|
12
|
+
* Returns an effect that races this effect with the specified effect, calling
|
|
13
|
+
* the specified finisher as soon as one result or the other has been computed.
|
|
14
|
+
* @tsplus pipeable fncts.io.IO raceWith
|
|
15
|
+
* @tsplus location "@fncts/io/IO/api/raceWith"
|
|
16
|
+
*/
|
|
17
|
+
export declare function raceWith<R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(right: Lazy<IO<R1, E1, A1>>, leftWins: (exit: Exit<E, A>, fiber: Fiber<E1, A1>) => IO<R2, E2, A2>, rightWins: (exit: Exit<E1, A1>, fiber: Fiber<E, A>) => IO<R3, E3, A3>, __tsplusTrace?: string): (left: IO<R, E, A>) => IO<R | R1 | R2 | R3, E2 | E3, A2 | A3>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
+
export type Grafter = <R, E, A>(effect: IO<R, E, A>) => IO<R, E, A>;
|
|
3
|
+
/**
|
|
4
|
+
* Transplants specified effects so that when those effects fork other
|
|
5
|
+
* effects, the forked effects will be governed by the scope of the
|
|
6
|
+
* fiber that executes this effect.
|
|
7
|
+
*
|
|
8
|
+
* This can be used to "graft" deep grandchildren onto a higher-level
|
|
9
|
+
* scope, effectively extending their lifespans into the parent scope.
|
|
10
|
+
* @tsplus static fncts.io.IOOps transplant
|
|
11
|
+
* @tsplus location "@fncts/io/IO/api/transplant"
|
|
12
|
+
*/
|
|
13
|
+
export declare function transplant<R, E, A>(f: (_: Grafter) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
|
2
|
+
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
|
3
|
+
import { IO } from "@fncts/io/IO/definition";
|
|
4
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
5
|
+
/**
|
|
6
|
+
* @tsplus pipeable fncts.io.IO whenFiberRef
|
|
7
|
+
* @tsplus static fncts.io.IOOps whenFiberRef
|
|
8
|
+
* @tsplus location "@fncts/io/IO/api/whenFiberRef"
|
|
9
|
+
*/
|
|
10
|
+
export declare function whenFiberRef<S>(ref: FiberRef<S>, f: Predicate<S>, __tsplusTrace?: string): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R, E, import("@fncts/base/data/Maybe").Maybe<A>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from "@fncts/io/Ref/definition";
|
|
2
|
+
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
|
3
|
+
import { IO } from "@fncts/io/IO/definition";
|
|
4
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
5
|
+
/**
|
|
6
|
+
* @tsplus pipeable fncts.io.IO whenRef
|
|
7
|
+
* @tsplus static fncts.io.IOOps whenRef
|
|
8
|
+
* @tsplus location "@fncts/io/IO/api/whenRef"
|
|
9
|
+
*/
|
|
10
|
+
export declare function whenRef<S>(ref: Ref<S>, f: Predicate<S>): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R, E, import("@fncts/base/data/Maybe").Maybe<A>>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
|
3
|
+
import { Future } from "@fncts/io/Future";
|
|
4
|
+
import { Fiber } from "@fncts/io/Fiber/definition";
|
|
4
5
|
/**
|
|
5
6
|
* @tsplus pipeable fncts.io.IO zipConcurrent
|
|
6
7
|
* @tsplus location "@fncts/io/IO/api/zipConcurrent"
|
|
7
8
|
*/
|
|
8
|
-
export declare function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R1 | R, E1 | E, readonly [A, B]>;
|
|
9
|
+
export declare function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R1 | R, E1 | E, readonly [A, B]>;
|
|
9
10
|
/**
|
|
10
11
|
* @tsplus pipeable fncts.io.IO zipWithConcurrent
|
|
11
12
|
* @tsplus location "@fncts/io/IO/api/zipConcurrent"
|
|
12
13
|
*/
|
|
13
|
-
export declare function zipWithConcurrent<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string): <R, E>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<R1 | R, E1 | E, C>;
|
|
14
|
+
export declare function zipWithConcurrent<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string): <R, E>(self: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R1 | R, E1 | E, C>;
|
package/IO/api.d.ts
CHANGED
|
@@ -543,6 +543,11 @@ export declare function iterate<R, E, A>(initial: A, cont: (a: A) => boolean, bo
|
|
|
543
543
|
* @tsplus location "@fncts/io/IO/api"
|
|
544
544
|
*/
|
|
545
545
|
export declare function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never>>;
|
|
546
|
+
/**
|
|
547
|
+
* @tsplus getter fncts.io.IO just
|
|
548
|
+
* @tsplus location "@fncts/io/IO/api"
|
|
549
|
+
*/
|
|
550
|
+
export declare function just<R, E, A>(self: IO<R, E, Maybe<A>>): IO<R, Maybe<E>, A>;
|
|
546
551
|
/**
|
|
547
552
|
* @tsplus static fncts.io.IOOps log
|
|
548
553
|
* @tsplus location "@fncts/io/IO/api"
|
|
@@ -659,6 +664,11 @@ export declare function merge<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string):
|
|
|
659
664
|
* @tsplus location "@fncts/io/IO/api"
|
|
660
665
|
*/
|
|
661
666
|
export declare function mergeAll<R, E, A, B>(fas: Iterable<IO<R, E, A>>, b: B, f: (b: B, a: A) => B, __tsplusTrace?: string): IO<R, E, B>;
|
|
667
|
+
/**
|
|
668
|
+
* @tsplus static fncts.io.IOOps nothing
|
|
669
|
+
* @tsplus location "@fncts/io/IO/api"
|
|
670
|
+
*/
|
|
671
|
+
export declare const nothing: IO<never, never, import("@fncts/base/data/Maybe.js").Maybe<never>>;
|
|
662
672
|
/**
|
|
663
673
|
* Converts an option on errors into an option on values.
|
|
664
674
|
* @tsplus getter fncts.io.IO optional
|
|
@@ -982,9 +992,10 @@ export declare function when(b: Lazy<boolean>, __tsplusTrace?: string): <R, E, A
|
|
|
982
992
|
/**
|
|
983
993
|
* The moral equivalent of `if (p) exp` when `p` has side-effects
|
|
984
994
|
* @tsplus pipeable fncts.io.IO whenIO
|
|
995
|
+
* @tsplus static fncts.io.IOOps whenIO
|
|
985
996
|
* @tsplus location "@fncts/io/IO/api"
|
|
986
997
|
*/
|
|
987
|
-
export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R1 | R, E1 | E,
|
|
998
|
+
export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R1 | R, E1 | E, import("@fncts/base/data/Maybe.js").Maybe<A>>;
|
|
988
999
|
/**
|
|
989
1000
|
* @tsplus static fncts.io.IOOps withFiberRuntime
|
|
990
1001
|
* @tsplus location "@fncts/io/IO/api"
|
package/IO.d.ts
CHANGED
|
@@ -15,15 +15,17 @@ export * from "./IO/api/clockWith.js";
|
|
|
15
15
|
export * from "./IO/api/concurrency.js";
|
|
16
16
|
export * from "./IO/api/concurrentFinalizers.js";
|
|
17
17
|
export * from "./IO/api/consoleWith.js";
|
|
18
|
-
export * from "./IO/api/
|
|
18
|
+
export * from "./IO/api/daemonChildren.js";
|
|
19
19
|
export * from "./IO/api/delay.js";
|
|
20
20
|
export * from "./IO/api/descriptor.js";
|
|
21
|
+
export * from "./IO/api/disconnect.js";
|
|
21
22
|
export * from "./IO/api/ensuringChildren.js";
|
|
22
23
|
export * from "./IO/api/environment.js";
|
|
23
24
|
export * from "./IO/api/foreachConcurrent.js";
|
|
24
25
|
export * from "./IO/api/foreachExec.js";
|
|
25
26
|
export * from "./IO/api/fork.js";
|
|
26
27
|
export * from "./IO/api/forkAll.js";
|
|
28
|
+
export * from "./IO/api/forkDaemon.js";
|
|
27
29
|
export * from "./IO/api/forkIn.js";
|
|
28
30
|
export * from "./IO/api/forkScoped.js";
|
|
29
31
|
export * from "./IO/api/fulfill.js";
|
|
@@ -35,6 +37,7 @@ export * from "./IO/api/provideLayer.js";
|
|
|
35
37
|
export * from "./IO/api/provideSomeLayer.js";
|
|
36
38
|
export * from "./IO/api/race.js";
|
|
37
39
|
export * from "./IO/api/raceFirst.js";
|
|
40
|
+
export * from "./IO/api/raceWith.js";
|
|
38
41
|
export * from "./IO/api/randomWith.js";
|
|
39
42
|
export * from "./IO/api/repeat.js";
|
|
40
43
|
export * from "./IO/api/retry.js";
|
|
@@ -47,6 +50,9 @@ export * from "./IO/api/sleep.js";
|
|
|
47
50
|
export * from "./IO/api/stateful.js";
|
|
48
51
|
export * from "./IO/api/supervised.js";
|
|
49
52
|
export * from "./IO/api/timeout.js";
|
|
53
|
+
export * from "./IO/api/transplant.js";
|
|
54
|
+
export * from "./IO/api/whenFiberRef.js";
|
|
55
|
+
export * from "./IO/api/whenRef.js";
|
|
50
56
|
export * from "./IO/api/withChildren.js";
|
|
51
57
|
export * from "./IO/api/withEarlyRelease.js";
|
|
52
58
|
export * from "./IO/api/withFinalizer.js";
|
package/RefSubject/Atomic.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Cause } from "@fncts/base/data/Cause/definition";
|
|
|
5
5
|
import type { Emitter } from "@fncts/io/Push";
|
|
6
6
|
import { Hold } from "@fncts/io/Push";
|
|
7
7
|
import { Atomic } from "@fncts/io/Ref";
|
|
8
|
-
import { RefSubjectInternal } from "@fncts/io/RefSubject";
|
|
8
|
+
import { RefSubjectInternal } from "@fncts/io/RefSubject/definition";
|
|
9
9
|
export declare class AtomicRefSubject<E, A> extends RefSubjectInternal<never, E, A, A> {
|
|
10
10
|
readonly initial: A;
|
|
11
11
|
readonly stream: Hold<never, E, A>;
|
package/_cjs/Cached/api.cjs
CHANGED
|
@@ -8,7 +8,7 @@ exports.get = get;
|
|
|
8
8
|
exports.refresh = exports.manual = void 0;
|
|
9
9
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/schedule"));
|
|
10
10
|
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/interrupt"));
|
|
11
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/
|
|
11
|
+
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/forkDaemon"));
|
|
12
12
|
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Fiber/api/interrupt"));
|
|
13
13
|
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/acquireRelease"));
|
|
14
14
|
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api"));
|
|
@@ -16,7 +16,7 @@ var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require
|
|
|
16
16
|
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
|
|
17
17
|
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Ref/api/get"));
|
|
18
18
|
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Future/api"));
|
|
19
|
-
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/
|
|
19
|
+
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/raceWith"));
|
|
20
20
|
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/fork"));
|
|
21
21
|
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/race"));
|
|
22
22
|
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/api/toPull"));
|
|
@@ -4,19 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mergeWith = mergeWith;
|
|
7
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/
|
|
7
|
+
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/forkDaemon"));
|
|
8
8
|
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/internal/MergeState"));
|
|
9
9
|
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api"));
|
|
10
10
|
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/api"));
|
|
11
11
|
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/core-api"));
|
|
12
12
|
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Fiber/api/join"));
|
|
13
|
-
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/
|
|
14
|
-
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/
|
|
15
|
-
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/
|
|
16
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/
|
|
17
|
-
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Fiber/api/
|
|
18
|
-
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/
|
|
19
|
-
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/
|
|
13
|
+
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/IO/api/raceWith"));
|
|
14
|
+
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Exit/constructors"));
|
|
15
|
+
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/destructors"));
|
|
16
|
+
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Exit/api"));
|
|
17
|
+
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Fiber/api/interrupt"));
|
|
18
|
+
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Fiber/api/await"));
|
|
19
|
+
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/api/toPull"));
|
|
20
|
+
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/Channel/internal/SingleProducerAsyncInput"));
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
23
|
const fileName_1 = "(@fncts/io) src/Channel/api/mergeWith.ts";
|
|
@@ -37,12 +38,12 @@ function mergeWith(that, leftDone, rightDone) {
|
|
|
37
38
|
void 0;
|
|
38
39
|
switch (decision._tag) {
|
|
39
40
|
case "Done" /* MergeDecisionTag.Done */:
|
|
40
|
-
return tsplus_module_3.succeedNow(tsplus_module_4.fromIO(() => tsplus_module_3.zipRight(decision.io, fileName_1 + ":98:79")(
|
|
41
|
+
return tsplus_module_3.succeedNow(tsplus_module_4.fromIO(() => tsplus_module_3.zipRight(decision.io, fileName_1 + ":98:79")(tsplus_module_11.interrupt(fiber))), fileName_1 + ":98:39");
|
|
41
42
|
case "Await" /* MergeDecisionTag.Await */:
|
|
42
|
-
return tsplus_module_3.map(ex =>
|
|
43
|
+
return tsplus_module_3.map(ex => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(done => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.succeed(done))), elem => tsplus_module_5.zipRight(go(single(decision.f)))(tsplus_module_4.writeNow(elem)))(r))(ex), fileName_1 + ":100:41")(tsplus_module_12.wait(fiber, fileName_1 + ":100:31"));
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
|
-
return
|
|
46
|
+
return tsplus_module_10.match(cause => onDecision(done(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => onDecision(done(tsplus_module_8.succeed(d))), elem => tsplus_module_3.map(leftFiber => tsplus_module_5.zipRight(go(both(leftFiber, fiber)))(tsplus_module_4.writeNow(elem)), fileName_1 + ":118:40")(tsplus_module_1.forkDaemon(pull, fileName_1 + ":118:25")))(r))(exit);
|
|
46
47
|
};
|
|
47
48
|
const go = state => {
|
|
48
49
|
switch (state._tag) {
|
|
@@ -50,17 +51,17 @@ function mergeWith(that, leftDone, rightDone) {
|
|
|
50
51
|
{
|
|
51
52
|
const lj = tsplus_module_6.join(state.left, fileName_1 + ":135:93");
|
|
52
53
|
const rj = tsplus_module_6.join(state.right, fileName_1 + ":136:94");
|
|
53
|
-
return tsplus_module_4.unwrap(() =>
|
|
54
|
+
return tsplus_module_4.unwrap(() => tsplus_module_7.raceWith(() => rj, (leftEx, _) => handleSide(leftEx, state.right, pullL)(leftDone, (l, r) => tsplus_module_2.bothRunning(l, r), f => tsplus_module_2.leftDone(f)), (rightEx, _) => handleSide(rightEx, state.left, pullR)(rightDone, (l, r) => tsplus_module_2.bothRunning(r, l), f => tsplus_module_2.rightDone(f)), fileName_1 + ":138:28")(lj));
|
|
54
55
|
}
|
|
55
56
|
case "LeftDone" /* MergeStateTag.LeftDone */:
|
|
56
|
-
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit =>
|
|
57
|
+
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.leftDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":157:33")(tsplus_module_3.result(pullR, fileName_1 + ":157:22")));
|
|
57
58
|
case "RightDone" /* MergeStateTag.RightDone */:
|
|
58
|
-
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit =>
|
|
59
|
+
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.rightDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":170:33")(tsplus_module_3.result(pullL, fileName_1 + ":170:22")));
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
return tsplus_module_4.embedInput(input)(tsplus_module_5.flatMap(go)(tsplus_module_4.fromIO(() => tsplus_module_3.zipWith(tsplus_module_1.forkDaemon(pullR, fileName_1 + ":184:41"), (a, b) => tsplus_module_2.bothRunning(a, b), fileName_1 + ":184:35")(tsplus_module_1.forkDaemon(pullL, fileName_1 + ":184:16")))));
|
|
62
|
-
}, fileName_1 + ":51:30")(
|
|
63
|
-
}, fileName_1 + ":48:30")(
|
|
63
|
+
}, fileName_1 + ":51:30")(tsplus_module_13.toPull(tsplus_module_4.pipeTo(that)(queueReader))), fileName_1 + ":50:30")(tsplus_module_13.toPull(tsplus_module_4.pipeTo(self)(queueReader)));
|
|
64
|
+
}, fileName_1 + ":48:30")(tsplus_module_14.makeSingleProducerAsyncInput()));
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
//# sourceMappingURL=mergeWith.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeWith.cjs","mappings":"
|
|
1
|
+
{"version":3,"file":"mergeWith.cjs","mappings":"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","names":["mergeWith","that","leftDone","rightDone","self","tsplus_module_4","input","queueReader","pullL","pullR","handleSide","exit","fiber","pull","done","both","single","onDecision","decision","_tag","tsplus_module_3","io","ex","tsplus_module_10","cause","f","tsplus_module_8","r","tsplus_module_9","elem","tsplus_module_5","go","d","leftFiber","state","lj","left","rj","right","tsplus_module_7","leftEx","_","l","tsplus_module_2","rightEx","a","b","tsplus_module_14"],"sourceRoot":"","sources":["../../../_src/Channel/api/mergeWith.ts"],"sourcesContent":[null]}
|
package/_cjs/Channel/api.cjs
CHANGED
|
@@ -553,9 +553,7 @@ function interrupt(fiberId) {
|
|
|
553
553
|
* @tsplus static fncts.io.ChannelOps scoped
|
|
554
554
|
*/
|
|
555
555
|
function scoped_1(io) {
|
|
556
|
-
return unwrap_1(() => tsplus_module_6.uninterruptibleMask((
|
|
557
|
-
restore
|
|
558
|
-
}) => tsplus_module_4.map(scope => acquireReleaseOutExitWith_1(tsplus_module_4.tapErrorCause(cause => scope.close(() => tsplus_module_20.failCause(cause)), fileName_1 + ":759:50")(restore(tsplus_module_21.extend(io, fileName_1 + ":759:31")(scope), fileName_1 + ":759:18")), (_, exit) => scope.close(() => exit)), fileName_1 + ":757:21")(tsplus_module_21.make)));
|
|
556
|
+
return unwrap_1(() => tsplus_module_6.uninterruptibleMask(restore => tsplus_module_4.map(scope => acquireReleaseOutExitWith_1(tsplus_module_4.tapErrorCause(cause => scope.close(() => tsplus_module_20.failCause(cause)), fileName_1 + ":759:50")(restore(tsplus_module_21.extend(io, fileName_1 + ":759:31")(scope), fileName_1 + ":759:18")), (_, exit) => scope.close(() => exit)), fileName_1 + ":757:21")(tsplus_module_21.make)));
|
|
559
557
|
}
|
|
560
558
|
/**
|
|
561
559
|
* Returns a new channel, which is the same as this one, except the failure value of the returned
|