@fncts/io 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/Cached/internal.d.ts +1 -1
  2. package/CancellerState.d.ts +1 -1
  3. package/Channel/ChildExecutorDecision/definition.d.ts +1 -1
  4. package/Channel/UpstreamPullRequest/definition.d.ts +1 -1
  5. package/Channel/UpstreamPullStrategy/definition.d.ts +1 -1
  6. package/Channel/api/mergeAllWith.d.ts +1 -1
  7. package/Channel/internal/ChannelExecutor.d.ts +1 -1
  8. package/Channel/internal/ChannelState.d.ts +2 -2
  9. package/Channel/internal/MergeDecision.d.ts +1 -1
  10. package/Channel/internal/MergeState.d.ts +1 -1
  11. package/Channel/internal/SingleProducerAsyncInput.d.ts +1 -1
  12. package/Fiber/FiberContext.d.ts +18 -18
  13. package/Fiber/definition.d.ts +2 -2
  14. package/FiberRef/api.d.ts +2 -2
  15. package/FiberRef/definition.d.ts +2 -2
  16. package/FiberRef/unsafe.d.ts +6 -0
  17. package/FiberRefs/definition.d.ts +1 -1
  18. package/FiberState/definition.d.ts +2 -2
  19. package/FiberStatus/definition.d.ts +1 -1
  20. package/Future/definition.d.ts +1 -1
  21. package/Hub/definition.d.ts +1 -1
  22. package/IO/api/core-scope.d.ts +4 -3
  23. package/IO/api/interrupt.d.ts +2 -2
  24. package/IO/api/supervised.d.ts +10 -0
  25. package/IO/api.d.ts +7 -10
  26. package/IO/definition.d.ts +16 -139
  27. package/IO.d.ts +1 -0
  28. package/IOEnv/definition.d.ts +1 -1
  29. package/Layer/definition.d.ts +2 -2
  30. package/Ref/definition.d.ts +3 -3
  31. package/RuntimeConfig.d.ts +1 -1
  32. package/STM/definition.d.ts +5 -5
  33. package/STM/internal/CommitState.d.ts +1 -1
  34. package/STM/internal/Entry.d.ts +2 -2
  35. package/STM/internal/Journal.d.ts +6 -6
  36. package/STM/internal/TryCommit.d.ts +2 -2
  37. package/STM/internal/Versioned.d.ts +1 -1
  38. package/Schedule/Decision.d.ts +1 -1
  39. package/Scope/ReleaseMap/definition.d.ts +1 -1
  40. package/Scope/definition.d.ts +2 -2
  41. package/ScopedRef/definition.d.ts +1 -1
  42. package/State/internal.d.ts +1 -1
  43. package/Stream/api.d.ts +1 -1
  44. package/Stream/definition.d.ts +1 -1
  45. package/Stream/internal/DebounceState.d.ts +4 -4
  46. package/Stream/internal/Handoff.d.ts +5 -5
  47. package/Stream/internal/Pull.d.ts +1 -1
  48. package/Stream/internal/SinkEndReason.d.ts +1 -1
  49. package/TExit/definition.d.ts +3 -3
  50. package/TReentrantLock/definition.d.ts +1 -1
  51. package/TRef/definition.d.ts +1 -1
  52. package/TxnId.d.ts +1 -1
  53. package/_cjs/Clock/definition.cjs +1 -1
  54. package/_cjs/Console/definition.cjs +1 -1
  55. package/_cjs/Fiber/FiberContext.cjs +161 -294
  56. package/_cjs/Fiber/FiberContext.cjs.map +1 -1
  57. package/_cjs/FiberRef/api.cjs +19 -10
  58. package/_cjs/FiberRef/api.cjs.map +1 -1
  59. package/_cjs/FiberRef/unsafe.cjs +9 -1
  60. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  61. package/_cjs/IO/api/core-scope.cjs +23 -15
  62. package/_cjs/IO/api/core-scope.cjs.map +1 -1
  63. package/_cjs/IO/api/ensuringChildren.cjs +4 -2
  64. package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
  65. package/_cjs/IO/api/interrupt.cjs +17 -9
  66. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  67. package/_cjs/IO/api/supervised.cjs +26 -0
  68. package/_cjs/IO/api/supervised.cjs.map +1 -0
  69. package/_cjs/IO/api/withChildren.cjs +4 -2
  70. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  71. package/_cjs/IO/api.cjs +69 -63
  72. package/_cjs/IO/api.cjs.map +1 -1
  73. package/_cjs/IO/definition.cjs +8 -226
  74. package/_cjs/IO/definition.cjs.map +1 -1
  75. package/_cjs/IO.cjs +13 -0
  76. package/_cjs/IO.cjs.map +1 -1
  77. package/_cjs/Layer/api.cjs +1 -1
  78. package/_cjs/Random/definition.cjs +1 -1
  79. package/_cjs/Scope/definition.cjs +1 -1
  80. package/_mjs/Clock/definition.mjs +1 -1
  81. package/_mjs/Console/definition.mjs +1 -1
  82. package/_mjs/Fiber/FiberContext.mjs +161 -293
  83. package/_mjs/Fiber/FiberContext.mjs.map +1 -1
  84. package/_mjs/FiberRef/api.mjs +18 -9
  85. package/_mjs/FiberRef/api.mjs.map +1 -1
  86. package/_mjs/FiberRef/unsafe.mjs +6 -0
  87. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  88. package/_mjs/IO/api/core-scope.mjs +21 -16
  89. package/_mjs/IO/api/core-scope.mjs.map +1 -1
  90. package/_mjs/IO/api/ensuringChildren.mjs +3 -2
  91. package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
  92. package/_mjs/IO/api/interrupt.mjs +14 -6
  93. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  94. package/_mjs/IO/api/supervised.mjs +14 -0
  95. package/_mjs/IO/api/supervised.mjs.map +1 -0
  96. package/_mjs/IO/api/withChildren.mjs +3 -2
  97. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  98. package/_mjs/IO/api.mjs +67 -60
  99. package/_mjs/IO/api.mjs.map +1 -1
  100. package/_mjs/IO/definition.mjs +5 -184
  101. package/_mjs/IO/definition.mjs.map +1 -1
  102. package/_mjs/IO.mjs +1 -0
  103. package/_mjs/IO.mjs.map +1 -1
  104. package/_mjs/Layer/api.mjs +1 -1
  105. package/_mjs/Random/definition.mjs +1 -1
  106. package/_mjs/Scope/definition.mjs +1 -1
  107. package/_src/Fiber/FiberContext.ts +21 -111
  108. package/_src/FiberRef/api.ts +15 -7
  109. package/_src/FiberRef/unsafe.ts +5 -0
  110. package/_src/IO/api/core-scope.ts +12 -10
  111. package/_src/IO/api/interrupt.ts +8 -3
  112. package/_src/IO/api/supervised.ts +14 -0
  113. package/_src/IO/api.ts +25 -26
  114. package/_src/IO/definition.ts +8 -158
  115. package/_src/IO.ts +1 -0
  116. package/package.json +4 -4
@@ -7,21 +7,18 @@ import { Maybe } from "@fncts/base/data/Maybe/definition";
7
7
  import { FiberScope } from "@fncts/io/FiberScope";
8
8
  import { Lazy } from "@fncts/base/data/function/definition";
9
9
  import { Fiber } from "@fncts/io/Fiber/definition";
10
- import { InterruptStatus } from "@fncts/io/InterruptStatus";
11
- import { FiberDescriptor } from "@fncts/io/FiberDescriptor";
12
- import { Supervisor } from "@fncts/io/Supervisor/definition";
13
- import { FiberRef } from "@fncts/io/FiberRef/definition";
14
- import { FiberRefs } from "@fncts/io/FiberRefs";
15
10
  import { LogLevel } from "@fncts/io/LogLevel";
11
+ import { FiberRef } from "@fncts/io/FiberRef/definition";
16
12
  import { Exit } from "@fncts/base/data/Exit/definition";
13
+ import type { FiberStatus } from "../FiberStatus.js";
17
14
  import type { Trace as Trace_ } from "@fncts/base/data/Trace";
18
15
  import type { FiberContext } from "@fncts/io/Fiber/FiberContext";
19
16
  export declare const IOTypeId: unique symbol;
20
- export declare type IOTypeId = typeof IOTypeId;
17
+ export type IOTypeId = typeof IOTypeId;
21
18
  export interface IOF extends HKT {
22
19
  type: IO<this["R"], this["E"], this["A"]>;
23
20
  variance: {
24
- R: "-";
21
+ R: "+";
25
22
  E: "+";
26
23
  A: "+";
27
24
  };
@@ -62,9 +59,9 @@ export declare function unifyIO<X extends IO<any, any, any>>(self: X): IO<[
62
59
  ] extends [{
63
60
  _A: () => infer A;
64
61
  }] ? A : never>;
65
- export declare type UIO<A> = IO<never, never, A>;
66
- export declare type URIO<R, A> = IO<R, never, A>;
67
- export declare type FIO<E, A> = IO<never, E, A>;
62
+ export type UIO<A> = IO<never, never, A>;
63
+ export type URIO<R, A> = IO<R, never, A>;
64
+ export type FIO<E, A> = IO<never, E, A>;
68
65
  export declare const enum IOTag {
69
66
  SucceedNow = "SucceedNow",
70
67
  Chain = "Chain",
@@ -78,22 +75,9 @@ export declare const enum IOTag {
78
75
  Fail = "Fail",
79
76
  Yield = "Yield",
80
77
  Race = "Race",
81
- SetInterrupt = "SetInterrupt",
82
- GetInterrupt = "GetInterrupt",
83
- GetDescriptor = "GetDescriptor",
84
- Supervise = "Supervise",
85
- FiberRefModify = "FiberRefModify",
86
- FiberRefLocally = "FiberRefLocally",
87
- FiberRefDelete = "FiberRefDelete",
88
- FiberRefWith = "FiberRefWith",
89
- FiberRefModifyAll = "FiberRefModifyAll",
90
- GetForkScope = "GetForkScope",
91
- OverrideForkScope = "OverrideForkScope",
92
78
  Trace = "Trace",
93
- GetRuntimeConfig = "GetRuntimeConfig",
94
- Ensuring = "Ensuring",
95
79
  Logged = "Logged",
96
- SetRuntimeConfig = "SetRuntimeConfig"
80
+ Stateful = "Stateful"
97
81
  }
98
82
  export declare function isIO(u: unknown): u is IO<any, any, any>;
99
83
  /**
@@ -156,7 +140,7 @@ export declare class Match<R, E, A, R1, E1, B, R2, E2, C> extends IO<R | R1 | R2
156
140
  readonly _tag = IOTag.Match;
157
141
  constructor(io: IO<R, E, A>, onFailure: (cause: Cause<E>) => IO<R1, E1, B>, apply: (a: A) => IO<R2, E2, C>, trace?: string | undefined);
158
142
  }
159
- export declare type FailureReporter = (e: Cause<unknown>) => void;
143
+ export type FailureReporter = (e: Cause<unknown>) => void;
160
144
  /**
161
145
  * @internal
162
146
  */
@@ -214,112 +198,11 @@ export declare class Race<R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3> extends I
214
198
  readonly _tag = "Race";
215
199
  constructor(left: IO<R, E, A>, right: IO<R1, E1, A1>, leftWins: (exit: Fiber<E, A>, fiber: Fiber<E1, A1>) => IO<R2, E2, A2>, rightWins: (exit: Fiber<E1, A1>, fiber: Fiber<E, A>) => IO<R3, E3, A3>, trace?: string | undefined);
216
200
  }
217
- /**
218
- * @internal
219
- */
220
- export declare class SetInterrupt<R, E, A> extends IO<R, E, A> {
221
- readonly io: IO<R, E, A>;
222
- readonly flag: InterruptStatus;
223
- readonly trace?: string | undefined;
224
- readonly _tag = IOTag.SetInterrupt;
225
- constructor(io: IO<R, E, A>, flag: InterruptStatus, trace?: string | undefined);
226
- }
227
- /**
228
- * @internal
229
- */
230
- export declare class GetInterrupt<R, E, A> extends IO<R, E, A> {
231
- readonly f: (_: InterruptStatus) => IO<R, E, A>;
232
- readonly trace?: string | undefined;
233
- readonly _tag = IOTag.GetInterrupt;
234
- constructor(f: (_: InterruptStatus) => IO<R, E, A>, trace?: string | undefined);
235
- }
236
- /**
237
- * @internal
238
- */
239
- export declare class GetDescriptor<R, E, A> extends IO<R, E, A> {
240
- readonly f: (_: FiberDescriptor) => IO<R, E, A>;
241
- readonly trace?: string | undefined;
242
- readonly _tag = IOTag.GetDescriptor;
243
- constructor(f: (_: FiberDescriptor) => IO<R, E, A>, trace?: string | undefined);
244
- }
245
- /**
246
- * @internal
247
- */
248
- export declare class Supervise<R, E, A> extends IO<R, E, A> {
249
- readonly io: IO<R, E, A>;
250
- readonly supervisor: Supervisor<any>;
251
- readonly trace?: string | undefined;
252
- readonly _tag = IOTag.Supervise;
253
- constructor(io: IO<R, E, A>, supervisor: Supervisor<any>, trace?: string | undefined);
254
- }
255
- /**
256
- * @internal
257
- */
258
- export declare class FiberRefModify<A, B> extends IO<never, never, B> {
259
- readonly fiberRef: FiberRef<unknown>;
260
- readonly f: (a: A) => readonly [B, A];
261
- readonly trace?: string | undefined;
262
- readonly _tag = IOTag.FiberRefModify;
263
- constructor(fiberRef: FiberRef<unknown>, f: (a: A) => readonly [B, A], trace?: string | undefined);
264
- }
265
- export declare class FiberRefLocally<V, R, E, A> extends IO<R, E, A> {
266
- readonly localValue: V;
267
- readonly fiberRef: FiberRef<V>;
268
- readonly io: IO<R, E, A>;
269
- readonly trace?: string | undefined;
270
- readonly _tag = IOTag.FiberRefLocally;
271
- constructor(localValue: V, fiberRef: FiberRef<V>, io: IO<R, E, A>, trace?: string | undefined);
272
- }
273
- export declare class FiberRefDelete extends IO<never, never, void> {
274
- readonly fiberRef: FiberRef<unknown>;
275
- readonly trace?: string | undefined;
276
- readonly _tag = IOTag.FiberRefDelete;
277
- constructor(fiberRef: FiberRef<unknown>, trace?: string | undefined);
278
- }
279
- export declare class FiberRefWith<A, P, R, E, B> extends IO<R, E, B> {
280
- readonly fiberRef: FiberRef<A>;
281
- readonly f: (a: A) => IO<R, E, B>;
282
- readonly trace?: string | undefined;
283
- readonly _tag = IOTag.FiberRefWith;
284
- constructor(fiberRef: FiberRef<A>, f: (a: A) => IO<R, E, B>, trace?: string | undefined);
285
- }
286
- export declare class FiberRefModifyAll<A> extends IO<never, never, A> {
287
- readonly f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs) => readonly [A, FiberRefs];
288
- readonly trace?: string | undefined;
289
- readonly _tag = IOTag.FiberRefModifyAll;
290
- constructor(f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs) => readonly [A, FiberRefs], trace?: string | undefined);
291
- }
292
- /**
293
- * @internal
294
- */
295
- export declare class GetForkScope<R, E, A> extends IO<R, E, A> {
296
- readonly f: (_: FiberScope) => IO<R, E, A>;
201
+ export declare class Stateful<R, E, A> extends IO<R, E, A> {
202
+ readonly onState: (fiber: FiberContext<E, A>, status: FiberStatus) => IO<R, E, A>;
297
203
  readonly trace?: string | undefined;
298
- readonly _tag = IOTag.GetForkScope;
299
- constructor(f: (_: FiberScope) => IO<R, E, A>, trace?: string | undefined);
300
- }
301
- /**
302
- * @internal
303
- */
304
- export declare class OverrideForkScope<R, E, A> extends IO<R, E, A> {
305
- readonly io: IO<R, E, A>;
306
- readonly forkScope: Maybe<FiberScope>;
307
- readonly trace?: string | undefined;
308
- readonly _tag = IOTag.OverrideForkScope;
309
- constructor(io: IO<R, E, A>, forkScope: Maybe<FiberScope>, trace?: string | undefined);
310
- }
311
- export declare class GetRuntimeConfig<R, E, A> extends IO<R, E, A> {
312
- readonly f: (_: RuntimeConfig) => IO<R, E, A>;
313
- readonly trace?: string | undefined;
314
- readonly _tag = IOTag.GetRuntimeConfig;
315
- constructor(f: (_: RuntimeConfig) => IO<R, E, A>, trace?: string | undefined);
316
- }
317
- export declare class Ensuring<R, E, A, R1> extends IO<R | R1, E, A> {
318
- readonly io: IO<R, E, A>;
319
- readonly finalizer: IO<R1, never, any>;
320
- readonly trace?: string | undefined;
321
- readonly _tag = IOTag.Ensuring;
322
- constructor(io: IO<R, E, A>, finalizer: IO<R1, never, any>, trace?: string | undefined);
204
+ readonly _tag = IOTag.Stateful;
205
+ constructor(onState: (fiber: FiberContext<E, A>, status: FiberStatus) => IO<R, E, A>, trace?: string | undefined);
323
206
  }
324
207
  export declare class Logged extends IO<never, never, void> {
325
208
  readonly message: () => string;
@@ -331,20 +214,14 @@ export declare class Logged extends IO<never, never, void> {
331
214
  readonly _tag = IOTag.Logged;
332
215
  constructor(message: () => string, cause: Cause<any>, overrideLogLevel: Maybe<LogLevel>, trace?: string | undefined, overrideRef1?: FiberRef<unknown> | null, overrideValue1?: unknown | null);
333
216
  }
334
- export declare class SetRuntimeConfig extends IO<never, never, void> {
335
- readonly runtimeConfig: RuntimeConfig;
336
- readonly trace?: string | undefined;
337
- readonly _tag = IOTag.SetRuntimeConfig;
338
- constructor(runtimeConfig: RuntimeConfig, trace?: string | undefined);
339
- }
340
- export declare type Instruction = Chain<any, any, any, any, any, any> | SucceedNow<any> | Succeed<any> | SucceedWith<any> | Async<any, any, any, any> | Match<any, any, any, any, any, any, any, any, any> | Fork<any, any, any> | SetInterrupt<any, any, any> | GetInterrupt<any, any, any> | Fail<any> | GetDescriptor<any, any, any> | Yield | Defer<any, any, any> | DeferWith<any, any, any> | FiberRefModify<any, any> | FiberRefLocally<any, any, any, any> | FiberRefDelete | FiberRefWith<any, any, any, any, any> | FiberRefModifyAll<any> | Race<any, any, any, any, any, any, any, any, any, any, any, any> | Supervise<any, any, any> | GetForkScope<any, any, any> | OverrideForkScope<any, any, any> | Trace | GetRuntimeConfig<any, any, any> | Ensuring<any, any, any, any> | Logged | SetRuntimeConfig;
217
+ export type Instruction = Chain<any, any, any, any, any, any> | SucceedNow<any> | Succeed<any> | SucceedWith<any> | Async<any, any, any, any> | Match<any, any, any, any, any, any, any, any, any> | Fork<any, any, any> | Fail<any> | Yield | Defer<any, any, any> | DeferWith<any, any, any> | Stateful<any, any, any> | Race<any, any, any, any, any, any, any, any, any, any, any, any> | Trace | Logged;
341
218
  /**
342
219
  * @tsplus macro identity
343
220
  */
344
221
  export declare function concrete(_: IO<any, any, any>): Instruction;
345
- export declare type Canceler<R> = URIO<R, void>;
222
+ export type Canceler<R> = URIO<R, void>;
346
223
  export declare const IOErrorTypeId: unique symbol;
347
- export declare type IOErrorTypeId = typeof IOErrorTypeId;
224
+ export type IOErrorTypeId = typeof IOErrorTypeId;
348
225
  export declare class IOError<E, A> {
349
226
  readonly exit: Exit<E, A>;
350
227
  readonly _typeId: IOErrorTypeId;
package/IO.d.ts CHANGED
@@ -42,6 +42,7 @@ export * from "./IO/api/scopeWith.js";
42
42
  export * from "./IO/api/sequenceT.js";
43
43
  export * from "./IO/api/sleep.js";
44
44
  export * from "./IO/api/stateful.js";
45
+ export * from "./IO/api/supervised.js";
45
46
  export * from "./IO/api/timeout.js";
46
47
  export * from "./IO/api/withChildren.js";
47
48
  export * from "./IO/api/withEarlyRelease.js";
@@ -1,7 +1,7 @@
1
1
  import { Clock } from "@fncts/io/Clock/definition";
2
2
  import { Random } from "@fncts/io/Random/definition";
3
3
  import { Console } from "@fncts/io/Console";
4
- export declare type IOEnv = Clock | Console | Random;
4
+ export type IOEnv = Clock | Console | Random;
5
5
  /**
6
6
  * @tsplus type fncts.io.IOEnvOps
7
7
  */
@@ -3,7 +3,7 @@ import { Environment } from "@fncts/base/data/Environment/definition";
3
3
  import { Scope } from "@fncts/io/Scope/definition";
4
4
  import { IO } from "@fncts/io/IO/definition";
5
5
  export declare const LayerHash: unique symbol;
6
- export declare type LayerHash = typeof LayerHash;
6
+ export type LayerHash = typeof LayerHash;
7
7
  /**
8
8
  * @tsplus type fncts.io.Layer
9
9
  * @tsplus companion fncts.io.LayerOps
@@ -15,7 +15,7 @@ export declare abstract class Layer<RIn, E, ROut> {
15
15
  [LayerHash]: PropertyKey;
16
16
  setKey(hash: PropertyKey): this;
17
17
  }
18
- export declare type Concrete = Fold<any, any, any, any, any, any, any, any, any> | Fresh<any, any, any> | FromScoped<any, any, any> | Defer<any, any, any> | To<any, any, any, any, any> | ZipWith<any, any, any, any, any, any, any> | ZipWithC<any, any, any, any, any, any, any>;
18
+ export type Concrete = Fold<any, any, any, any, any, any, any, any, any> | Fresh<any, any, any> | FromScoped<any, any, any> | Defer<any, any, any> | To<any, any, any, any, any> | ZipWith<any, any, any, any, any, any, any> | ZipWithC<any, any, any, any, any, any, any>;
19
19
  /**
20
20
  * @tsplus fluent fncts.io.Layer concrete
21
21
  * @tsplus location "@fncts/io/Layer/definition"
@@ -5,7 +5,7 @@ import type { Derived } from "./Derived.js";
5
5
  import type { DerivedAll } from "./DerivedAll.js";
6
6
  import type * as Synchro from "./Synchronized/definition.js";
7
7
  export declare const RefTypeId: unique symbol;
8
- export declare type RefTypeId = typeof RefTypeId;
8
+ export type RefTypeId = typeof RefTypeId;
9
9
  /**
10
10
  * @tsplus type fncts.io.Ref
11
11
  */
@@ -18,8 +18,8 @@ export interface PRef<RA, RB, EA, EB, A, B> {
18
18
  readonly _A: (_: A) => void;
19
19
  readonly _B: () => B;
20
20
  }
21
- export declare type Ref<A> = PRef<never, never, never, never, A, A>;
22
- export declare type ERef<E, A> = PRef<unknown, unknown, E, E, A, A>;
21
+ export type Ref<A> = PRef<never, never, never, never, A, A>;
22
+ export type ERef<E, A> = PRef<unknown, unknown, E, E, A, A>;
23
23
  export declare namespace PRef {
24
24
  type Synchronized<RA, RB, EA, EB, A, B> = Synchro.PSynchronized<RA, RB, EA, EB, A, B>;
25
25
  }
@@ -10,7 +10,7 @@ export declare const RuntimeConfigFlag: {
10
10
  readonly TrackRuntimeMetrics: symbol;
11
11
  readonly EnableFiberRoots: symbol;
12
12
  };
13
- export declare type RuntimeConfigFlag = typeof RuntimeConfigFlag[keyof typeof RuntimeConfigFlag];
13
+ export type RuntimeConfigFlag = typeof RuntimeConfigFlag[keyof typeof RuntimeConfigFlag];
14
14
  export declare class RuntimeConfig extends CaseClass<{
15
15
  readonly reportFailure: (e: Cause<unknown>) => void;
16
16
  readonly supervisor: Supervisor<any>;
@@ -12,7 +12,7 @@ export declare const enum STMTag {
12
12
  ContramapEnvironment = "ContramapEnvironment"
13
13
  }
14
14
  export declare const STMTypeId: unique symbol;
15
- export declare type STMTypeId = typeof STMTypeId;
15
+ export type STMTypeId = typeof STMTypeId;
16
16
  /**
17
17
  * @tsplus type fncts.io.STM
18
18
  * @tsplus companion fncts.io.STMOps
@@ -75,7 +75,7 @@ export declare class ContramapEnvironment<R, E, A, R0> extends STM<R0, E, A> {
75
75
  }
76
76
  export declare function concrete<R, E, A>(_: STM<R, E, A>): asserts _ is Effect<R, E, A> | OnFailure<R, unknown, A, E> | OnSuccess<R, E, unknown, A> | OnRetry<R, E, A> | Succeed<A> | SucceedNow<A> | ContramapEnvironment<unknown, E, A, R>;
77
77
  export declare const FailExceptionTypeId: unique symbol;
78
- export declare type FailExceptionTypeId = typeof FailExceptionTypeId;
78
+ export type FailExceptionTypeId = typeof FailExceptionTypeId;
79
79
  export declare class FailException<E> {
80
80
  readonly e: E;
81
81
  readonly _typeId: FailExceptionTypeId;
@@ -83,7 +83,7 @@ export declare class FailException<E> {
83
83
  }
84
84
  export declare function isFailException(u: unknown): u is FailException<unknown>;
85
85
  export declare const HaltExceptionTypeId: unique symbol;
86
- export declare type HaltExceptionTypeId = typeof HaltExceptionTypeId;
86
+ export type HaltExceptionTypeId = typeof HaltExceptionTypeId;
87
87
  export declare class HaltException<E> {
88
88
  readonly e: E;
89
89
  readonly _typeId: HaltExceptionTypeId;
@@ -91,7 +91,7 @@ export declare class HaltException<E> {
91
91
  }
92
92
  export declare function isHaltException(u: unknown): u is HaltException<unknown>;
93
93
  export declare const InterruptExceptionTypeId: unique symbol;
94
- export declare type InterruptExceptionTypeId = typeof InterruptExceptionTypeId;
94
+ export type InterruptExceptionTypeId = typeof InterruptExceptionTypeId;
95
95
  export declare class InterruptException {
96
96
  readonly fiberId: FiberId;
97
97
  readonly _typeId: InterruptExceptionTypeId;
@@ -99,7 +99,7 @@ export declare class InterruptException {
99
99
  }
100
100
  export declare function isInterruptException(u: unknown): u is InterruptException;
101
101
  export declare const RetryExceptionTypeId: unique symbol;
102
- export declare type RetryExceptionTypeId = typeof RetryExceptionTypeId;
102
+ export type RetryExceptionTypeId = typeof RetryExceptionTypeId;
103
103
  export declare class RetryException {
104
104
  readonly _typeId: RetryExceptionTypeId;
105
105
  }
@@ -28,7 +28,7 @@ export declare const Running: CommitState<never, never>;
28
28
  /**
29
29
  * @tsplus type fncts.io.CommitState
30
30
  */
31
- export declare type CommitState<E, A> = Done<E, A> | Interrupted | Running;
31
+ export type CommitState<E, A> = Done<E, A> | Interrupted | Running;
32
32
  /**
33
33
  * @tsplus type fncts.io.CommitStateOps
34
34
  */
@@ -1,7 +1,7 @@
1
1
  import type { Atomic } from "../../TRef.js";
2
2
  import { Versioned } from "./Versioned.js";
3
3
  export declare const EntryTypeId: unique symbol;
4
- export declare type EntryTypeId = typeof EntryTypeId;
4
+ export type EntryTypeId = typeof EntryTypeId;
5
5
  /**
6
6
  * @tsplus type fncts.io.Entry
7
7
  * @tsplus companion fncts.io.EntryOps
@@ -17,7 +17,7 @@ export declare class Entry {
17
17
  */
18
18
  export declare function make<A0>(tref0: Atomic<A0>, isNew0: boolean): Entry;
19
19
  export declare const ConcreteEntryTypeId: unique symbol;
20
- export declare type ConcreteEntryTypeId = typeof ConcreteEntryTypeId;
20
+ export type ConcreteEntryTypeId = typeof ConcreteEntryTypeId;
21
21
  export declare class ConcreteEntry<S> {
22
22
  readonly tref: Atomic<S>;
23
23
  readonly expected: Versioned<S>;
@@ -14,14 +14,14 @@ import { Done } from "./TryCommit.js";
14
14
  /**
15
15
  * @tsplus type fncts.io.Journal
16
16
  */
17
- export declare type Journal = Map<Atomic<any>, Entry>;
17
+ export type Journal = Map<Atomic<any>, Entry>;
18
18
  /**
19
19
  * @tsplus type fncts.io.JournalOps
20
20
  */
21
21
  export interface JournalOps {
22
22
  }
23
23
  export declare const Journal: JournalOps;
24
- export declare type Todo = () => unknown;
24
+ export type Todo = () => unknown;
25
25
  /**
26
26
  * Creates a function that can reset the journal.
27
27
  * @tsplus fluent fncts.io.Journal prepareReset
@@ -34,13 +34,13 @@ export declare function prepareResetJournal(journal: Journal): () => unknown;
34
34
  * @tsplus location "@fncts/io/STM/internal/Journal"
35
35
  */
36
36
  export declare function commitJournal(journal: Journal): void;
37
- declare type Invalid = -1;
37
+ type Invalid = -1;
38
38
  declare const Invalid = -1;
39
- declare type ReadOnly = 0;
39
+ type ReadOnly = 0;
40
40
  declare const ReadOnly = 0;
41
- declare type ReadWrite = 1;
41
+ type ReadWrite = 1;
42
42
  declare const ReadWrite = 1;
43
- declare type JournalAnalysis = Invalid | ReadOnly | ReadWrite;
43
+ type JournalAnalysis = Invalid | ReadOnly | ReadWrite;
44
44
  /**
45
45
  * Analyzes the journal, determining whether it is valid and whether it is
46
46
  * read only in a single pass. Note that information on whether the
@@ -1,8 +1,8 @@
1
1
  import { Exit } from "@fncts/base/data/Exit/definition";
2
2
  import type { Journal } from "./Journal.js";
3
3
  export declare const TryCommitTypeId: unique symbol;
4
- export declare type TryCommitTypeId = typeof TryCommitTypeId;
5
- export declare type TryCommit<E, A> = Done<E, A> | Suspend;
4
+ export type TryCommitTypeId = typeof TryCommitTypeId;
5
+ export type TryCommit<E, A> = Done<E, A> | Suspend;
6
6
  export declare const enum TryCommitTag {
7
7
  Done = "Done",
8
8
  Suspend = "Suspend"
@@ -1,5 +1,5 @@
1
1
  export declare const VersionedTypeId: unique symbol;
2
- export declare type VersionedTypeId = typeof VersionedTypeId;
2
+ export type VersionedTypeId = typeof VersionedTypeId;
3
3
  export declare class Versioned<A> {
4
4
  readonly value: A;
5
5
  readonly _typeId: VersionedTypeId;
@@ -15,7 +15,7 @@ export declare class Done {
15
15
  /**
16
16
  * @tsplus type fncts.io.Schedule.Decision
17
17
  */
18
- export declare type Decision = Continue | Done;
18
+ export type Decision = Continue | Done;
19
19
  /**
20
20
  * @tsplus type fncts.io.Schedule.DecisionOps
21
21
  */
@@ -18,7 +18,7 @@ export declare class Running {
18
18
  readonly _tag = "Running";
19
19
  constructor(nextKey: number, finalizers: HashMap<number, Finalizer>, update: (_: Finalizer) => Finalizer);
20
20
  }
21
- export declare type State = Exited | Running;
21
+ export type State = Exited | Running;
22
22
  interface ReleaseMapN extends HKT {
23
23
  readonly type: ReleaseMap;
24
24
  }
@@ -3,7 +3,7 @@ import { UIO } from "@fncts/io/IO/definition";
3
3
  import { Lazy } from "@fncts/base/data/function/definition";
4
4
  import { Exit } from "@fncts/base/data/Exit/definition";
5
5
  export declare const ScopeTypeId: unique symbol;
6
- export declare type ScopeTypeId = typeof ScopeTypeId;
6
+ export type ScopeTypeId = typeof ScopeTypeId;
7
7
  /**
8
8
  * @tsplus type fncts.io.Scope
9
9
  * @tsplus companion fncts.io.ScopeOps
@@ -20,7 +20,7 @@ export declare abstract class Scope {
20
20
  export declare abstract class Closeable extends Scope {
21
21
  abstract close(exit: Lazy<Exit<any, any>>): UIO<void>;
22
22
  }
23
- declare type Closeable_ = Closeable;
23
+ type Closeable_ = Closeable;
24
24
  export declare namespace Scope {
25
25
  type Closeable = Closeable_;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  import { IO, UIO } from "@fncts/io/IO/definition";
2
2
  import { Scope } from "@fncts/io/Scope/definition";
3
3
  export declare const ScopedRefTypeId: unique symbol;
4
- export declare type ScopedRefTypeId = typeof ScopedRefTypeId;
4
+ export type ScopedRefTypeId = typeof ScopedRefTypeId;
5
5
  /**
6
6
  * @tsplus type fncts.io.ScopedRef
7
7
  * @tsplus companion fncts.io.ScopedRefOps
@@ -1,6 +1,6 @@
1
1
  import { UIO } from "@fncts/io/IO/definition";
2
2
  export declare const StateTypeId: unique symbol;
3
- export declare type StateTypeId = typeof StateTypeId;
3
+ export type StateTypeId = typeof StateTypeId;
4
4
  export declare abstract class StateInternal<S> {
5
5
  readonly _A: () => S;
6
6
  readonly _typeId: StateTypeId;
package/Stream/api.d.ts CHANGED
@@ -744,7 +744,7 @@ export declare function mergeMapIO_<R, E, A, R1, E1, B>(stream: Stream<R, E, A>,
744
744
  */
745
745
  export declare function mergeEither_<R, E, A, R1, E1, B>(fa: Stream<R, E, A>, fb: Stream<R1, E1, B>, __tsplusTrace?: string): Stream<R | R1, E | E1, Either<A, B>>;
746
746
  export declare function mergeWithHandler<R, E>(terminate: boolean, __tsplusTrace?: string): (exit: Exit<E, unknown>) => MergeDecision<R, E, unknown, E, unknown>;
747
- export declare type TerminationStrategy = "Left" | "Right" | "Both" | "Either";
747
+ export type TerminationStrategy = "Left" | "Right" | "Both" | "Either";
748
748
  /**
749
749
  * @tsplus fluent fncts.io.Stream mergeWith
750
750
  * @tsplus location "@fncts/io/Stream/api"
@@ -2,7 +2,7 @@ import { Channel } from "@fncts/io/Channel";
2
2
  import { Conc } from "@fncts/base/collection/immutable/Conc";
3
3
  import type { _A, _E, _R } from "@fncts/base/types";
4
4
  export declare const StreamTypeId: unique symbol;
5
- export declare type StreamTypeId = typeof StreamTypeId;
5
+ export type StreamTypeId = typeof StreamTypeId;
6
6
  /**
7
7
  * A `Stream<R, E, A>` is a description of a program that, when evaluated,
8
8
  * may emit 0 or more values of type `A`, may fail with errors of type `E`
@@ -7,19 +7,19 @@ export declare const enum DebounceStateTag {
7
7
  Current = "Current"
8
8
  }
9
9
  export declare const NotStartedTag: unique symbol;
10
- export declare type NotStartedTag = typeof NotStartedTag;
10
+ export type NotStartedTag = typeof NotStartedTag;
11
11
  export declare class NotStarted {
12
12
  readonly _tag = DebounceStateTag.NotStarted;
13
13
  }
14
14
  export declare const PreviousTag: unique symbol;
15
- export declare type PreviousTag = typeof PreviousTag;
15
+ export type PreviousTag = typeof PreviousTag;
16
16
  export declare class Previous<A> {
17
17
  readonly fiber: Fiber<never, Conc<A>>;
18
18
  readonly _tag = DebounceStateTag.Previous;
19
19
  constructor(fiber: Fiber<never, Conc<A>>);
20
20
  }
21
21
  export declare const CurrentTag: unique symbol;
22
- export declare type CurrentTag = typeof CurrentTag;
22
+ export type CurrentTag = typeof CurrentTag;
23
23
  export declare class Current<E, A> {
24
24
  readonly fiber: Fiber<E, HandoffSignal<E, A>>;
25
25
  readonly _tag = DebounceStateTag.Current;
@@ -28,7 +28,7 @@ export declare class Current<E, A> {
28
28
  /**
29
29
  * @tsplus type fncts.io.Stream.DebounceState
30
30
  */
31
- export declare type DebounceState<E, A> = NotStarted | Previous<A> | Current<E, A>;
31
+ export type DebounceState<E, A> = NotStarted | Previous<A> | Current<E, A>;
32
32
  /**
33
33
  * @tsplus type fncts.io.Stream.DebounceStateOps
34
34
  */
@@ -29,7 +29,7 @@ export declare class Full<A> {
29
29
  readonly _tag: typeof FullTypeId;
30
30
  constructor(a: A, notifyProducer: Future<never, void>);
31
31
  }
32
- export declare type State<A> = Empty | Full<A>;
32
+ export type State<A> = Empty | Full<A>;
33
33
  /**
34
34
  * @tsplus static fncts.io.Stream.HandoffOps __call
35
35
  * @tsplus location "@fncts/io/Stream/internal/Handoff"
@@ -52,7 +52,7 @@ export declare function take<A>(handoff: Handoff<A>): UIO<A>;
52
52
  export declare function poll<A>(handoff: Handoff<A>): UIO<Maybe<A>>;
53
53
  export declare const HandoffSignalTypeId: unique symbol;
54
54
  export declare const EmitTypeId: unique symbol;
55
- export declare type EmitTypeId = typeof EmitTypeId;
55
+ export type EmitTypeId = typeof EmitTypeId;
56
56
  export declare class Emit<A> {
57
57
  readonly els: Conc<A>;
58
58
  readonly _typeId: typeof HandoffSignalTypeId;
@@ -60,7 +60,7 @@ export declare class Emit<A> {
60
60
  constructor(els: Conc<A>);
61
61
  }
62
62
  export declare const HaltTypeId: unique symbol;
63
- export declare type HaltTypeId = typeof HaltTypeId;
63
+ export type HaltTypeId = typeof HaltTypeId;
64
64
  export declare class Halt<E> {
65
65
  readonly error: Cause<E>;
66
66
  readonly _typeId: typeof HandoffSignalTypeId;
@@ -68,7 +68,7 @@ export declare class Halt<E> {
68
68
  constructor(error: Cause<E>);
69
69
  }
70
70
  export declare const EndTypeId: unique symbol;
71
- export declare type EndTypeId = typeof EndTypeId;
71
+ export type EndTypeId = typeof EndTypeId;
72
72
  export declare class End {
73
73
  readonly reason: SinkEndReason;
74
74
  readonly _typeId: typeof HandoffSignalTypeId;
@@ -78,7 +78,7 @@ export declare class End {
78
78
  /**
79
79
  * @tsplus type fncts.io.Stream.HandoffSignal
80
80
  */
81
- export declare type HandoffSignal<E, A> = Emit<A> | Halt<E> | End;
81
+ export type HandoffSignal<E, A> = Emit<A> | Halt<E> | End;
82
82
  /**
83
83
  * @tsplus type fncts.io.Stream.HandoffSignalOps
84
84
  */
@@ -4,7 +4,7 @@ import { Conc } from "@fncts/base/collection/immutable/Conc";
4
4
  import { Cause } from "@fncts/base/data/Cause/definition";
5
5
  import type { Queue } from "../../Queue.js";
6
6
  import type { Take } from "./Take.js";
7
- export declare type Pull<R, E, A> = IO<R, Maybe<E>, Conc<A>>;
7
+ export type Pull<R, E, A> = IO<R, Maybe<E>, Conc<A>>;
8
8
  /**
9
9
  * @tsplus type fncts.io.Stream.PullOps
10
10
  */
@@ -16,7 +16,7 @@ export declare class UpstreamEnd {
16
16
  /**
17
17
  * @tsplus type fncts.io.Stream.SinkEndReason
18
18
  */
19
- export declare type SinkEndReason = ScheduleEnd | UpstreamEnd;
19
+ export type SinkEndReason = ScheduleEnd | UpstreamEnd;
20
20
  /**
21
21
  * @tsplus fluent fncts.io.Stream.SinkEndReason match
22
22
  * @tsplus location "@fncts/io/Stream/internal/SinkEndReason"
@@ -4,7 +4,7 @@ import { FiberId } from "@fncts/base/data/FiberId/definition";
4
4
  /**
5
5
  * @tsplus type fncts.TExit
6
6
  */
7
- export declare type TExit<E, A> = Fail<E> | Succeed<A> | Retry | Halt | Interrupt;
7
+ export type TExit<E, A> = Fail<E> | Succeed<A> | Retry | Halt | Interrupt;
8
8
  /**
9
9
  * @tsplus type fncts.TExitOps
10
10
  */
@@ -12,7 +12,7 @@ export interface TExitOps {
12
12
  }
13
13
  export declare const TExit: TExitOps;
14
14
  export declare const TExitTypeId: unique symbol;
15
- export declare type TExitTypeId = typeof TExitTypeId;
15
+ export type TExitTypeId = typeof TExitTypeId;
16
16
  export declare const enum TExitTag {
17
17
  Fail = "Fail",
18
18
  Succeed = "Succeed",
@@ -21,7 +21,7 @@ export declare const enum TExitTag {
21
21
  Retry = "Retry"
22
22
  }
23
23
  export declare const FailTypeId: unique symbol;
24
- export declare type FailTypeId = typeof FailTypeId;
24
+ export type FailTypeId = typeof FailTypeId;
25
25
  /**
26
26
  * @tsplus static fncts.TExitOps isTExit
27
27
  * @tsplus location "@fncts/io/TExit/definition"
@@ -62,4 +62,4 @@ export declare class ReadLock implements Lock {
62
62
  noOtherHolder(fiberId: FiberId): boolean;
63
63
  adjust(fiberId: FiberId, adjust: number): ReadLock;
64
64
  }
65
- export declare type LockState = WriteLock | ReadLock;
65
+ export type LockState = WriteLock | ReadLock;
@@ -5,7 +5,7 @@ import type { Versioned } from "../STM/internal/Versioned.js";
5
5
  import type { AtomicReference } from "@fncts/base/internal/AtomicReference";
6
6
  import type { TxnId } from "@fncts/io/TxnId";
7
7
  export declare const TRefTypeId: unique symbol;
8
- export declare type TRefTypeId = typeof TRefTypeId;
8
+ export type TRefTypeId = typeof TRefTypeId;
9
9
  /**
10
10
  * A `TRef<EA, EB, A, B>` is a polymorphic, purely functional description of a
11
11
  * mutable reference that can be modified as part of a transactional effect. The
package/TxnId.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type TxnId = number;
1
+ export type TxnId = number;
2
2
  /**
3
3
  * @tsplus type fncts.TxnIdOps
4
4
  */
@@ -22,6 +22,6 @@ class Clock {}
22
22
 
23
23
 
24
24
  exports.Clock = Clock;
25
- const ClockTag = /*#__PURE__*/tsplus_module_1.makeTag("d60c9045-a93d-492e-97ae-170170bdeed1");
25
+ const ClockTag = /*#__PURE__*/tsplus_module_1.makeTag("19435fc3-3855-4914-989b-3d23ff58fa87");
26
26
  exports.ClockTag = ClockTag;
27
27
  //# sourceMappingURL=definition.cjs.map