@fncts/io 0.0.34 → 0.0.36
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/Fiber/FiberRuntime.d.ts +7 -7
- package/Fiber/constructors.d.ts +5 -0
- package/IO/api/all.d.ts +41 -0
- package/IO/api/concurrency.d.ts +11 -0
- package/IO/api/interrupt.d.ts +1 -1
- package/IO/api/raceWith.d.ts +2 -1
- package/IO/api.d.ts +7 -2
- package/IO/definition.d.ts +103 -127
- package/IO.d.ts +1 -0
- package/Push/api.d.ts +86 -36
- package/Push/definition.d.ts +28 -13
- package/Push/internal.d.ts +7 -11
- package/RefSubject/Atomic.d.ts +8 -11
- package/RefSubject/Synchronized/definition.d.ts +4 -6
- package/RefSubject/api.d.ts +0 -1
- package/RefSubject/definition.d.ts +6 -8
- package/STM/definition.d.ts +19 -2
- package/Sink/api.d.ts +24 -24
- package/Subject/Atomic.d.ts +4 -6
- package/Subject/definition.d.ts +2 -2
- package/_cjs/Channel/api/runScoped.cjs +1 -1
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +2 -2
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +110 -98
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +10 -2
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/Future/api.cjs +1 -1
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/IO/api/all.cjs +33 -0
- package/_cjs/IO/api/all.cjs.map +1 -0
- package/_cjs/IO/api/asyncIO.cjs +1 -1
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -1
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +25 -4
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/disconnect.cjs +1 -1
- package/_cjs/IO/api/disconnect.cjs.map +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +1 -1
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -1
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -1
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -1
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +18 -6
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/raceWith.cjs +4 -4
- package/_cjs/IO/api/raceWith.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +8 -5
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +78 -20
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +14 -191
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO.cjs +11 -0
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +1 -1
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +238 -168
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/definition.cjs +12 -13
- package/_cjs/Push/definition.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +37 -29
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +15 -19
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/definition.cjs +9 -10
- package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -1
- package/_cjs/RefSubject/api.cjs +5 -6
- package/_cjs/RefSubject/api.cjs.map +1 -1
- package/_cjs/RefSubject/definition.cjs.map +1 -1
- package/_cjs/STM/api/atomically.cjs +1 -1
- package/_cjs/STM/api/atomically.cjs.map +1 -1
- package/_cjs/STM/api.cjs +2 -2
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +1 -1
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -2
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Semaphore.cjs +1 -1
- package/_cjs/Semaphore.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +13 -13
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +4 -5
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +2 -2
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +1 -1
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +12 -17
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +12 -17
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +2 -12
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +3 -9
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +11 -27
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_mjs/Channel/api/runScoped.mjs +1 -1
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +2 -2
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +111 -100
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/constructors.mjs +7 -1
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/Future/api.mjs +1 -1
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/IO/api/all.mjs +24 -0
- package/_mjs/IO/api/all.mjs.map +1 -0
- package/_mjs/IO/api/asyncIO.mjs +1 -1
- package/_mjs/IO/api/asyncIO.mjs.map +1 -1
- package/_mjs/IO/api/bracketExit.mjs +1 -1
- package/_mjs/IO/api/bracketExit.mjs.map +1 -1
- package/_mjs/IO/api/concurrency.mjs +19 -2
- package/_mjs/IO/api/concurrency.mjs.map +1 -1
- package/_mjs/IO/api/disconnect.mjs +1 -1
- package/_mjs/IO/api/disconnect.mjs.map +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/foreachExec.mjs +1 -1
- package/_mjs/IO/api/foreachExec.mjs.map +1 -1
- package/_mjs/IO/api/forkIn.mjs +1 -1
- package/_mjs/IO/api/forkIn.mjs.map +1 -1
- package/_mjs/IO/api/forkScoped.mjs +1 -1
- package/_mjs/IO/api/forkScoped.mjs.map +1 -1
- package/_mjs/IO/api/fulfill.mjs +1 -1
- package/_mjs/IO/api/fulfill.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +19 -7
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/raceWith.mjs +4 -4
- package/_mjs/IO/api/raceWith.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +8 -5
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +78 -23
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +12 -181
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO.mjs +1 -0
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +1 -1
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Push/api.mjs +223 -166
- package/_mjs/Push/api.mjs.map +1 -1
- package/_mjs/Push/definition.mjs +9 -10
- package/_mjs/Push/definition.mjs.map +1 -1
- package/_mjs/Push/internal.mjs +33 -22
- package/_mjs/Push/internal.mjs.map +1 -1
- package/_mjs/RefSubject/Atomic.mjs +15 -19
- package/_mjs/RefSubject/Atomic.mjs.map +1 -1
- package/_mjs/RefSubject/Synchronized/definition.mjs +9 -10
- package/_mjs/RefSubject/Synchronized/definition.mjs.map +1 -1
- package/_mjs/RefSubject/api.mjs +6 -7
- package/_mjs/RefSubject/api.mjs.map +1 -1
- package/_mjs/RefSubject/definition.mjs.map +1 -1
- package/_mjs/STM/api/atomically.mjs +1 -1
- package/_mjs/STM/api/atomically.mjs.map +1 -1
- package/_mjs/STM/api.mjs +2 -2
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +1 -1
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +2 -2
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Semaphore.mjs +1 -1
- package/_mjs/Semaphore.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +10 -10
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/Subject/Atomic.mjs +4 -5
- package/_mjs/Subject/Atomic.mjs.map +1 -1
- package/_mjs/TReentrantLock/api.mjs +2 -2
- package/_mjs/TReentrantLock/api.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +1 -1
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +12 -17
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +12 -17
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/filterIO.mjs +2 -12
- package/_mjs/collection/immutable/Conc/filterIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/mapIO.mjs +3 -9
- package/_mjs/collection/immutable/Conc/mapIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs +11 -27
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs.map +1 -1
- package/_src/Channel/api.ts +3 -3
- package/_src/Fiber/FiberRuntime.ts +76 -75
- package/_src/Fiber/constructors.ts +5 -0
- package/_src/IO/api/all.ts +64 -0
- package/_src/IO/api/concurrency.ts +33 -0
- package/_src/IO/api/foreachExec.ts +2 -2
- package/_src/IO/api/interrupt.ts +20 -7
- package/_src/IO/api/raceWith.ts +4 -2
- package/_src/IO/api/timeout.ts +21 -1
- package/_src/IO/api.ts +79 -27
- package/_src/IO/definition.ts +155 -200
- package/_src/IO.ts +1 -0
- package/_src/Layer/api.ts +0 -1
- package/_src/Push/api.ts +305 -304
- package/_src/Push/definition.ts +19 -17
- package/_src/Push/internal.ts +63 -31
- package/_src/RefSubject/Atomic.ts +16 -22
- package/_src/RefSubject/Synchronized/definition.ts +6 -9
- package/_src/RefSubject/api.ts +9 -12
- package/_src/RefSubject/definition.ts +6 -8
- package/_src/STM/api.ts +0 -5
- package/_src/STM/definition.ts +8 -2
- package/_src/Sink/api.ts +9 -9
- package/_src/Subject/Atomic.ts +6 -8
- package/_src/Subject/definition.ts +2 -2
- package/_src/collection/immutable/Conc/dropUntilIO.ts +18 -15
- package/_src/collection/immutable/Conc/dropWhileIO.ts +18 -17
- package/_src/collection/immutable/Conc/filterIO.ts +1 -11
- package/_src/collection/immutable/Conc/mapIO.ts +2 -9
- package/_src/collection/immutable/Conc/takeWhileIO.ts +19 -28
- package/collection/immutable/Conc/filterIO.d.ts +1 -1
- package/collection/immutable/Conc/mapIO.d.ts +1 -1
- package/collection/immutable/Conc/takeWhileIO.d.ts +1 -1
- package/package.json +2 -2
package/Push/definition.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
-
import { Scope } from "@fncts/io/Scope/definition";
|
|
3
2
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
4
3
|
export declare const PushVariance: unique symbol;
|
|
5
4
|
export type PushVariance = typeof PushVariance;
|
|
@@ -10,32 +9,48 @@ export type PushTypeId = typeof PushTypeId;
|
|
|
10
9
|
* @tsplus companion fncts.io.PushOps
|
|
11
10
|
*/
|
|
12
11
|
export declare class Push<R, E, A> {
|
|
13
|
-
readonly run: <R1>(emitter:
|
|
12
|
+
readonly run: <R1>(emitter: Sink<R1, E, A>) => IO<R | R1, never, unknown>;
|
|
14
13
|
readonly [PushTypeId]: PushTypeId;
|
|
15
14
|
[PushVariance]: {
|
|
16
15
|
readonly _R: (_: never) => R;
|
|
17
16
|
readonly _E: (_: never) => E;
|
|
18
17
|
readonly _A: (_: never) => A;
|
|
19
18
|
};
|
|
20
|
-
constructor(run: <R1>(emitter:
|
|
19
|
+
constructor(run: <R1>(emitter: Sink<R1, E, A>) => IO<R | R1, never, unknown>);
|
|
20
|
+
}
|
|
21
|
+
export declare namespace Push {
|
|
22
|
+
type EnvironmentOf<X> = [X] extends [{
|
|
23
|
+
[PushVariance]: {
|
|
24
|
+
readonly _R: (_: never) => infer R;
|
|
25
|
+
};
|
|
26
|
+
}] ? R : never;
|
|
27
|
+
type ErrorOf<X> = [X] extends [{
|
|
28
|
+
[PushVariance]: {
|
|
29
|
+
readonly _E: (_: never) => infer E;
|
|
30
|
+
};
|
|
31
|
+
}] ? E : never;
|
|
32
|
+
type ValueOf<X> = [X] extends [{
|
|
33
|
+
[PushVariance]: {
|
|
34
|
+
readonly _A: (_: never) => infer A;
|
|
35
|
+
};
|
|
36
|
+
}] ? A : never;
|
|
21
37
|
}
|
|
22
38
|
/**
|
|
23
|
-
* @tsplus type fncts.io.Push.
|
|
24
|
-
* @tsplus companion fncts.io.Push.
|
|
39
|
+
* @tsplus type fncts.io.Push.Sink
|
|
40
|
+
* @tsplus companion fncts.io.Push.SinkOps
|
|
25
41
|
*/
|
|
26
|
-
export declare class
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
|
|
30
|
-
constructor(emit: (value: A) => IO<R, never, unknown>, failCause: (cause: Cause<E>) => IO<R, never, void>, end: IO<R, never, void>);
|
|
42
|
+
export declare class Sink<R, E, A> {
|
|
43
|
+
readonly event: (value: A) => IO<R, never, void>;
|
|
44
|
+
readonly error: (cause: Cause<E>) => IO<R, never, void>;
|
|
45
|
+
constructor(event: (value: A) => IO<R, never, void>, error: (cause: Cause<E>) => IO<R, never, void>);
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
48
|
* @tsplus static fncts.io.PushOps __call
|
|
34
49
|
* @tsplus location "@fncts/io/Push/definition"
|
|
35
50
|
*/
|
|
36
|
-
export declare function makePush<R, E, A>(run: <R1>(
|
|
51
|
+
export declare function makePush<R, E, A>(run: <R1>(sink: Sink<R1, E, A>) => IO<R | R1, never, unknown>): Push<R, E, A>;
|
|
37
52
|
/**
|
|
38
|
-
* @tsplus static fncts.io.Push.
|
|
53
|
+
* @tsplus static fncts.io.Push.SinkOps __call
|
|
39
54
|
* @tsplus location "@fncts/io/Push/definition"
|
|
40
55
|
*/
|
|
41
|
-
export declare function
|
|
56
|
+
export declare function makeSink<R, E, A>(value: (value: A) => IO<R, never, unknown>, error: (cause: Cause<E>) => IO<R, never, unknown>): Sink<R, E, A>;
|
package/Push/internal.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare
|
|
5
|
-
export
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare function isEarlyExit(u: unknown): u is EarlyExit;
|
|
10
|
-
export declare const earlyExit: import("../IO").UIO<never>;
|
|
11
|
-
export declare function onEarlyExit<R1, E1, B>(onEarlyExit: IO<R1, E1, B>): <R, E, A>(self: import("../IO").IO<R, E, A>) => import("../IO").IO<R1 | R, E1 | E, B | A>;
|
|
1
|
+
import { IO, URIO } from "@fncts/io/IO/definition";
|
|
2
|
+
import { Fiber } from "@fncts/io/Fiber/definition";
|
|
3
|
+
import type { RuntimeFiber } from "@fncts/io/Fiber";
|
|
4
|
+
export declare function withScopedFork<R, E, A>(f: (fork: <R, E, A>(io: IO<R, E, A>) => IO<R, never, RuntimeFiber<E, A>>) => IO<R, E, A>): IO<R, E, A>;
|
|
5
|
+
export declare function withSwitch<R, E, A>(f: (fork: <R>(io: URIO<R, void>) => URIO<R, void>) => IO<R, E, A>): import("../IO").IO<R, E, void>;
|
|
6
|
+
export declare function withUnboundedConcurrency<R, E, A>(f: (fork: <R>(io: URIO<R, void>) => URIO<R, RuntimeFiber<never, void>>) => IO<R, E, A>): import("../IO").IO<R, E, void>;
|
|
7
|
+
export declare function withExhaust<R, E, A>(f: (fork: <R>(io: URIO<R, void>) => URIO<R, void>) => IO<R, E, A>): import("../IO").IO<R, E, void>;
|
package/RefSubject/Atomic.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Just } from "@fncts/base/data/Maybe/definition";
|
|
2
2
|
import { IO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { Scope } from "@fncts/io/Scope/definition";
|
|
4
3
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
5
|
-
import type {
|
|
4
|
+
import type { Sink } from "@fncts/io/Push";
|
|
6
5
|
import { Hold } from "@fncts/io/Push";
|
|
7
6
|
import { Atomic } from "@fncts/io/Ref";
|
|
8
7
|
import { RefSubjectInternal } from "@fncts/io/RefSubject/definition";
|
|
@@ -15,19 +14,17 @@ export declare class AtomicRefSubject<E, A> extends RefSubjectInternal<never, E,
|
|
|
15
14
|
get get(): import("../IO").UIO<A>;
|
|
16
15
|
set(value: A, __tsplusTrace?: string): import("../IO").IO<never, never, void>;
|
|
17
16
|
modify<E, A, B>(this: AtomicRefSubject<E, A>, f: (a: A) => readonly [B, A], __tsplusTrace?: string): IO<never, never, B>;
|
|
18
|
-
run<R>(emitter:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
unsafeFailCause(cause: Cause<E>): void;
|
|
24
|
-
unsafeEnd(): void;
|
|
17
|
+
run<R>(emitter: Sink<R, E, A>): IO<R, never, unknown>;
|
|
18
|
+
event(value: A): IO<never, never, void>;
|
|
19
|
+
error(cause: Cause<E>): IO<never, never, void>;
|
|
20
|
+
unsafeEvent(value: A): void;
|
|
21
|
+
unsafeError(cause: Cause<E>): void;
|
|
25
22
|
get unsafeGet(): A;
|
|
26
23
|
}
|
|
27
24
|
declare class AtomicEmitRef<E, A> extends Atomic<A> {
|
|
28
25
|
readonly ref: Atomic<A>;
|
|
29
|
-
readonly
|
|
30
|
-
constructor(ref: Atomic<A>,
|
|
26
|
+
readonly sink: Sink<never, E, A>;
|
|
27
|
+
constructor(ref: Atomic<A>, sink: Sink<never, E, A>);
|
|
31
28
|
get get(): import("../IO").UIO<A>;
|
|
32
29
|
get unsafeGet(): A;
|
|
33
30
|
unsafeSet(value: A): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { TSemaphore } from "@fncts/io/TSemaphore/definition";
|
|
2
2
|
import type { RefSubject } from "../definition.js";
|
|
3
3
|
import type { Cause } from "@fncts/base/data/Cause";
|
|
4
|
-
import type {
|
|
5
|
-
import type { Scope } from "@fncts/io/Scope";
|
|
4
|
+
import type { Sink } from "@fncts/io/Push";
|
|
6
5
|
import { IO } from "@fncts/io/IO";
|
|
7
6
|
import { RefSubjectInternal } from "../definition.js";
|
|
8
7
|
export declare const SynchronizedRefSubjectTypeId: unique symbol;
|
|
@@ -30,12 +29,11 @@ export declare class SynchronizedRefSubjectInternal<R, E, A, B> extends RefSubje
|
|
|
30
29
|
constructor(semaphore: TSemaphore, ref: RefSubjectInternal<R, E, A, B>);
|
|
31
30
|
get get(): IO<R, never, B>;
|
|
32
31
|
set(a: A, __tsplusTrace?: string | undefined): IO<R, never, void>;
|
|
33
|
-
run<R1>(emitter:
|
|
32
|
+
run<R1>(emitter: Sink<R1, E, B>): IO<R | R1, never, void>;
|
|
34
33
|
modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string | undefined): IO<R, never, C>;
|
|
35
34
|
modifyIO<R1, E1, C>(f: (b: B) => IO<R1, E1, readonly [C, A]>, __tsplusTrace?: string): IO<R | R1, E1, C>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
end: IO<R, never, void>;
|
|
35
|
+
event(value: A): IO<R, never, void>;
|
|
36
|
+
error(cause: Cause<E>): IO<R, never, void>;
|
|
39
37
|
withPermit<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
|
40
38
|
get unsafeGet(): B;
|
|
41
39
|
}
|
package/RefSubject/api.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Lazy } from "@fncts/base/data/function/definition";
|
|
2
2
|
import { UIO, IO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { Scope } from "@fncts/io/Scope/definition";
|
|
4
3
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
5
4
|
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
6
5
|
import { RefSubject } from "./definition.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
-
import { Scope } from "@fncts/io/Scope/definition";
|
|
3
2
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
4
|
-
import type {
|
|
3
|
+
import type { Sink } from "../Push.js";
|
|
5
4
|
import type { Push } from "../Push.js";
|
|
6
5
|
import type { ModifiableRef, ReadableRef, WritableRef } from "../Ref.js";
|
|
7
6
|
import type { SynchronizedRefSubject } from "@fncts/io/RefSubject/Synchronized/definition";
|
|
@@ -11,7 +10,7 @@ import { RefVariance } from "../Ref.js";
|
|
|
11
10
|
/**
|
|
12
11
|
* @tsplus type fncts.io.Push.RefSubject
|
|
13
12
|
*/
|
|
14
|
-
export interface RefSubject<out R, in out E, in A, out B> extends Push<R, E, B>,
|
|
13
|
+
export interface RefSubject<out R, in out E, in A, out B> extends Push<R, E, B>, Sink<R, E, A> {
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
16
|
* @tsplus type fncts.io.Push.RefSubjectOps
|
|
@@ -22,7 +21,7 @@ export declare const RefSubject: RefSubjectOps;
|
|
|
22
21
|
export declare namespace RefSubject {
|
|
23
22
|
type Synchronized<R, E, A, B> = SynchronizedRefSubject<R, E, A, B>;
|
|
24
23
|
}
|
|
25
|
-
export declare abstract class RefSubjectInternal<R, E, A, B> implements ReadableRef<R, never, B>, WritableRef<R, never, A>, ModifiableRef<R, R, never, never, A, B>, Push<R, E, B>,
|
|
24
|
+
export declare abstract class RefSubjectInternal<R, E, A, B> implements ReadableRef<R, never, B>, WritableRef<R, never, A>, ModifiableRef<R, R, never, never, A, B>, Push<R, E, B>, Sink<R, E, A> {
|
|
26
25
|
readonly [PushTypeId]: PushTypeId;
|
|
27
26
|
[RefVariance]: {
|
|
28
27
|
readonly _RA: (_: never) => R;
|
|
@@ -40,10 +39,9 @@ export declare abstract class RefSubjectInternal<R, E, A, B> implements Readable
|
|
|
40
39
|
abstract get get(): IO<R, never, B>;
|
|
41
40
|
abstract set(value: A): IO<R, never, void>;
|
|
42
41
|
abstract modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string): IO<R, never, C>;
|
|
43
|
-
abstract run<R1>(emitter:
|
|
44
|
-
abstract
|
|
45
|
-
abstract
|
|
46
|
-
abstract end: IO<R, never, void>;
|
|
42
|
+
abstract run<R1>(emitter: Sink<R1, E, B>): IO<R | R1, never, void>;
|
|
43
|
+
abstract error(cause: Cause<E>): IO<R, never, void>;
|
|
44
|
+
abstract event(value: A): IO<R, never, void>;
|
|
47
45
|
abstract get unsafeGet(): B;
|
|
48
46
|
}
|
|
49
47
|
/**
|
package/STM/definition.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
|
2
2
|
import { Environment } from "@fncts/base/data/Environment/definition";
|
|
3
3
|
import type { Journal } from "./internal/Journal.js";
|
|
4
4
|
import type { _A, _E, _R } from "@fncts/base/types";
|
|
5
|
-
import {
|
|
5
|
+
import { IOTag, IOTypeId, IOVariance } from "@fncts/io/IO/definition";
|
|
6
6
|
export declare const enum STMTag {
|
|
7
7
|
Effect = "Effect",
|
|
8
8
|
OnFailure = "OnFailure",
|
|
@@ -22,7 +22,7 @@ export type STMTypeId = typeof STMTypeId;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare abstract class STM<R, E, A> {
|
|
24
24
|
readonly [IOTypeId]: IOTypeId;
|
|
25
|
-
readonly _tag =
|
|
25
|
+
readonly _tag = IOTag.Commit;
|
|
26
26
|
readonly trace?: string;
|
|
27
27
|
readonly [STMTypeId]: STMTypeId;
|
|
28
28
|
[IOVariance]: {
|
|
@@ -36,6 +36,23 @@ export declare abstract class STM<R, E, A> {
|
|
|
36
36
|
_A: () => A;
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
export declare namespace STM {
|
|
40
|
+
type EnvironmentOf<X> = [X] extends [{
|
|
41
|
+
[STMVariance]: {
|
|
42
|
+
_R: () => infer R;
|
|
43
|
+
};
|
|
44
|
+
}] ? R : never;
|
|
45
|
+
type ErrorOf<X> = [X] extends [{
|
|
46
|
+
[STMVariance]: {
|
|
47
|
+
_E: () => infer E;
|
|
48
|
+
};
|
|
49
|
+
}] ? E : never;
|
|
50
|
+
type ValueOf<X> = [X] extends [{
|
|
51
|
+
[STMVariance]: {
|
|
52
|
+
_A: () => infer A;
|
|
53
|
+
};
|
|
54
|
+
}] ? A : never;
|
|
55
|
+
}
|
|
39
56
|
/**
|
|
40
57
|
* @tsplus unify fncts.io.STM
|
|
41
58
|
*/
|
package/Sink/api.d.ts
CHANGED
|
@@ -21,37 +21,37 @@ import { MergeDecision } from "../Channel/internal/MergeDecision.js";
|
|
|
21
21
|
* @tsplus pipeable fncts.io.Sink zipLeft
|
|
22
22
|
* @tsplus location "@fncts/io/Sink/api"
|
|
23
23
|
*/
|
|
24
|
-
export declare function zipLeft<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E,
|
|
24
|
+
export declare function zipLeft<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, Z>;
|
|
25
25
|
/**
|
|
26
|
-
* Like {@link
|
|
26
|
+
* Like {@link zipConcurrent }, but keeps only the result from this sink
|
|
27
27
|
* @tsplus pipeable fncts.io.Sink zipLeftC
|
|
28
28
|
* @tsplus location "@fncts/io/Sink/api"
|
|
29
29
|
*/
|
|
30
|
-
export declare function zipLeftC<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E,
|
|
30
|
+
export declare function zipLeftC<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, Z>;
|
|
31
31
|
/**
|
|
32
32
|
* Like {@link zip }, but keeps only the result from the `that` sink
|
|
33
33
|
* @tsplus pipeable fncts.io.Sink zipRight
|
|
34
34
|
* @tsplus location "@fncts/io/Sink/api"
|
|
35
35
|
*/
|
|
36
|
-
export declare function zipRight<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E,
|
|
36
|
+
export declare function zipRight<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, Z1>;
|
|
37
37
|
/**
|
|
38
|
-
* Like {@link
|
|
38
|
+
* Like {@link zipConcurrent }, but keeps only the result from the `that` sink
|
|
39
39
|
* @tsplus pipeable fncts.io.Sink zipRightC
|
|
40
40
|
* @tsplus location "@fncts/io/Sink/api"
|
|
41
41
|
*/
|
|
42
|
-
export declare function zipRightC<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E,
|
|
42
|
+
export declare function zipRightC<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, Z1>;
|
|
43
43
|
/**
|
|
44
44
|
* Replaces this sink's result with the provided value.
|
|
45
45
|
* @tsplus pipeable fncts.io.Sink as
|
|
46
46
|
* @tsplus location "@fncts/io/Sink/api"
|
|
47
47
|
*/
|
|
48
|
-
export declare function as<Z1>(z: Lazy<Z1>, __tsplusTrace?: string): <R, E, In, L,
|
|
48
|
+
export declare function as<Z1>(z: Lazy<Z1>, __tsplusTrace?: string): <R, E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E, In, L, Z1>;
|
|
49
49
|
/**
|
|
50
50
|
* Repeatedly runs the sink and accumulates its results into a chunk
|
|
51
51
|
* @tsplus pipeable fncts.io.Sink collectAll
|
|
52
52
|
* @tsplus location "@fncts/io/Sink/api"
|
|
53
53
|
*/
|
|
54
|
-
export declare function collectAll(__tsplusTrace?: string): <R, E, In extends L, L,
|
|
54
|
+
export declare function collectAll(__tsplusTrace?: string): <R, E, In extends L, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E, In, L, import("@fncts/base/collection/immutable/Conc.js").Conc<Z>>;
|
|
55
55
|
/**
|
|
56
56
|
* Repeatedly runs the sink for as long as its results satisfy the predicate
|
|
57
57
|
* `p`. The sink's results will be accumulated using the stepping function
|
|
@@ -72,26 +72,26 @@ export declare function collectLeftover<R, E, In, L, Z>(self: Sink<R, E, In, L,
|
|
|
72
72
|
* @tsplus pipeable fncts.io.Sink contramap
|
|
73
73
|
* @tsplus location "@fncts/io/Sink/api"
|
|
74
74
|
*/
|
|
75
|
-
export declare function contramap<In, In1>(f: (inp: In1) => In, __tsplusTrace?: string): <R, E, L,
|
|
75
|
+
export declare function contramap<In, In1>(f: (inp: In1) => In, __tsplusTrace?: string): <R, E, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E, In1, L, Z>;
|
|
76
76
|
/**
|
|
77
77
|
* Transforms this sink's input chunks. `f` must preserve chunking-invariance
|
|
78
78
|
* @tsplus pipeable fncts.io.Sink contramapChunks
|
|
79
79
|
* @tsplus location "@fncts/io/Sink/api"
|
|
80
80
|
*/
|
|
81
|
-
export declare function contramapChunks<In, In1>(f: (chunk: Conc<In1>) => Conc<In>, __tsplusTrace?: string): <R, E, L,
|
|
81
|
+
export declare function contramapChunks<In, In1>(f: (chunk: Conc<In1>) => Conc<In>, __tsplusTrace?: string): <R, E, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E, In1, L, Z>;
|
|
82
82
|
/**
|
|
83
83
|
* Effectfully transforms this sink's input chunks. `f` must preserve
|
|
84
84
|
* chunking-invariance
|
|
85
85
|
* @tsplus pipeable fncts.io.Sink contramapChunksIO
|
|
86
86
|
* @tsplus location "@fncts/io/Sink/api"
|
|
87
87
|
*/
|
|
88
|
-
export declare function contramapChunksIO<In, R1, E1, In1>(f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>, __tsplusTrace?: string): <R, E, L,
|
|
88
|
+
export declare function contramapChunksIO<In, R1, E1, In1>(f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>, __tsplusTrace?: string): <R, E, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In1, L, Z>;
|
|
89
89
|
/**
|
|
90
90
|
* Effectfully transforms this sink's input elements.
|
|
91
91
|
* @tsplus pipeable fncts.io.Sink contramapIO
|
|
92
92
|
* @tsplus location "@fncts/io/Sink/api"
|
|
93
93
|
*/
|
|
94
|
-
export declare function contramapIO<In, R1, E1, In1>(f: (inp: In1) => IO<R1, E1, In>, __tsplusTrace?: string): <R, E, L,
|
|
94
|
+
export declare function contramapIO<In, R1, E1, In1>(f: (inp: In1) => IO<R1, E1, In>, __tsplusTrace?: string): <R, E, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In1, L, Z>;
|
|
95
95
|
/**
|
|
96
96
|
* Transforms both inputs and result of this sink using the provided
|
|
97
97
|
* functions.
|
|
@@ -507,7 +507,7 @@ export declare function map<Z, Z1>(f: (z: Z) => Z1, __tsplusTrace?: string): <R,
|
|
|
507
507
|
* @tsplus pipeable fncts.io.Sink mapError
|
|
508
508
|
* @tsplus location "@fncts/io/Sink/api"
|
|
509
509
|
*/
|
|
510
|
-
export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, In, L,
|
|
510
|
+
export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E1, In, L, Z>;
|
|
511
511
|
/**
|
|
512
512
|
* Effectfully transforms this sink's result.
|
|
513
513
|
* @tsplus pipeable fncts.io.Sink mapIO
|
|
@@ -529,28 +529,28 @@ export declare function matchSink<E, In, Z, R1, E1, In1 extends In, L1, Z1, R2,
|
|
|
529
529
|
* @tsplus pipeable fncts.io.Sink orElse
|
|
530
530
|
* @tsplus location "@fncts/io/Sink/api"
|
|
531
531
|
*/
|
|
532
|
-
export declare function orElse<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, In, L,
|
|
532
|
+
export declare function orElse<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L1 | L, Z1 | Z>;
|
|
533
533
|
/**
|
|
534
534
|
* Provides the sink with its required environment, which eliminates its
|
|
535
535
|
* dependency on `R`.
|
|
536
536
|
* @tsplus pipeable fncts.io.Sink provideEnvironment
|
|
537
537
|
* @tsplus location "@fncts/io/Sink/api"
|
|
538
538
|
*/
|
|
539
|
-
export declare function provideEnvironment<R>(r: Lazy<Environment<R>>, __tsplusTrace?: string): <E, In, L,
|
|
539
|
+
export declare function provideEnvironment<R>(r: Lazy<Environment<R>>, __tsplusTrace?: string): <E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<never, E, In, L, Z>;
|
|
540
540
|
/**
|
|
541
541
|
* Runs both sinks in parallel on the input, returning the result or the
|
|
542
542
|
* error from the one that finishes first.
|
|
543
543
|
* @tsplus pipeable fncts.io.Sink race
|
|
544
544
|
* @tsplus location "@fncts/io/Sink/api"
|
|
545
545
|
*/
|
|
546
|
-
export declare function race<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, In, L,
|
|
546
|
+
export declare function race<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L1 | L, Z1 | Z>;
|
|
547
547
|
/**
|
|
548
548
|
* Runs both sinks in parallel on the input, returning the result or the error
|
|
549
549
|
* from the one that finishes first.
|
|
550
550
|
* @tsplus pipeable fncts.io.Sink raceBoth
|
|
551
551
|
* @tsplus location "@fncts/io/Sink/api"
|
|
552
552
|
*/
|
|
553
|
-
export declare function raceBoth<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, capacity?: Lazy<number>, __tsplusTrace?: string): <R, E, In, L,
|
|
553
|
+
export declare function raceBoth<R1, E1, In1, L1, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, capacity?: Lazy<number>, __tsplusTrace?: string): <R, E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L1 | L, import("@fncts/base/data/Either.js").Either<Z, Z1>>;
|
|
554
554
|
/**
|
|
555
555
|
* Runs both sinks in parallel on the input, using the specified merge
|
|
556
556
|
* function as soon as one result or the other has been computed.
|
|
@@ -594,7 +594,7 @@ export declare function serviceWithSink<S, R, E, In, L, Z>(f: (service: S) => Si
|
|
|
594
594
|
* @tsplus pipeable fncts.io.Sink splitWhere
|
|
595
595
|
* @tsplus location "@fncts/io/Sink/api"
|
|
596
596
|
*/
|
|
597
|
-
export declare function splitWhere<In>(p: Predicate<In>, __tsplusTrace?: string): <R, E, L extends In,
|
|
597
|
+
export declare function splitWhere<In>(p: Predicate<In>, __tsplusTrace?: string): <R, E, L extends In, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R, E, In, In, Z>;
|
|
598
598
|
/**
|
|
599
599
|
* A sink that immediately ends with the specified value.
|
|
600
600
|
* @tsplus static fncts.io.SinkOps succeed
|
|
@@ -613,7 +613,7 @@ export declare function succeedNow<Z>(z: Z, __tsplusTrace?: string): Sink<never,
|
|
|
613
613
|
* @tsplus pipeable fncts.io.Sink summarized
|
|
614
614
|
* @tsplus location "@fncts/io/Sink/api"
|
|
615
615
|
*/
|
|
616
|
-
export declare function summarized<R1, E1, B, C>(summary: Lazy<IO<R1, E1, B>>, f: (b1: B, b2: B) => C, __tsplusTrace?: string): <R, E, In, L,
|
|
616
|
+
export declare function summarized<R1, E1, B, C>(summary: Lazy<IO<R1, E1, B>>, f: (b1: B, b2: B) => C, __tsplusTrace?: string): <R, E, In, L, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In, L, readonly [Z, C]>;
|
|
617
617
|
/**
|
|
618
618
|
* @tsplus getter fncts.io.Sink timed
|
|
619
619
|
* @tsplus location "@fncts/io/Sink/api"
|
|
@@ -638,14 +638,14 @@ export declare function unwrapScoped<R, E, R1, E1, In, L, Z>(scoped: Lazy<IO<R,
|
|
|
638
638
|
* @tsplus pipeable fncts.io.Sink zip
|
|
639
639
|
* @tsplus location "@fncts/io/Sink/api"
|
|
640
640
|
*/
|
|
641
|
-
export declare function zip<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E,
|
|
641
|
+
export declare function zip<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, readonly [Z, Z1]>;
|
|
642
642
|
/**
|
|
643
643
|
* Runs both sinks in parallel on the input and combines the results in a
|
|
644
644
|
* tuple.
|
|
645
|
-
* @tsplus pipeable fncts.io.Sink
|
|
645
|
+
* @tsplus pipeable fncts.io.Sink zipConcurrent
|
|
646
646
|
* @tsplus location "@fncts/io/Sink/api"
|
|
647
647
|
*/
|
|
648
|
-
export declare function
|
|
648
|
+
export declare function zipConcurrent<In, L, R1, E1, In1 extends In, L1 extends L, Z1>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): <R, E, Z>(self: import("./definition.js").Sink<R, E, In, L, Z>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L | L1, readonly [Z, Z1]>;
|
|
649
649
|
/**
|
|
650
650
|
* Feeds inputs to this sink until it yields a result, then switches over to
|
|
651
651
|
* the provided sink until it yields a result, finally combining the two
|
|
@@ -657,7 +657,7 @@ export declare function zipWith<In, L, Z, R1, E1, In1 extends In, L1 extends L,
|
|
|
657
657
|
/**
|
|
658
658
|
* Runs both sinks in parallel on the input and combines the results using the
|
|
659
659
|
* provided function.
|
|
660
|
-
* @tsplus pipeable fncts.io.Sink
|
|
660
|
+
* @tsplus pipeable fncts.io.Sink zipWithConcurrent
|
|
661
661
|
* @tsplus location "@fncts/io/Sink/api"
|
|
662
662
|
*/
|
|
663
|
-
export declare function
|
|
663
|
+
export declare function zipWithConcurrent<Z, R1, E1, In1, L1, Z1, Z2>(that: Lazy<Sink<R1, E1, In1, L1, Z1>>, f: (z: Z, z1: Z1) => Z2, __tsplusTrace?: string): <R, E, In, L>(self: import("@fncts/base/data/function.js").Lazy<import("./definition.js").Sink<R, E, In, L, Z>>) => import("./definition.js").Sink<R1 | R, E1 | E, In & In1, L1 | L, Z2>;
|
package/Subject/Atomic.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
-
import { Scope } from "@fncts/io/Scope/definition";
|
|
3
2
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
4
|
-
import type {
|
|
3
|
+
import type { Sink } from "@fncts/io/Push/definition";
|
|
5
4
|
import type { Subject } from "@fncts/io/Subject/definition";
|
|
6
5
|
import { Multicast } from "@fncts/io/Push";
|
|
7
6
|
import { PushTypeId, PushVariance } from "@fncts/io/Push/definition";
|
|
@@ -15,8 +14,7 @@ export declare class AtomicSubject<E, A> implements Subject<never, E, A> {
|
|
|
15
14
|
readonly _A: (_: never) => A;
|
|
16
15
|
};
|
|
17
16
|
readonly stream: Multicast<never, E, A>;
|
|
18
|
-
run<R>(emitter:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
end: import("../IO").IO<never, never, void>;
|
|
17
|
+
run<R>(emitter: Sink<R, E, A>): IO<R, never, unknown>;
|
|
18
|
+
event(value: A): IO<never, never, void>;
|
|
19
|
+
error(cause: Cause<E>): IO<never, never, void>;
|
|
22
20
|
}
|
package/Subject/definition.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Push, Sink } from "../Push.js";
|
|
2
2
|
export declare const SubjectTypeId: unique symbol;
|
|
3
3
|
export type SubjectTypeId = typeof SubjectTypeId;
|
|
4
4
|
/**
|
|
5
5
|
* @tsplus type fncts.io.Push.Subject
|
|
6
6
|
*/
|
|
7
|
-
export interface Subject<R, E, A> extends Push<R, E, A>,
|
|
7
|
+
export interface Subject<R, E, A> extends Push<R, E, A>, Sink<R, E, A> {
|
|
8
8
|
readonly [SubjectTypeId]: SubjectTypeId;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
@@ -59,6 +59,6 @@ function runScoped(self) {
|
|
|
59
59
|
return tsplus_module_1.unit;
|
|
60
60
|
}
|
|
61
61
|
}, fileName_1 + ":46:26"));
|
|
62
|
-
return tsplus_module_10.uninterruptibleMask(restore => tsplus_module_1.flatMap(parent => tsplus_module_1.flatMap(child => tsplus_module_1.flatMap(channelFuture => tsplus_module_1.flatMap(scopeFuture => tsplus_module_1.flatMap(fiber => tsplus_module_1.flatMap(() => tsplus_module_1.flatMap(done => tsplus_module_1.map(() => done, fileName_1 + ":66:8")(fiber.inheritAll), fileName_1 + ":65:21")(restore(tsplus_module_3.wait(channelFuture, fileName_1 + ":65:43"), fileName_1 + ":65:29")), fileName_1 + ":64:8")(tsplus_module_6.addFinalizer(() => tsplus_module_3.succeed_(undefined, fileName_1 + ":64:44")(scopeFuture), fileName_1 + ":64:24")), fileName_1 + ":63:30")(tsplus_module_7.forkScoped(restore(run(channelFuture, scopeFuture, child), fileName_1 + ":63:38"), fileName_1 + ":63:78")), fileName_1 + ":62:30")(tsplus_module_8.make(fileName_1 + ":62:42")), fileName_1 + ":61:30")(tsplus_module_8.make(fileName_1 + ":61:42")), fileName_1 + ":60:30")(parent.fork), fileName_1 + ":59:30")(tsplus_module_9.scope));
|
|
62
|
+
return tsplus_module_10.uninterruptibleMask(restore => tsplus_module_1.flatMap(parent => tsplus_module_1.flatMap(child => tsplus_module_1.flatMap(channelFuture => tsplus_module_1.flatMap(scopeFuture => tsplus_module_1.flatMap(fiber => tsplus_module_1.flatMap(() => tsplus_module_1.flatMap(done => tsplus_module_1.map(() => done, fileName_1 + ":66:8")(fiber.inheritAll), fileName_1 + ":65:21")(restore(tsplus_module_3.wait(channelFuture, fileName_1 + ":65:43"), fileName_1 + ":65:29")), fileName_1 + ":64:8")(tsplus_module_6.addFinalizer(() => tsplus_module_3.succeed_(undefined, fileName_1 + ":64:44")(scopeFuture), fileName_1 + ":64:24")), fileName_1 + ":63:30")(tsplus_module_7.forkScoped(restore(run(channelFuture, scopeFuture, child), fileName_1 + ":63:38"), fileName_1 + ":63:78")), fileName_1 + ":62:30")(tsplus_module_8.make(fileName_1 + ":62:42")), fileName_1 + ":61:30")(tsplus_module_8.make(fileName_1 + ":61:42")), fileName_1 + ":60:30")(parent.fork), fileName_1 + ":59:30")(tsplus_module_9.scope), fileName_1 + ":57:32");
|
|
63
63
|
}
|
|
64
64
|
//# sourceMappingURL=runScoped.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runScoped.cjs","names":["_function","require","_ChannelExecutor","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_interopRequireWildcard","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","runScopedInterpret","channelState","exec","_tag","tsplus_module_1","flatMap","run","fileName_1","effect","fromExit","getDone","readUpstream","cause","refailCause","Error","runScoped","self","channelFuture","scopeFuture","scope","defer","zipLeft","tsplus_module_3","wait","zipRight","tsplus_module_2","fulfill","tsplus_module_5","acquireReleaseExit","succeed","ChannelExecutor","identity","exit","finalize","close","tapErrorCause","tsplus_module_4","addFinalizer","unit","tsplus_module_10","uninterruptibleMask","restore","parent","child","fiber","done","map","inheritAll","tsplus_module_6","succeed_","undefined","tsplus_module_7","forkScoped","tsplus_module_8","make","fork","tsplus_module_9"],"sources":["../../../_src/Channel/api/runScoped.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,SAAA,gBAAAC,OAAA;AACA,IAAAC,gBAAA,gBAAAD,OAAA;AAA2F,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAI,wBAAAC,GAAA,EAAAL,WAAA,SAAAA,WAAA,IAAAK,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAT,wBAAA,CAAAC,WAAA,OAAAQ,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,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d,eAAA,CAAAC,OAAA,CACXuC,KAAK,IAAAxC,eAAA,CAAAC,OAAA,OAAAD,eAAA,CAAAC,OAAA,CAELwC,IAAI,IAAAzC,eAAA,CAAA0C,GAAA,OAEHD,IAAI,EAAAtC,UAAA,YADTqC,KAAK,CAACG,UAAU,GAAAxC,UAAA,aADHkC,OAAO,CAAAnB,eAAA,CAAAC,IAAA,CAACN,aAAa,EAAAV,UAAA,cAAAA,UAAA,YAAO,GAAAA,UAAA,YADzCyC,eAAA,CAAAX,YAAA,OAAgBf,eAAA,CAAA2B,QAAA,CAAoBC,SAAS,EAAA3C,UAAA,aAA7BW,WAAW,CAAmB,EAAAX,UAAA,YAAC,GAAAA,UAAA,aAAA4C,eAAA,CAAAC,UAAA,CADzBX,OAAO,CAACnC,GAAG,CAACW,aAAa,EAAEC,WAAW,EAAEyB,KAAK,CAAC,EAAApC,UAAA,YAAC,EAAAA,UAAA,eAAAA,UAAA,aAD/C8C,eAAA,CAAAC,IAAA,CAAA/C,UAAA,YAA0B,GAAAA,UAAA,aAD1B8C,eAAA,CAAAC,IAAA,CAAA/C,UAAA,YAA8B,GAAAA,UAAA,aAD9BmC,MAAM,CAACa,IAAI,GAAAhD,UAAA,aAAAiD,eAAA,CAAArC,KAAA,CAQnC,
|
|
1
|
+
{"version":3,"file":"runScoped.cjs","names":["_function","require","_ChannelExecutor","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_interopRequireWildcard","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","runScopedInterpret","channelState","exec","_tag","tsplus_module_1","flatMap","run","fileName_1","effect","fromExit","getDone","readUpstream","cause","refailCause","Error","runScoped","self","channelFuture","scopeFuture","scope","defer","zipLeft","tsplus_module_3","wait","zipRight","tsplus_module_2","fulfill","tsplus_module_5","acquireReleaseExit","succeed","ChannelExecutor","identity","exit","finalize","close","tapErrorCause","tsplus_module_4","addFinalizer","unit","tsplus_module_10","uninterruptibleMask","restore","parent","child","fiber","done","map","inheritAll","tsplus_module_6","succeed_","undefined","tsplus_module_7","forkScoped","tsplus_module_8","make","fork","tsplus_module_9"],"sources":["../../../_src/Channel/api/runScoped.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,SAAA,gBAAAC,OAAA;AACA,IAAAC,gBAAA,gBAAAD,OAAA;AAA2F,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAI,wBAAAC,GAAA,EAAAL,WAAA,SAAAA,WAAA,IAAAK,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAT,wBAAA,CAAAC,WAAA,OAAAQ,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA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UAAA,YAAO,GAAAA,UAAA,YADzCyC,eAAA,CAAAX,YAAA,OAAgBf,eAAA,CAAA2B,QAAA,CAAoBC,SAAS,EAAA3C,UAAA,aAA7BW,WAAW,CAAmB,EAAAX,UAAA,YAAC,GAAAA,UAAA,aAAA4C,eAAA,CAAAC,UAAA,CADzBX,OAAO,CAACnC,GAAG,CAACW,aAAa,EAAEC,WAAW,EAAEyB,KAAK,CAAC,EAAApC,UAAA,YAAC,EAAAA,UAAA,eAAAA,UAAA,aAD/C8C,eAAA,CAAAC,IAAA,CAAA/C,UAAA,YAA0B,GAAAA,UAAA,aAD1B8C,eAAA,CAAAC,IAAA,CAAA/C,UAAA,YAA8B,GAAAA,UAAA,aAD9BmC,MAAM,CAACa,IAAI,GAAAhD,UAAA,aAAAiD,eAAA,CAAArC,KAAA,CAQnC,EAAAZ,UAAA,YACH;AACH"}
|
package/_cjs/Channel/api.cjs
CHANGED
|
@@ -553,7 +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(restore => tsplus_module_4.map(scope => acquireReleaseOutExitWith_1(tsplus_module_4.tapErrorCause(cause => scope.close(() => tsplus_module_20.failCause(cause, fileName_1 + ":759:88")), 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:88")), 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), fileName_1 + ":756:27"));
|
|
557
557
|
}
|
|
558
558
|
/**
|
|
559
559
|
* Returns a new channel, which is the same as this one, except the failure value of the returned
|
|
@@ -599,7 +599,7 @@ function mapOut(f) {
|
|
|
599
599
|
return pipeTo_1(reader)(self);
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
const mapOutIOReader = f =>
|
|
602
|
+
const mapOutIOReader = f => readWithCause_1(out => tsplus_module_1.zipRight(mapOutIOReader(f))(tsplus_module_1.flatMap(writeNow_1)(fromIO_1(() => f(out)))), tsplus_module_1.failCauseNow, tsplus_module_1.succeedNow);
|
|
603
603
|
/**
|
|
604
604
|
* @tsplus pipeable fncts.io.Channel mapOutIO
|
|
605
605
|
*/
|