@fncts/io 0.0.17 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) 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/Clock/definition.d.ts +1 -0
  13. package/Fiber/FiberContext.d.ts +22 -19
  14. package/Fiber/api/interruptAll.d.ts +1 -1
  15. package/Fiber/api/interruptAsFork.d.ts +8 -0
  16. package/Fiber/definition.d.ts +6 -8
  17. package/FiberRef/api.d.ts +7 -2
  18. package/FiberRef/definition.d.ts +4 -3
  19. package/FiberRef/unsafe.d.ts +18 -1
  20. package/FiberRefs/api.d.ts +5 -0
  21. package/FiberRefs/definition.d.ts +1 -1
  22. package/FiberState/definition.d.ts +2 -2
  23. package/FiberStatus/definition.d.ts +1 -1
  24. package/Future/definition.d.ts +1 -1
  25. package/Hub/definition.d.ts +1 -1
  26. package/IO/api/core-scope.d.ts +4 -3
  27. package/IO/api/interrupt.d.ts +2 -2
  28. package/IO/api/supervised.d.ts +10 -0
  29. package/IO/api.d.ts +7 -10
  30. package/IO/definition.d.ts +16 -139
  31. package/IO.d.ts +1 -0
  32. package/IOEnv/definition.d.ts +1 -1
  33. package/Layer/definition.d.ts +2 -2
  34. package/Ref/definition.d.ts +3 -3
  35. package/Reloadable/api.d.ts +21 -0
  36. package/Reloadable/constructors.d.ts +23 -0
  37. package/Reloadable/definition.d.ts +20 -0
  38. package/Reloadable.d.ts +3 -0
  39. package/RuntimeConfig.d.ts +1 -1
  40. package/STM/definition.d.ts +5 -5
  41. package/STM/internal/CommitState.d.ts +1 -1
  42. package/STM/internal/Entry.d.ts +2 -2
  43. package/STM/internal/Journal.d.ts +6 -6
  44. package/STM/internal/TryCommit.d.ts +2 -2
  45. package/STM/internal/Versioned.d.ts +1 -1
  46. package/Schedule/Decision.d.ts +1 -1
  47. package/Scope/ReleaseMap/definition.d.ts +1 -1
  48. package/Scope/definition.d.ts +2 -2
  49. package/ScopedRef/definition.d.ts +1 -1
  50. package/State/internal.d.ts +1 -1
  51. package/Stream/api.d.ts +1 -1
  52. package/Stream/definition.d.ts +1 -1
  53. package/Stream/internal/DebounceState.d.ts +4 -4
  54. package/Stream/internal/Handoff.d.ts +5 -5
  55. package/Stream/internal/Pull.d.ts +1 -1
  56. package/Stream/internal/SinkEndReason.d.ts +1 -1
  57. package/TExit/definition.d.ts +3 -3
  58. package/TReentrantLock/definition.d.ts +1 -1
  59. package/TRef/definition.d.ts +1 -1
  60. package/TxnId.d.ts +1 -1
  61. package/_cjs/Clock/definition.cjs +2 -1
  62. package/_cjs/Clock/definition.cjs.map +1 -1
  63. package/_cjs/Console/definition.cjs +1 -1
  64. package/_cjs/Console/definition.cjs.map +1 -1
  65. package/_cjs/Fiber/FiberContext.cjs +180 -310
  66. package/_cjs/Fiber/FiberContext.cjs.map +1 -1
  67. package/_cjs/Fiber/api/collectAll.cjs +2 -2
  68. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  69. package/_cjs/Fiber/api/interrupt.cjs +4 -2
  70. package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
  71. package/_cjs/Fiber/api/interruptAll.cjs +8 -8
  72. package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
  73. package/_cjs/Fiber/api/interruptAs.cjs +7 -1
  74. package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
  75. package/_cjs/Fiber/api/interruptAsFork.cjs +15 -0
  76. package/_cjs/Fiber/api/interruptAsFork.cjs.map +1 -0
  77. package/_cjs/Fiber/api/interruptFork.cjs +5 -5
  78. package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
  79. package/_cjs/Fiber/definition.cjs +2 -2
  80. package/_cjs/Fiber/definition.cjs.map +1 -1
  81. package/_cjs/FiberRef/api.cjs +29 -10
  82. package/_cjs/FiberRef/api.cjs.map +1 -1
  83. package/_cjs/FiberRef/definition.cjs +2 -1
  84. package/_cjs/FiberRef/definition.cjs.map +1 -1
  85. package/_cjs/FiberRef/unsafe.cjs +29 -5
  86. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  87. package/_cjs/FiberRefs/api.cjs +28 -2
  88. package/_cjs/FiberRefs/api.cjs.map +1 -1
  89. package/_cjs/FiberRefs/join.cjs +1 -1
  90. package/_cjs/FiberRefs/join.cjs.map +1 -1
  91. package/_cjs/IO/api/core-scope.cjs +23 -15
  92. package/_cjs/IO/api/core-scope.cjs.map +1 -1
  93. package/_cjs/IO/api/ensuringChildren.cjs +4 -2
  94. package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
  95. package/_cjs/IO/api/interrupt.cjs +21 -11
  96. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  97. package/_cjs/IO/api/supervised.cjs +26 -0
  98. package/_cjs/IO/api/supervised.cjs.map +1 -0
  99. package/_cjs/IO/api/withChildren.cjs +4 -2
  100. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  101. package/_cjs/IO/api/zipC.cjs +10 -8
  102. package/_cjs/IO/api/zipC.cjs.map +1 -1
  103. package/_cjs/IO/api.cjs +67 -63
  104. package/_cjs/IO/api.cjs.map +1 -1
  105. package/_cjs/IO/definition.cjs +8 -226
  106. package/_cjs/IO/definition.cjs.map +1 -1
  107. package/_cjs/IO/runtime.cjs +7 -9
  108. package/_cjs/IO/runtime.cjs.map +1 -1
  109. package/_cjs/IO.cjs +13 -0
  110. package/_cjs/IO.cjs.map +1 -1
  111. package/_cjs/Layer/api.cjs +1 -1
  112. package/_cjs/Layer/api.cjs.map +1 -1
  113. package/_cjs/Random/definition.cjs +1 -1
  114. package/_cjs/Random/definition.cjs.map +1 -1
  115. package/_cjs/Reloadable/api.cjs +46 -0
  116. package/_cjs/Reloadable/api.cjs.map +1 -0
  117. package/_cjs/Reloadable/constructors.cjs +82 -0
  118. package/_cjs/Reloadable/constructors.cjs.map +1 -0
  119. package/_cjs/Reloadable/definition.cjs +58 -0
  120. package/_cjs/Reloadable/definition.cjs.map +1 -0
  121. package/_cjs/Reloadable.cjs +45 -0
  122. package/_cjs/Reloadable.cjs.map +1 -0
  123. package/_cjs/Scope/definition.cjs +1 -1
  124. package/_cjs/Scope/definition.cjs.map +1 -1
  125. package/_cjs/internal/IsFatal.cjs +129 -0
  126. package/_cjs/internal/IsFatal.cjs.map +1 -0
  127. package/_mjs/Clock/definition.mjs +2 -1
  128. package/_mjs/Clock/definition.mjs.map +1 -1
  129. package/_mjs/Console/definition.mjs +1 -1
  130. package/_mjs/Console/definition.mjs.map +1 -1
  131. package/_mjs/Fiber/FiberContext.mjs +180 -309
  132. package/_mjs/Fiber/FiberContext.mjs.map +1 -1
  133. package/_mjs/Fiber/api/collectAll.mjs +2 -2
  134. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  135. package/_mjs/Fiber/api/interrupt.mjs +3 -2
  136. package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
  137. package/_mjs/Fiber/api/interruptAll.mjs +6 -6
  138. package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
  139. package/_mjs/Fiber/api/interruptAs.mjs +3 -1
  140. package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
  141. package/_mjs/Fiber/api/interruptAsFork.mjs +8 -0
  142. package/_mjs/Fiber/api/interruptAsFork.mjs.map +1 -0
  143. package/_mjs/Fiber/api/interruptFork.mjs +5 -4
  144. package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
  145. package/_mjs/Fiber/definition.mjs +2 -2
  146. package/_mjs/Fiber/definition.mjs.map +1 -1
  147. package/_mjs/FiberRef/api.mjs +26 -9
  148. package/_mjs/FiberRef/api.mjs.map +1 -1
  149. package/_mjs/FiberRef/definition.mjs +2 -1
  150. package/_mjs/FiberRef/definition.mjs.map +1 -1
  151. package/_mjs/FiberRef/unsafe.mjs +23 -4
  152. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  153. package/_mjs/FiberRefs/api.mjs +22 -1
  154. package/_mjs/FiberRefs/api.mjs.map +1 -1
  155. package/_mjs/FiberRefs/join.mjs +1 -1
  156. package/_mjs/FiberRefs/join.mjs.map +1 -1
  157. package/_mjs/IO/api/core-scope.mjs +21 -16
  158. package/_mjs/IO/api/core-scope.mjs.map +1 -1
  159. package/_mjs/IO/api/ensuringChildren.mjs +3 -2
  160. package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
  161. package/_mjs/IO/api/interrupt.mjs +18 -9
  162. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  163. package/_mjs/IO/api/supervised.mjs +14 -0
  164. package/_mjs/IO/api/supervised.mjs.map +1 -0
  165. package/_mjs/IO/api/withChildren.mjs +3 -2
  166. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  167. package/_mjs/IO/api/zipC.mjs +9 -8
  168. package/_mjs/IO/api/zipC.mjs.map +1 -1
  169. package/_mjs/IO/api.mjs +66 -60
  170. package/_mjs/IO/api.mjs.map +1 -1
  171. package/_mjs/IO/definition.mjs +5 -184
  172. package/_mjs/IO/definition.mjs.map +1 -1
  173. package/_mjs/IO/runtime.mjs +7 -8
  174. package/_mjs/IO/runtime.mjs.map +1 -1
  175. package/_mjs/IO.mjs +1 -0
  176. package/_mjs/IO.mjs.map +1 -1
  177. package/_mjs/Layer/api.mjs +1 -1
  178. package/_mjs/Layer/api.mjs.map +1 -1
  179. package/_mjs/Random/definition.mjs +1 -1
  180. package/_mjs/Random/definition.mjs.map +1 -1
  181. package/_mjs/Reloadable/api.mjs +30 -0
  182. package/_mjs/Reloadable/api.mjs.map +1 -0
  183. package/_mjs/Reloadable/constructors.mjs +55 -0
  184. package/_mjs/Reloadable/constructors.mjs.map +1 -0
  185. package/_mjs/Reloadable/definition.mjs +40 -0
  186. package/_mjs/Reloadable/definition.mjs.map +1 -0
  187. package/_mjs/Reloadable.mjs +5 -0
  188. package/_mjs/Reloadable.mjs.map +1 -0
  189. package/_mjs/Scope/definition.mjs +1 -1
  190. package/_mjs/Scope/definition.mjs.map +1 -1
  191. package/_mjs/internal/IsFatal.mjs +104 -0
  192. package/_mjs/internal/IsFatal.mjs.map +1 -0
  193. package/_src/Clock/definition.ts +1 -0
  194. package/_src/Fiber/FiberContext.ts +50 -135
  195. package/_src/Fiber/api/collectAll.ts +1 -4
  196. package/_src/Fiber/api/interruptAll.ts +2 -2
  197. package/_src/Fiber/api/interruptAs.ts +1 -1
  198. package/_src/Fiber/api/interruptAsFork.ts +7 -0
  199. package/_src/Fiber/api/interruptFork.ts +1 -1
  200. package/_src/Fiber/definition.ts +3 -5
  201. package/_src/FiberRef/api.ts +30 -7
  202. package/_src/FiberRef/definition.ts +1 -0
  203. package/_src/FiberRef/unsafe.ts +27 -3
  204. package/_src/FiberRefs/api.ts +16 -0
  205. package/_src/FiberRefs/join.ts +1 -1
  206. package/_src/IO/api/core-scope.ts +12 -10
  207. package/_src/IO/api/interrupt.ts +8 -3
  208. package/_src/IO/api/supervised.ts +14 -0
  209. package/_src/IO/api.ts +25 -26
  210. package/_src/IO/definition.ts +8 -158
  211. package/_src/IO/runtime.ts +7 -11
  212. package/_src/IO.ts +1 -0
  213. package/_src/Reloadable/api.ts +28 -0
  214. package/_src/Reloadable/constructors.ts +60 -0
  215. package/_src/Reloadable/definition.ts +34 -0
  216. package/_src/Reloadable.ts +5 -0
  217. package/_src/internal/IsFatal.ts +79 -0
  218. package/internal/IsFatal.d.ts +47 -0
  219. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  import { FIO } from "@fncts/io/IO/definition";
2
2
  export declare const CachedTypeId: unique symbol;
3
- export declare type CachedTypeId = typeof CachedTypeId;
3
+ export type CachedTypeId = typeof CachedTypeId;
4
4
  export declare abstract class CachedInternal<Error, Resource> {
5
5
  readonly _E: () => Error;
6
6
  readonly _A: () => Resource;
@@ -18,7 +18,7 @@ export declare class Registered {
18
18
  /**
19
19
  * @tsplus type fncts.CancellerState
20
20
  */
21
- export declare type CancellerState = Empty | Pending | Registered;
21
+ export type CancellerState = Empty | Pending | Registered;
22
22
  /**
23
23
  * @tsplus type fncts.CancellerStateOps
24
24
  */
@@ -26,7 +26,7 @@ export declare const Yield: ChildExecutorDecision;
26
26
  /**
27
27
  * @tsplus type fncts.io.Channel.ChildExecutorDecision
28
28
  */
29
- export declare type ChildExecutorDecision = Continue | Close | Yield;
29
+ export type ChildExecutorDecision = Continue | Close | Yield;
30
30
  /**
31
31
  * @tsplus type fncts.io.Channel.ChildExecutorDecisionOps
32
32
  */
@@ -11,7 +11,7 @@ export declare class NoUpstream {
11
11
  /**
12
12
  * @tsplus type fncts.io.Channel.UpstreamPullRequest
13
13
  */
14
- export declare type UpstreamPullRequest<A> = Pulled<A> | NoUpstream;
14
+ export type UpstreamPullRequest<A> = Pulled<A> | NoUpstream;
15
15
  /**
16
16
  * @tsplus type fncts.io.Channel.UpstreamPullRequestOps
17
17
  */
@@ -17,7 +17,7 @@ export interface PullAfterAllEnqueued<A> {
17
17
  * @tsplus location "@fncts/io/Channel/UpstreamPullStrategy/definition"
18
18
  */
19
19
  export declare function PullAfterAllEnqueued<A>(emitSeparator: Maybe<A>): UpstreamPullStrategy<A>;
20
- export declare type UpstreamPullStrategy<A> = PullAfterNext<A> | PullAfterAllEnqueued<A>;
20
+ export type UpstreamPullStrategy<A> = PullAfterNext<A> | PullAfterAllEnqueued<A>;
21
21
  /**
22
22
  * @tsplus type fncts.io.Channel.UpstreamPullStrategyOps
23
23
  */
@@ -3,7 +3,7 @@ import { IO } from "@fncts/io/IO/definition";
3
3
  import { Either } from "@fncts/base/data/Either/definition";
4
4
  import { Future } from "@fncts/io/Future";
5
5
  import { Maybe } from "@fncts/base/data/Maybe/definition";
6
- export declare type MergeStrategy = "BackPressure" | "BufferSliding";
6
+ export type MergeStrategy = "BackPressure" | "BufferSliding";
7
7
  /**
8
8
  * @tsplus fluent fncts.io.Channel mergeAllWith
9
9
  * @tsplus location "@fncts/io/Channel/api/mergeAllWith"
@@ -8,7 +8,7 @@ import { ListBuffer } from "@fncts/base/collection/mutable/ListBuffer";
8
8
  import { Maybe } from "@fncts/base/data/Maybe/definition";
9
9
  import type { ChannelState } from "@fncts/io/Channel/internal/ChannelState";
10
10
  import * as State from "@fncts/io/Channel/internal/ChannelState";
11
- export declare type ErasedExecutor<R> = ChannelExecutor<R, unknown, unknown, unknown, unknown, unknown, unknown>;
11
+ export type ErasedExecutor<R> = ChannelExecutor<R, unknown, unknown, unknown, unknown, unknown, unknown>;
12
12
  export declare function readUpstream<R, E, A>(r: State.Read<R, E>, cont: () => IO<R, E, A>): IO<R, E, A>;
13
13
  export declare class ChannelExecutor<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone> {
14
14
  private providedEnv;
@@ -8,7 +8,7 @@ export declare const enum ChannelStateTag {
8
8
  Read = "Read"
9
9
  }
10
10
  export declare const ChannelStateTypeId: unique symbol;
11
- export declare type ChannelStateTypeId = typeof ChannelStateTypeId;
11
+ export type ChannelStateTypeId = typeof ChannelStateTypeId;
12
12
  export declare class Emit {
13
13
  readonly _tag = ChannelStateTag.Emit;
14
14
  readonly _R: (_: unknown) => void;
@@ -40,5 +40,5 @@ export declare class Read<R, E> {
40
40
  constructor(upstream: ErasedExecutor<R> | null, onEffect: (_: IO<R, never, void>) => IO<R, never, void>, onEmit: (_: any) => IO<R, never, void> | null, onDone: (exit: Exit<any, any>) => IO<R, never, void> | null);
41
41
  get effect(): IO<R, E, any>;
42
42
  }
43
- export declare type ChannelState<R, E> = Emit | Done | Effect<R, E> | Read<R, E>;
43
+ export type ChannelState<R, E> = Emit | Done | Effect<R, E> | Read<R, E>;
44
44
  export declare function effectOrNullIgnored<R, E>(channelState: ChannelState<R, E> | null): IO<R, never, void> | null;
@@ -5,7 +5,7 @@ export declare const enum MergeDecisionTag {
5
5
  Await = "Await"
6
6
  }
7
7
  export declare const MergeDecisionTypeId: unique symbol;
8
- export declare type MergeDecisionTypeId = typeof MergeDecisionTypeId;
8
+ export type MergeDecisionTypeId = typeof MergeDecisionTypeId;
9
9
  /**
10
10
  * @tsplus type fncts.io.Channel.MergeDecision
11
11
  * @tsplus companion fncts.io.Channel.MergeDecisionOps
@@ -26,7 +26,7 @@ export declare class RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> {
26
26
  /**
27
27
  * @tsplus type fncts.io.Channel.MergeState
28
28
  */
29
- export declare type MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> = BothRunning<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | LeftDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>;
29
+ export type MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> = BothRunning<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | LeftDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> | RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>;
30
30
  /**
31
31
  * @tsplus type fncts.io.Channel.MergeStateOps
32
32
  */
@@ -34,7 +34,7 @@ export declare class StateEmit<Err, Elem, Done> {
34
34
  readonly _stateTag = StateTag.Emit;
35
35
  constructor(notifyConsumers: Queue<Future<Err, Either<Done, Elem>>>);
36
36
  }
37
- export declare type State<Err, Elem, Done> = StateEmpty | StateEmit<Err, Elem, Done> | StateError<Err> | StateDone<Done>;
37
+ export type State<Err, Elem, Done> = StateEmpty | StateEmit<Err, Elem, Done> | StateError<Err> | StateDone<Done>;
38
38
  /**
39
39
  * An MVar-like abstraction for sending data to channels asynchronously. Designed
40
40
  * for one producer and multiple consumers.
@@ -11,6 +11,7 @@ export declare abstract class Clock {
11
11
  }
12
12
  /**
13
13
  * @tsplus static fncts.io.ClockOps Tag
14
+ * @tsplus implicit
14
15
  * @tsplus location "@fncts/io/Clock/definition"
15
16
  */
16
17
  export declare const ClockTag: import("@fncts/base/data/Tag").Tag<Clock>;
@@ -7,7 +7,6 @@ import { Maybe, Nothing, Just } from "@fncts/base/data/Maybe/definition";
7
7
  import { Fiber } from "@fncts/io/Fiber/definition";
8
8
  import { Hashable } from "@fncts/base/typeclass/Hashable";
9
9
  import { Equatable } from "@fncts/base/typeclass/Equatable";
10
- import { Supervisor } from "@fncts/io/Supervisor/definition";
11
10
  import { RuntimeConfig, RuntimeConfigFlag } from "@fncts/io/RuntimeConfig";
12
11
  import { FiberRefs } from "@fncts/io/FiberRefs";
13
12
  import { Conc, ConcBuilder } from "@fncts/base/collection/immutable/Conc";
@@ -16,10 +15,11 @@ import { Exit } from "@fncts/base/data/Exit/definition";
16
15
  import { Either } from "@fncts/base/data/Either/definition";
17
16
  import { FiberScope } from "@fncts/io/FiberScope";
18
17
  import { Trace } from "@fncts/base/data/Trace/definition";
18
+ import { Supervisor } from "@fncts/io/Supervisor/definition";
19
19
  import { Cause } from "@fncts/base/data/Cause/definition";
20
- import { InterruptStatus } from "@fncts/io/InterruptStatus";
21
20
  import { isInterruptedException, IllegalStateError } from "@fncts/base/data/exceptions";
22
21
  import { FiberDescriptor } from "@fncts/io/FiberDescriptor";
22
+ import { InterruptStatus } from "@fncts/io/InterruptStatus";
23
23
  import { LogLevel } from "@fncts/io/LogLevel";
24
24
  import type { Instruction, Match } from "@fncts/io/IO/definition";
25
25
  import { TraceElement } from "@fncts/base/data/TraceElement";
@@ -28,9 +28,9 @@ import { Stack } from "@fncts/base/internal/Stack";
28
28
  import { FiberTypeId } from "@fncts/io/Fiber/definition";
29
29
  import { FiberState } from "@fncts/io/FiberState";
30
30
  import { FiberStatus } from "@fncts/io/FiberStatus";
31
- export declare type FiberRefLocals = AtomicReference<HashMap<FiberRef<unknown>, Cons<readonly [FiberId.Runtime, unknown]>>>;
32
- declare type Erased = IO<any, any, any>;
33
- declare type ErasedCont = (a: any) => Erased;
31
+ export type FiberRefLocals = HashMap<FiberRef<unknown>, Cons<readonly [FiberId.Runtime, unknown]>>;
32
+ type Erased = IO<any, any, any>;
33
+ type ErasedCont = (a: any) => Erased;
34
34
  export declare class InterruptExit {
35
35
  readonly apply: ErasedCont;
36
36
  readonly trace?: string | undefined;
@@ -56,7 +56,7 @@ export declare class Finalizer {
56
56
  readonly _tag = "Finalizer";
57
57
  constructor(finalizer: IO<any, never, any>, apply: ErasedCont, trace?: string | undefined);
58
58
  }
59
- export declare type Frame = InterruptExit | Match<any, any, any, any, any, any, any, any, any> | HandlerFrame | TracedCont | Finalizer;
59
+ export type Frame = InterruptExit | Match<any, any, any, any, any, any, any, any, any> | HandlerFrame | TracedCont | Finalizer;
60
60
  export declare const currentFiber: AtomicReference<FiberContext<any, any> | null>;
61
61
  export declare function unsafeCurrentFiber(): Maybe<FiberContext<any, any>>;
62
62
  /**
@@ -65,10 +65,10 @@ export declare function unsafeCurrentFiber(): Maybe<FiberContext<any, any>>;
65
65
  * @tsplus type fncts.io.Fiber
66
66
  */
67
67
  export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable, Equatable {
68
- protected readonly fiberId: FiberId.Runtime;
69
- private runtimeConfig;
70
- private interruptStatus;
71
- private fiberRefLocals;
68
+ readonly fiberId: FiberId.Runtime;
69
+ runtimeConfig: RuntimeConfig;
70
+ interruptStatus: Stack<boolean>;
71
+ fiberRefLocals: FiberRefLocals;
72
72
  private readonly _children;
73
73
  readonly _typeId: FiberTypeId;
74
74
  readonly _tag = "RuntimeFiber";
@@ -80,7 +80,6 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
80
80
  private asyncEpoch;
81
81
  private stack;
82
82
  nextIO: Instruction | null;
83
- private currentSupervisor;
84
83
  constructor(fiberId: FiberId.Runtime, runtimeConfig: RuntimeConfig, interruptStatus: Stack<boolean>, fiberRefLocals: FiberRefLocals, _children: Set<FiberContext<unknown, unknown>>);
85
84
  get poll(): import("@fncts/io/IO/definition").UIO<import("@fncts/base/data/Maybe").Maybe<import("@fncts/base/data/Exit").Exit<E, A>>>;
86
85
  get inheritRefs(): UIO<void>;
@@ -88,6 +87,7 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
88
87
  awaitAsync(k: FiberState.Callback<E, A>): void;
89
88
  get children(): UIO<Conc<Fiber.Runtime<any, any>>>;
90
89
  evalOnIO<R1, E1, B, R2, E2, C>(effect: IO<R1, E1, B>, orElse: IO<R2, E2, C>, __tsplusTrace?: string): IO<R1 & R2, E1 | E2, B | C>;
90
+ get fiberRefs(): FiberRefs;
91
91
  get await(): UIO<Exit<E, A>>;
92
92
  run(): void;
93
93
  get scope(): FiberScope;
@@ -103,19 +103,19 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
103
103
  */
104
104
  runUntil(maxOpCount: number): void;
105
105
  unsafeRunLater(i0: Instruction): void;
106
- private unsafeGetRef;
106
+ unsafeGetRef<A>(ref: FiberRef<A>): A;
107
107
  private unsafeGetRefs;
108
- private unsafeSetRef;
109
- private unsafeDeleteRef;
108
+ unsafeSetRef<A>(ref: FiberRef<A>, value: A): void;
109
+ unsafeDeleteRef<A>(ref: FiberRef<A>): void;
110
110
  unsafePoll(): import("@fncts/base/data/Maybe").Maybe<import("@fncts/base/data/Exit").Exit<E, A>>;
111
111
  private interruptExit;
112
- private unsafeAddFinalizer;
113
- private get unsafeIsInterruptible();
112
+ unsafeAddFinalizer(finalizer: IO<any, never, any>): void;
113
+ get unsafeIsInterruptible(): boolean;
114
114
  private get unsafeIsInterrupted();
115
115
  private get unsafeIsInterrupting();
116
116
  private get unsafeShouldInterrupt();
117
117
  private unsafeDisableInterruption;
118
- private unsafeRestoreInterruptStatus;
118
+ unsafeRestoreInterruptStatus(): void;
119
119
  private unsafeAddSuppressedCause;
120
120
  /**
121
121
  * Unwinds the stack, looking for the first error handler, and exiting
@@ -126,7 +126,7 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
126
126
  private unsafeNextEffect;
127
127
  private unsafeNotifyObservers;
128
128
  private unsafeRemoveObserver;
129
- private unsafeInterruptAs;
129
+ interruptAsFork(fiberId: FiberId): UIO<void>;
130
130
  private unsafeTryDone;
131
131
  private unsafeSetAsyncCanceller;
132
132
  private unsafeReportUnhandled;
@@ -137,7 +137,7 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
137
137
  private unsafeFork;
138
138
  unsafeOnDone(k: FiberState.Callback<never, Exit<E, A>>): void;
139
139
  private unsafeClearSuppressedCause;
140
- private unsafeGetDescriptor;
140
+ unsafeGetDescriptor(): import("../FiberDescriptor").FiberDescriptor;
141
141
  private unsafeRace;
142
142
  private unsafeCompleteRace;
143
143
  private unsafeCaptureTrace;
@@ -146,5 +146,8 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
146
146
  unsafeAddChild(child: FiberContext<unknown, unknown>): void;
147
147
  private unsafeLog;
148
148
  private unsafeLogWith;
149
+ private unsafeIsFatal;
150
+ private unsafeHandleFatalError;
151
+ get currentSupervisor(): Supervisor<any>;
149
152
  }
150
153
  export {};
@@ -6,7 +6,7 @@ import { UIO } from "@fncts/io/IO/definition";
6
6
  * @tsplus static fncts.io.FiberOps interruptAllAs
7
7
  * @tsplus location "@fncts/io/Fiber/api/interruptAll"
8
8
  */
9
- export declare function interruptAllAs_(fs: Iterable<Fiber<any, any>>, id: FiberId, __tsplusTrace?: string): UIO<void>;
9
+ export declare function interruptAllAs(fs: Iterable<Fiber<any, any>>, id: FiberId, __tsplusTrace?: string): UIO<void>;
10
10
  /**
11
11
  * Interrupts all fibers and awaits their interruption
12
12
  * @tsplus static fncts.io.FiberOps interruptAll
@@ -0,0 +1,8 @@
1
+ import { Fiber } from "@fncts/io/Fiber/definition";
2
+ import { FiberId } from "@fncts/base/data/FiberId/definition";
3
+ import { UIO } from "@fncts/io/IO/definition";
4
+ /**
5
+ * @tsplus fluent fncts.io.Fiber interruptAsFork
6
+ * @tsplus location "@fncts/io/Fiber/api/interruptAsFork"
7
+ */
8
+ export declare function interruptAsFork<E, A>(self: Fiber<E, A>, fiberId: FiberId): UIO<void>;
@@ -7,7 +7,7 @@ import { TraceElement } from "@fncts/base/data/TraceElement/definition";
7
7
  import { Trace } from "@fncts/base/data/Trace/definition";
8
8
  import type { FiberStatus } from "@fncts/io/FiberStatus";
9
9
  export declare const FiberTypeId: unique symbol;
10
- export declare type FiberTypeId = typeof FiberTypeId;
10
+ export type FiberTypeId = typeof FiberTypeId;
11
11
  /**
12
12
  * @tsplus type fncts.io.Fiber
13
13
  */
@@ -39,11 +39,9 @@ export interface FiberCommon<E, A> extends Fiber<E, A> {
39
39
  */
40
40
  readonly inheritRefs: UIO<void>;
41
41
  /**
42
- * Interrupts the fiber as if interrupted from the specified fiber. If the
43
- * fiber has already exited, the returned effect will resume immediately.
44
- * Otherwise, the effect will resume when the fiber exits.
42
+ * Interrupts the fiber as if interrupted from the specified fiber.
45
43
  */
46
- readonly interruptAs: (fiberId: FiberId) => UIO<Exit<E, A>>;
44
+ readonly interruptAsFork: (fiberId: FiberId) => UIO<void>;
47
45
  /**
48
46
  * Tentatively observes the fiber, but returns immediately if it is not already done.
49
47
  */
@@ -84,15 +82,15 @@ export declare class SyntheticFiber<E, A> implements FiberCommon<E, A> {
84
82
  readonly children: UIO<Conc<Fiber.Runtime<any, any>>>;
85
83
  readonly inheritRefs: UIO<void>;
86
84
  readonly poll: UIO<Maybe<Exit<E, A>>>;
87
- readonly interruptAs: (fiberId: FiberId) => UIO<Exit<E, A>>;
85
+ readonly interruptAsFork: (fiberId: FiberId) => UIO<void>;
88
86
  readonly _tag = "SyntheticFiber";
89
87
  readonly _typeId: FiberTypeId;
90
88
  readonly _E: () => E;
91
89
  readonly _A: () => A;
92
90
  readonly await: import("../IO").UIO<import("@fncts/base/data/Exit").Exit<E, A>>;
93
- constructor(id: FiberId, wait: UIO<Exit<E, A>>, children: UIO<Conc<Fiber.Runtime<any, any>>>, inheritRefs: UIO<void>, poll: UIO<Maybe<Exit<E, A>>>, interruptAs: (fiberId: FiberId) => UIO<Exit<E, A>>);
91
+ constructor(id: FiberId, wait: UIO<Exit<E, A>>, children: UIO<Conc<Fiber.Runtime<any, any>>>, inheritRefs: UIO<void>, poll: UIO<Maybe<Exit<E, A>>>, interruptAsFork: (fiberId: FiberId) => UIO<void>);
94
92
  }
95
- export declare type ConcreteFiber<E, A> = Fiber.Runtime<E, A> | Fiber.Synthetic<E, A>;
93
+ export type ConcreteFiber<E, A> = Fiber.Runtime<E, A> | Fiber.Synthetic<E, A>;
96
94
  /**
97
95
  * @tsplus fluent fncts.io.Fiber concrete
98
96
  * @tsplus macro remove
package/FiberRef/api.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare function getAndUpdateJust_<A>(fiberRef: FiberRef<A>, f: (a: A) =>
43
43
  * @tsplus fluent fncts.io.FiberRef locally
44
44
  * @tsplus location "@fncts/io/FiberRef/api"
45
45
  */
46
- export declare function locally_<A>(fiberRef: FiberRef<A>, value: A, __tsplusTrace?: string): <R1, E1, B>(use: import("@fncts/io/IO/definition").IO<R1, E1, B>) => import("@fncts/io/IO/definition").IO<R1, E1, B>;
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
47
  /**
48
48
  * Returns an `IO` that runs with `f` applied to the current fiber.
49
49
  *
@@ -51,7 +51,7 @@ export declare function locally_<A>(fiberRef: FiberRef<A>, value: A, __tsplusTra
51
51
  * @tsplus fluent fncts.io.FiberRef locallyWith
52
52
  * @tsplus location "@fncts/io/FiberRef/api"
53
53
  */
54
- export declare function locallyWith_<A>(self: FiberRef<A>, f: (a: A) => A, __tsplusTrace?: string): <R1, E1, B>(use: import("@fncts/io/IO/definition").IO<R1, E1, B>) => import("@fncts/io/IO/definition").IO<R1, E1, B>;
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
55
  /**
56
56
  * @tsplus fluent fncts.io.FiberRef getWith
57
57
  * @tsplus location "@fncts/io/FiberRef/api"
@@ -87,3 +87,8 @@ export declare function patch<Value, Patch>(self: FiberRef.WithPatch<Value, Patc
87
87
  * @tsplus location "@fncts/io/FiberRef/api"
88
88
  */
89
89
  export declare function fork<Value, Patch>(self: FiberRef.WithPatch<Value, Patch>): Patch;
90
+ /**
91
+ * @tsplus fluent fncts.io.FiberRef join
92
+ * @tsplus location "@fncts/io/FiberRef/api"
93
+ */
94
+ export declare function join<Value, Patch>(self: FiberRef.WithPatch<Value, Patch>, oldValue: Value, newValue: Value): Value;
@@ -1,7 +1,7 @@
1
1
  import { Hashable } from "@fncts/base/typeclass/Hashable";
2
2
  import { Equatable } from "@fncts/base/typeclass/Equatable";
3
3
  export declare const FiberRefTypeId: unique symbol;
4
- export declare type FiberRefTypeId = typeof FiberRefTypeId;
4
+ export type FiberRefTypeId = typeof FiberRefTypeId;
5
5
  /**
6
6
  * @tsplus type fncts.io.FiberRef
7
7
  * @tsplus companion fncts.io.FiberRefOps
@@ -25,14 +25,15 @@ export declare class FiberRefInternal<Value, Patch> extends FiberRef<Value> impl
25
25
  readonly _combine: (first: Patch, second: Patch) => Patch;
26
26
  readonly _patch: (patch: Patch) => (oldValue: Value) => Value;
27
27
  readonly _fork: Patch;
28
+ readonly _join: (oldValue: Value, newValue: Value) => Value;
28
29
  readonly _Patch: Patch;
29
30
  private readonly id;
30
- constructor(_initial: Value, _diff: (oldValue: Value, newValue: Value) => Patch, _combine: (first: Patch, second: Patch) => Patch, _patch: (patch: Patch) => (oldValue: Value) => Value, _fork: Patch);
31
+ constructor(_initial: Value, _diff: (oldValue: Value, newValue: Value) => Patch, _combine: (first: Patch, second: Patch) => Patch, _patch: (patch: Patch) => (oldValue: Value) => Value, _fork: Patch, _join: (oldValue: Value, newValue: Value) => Value);
31
32
  get [Symbol.hash](): number;
32
33
  [Symbol.equals](that: unknown): boolean;
33
34
  }
34
35
  export declare function isFiberRef(u: unknown): u is FiberRef<unknown>;
35
- declare type Concrete<Value, Patch> = FiberRefInternal<Value, Patch>;
36
+ type Concrete<Value, Patch> = FiberRefInternal<Value, Patch>;
36
37
  /**
37
38
  * @tsplus macro remove
38
39
  */
@@ -5,14 +5,16 @@ import { FiberScope } from "@fncts/io/FiberScope";
5
5
  import { LogLevel } from "@fncts/io/LogLevel";
6
6
  import { List } from "@fncts/base/collection/immutable/List/definition";
7
7
  import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
8
+ import { Supervisor } from "@fncts/io/Supervisor/definition";
8
9
  import type { LogSpan } from "../LogSpan.js";
9
10
  import type { Scheduler } from "@fncts/io/internal/Scheduler.js";
10
11
  import { Patch } from "@fncts/base/data/Patch";
12
+ import { IsFatal } from "../internal/IsFatal.js";
11
13
  /**
12
14
  * @tsplus static fncts.io.FiberRefOps unsafeMakePatch
13
15
  * @tsplus location "@fncts/io/FiberRef/unsafe"
14
16
  */
15
- export declare function unsafeMakePatch<Value, Patch>(initial: Value, diff: (oldValue: Value, newValue: Value) => Patch, combine: (first: Patch, second: Patch) => Patch, patch: (patch: Patch) => (oldValue: Value) => Value, fork: Patch): FiberRef.WithPatch<Value, Patch>;
17
+ export declare function unsafeMakePatch<Value, Patch>(initial: Value, diff: (oldValue: Value, newValue: Value) => Patch, combine: (first: Patch, second: Patch) => Patch, patch: (patch: Patch) => (oldValue: Value) => Value, fork: Patch, join?: (oldValue: Value, newValue: Value) => Value): FiberRef.WithPatch<Value, Patch>;
16
18
  /**
17
19
  * @tsplus static fncts.io.FiberRefOps unsafeMakeEnvironment
18
20
  * @tsplus location "@fncts/io/FiberRef/unsafe"
@@ -58,3 +60,18 @@ export declare const currentLogAnnotations: import("./definition.js").FiberRef.W
58
60
  * @tsplus location "@fncts/io/FiberRef/unsafe"
59
61
  */
60
62
  export declare const currentScheduler: import("./definition.js").FiberRef.WithPatch<Scheduler, (_: Scheduler) => Scheduler>;
63
+ /**
64
+ * @tsplus static fncts.io.FiberRefOps currentSupervisor
65
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
66
+ */
67
+ export declare const currentSupervisor: import("./definition.js").FiberRef.WithPatch<import("../Supervisor.js").Supervisor<any>, (_: import("../Supervisor.js").Supervisor<any>) => import("../Supervisor.js").Supervisor<any>>;
68
+ /**
69
+ * @tsplus static fncts.io.FiberRefOps currentIsFatal
70
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
71
+ */
72
+ export declare const currentIsFatal: import("./definition.js").FiberRef.WithPatch<IsFatal, (_: IsFatal) => IsFatal>;
73
+ /**
74
+ * @tsplus static fncts.io.FiberRefOps currentReportFatal
75
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
76
+ */
77
+ export declare const currentReportFatal: import("./definition.js").FiberRef.WithPatch<(t: unknown) => never, (_: (t: unknown) => never) => (t: unknown) => never>;
@@ -14,3 +14,8 @@ export declare function fiberRefs(self: FiberRefs): HashSet<FiberRef<unknown>>;
14
14
  * @tsplus location "@fncts/io/FiberRefs/api"
15
15
  */
16
16
  export declare function make(fiberRefLocals: HashMap<FiberRef<unknown>, Cons<readonly [FiberId.Runtime, unknown]>>): FiberRefs;
17
+ /**
18
+ * @tsplus fluent fncts.io.FiberRefs forkAs
19
+ * @tsplus location "@fncts/io/FiberRefs/api"
20
+ */
21
+ export declare function forkAs(self: FiberRefs, childId: FiberId.Runtime): FiberRefs;
@@ -3,7 +3,7 @@ import { FiberRef } from "@fncts/io/FiberRef/definition";
3
3
  import { Cons } from "@fncts/base/collection/immutable/List/definition";
4
4
  import { FiberId } from "@fncts/base/data/FiberId/definition";
5
5
  export declare const FiberRefsTypeId: unique symbol;
6
- export declare type FiberRefsTypeId = typeof FiberRefsTypeId;
6
+ export type FiberRefsTypeId = typeof FiberRefsTypeId;
7
7
  /**
8
8
  * @tsplus type fncts.io.FiberRefs
9
9
  * @tsplus companion fncts.io.FiberRefsOps
@@ -7,7 +7,7 @@ import { FiberStatus } from "../FiberStatus.js";
7
7
  /**
8
8
  * @tsplus type fncts.FiberState
9
9
  */
10
- export declare type FiberState<E, A> = Executing<E, A> | Done<E, A>;
10
+ export type FiberState<E, A> = Executing<E, A> | Done<E, A>;
11
11
  /**
12
12
  * @tsplus type fncts.FiberStateOps
13
13
  */
@@ -17,7 +17,7 @@ export declare const FiberState: FiberStateOps;
17
17
  export declare namespace FiberState {
18
18
  type Callback<E, A> = (exit: Exit<E, A>) => void;
19
19
  }
20
- export declare type Callback<E, A> = (exit: Exit<E, A>) => void;
20
+ export type Callback<E, A> = (exit: Exit<E, A>) => void;
21
21
  export declare class Executing<E, A> {
22
22
  status: FiberStatus;
23
23
  observers: Set<Callback<never, Exit<E, A>>>;
@@ -50,7 +50,7 @@ export declare class Suspended {
50
50
  /**
51
51
  * @tsplus type fncts.FiberStatus
52
52
  */
53
- export declare type FiberStatus = Done | Finishing | Running | Suspended;
53
+ export type FiberStatus = Done | Finishing | Running | Suspended;
54
54
  /**
55
55
  * @tsplus type fncts.FiberStatusOps
56
56
  */
@@ -24,4 +24,4 @@ export declare class Done<E, A> {
24
24
  readonly _tag = FutureStateTag.Done;
25
25
  constructor(value: FIO<E, A>);
26
26
  }
27
- export declare type State<E, A> = Done<E, A> | Pending<E, A>;
27
+ export type State<E, A> = Done<E, A> | Pending<E, A>;
@@ -2,7 +2,7 @@ import { PQueue } from "@fncts/io/Queue/definition";
2
2
  import { UIO, IO } from "@fncts/io/IO/definition";
3
3
  import { Scope } from "@fncts/io/Scope/definition";
4
4
  export declare const HubTypeId: unique symbol;
5
- export declare type HubTypeId = typeof HubTypeId;
5
+ export type HubTypeId = typeof HubTypeId;
6
6
  /**
7
7
  * A `Hub<RA, RB, EA, EB, A, B>` is an asynchronous message hub. Publishers
8
8
  * can publish messages of type `A` to the hub and subscribers can subscribe to
@@ -1,10 +1,11 @@
1
1
  import { UIO, URIO } from "@fncts/io/IO/definition";
2
+ import { FiberRef } from "@fncts/io/FiberRef/definition";
2
3
  import { Just } from "@fncts/base/data/Maybe/definition";
3
4
  import { Lazy } from "@fncts/base/data/function/definition";
4
5
  import { Exit } from "@fncts/base/data/Exit/definition";
5
6
  import { Fiber } from "@fncts/io/Fiber/definition";
6
7
  import { FiberScope } from "../../FiberScope.js";
7
- import { GetForkScope, IO } from "../definition.js";
8
+ import { IO } from "../definition.js";
8
9
  /**
9
10
  * @tsplus getter fncts.io.IO daemonChildren
10
11
  * @tsplus location "@fncts/io/IO/api/core-scope"
@@ -21,7 +22,7 @@ export declare const forkScope: UIO<FiberScope>;
21
22
  * @tsplus static fncts.io.IOOps forkScopeWith
22
23
  * @tsplus location "@fncts/io/IO/api/core-scope"
23
24
  */
24
- export declare function forkScopeWith<R, E, A>(f: (_: FiberScope) => IO<R, E, A>, __tsplusTrace?: string): GetForkScope<R, E, A>;
25
+ export declare function forkScopeWith<R, E, A>(f: (_: FiberScope) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
25
26
  export declare class ForkScopeRestore {
26
27
  private scope;
27
28
  constructor(scope: FiberScope);
@@ -42,7 +43,7 @@ export declare function forkScopeMask_<R, E, A>(newScope: FiberScope, f: (restor
42
43
  * @tsplus location "@fncts/io/IO/api/core-scope"
43
44
  */
44
45
  export declare function raceWith_<R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(left: IO<R, E, A>, 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): IO<R | R1 | R2 | R3, E2 | E3, A2 | A3>;
45
- export declare type Grafter = <R, E, A>(effect: IO<R, E, A>) => IO<R, E, A>;
46
+ export type Grafter = <R, E, A>(effect: IO<R, E, A>) => IO<R, E, A>;
46
47
  /**
47
48
  * Transplants specified effects so that when those effects fork other
48
49
  * effects, the forked effects will be governed by the scope of the
@@ -104,6 +104,6 @@ export declare function disconnect<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: s
104
104
  export declare class InterruptStatusRestore {
105
105
  readonly flag: InterruptStatus;
106
106
  constructor(flag: InterruptStatus);
107
- restore: <R, E, A>(io: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R, E, A>;
108
- force: <R, E, A>(io: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R, E, A>;
107
+ restore: <R, E, A>(io: import("../definition").IO<R, E, A>) => import("../definition").IO<R, E, A>;
108
+ force: <R, E, A>(io: import("../definition").IO<R, E, A>) => import("../definition").IO<R, E, A>;
109
109
  }
@@ -0,0 +1,10 @@
1
+ import { IO } from "@fncts/io/IO/definition";
2
+ import { Supervisor } from "@fncts/io/Supervisor/definition";
3
+ /**
4
+ *
5
+ * Returns an IO with the behavior of this one, but where all child
6
+ * fibers forked in the effect are reported to the specified supervisor.
7
+ * @tsplus fluent fncts.io.IO supervised
8
+ * @tsplus location "@fncts/io/IO/api/supervised"
9
+ */
10
+ export declare function supervised_<R, E, A>(fa: IO<R, E, A>, supervisor: Supervisor<any>, __tsplusTrace?: string): IO<R, E, A>;
package/IO/api.d.ts CHANGED
@@ -16,8 +16,8 @@ import { Exit } from "@fncts/base/data/Exit/definition";
16
16
  import { Trace } from "@fncts/base/data/Trace/definition";
17
17
  import { List } from "@fncts/base/collection/immutable/List/definition";
18
18
  import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
19
- import { Supervisor } from "@fncts/io/Supervisor/definition";
20
19
  import { FiberRefs } from "@fncts/io/FiberRefs";
20
+ import type { FiberStatus } from "../FiberStatus.js";
21
21
  import type * as P from "@fncts/base/typeclass";
22
22
  import type { _E, _R } from "@fncts/base/types";
23
23
  import type { FiberContext } from "@fncts/io/Fiber/FiberContext";
@@ -271,7 +271,7 @@ export declare function deferTryCatchWith<R, E, A, E1>(io: (runtimeConfig: Runti
271
271
  * @tsplus static fncts.io.IOOps descriptor
272
272
  * @tsplus location "@fncts/io/IO/api"
273
273
  */
274
- export declare const descriptor: IO<never, never, import("../FiberDescriptor").FiberDescriptor>;
274
+ export declare const descriptor: IO<never, never, import("../FiberDescriptor.js").FiberDescriptor>;
275
275
  /**
276
276
  * Constructs an IO based on information about the current fiber, such as
277
277
  * its identity.
@@ -972,14 +972,6 @@ export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<neve
972
972
  * @tsplus location "@fncts/io/IO/api"
973
973
  */
974
974
  export declare function succeed<A>(effect: Lazy<A>, __tsplusTrace?: string): UIO<A>;
975
- /**
976
- *
977
- * Returns an IO with the behavior of this one, but where all child
978
- * fibers forked in the effect are reported to the specified supervisor.
979
- * @tsplus fluent fncts.io.IO supervised
980
- * @tsplus location "@fncts/io/IO/api"
981
- */
982
- export declare function supervised_<R, E, A>(fa: IO<R, E, A>, supervisor: Supervisor<any>, __tsplusTrace?: string): IO<R, E, A>;
983
975
  /**
984
976
  * @tsplus fluent fncts.io.IO summarized
985
977
  * @tsplus location "@fncts/io/IO/api"
@@ -1080,6 +1072,11 @@ export declare function unsandbox<R, E, A>(ma: IO<R, Cause<E>, A>, __tsplusTrace
1080
1072
  * @tsplus location "@fncts/io/IO/api"
1081
1073
  */
1082
1074
  export declare function updateFiberRefs(f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs) => FiberRefs, __tsplusTrace?: string): UIO<void>;
1075
+ /**
1076
+ * @tsplus static fncts.io.IOOps withFiberContext
1077
+ * @tsplus location "@fncts/io/IO/api"
1078
+ */
1079
+ export declare function withFiberContext<R, E, A>(onState: (fiber: FiberContext<E, A>, status: FiberStatus) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
1083
1080
  /**
1084
1081
  * @tsplus fluent fncts.io.IO __call
1085
1082
  * @tsplus location "@fncts/io/IO/api"