@fncts/io 0.0.18 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/Clock/definition.d.ts +1 -0
  2. package/Differ/api.d.ts +24 -0
  3. package/Differ/definition.d.ts +15 -0
  4. package/Fiber/FiberContext.d.ts +5 -2
  5. package/Fiber/api/interruptAll.d.ts +1 -1
  6. package/Fiber/api/interruptAsFork.d.ts +8 -0
  7. package/Fiber/definition.d.ts +4 -6
  8. package/FiberRef/api.d.ts +5 -0
  9. package/FiberRef/definition.d.ts +2 -1
  10. package/FiberRef/unsafe.d.ts +23 -6
  11. package/FiberRefs/api.d.ts +5 -0
  12. package/IOEnv/services.d.ts +2 -2
  13. package/Reloadable/api.d.ts +21 -0
  14. package/Reloadable/constructors.d.ts +23 -0
  15. package/Reloadable/definition.d.ts +20 -0
  16. package/Reloadable.d.ts +3 -0
  17. package/Supervisor/api.d.ts +11 -5
  18. package/Supervisor/definition.d.ts +28 -0
  19. package/SupervisorPatch.d.ts +61 -0
  20. package/_cjs/Clock/definition.cjs +2 -1
  21. package/_cjs/Clock/definition.cjs.map +1 -1
  22. package/_cjs/Console/definition.cjs +1 -1
  23. package/_cjs/Console/definition.cjs.map +1 -1
  24. package/_cjs/Differ/api.cjs +108 -0
  25. package/_cjs/Differ/api.cjs.map +1 -0
  26. package/_cjs/Differ/definition.cjs +23 -0
  27. package/_cjs/Differ/definition.cjs.map +1 -0
  28. package/_cjs/Fiber/FiberContext.cjs +54 -51
  29. package/_cjs/Fiber/FiberContext.cjs.map +1 -1
  30. package/_cjs/Fiber/api/collectAll.cjs +2 -2
  31. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  32. package/_cjs/Fiber/api/interrupt.cjs +4 -2
  33. package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
  34. package/_cjs/Fiber/api/interruptAll.cjs +8 -8
  35. package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
  36. package/_cjs/Fiber/api/interruptAs.cjs +7 -1
  37. package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
  38. package/_cjs/Fiber/api/interruptAsFork.cjs +15 -0
  39. package/_cjs/Fiber/api/interruptAsFork.cjs.map +1 -0
  40. package/_cjs/Fiber/api/interruptFork.cjs +5 -5
  41. package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
  42. package/_cjs/Fiber/definition.cjs +2 -2
  43. package/_cjs/Fiber/definition.cjs.map +1 -1
  44. package/_cjs/FiberRef/api.cjs +10 -0
  45. package/_cjs/FiberRef/api.cjs.map +1 -1
  46. package/_cjs/FiberRef/definition.cjs +2 -1
  47. package/_cjs/FiberRef/definition.cjs.map +1 -1
  48. package/_cjs/FiberRef/unsafe.cjs +49 -19
  49. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  50. package/_cjs/FiberRefs/api.cjs +28 -2
  51. package/_cjs/FiberRefs/api.cjs.map +1 -1
  52. package/_cjs/FiberRefs/join.cjs +1 -1
  53. package/_cjs/FiberRefs/join.cjs.map +1 -1
  54. package/_cjs/IO/api/interrupt.cjs +5 -3
  55. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  56. package/_cjs/IO/api/zipC.cjs +10 -8
  57. package/_cjs/IO/api/zipC.cjs.map +1 -1
  58. package/_cjs/IO/api.cjs +2 -4
  59. package/_cjs/IO/api.cjs.map +1 -1
  60. package/_cjs/IO/runtime.cjs +7 -9
  61. package/_cjs/IO/runtime.cjs.map +1 -1
  62. package/_cjs/IOEnv/definition.cjs.map +1 -1
  63. package/_cjs/IOEnv/services.cjs.map +1 -1
  64. package/_cjs/Layer/api.cjs +1 -1
  65. package/_cjs/Layer/api.cjs.map +1 -1
  66. package/_cjs/Random/definition.cjs +1 -1
  67. package/_cjs/Random/definition.cjs.map +1 -1
  68. package/_cjs/Reloadable/api.cjs +46 -0
  69. package/_cjs/Reloadable/api.cjs.map +1 -0
  70. package/_cjs/Reloadable/constructors.cjs +82 -0
  71. package/_cjs/Reloadable/constructors.cjs.map +1 -0
  72. package/_cjs/Reloadable/definition.cjs +58 -0
  73. package/_cjs/Reloadable/definition.cjs.map +1 -0
  74. package/_cjs/Reloadable.cjs +45 -0
  75. package/_cjs/Reloadable.cjs.map +1 -0
  76. package/_cjs/Scope/definition.cjs +1 -1
  77. package/_cjs/Scope/definition.cjs.map +1 -1
  78. package/_cjs/Supervisor/api.cjs +44 -33
  79. package/_cjs/Supervisor/api.cjs.map +1 -1
  80. package/_cjs/Supervisor/definition.cjs +66 -1
  81. package/_cjs/Supervisor/definition.cjs.map +1 -1
  82. package/_cjs/SupervisorPatch.cjs +172 -0
  83. package/_cjs/SupervisorPatch.cjs.map +1 -0
  84. package/_cjs/internal/IsFatal.cjs +129 -0
  85. package/_cjs/internal/IsFatal.cjs.map +1 -0
  86. package/_mjs/Clock/definition.mjs +2 -1
  87. package/_mjs/Clock/definition.mjs.map +1 -1
  88. package/_mjs/Console/definition.mjs +1 -1
  89. package/_mjs/Console/definition.mjs.map +1 -1
  90. package/_mjs/Differ/api.mjs +90 -0
  91. package/_mjs/Differ/api.mjs.map +1 -0
  92. package/_mjs/Differ/definition.mjs +13 -0
  93. package/_mjs/Differ/definition.mjs.map +1 -0
  94. package/_mjs/Fiber/FiberContext.mjs +54 -51
  95. package/_mjs/Fiber/FiberContext.mjs.map +1 -1
  96. package/_mjs/Fiber/api/collectAll.mjs +2 -2
  97. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  98. package/_mjs/Fiber/api/interrupt.mjs +3 -2
  99. package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
  100. package/_mjs/Fiber/api/interruptAll.mjs +6 -6
  101. package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
  102. package/_mjs/Fiber/api/interruptAs.mjs +3 -1
  103. package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
  104. package/_mjs/Fiber/api/interruptAsFork.mjs +8 -0
  105. package/_mjs/Fiber/api/interruptAsFork.mjs.map +1 -0
  106. package/_mjs/Fiber/api/interruptFork.mjs +5 -4
  107. package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
  108. package/_mjs/Fiber/definition.mjs +2 -2
  109. package/_mjs/Fiber/definition.mjs.map +1 -1
  110. package/_mjs/FiberRef/api.mjs +8 -0
  111. package/_mjs/FiberRef/api.mjs.map +1 -1
  112. package/_mjs/FiberRef/definition.mjs +2 -1
  113. package/_mjs/FiberRef/definition.mjs.map +1 -1
  114. package/_mjs/FiberRef/unsafe.mjs +42 -18
  115. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  116. package/_mjs/FiberRefs/api.mjs +22 -1
  117. package/_mjs/FiberRefs/api.mjs.map +1 -1
  118. package/_mjs/FiberRefs/join.mjs +1 -1
  119. package/_mjs/FiberRefs/join.mjs.map +1 -1
  120. package/_mjs/IO/api/interrupt.mjs +4 -3
  121. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  122. package/_mjs/IO/api/zipC.mjs +9 -8
  123. package/_mjs/IO/api/zipC.mjs.map +1 -1
  124. package/_mjs/IO/api.mjs +2 -3
  125. package/_mjs/IO/api.mjs.map +1 -1
  126. package/_mjs/IO/runtime.mjs +7 -8
  127. package/_mjs/IO/runtime.mjs.map +1 -1
  128. package/_mjs/IOEnv/definition.mjs.map +1 -1
  129. package/_mjs/IOEnv/services.mjs.map +1 -1
  130. package/_mjs/Layer/api.mjs +1 -1
  131. package/_mjs/Layer/api.mjs.map +1 -1
  132. package/_mjs/Random/definition.mjs +1 -1
  133. package/_mjs/Random/definition.mjs.map +1 -1
  134. package/_mjs/Reloadable/api.mjs +30 -0
  135. package/_mjs/Reloadable/api.mjs.map +1 -0
  136. package/_mjs/Reloadable/constructors.mjs +55 -0
  137. package/_mjs/Reloadable/constructors.mjs.map +1 -0
  138. package/_mjs/Reloadable/definition.mjs +40 -0
  139. package/_mjs/Reloadable/definition.mjs.map +1 -0
  140. package/_mjs/Reloadable.mjs +5 -0
  141. package/_mjs/Reloadable.mjs.map +1 -0
  142. package/_mjs/Scope/definition.mjs +1 -1
  143. package/_mjs/Scope/definition.mjs.map +1 -1
  144. package/_mjs/Supervisor/api.mjs +39 -32
  145. package/_mjs/Supervisor/api.mjs.map +1 -1
  146. package/_mjs/Supervisor/definition.mjs +55 -0
  147. package/_mjs/Supervisor/definition.mjs.map +1 -1
  148. package/_mjs/SupervisorPatch.mjs +131 -0
  149. package/_mjs/SupervisorPatch.mjs.map +1 -0
  150. package/_mjs/internal/IsFatal.mjs +104 -0
  151. package/_mjs/internal/IsFatal.mjs.map +1 -0
  152. package/_src/Clock/definition.ts +1 -0
  153. package/_src/Differ/api.ts +72 -0
  154. package/_src/Differ/definition.ts +16 -0
  155. package/_src/Fiber/FiberContext.ts +29 -24
  156. package/_src/Fiber/api/collectAll.ts +1 -4
  157. package/_src/Fiber/api/interruptAll.ts +2 -2
  158. package/_src/Fiber/api/interruptAs.ts +1 -1
  159. package/_src/Fiber/api/interruptAsFork.ts +7 -0
  160. package/_src/Fiber/api/interruptFork.ts +1 -1
  161. package/_src/Fiber/definition.ts +3 -5
  162. package/_src/FiberRef/api.ts +30 -15
  163. package/_src/FiberRef/definition.ts +1 -0
  164. package/_src/FiberRef/unsafe.ts +43 -22
  165. package/_src/FiberRefs/api.ts +16 -0
  166. package/_src/FiberRefs/join.ts +1 -1
  167. package/_src/IO/api.ts +2 -2
  168. package/_src/IO/runtime.ts +7 -11
  169. package/_src/IOEnv/definition.ts +0 -2
  170. package/_src/IOEnv/services.ts +5 -4
  171. package/_src/Reloadable/api.ts +28 -0
  172. package/_src/Reloadable/constructors.ts +60 -0
  173. package/_src/Reloadable/definition.ts +34 -0
  174. package/_src/Reloadable.ts +5 -0
  175. package/_src/Supervisor/api.ts +33 -29
  176. package/_src/Supervisor/definition.ts +59 -0
  177. package/_src/SupervisorPatch.ts +107 -0
  178. package/_src/global.ts +4 -0
  179. package/_src/internal/IsFatal.ts +79 -0
  180. package/global.d.ts +4 -0
  181. package/internal/IsFatal.d.ts +47 -0
  182. package/package.json +2 -2
@@ -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>;
@@ -0,0 +1,24 @@
1
+ import type { Environment } from "@fncts/base/data/Environment";
2
+ import type { Supervisor } from "@fncts/io/Supervisor";
3
+ import { Differ } from "./definition.js";
4
+ /**
5
+ * Constructs a differ that just diffs two values by returning a function that
6
+ * sets the value to the new value. This differ does not support combining
7
+ * multiple updates to the value compositionally and should only be used when
8
+ * there is no compositional way to update them.
9
+ * @tsplus static fncts.io.DifferOps update
10
+ * @tsplus location "@fncts/io/Differ/api"
11
+ */
12
+ export declare function update<A>(): Differ<A, (_: A) => A>;
13
+ /**
14
+ * Constructs a differ that knows how to diff `Environment` values.
15
+ * @tsplus static fncts.io.DifferOps environment
16
+ * @tsplus location "@fncts/io/Differ/api"
17
+ */
18
+ export declare function environment<A>(): Differ<Environment<A>, Environment.Patch<A, A>>;
19
+ /**
20
+ * Constructs a differ that knows how to diff `Supervisor` values.
21
+ * @tsplus static fncts.io.DifferOps supervisor
22
+ * @tsplus location "@fncts/io/Differ/api"
23
+ */
24
+ export declare function supervisor(): Differ<Supervisor<any>, Supervisor.Patch>;
@@ -0,0 +1,15 @@
1
+ export declare const DifferTypeId: unique symbol;
2
+ export type DifferTypeId = typeof DifferTypeId;
3
+ /**
4
+ * @tsplus type fncts.io.Differ
5
+ * @tsplus companion fncts.io.DifferOps
6
+ */
7
+ export declare abstract class Differ<Value, Patch> {
8
+ readonly _typeId: DifferTypeId;
9
+ _Value: Value;
10
+ _Patch: Patch;
11
+ abstract readonly empty: Patch;
12
+ abstract combine(first: Patch, second: Patch): Patch;
13
+ abstract diff(oldValue: Value, newValue: Value): Patch;
14
+ abstract patch(patch: Patch): (oldValue: Value) => Value;
15
+ }
@@ -28,7 +28,7 @@ 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 type FiberRefLocals = AtomicReference<HashMap<FiberRef<unknown>, Cons<readonly [FiberId.Runtime, unknown]>>>;
31
+ export type FiberRefLocals = HashMap<FiberRef<unknown>, Cons<readonly [FiberId.Runtime, unknown]>>;
32
32
  type Erased = IO<any, any, any>;
33
33
  type ErasedCont = (a: any) => Erased;
34
34
  export declare class InterruptExit {
@@ -87,6 +87,7 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
87
87
  awaitAsync(k: FiberState.Callback<E, A>): void;
88
88
  get children(): UIO<Conc<Fiber.Runtime<any, any>>>;
89
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;
90
91
  get await(): UIO<Exit<E, A>>;
91
92
  run(): void;
92
93
  get scope(): FiberScope;
@@ -125,7 +126,7 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
125
126
  private unsafeNextEffect;
126
127
  private unsafeNotifyObservers;
127
128
  private unsafeRemoveObserver;
128
- private unsafeInterruptAs;
129
+ interruptAsFork(fiberId: FiberId): UIO<void>;
129
130
  private unsafeTryDone;
130
131
  private unsafeSetAsyncCanceller;
131
132
  private unsafeReportUnhandled;
@@ -145,6 +146,8 @@ export declare class FiberContext<E, A> implements Fiber.Runtime<E, A>, Hashable
145
146
  unsafeAddChild(child: FiberContext<unknown, unknown>): void;
146
147
  private unsafeLog;
147
148
  private unsafeLogWith;
149
+ private unsafeIsFatal;
150
+ private unsafeHandleFatalError;
148
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>;
@@ -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,13 +82,13 @@ 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
93
  export type ConcreteFiber<E, A> = Fiber.Runtime<E, A> | Fiber.Synthetic<E, A>;
96
94
  /**
package/FiberRef/api.d.ts CHANGED
@@ -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;
@@ -25,9 +25,10 @@ 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
  }
@@ -1,24 +1,31 @@
1
1
  import { FiberRef } from "@fncts/io/FiberRef/definition";
2
2
  import { Environment } from "@fncts/base/data/Environment/definition";
3
+ import { Supervisor } from "@fncts/io/Supervisor/definition";
4
+ import { SupervisorPatch } from "@fncts/io/SupervisorPatch";
3
5
  import { Maybe } from "@fncts/base/data/Maybe/definition";
4
6
  import { FiberScope } from "@fncts/io/FiberScope";
5
7
  import { LogLevel } from "@fncts/io/LogLevel";
6
8
  import { List } from "@fncts/base/collection/immutable/List/definition";
7
9
  import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
8
- import { Supervisor } from "@fncts/io/Supervisor/definition";
9
10
  import type { LogSpan } from "../LogSpan.js";
10
11
  import type { Scheduler } from "@fncts/io/internal/Scheduler.js";
11
- import { Patch } from "@fncts/base/data/Patch";
12
+ import { Differ } from "@fncts/io/Differ/definition";
13
+ import { IsFatal } from "../internal/IsFatal.js";
12
14
  /**
13
15
  * @tsplus static fncts.io.FiberRefOps unsafeMakePatch
14
16
  * @tsplus location "@fncts/io/FiberRef/unsafe"
15
17
  */
16
- 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>;
18
+ export declare function unsafeMakePatch<Value, Patch>(initial: Value, differ: Differ<Value, Patch>, fork: Patch, join?: (oldValue: Value, newValue: Value) => Value): FiberRef.WithPatch<Value, Patch>;
17
19
  /**
18
20
  * @tsplus static fncts.io.FiberRefOps unsafeMakeEnvironment
19
21
  * @tsplus location "@fncts/io/FiberRef/unsafe"
20
22
  */
21
- export declare function unsafeMakeEnvironment<A>(initial: Environment<A>): FiberRef.WithPatch<Environment<A>, Patch<A, A>>;
23
+ export declare function unsafeMakeEnvironment<A>(initial: Environment<A>): FiberRef.WithPatch<Environment<A>, Environment.Patch<A, A>>;
24
+ /**
25
+ * @tsplus static fncts.io.FiberRefOps unsafeMakeSupervisor
26
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
27
+ */
28
+ export declare function unsafeMakeSupervisor(initial: Supervisor<any>): FiberRef.WithPatch<Supervisor<any>, SupervisorPatch>;
22
29
  /**
23
30
  * @tsplus static fncts.io.FiberRefOps unsafeMake
24
31
  * @tsplus location "@fncts/io/FiberRef/unsafe"
@@ -33,7 +40,7 @@ export declare const forkScopeOverride: import("./definition.js").FiberRef.WithP
33
40
  * @tsplus static fncts.io.FiberRefOps currentEnvironment
34
41
  * @tsplus location "@fncts/io/FiberRef/unsafe"
35
42
  */
36
- export declare const currentEnvironment: import("./definition.js").FiberRef.WithPatch<import("@fncts/base/data/Environment.js").Environment<unknown>, Patch<unknown, unknown>>;
43
+ export declare const currentEnvironment: import("./definition.js").FiberRef.WithPatch<import("@fncts/base/data/Environment.js").Environment<unknown>, import("@fncts/base/data/Environment.js").Environment.Patch<unknown, unknown>>;
37
44
  /**
38
45
  * @tsplus static fncts.io.FiberRefOps fiberName
39
46
  * @tsplus location "@fncts/io/FiberRef/unsafe"
@@ -63,4 +70,14 @@ export declare const currentScheduler: import("./definition.js").FiberRef.WithPa
63
70
  * @tsplus static fncts.io.FiberRefOps currentSupervisor
64
71
  * @tsplus location "@fncts/io/FiberRef/unsafe"
65
72
  */
66
- export declare const currentSupervisor: import("./definition.js").FiberRef.WithPatch<import("../Supervisor.js").Supervisor<any>, (_: import("../Supervisor.js").Supervisor<any>) => import("../Supervisor.js").Supervisor<any>>;
73
+ export declare const currentSupervisor: import("./definition.js").FiberRef.WithPatch<import("../Supervisor.js").Supervisor<any>, import("../SupervisorPatch.js").SupervisorPatch>;
74
+ /**
75
+ * @tsplus static fncts.io.FiberRefOps currentIsFatal
76
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
77
+ */
78
+ export declare const currentIsFatal: import("./definition.js").FiberRef.WithPatch<IsFatal, (_: IsFatal) => IsFatal>;
79
+ /**
80
+ * @tsplus static fncts.io.FiberRefOps currentReportFatal
81
+ * @tsplus location "@fncts/io/FiberRef/unsafe"
82
+ */
83
+ 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;
@@ -1,9 +1,9 @@
1
1
  import { FiberRef } from "@fncts/io/FiberRef/definition";
2
2
  import { Environment } from "@fncts/base/data/Environment/definition";
3
3
  import { IOEnv } from "@fncts/io/IOEnv";
4
- import type { Patch } from "@fncts/base/data/Patch";
4
+ import type { EnvironmentPatch } from "@fncts/base/data/EnvironmentPatch";
5
5
  /**
6
6
  * @tsplus static fncts.io.IOEnvOps services
7
7
  * @tsplus location "@fncts/io/IOEnv/services"
8
8
  */
9
- export declare const services: FiberRef.WithPatch<Environment<IOEnv>, Patch<IOEnv, IOEnv>>;
9
+ export declare const services: FiberRef.WithPatch<Environment<IOEnv>, EnvironmentPatch<IOEnv, IOEnv>>;
@@ -0,0 +1,21 @@
1
+ import { Tag } from "@fncts/base/data/Tag/definition";
2
+ import { IO } from "@fncts/io/IO/definition";
3
+ import type { Reloadable } from "./definition.js";
4
+ /**
5
+ * @tsplus static fncts.io.ReloadableOps get
6
+ * @tsplus location "@fncts/io/Reloadable/api"
7
+ */
8
+ export declare function get<Service>(
9
+ /** @tsplus auto */ tag: Tag<Reloadable<Service>>): IO<Reloadable<Service>, unknown, Service>;
10
+ /**
11
+ * @tsplus static fncts.io.ReloadableOps reload
12
+ * @tsplus location "@fncts/io/Reloadable/api"
13
+ */
14
+ export declare function reload<Service>(
15
+ /** @tsplua auto */ tag: Tag<Reloadable<Service>>): IO<Reloadable<Service>, unknown, void>;
16
+ /**
17
+ * @tsplus static fncts.io.ReloadableOps reloadFork
18
+ * @tsplus location "@fncts/io/Reloadable/api"
19
+ */
20
+ export declare function reloadFork<Service>(
21
+ /** @tsplus auto */ tag: Tag<Reloadable<Service>>): IO<Reloadable<Service>, never, void>;
@@ -0,0 +1,23 @@
1
+ import { Layer } from "@fncts/io/Layer";
2
+ import { Tag } from "@fncts/base/data/Tag/definition";
3
+ import { Schedule } from "@fncts/io/Schedule/definition";
4
+ import { Environment } from "@fncts/base/data/Environment/definition";
5
+ import { Reloadable } from "./definition.js";
6
+ /**
7
+ * @tsplus static fncts.io.ReloadableOps auto
8
+ * @tsplus location "@fncts/io/Reloadable/constructors"
9
+ */
10
+ export declare function auto<In, E, Out, Env>(layer: Layer<In, E, Out>, tag: Tag<Out>, schedule: Schedule<Env, any, any>,
11
+ /** @tsplus auto */ reloadableTag: Tag<Reloadable<Out>>): Layer<In | Env, E, Reloadable<Out>>;
12
+ /**
13
+ * @tsplus static fncts.io.ReloadableOps autoFromConfig
14
+ * @tsplus location "@fncts/io/Reloadable/constructors"
15
+ */
16
+ export declare function autoFromConfig<In, E, Out, Env>(layer: Layer<In, E, Out>, tag: Tag<Out>, scheduleFromConfig: (env: Environment<In>) => Schedule<Env, any, any>,
17
+ /** @tsplus auto */ reloadableTag: Tag<Reloadable<Out>>): Layer<In | Env, E, Reloadable<Out>>;
18
+ /**
19
+ * @tsplus static fncts.io.ReloadableOps manual
20
+ * @tsplus location "@fncts/io/Reloadable/constructors"
21
+ */
22
+ export declare function manual<In, E, Out>(layer: Layer<In, E, Out>, tag: Tag<Out>,
23
+ /** @tsplus auto */ reloadableTag: Tag<Reloadable<Out>>): Layer<In, E, Reloadable<Out>>;
@@ -0,0 +1,20 @@
1
+ import { ScopedRef } from "@fncts/io/ScopedRef/definition";
2
+ import { IO, UIO } from "@fncts/io/IO/definition";
3
+ import { Tag } from "@fncts/base/data/Tag/definition";
4
+ /**
5
+ * @tsplus type fncts.io.Reloadable
6
+ * @tsplus companion fncts.io.ReloadableOps
7
+ */
8
+ export declare class Reloadable<Service> {
9
+ readonly scopedRef: ScopedRef<Service>;
10
+ readonly reload: IO<never, unknown, void>;
11
+ _Service: (_: never) => Service;
12
+ constructor(scopedRef: ScopedRef<Service>, reload: IO<never, unknown, void>);
13
+ get get(): UIO<Service>;
14
+ get reloadFork(): UIO<void>;
15
+ }
16
+ /**
17
+ * @tsplus derive fncts.Tag[fncts.io.Reloadable]<_> 10
18
+ * @tsplus location "@fncts/io/Reloadable/definition"
19
+ */
20
+ export declare function deriveTag<S>(...[tag]: [S] extends [Reloadable<infer X>] ? [tag: Tag<X>] : [tag: Tag<S>]): Tag<Reloadable<S>>;
@@ -0,0 +1,3 @@
1
+ export * from "./Reloadable/api.js";
2
+ export * from "./Reloadable/constructors.js";
3
+ export * from "./Reloadable/definition.js";
@@ -1,11 +1,17 @@
1
1
  import { Supervisor } from "@fncts/io/Supervisor/definition";
2
- import { Environment } from "@fncts/base/data/Environment/definition";
3
- import { IO } from "@fncts/io/IO/definition";
4
- import { Maybe } from "@fncts/base/data/Maybe/definition";
5
- import { Fiber } from "@fncts/io/Fiber/definition";
6
- import { Exit } from "@fncts/base/data/Exit/definition";
2
+ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
7
3
  /**
8
4
  * @tsplus fluent fncts.io.Supervisor zip
9
5
  * @tsplus location "@fncts/io/Supervisor/api"
10
6
  */
11
7
  export declare function zip_<A, B>(fa: Supervisor<A>, fb: Supervisor<B>): Supervisor<readonly [A, B]>;
8
+ /**
9
+ * @tsplus getter fncts.io.Supervisor toSet
10
+ * @tsplus location "@fncts/io/Supervisor/api"
11
+ */
12
+ export declare function toSet(self: Supervisor<any>): HashSet<Supervisor<any>>;
13
+ /**
14
+ * @tsplus fluent fncts.io.Supervisor removeSupervisor
15
+ * @tsplus location "@fncts/io/Supervisor/api"
16
+ */
17
+ export declare function removeSupervisor(self: Supervisor<any>, that: Supervisor<any>): Supervisor<any>;
@@ -3,6 +3,12 @@ import { Environment } from "@fncts/base/data/Environment/definition";
3
3
  import { Maybe } from "@fncts/base/data/Maybe/definition";
4
4
  import { Fiber } from "@fncts/io/Fiber/definition";
5
5
  import { Exit } from "@fncts/base/data/Exit/definition";
6
+ import type { SupervisorPatch } from "@fncts/io/SupervisorPatch";
7
+ export declare const enum SupervisorTag {
8
+ Const = 0,
9
+ Proxy = 1,
10
+ Zip = 2
11
+ }
6
12
  /**
7
13
  * @tsplus type fncts.io.Supervisor
8
14
  * @tsplus companion fncts.io.SupervisorOps
@@ -15,8 +21,12 @@ export declare abstract class Supervisor<A> {
15
21
  unsafeOnSuspend<E, A>(_fiber: Fiber.Runtime<E, A>): void;
16
22
  unsafeOnResume<E, A>(_fiber: Fiber.Runtime<E, A>): void;
17
23
  }
24
+ export declare namespace Supervisor {
25
+ type Patch = SupervisorPatch;
26
+ }
18
27
  export declare class ConstSupervisor<A> extends Supervisor<A> {
19
28
  readonly value: UIO<A>;
29
+ readonly _tag = SupervisorTag.Const;
20
30
  constructor(value: UIO<A>);
21
31
  unsafeOnStart(): void;
22
32
  unsafeOnEnd(): void;
@@ -27,6 +37,7 @@ export declare class ConstSupervisor<A> extends Supervisor<A> {
27
37
  export declare class ProxySupervisor<A> extends Supervisor<A> {
28
38
  readonly value: UIO<A>;
29
39
  readonly underlying: Supervisor<any>;
40
+ readonly _tag = SupervisorTag.Proxy;
30
41
  constructor(value: UIO<A>, underlying: Supervisor<any>);
31
42
  unsafeOnStart<R, E, A>(environment: Environment<R>, effect: IO<R, E, A>, parent: Maybe<Fiber.Runtime<E, A>>, fiber: Fiber.Runtime<E, A>): void;
32
43
  unsafeOnEnd<E, A>(value: Exit<E, A>, fiber: Fiber.Runtime<E, A>): void;
@@ -34,3 +45,20 @@ export declare class ProxySupervisor<A> extends Supervisor<A> {
34
45
  unsafeOnSuspend<E, A>(fiber: Fiber.Runtime<E, A>): void;
35
46
  unsafeOnResume<E, A>(fiber: Fiber.Runtime<E, A>): void;
36
47
  }
48
+ export declare class Zip<A, B> extends Supervisor<readonly [A, B]> {
49
+ readonly first: Supervisor<A>;
50
+ readonly second: Supervisor<B>;
51
+ readonly _tag = SupervisorTag.Zip;
52
+ constructor(first: Supervisor<A>, second: Supervisor<B>);
53
+ value: import("../IO").IO<never, never, readonly [A, B]>;
54
+ unsafeOnStart<R, E, A>(environment: Environment<R>, effect: IO<R, E, A>, parent: Maybe<Fiber.Runtime<any, any>>, fiber: Fiber.Runtime<E, A>): void;
55
+ unsafeOnEnd<E, A>(value: Exit<E, A>, fiber: Fiber.Runtime<E, A>): void;
56
+ unsafeOnEffect<E, A>(fiber: Fiber.Runtime<E, A>, effect: IO<any, any, any>): void;
57
+ unsafeOnSuspend<E, A>(fiber: Fiber.Runtime<E, A>): void;
58
+ unsafeOnResume<E, A>(fiber: Fiber.Runtime<E, A>): void;
59
+ }
60
+ export type Concrete = ConstSupervisor<any> | ProxySupervisor<any> | Zip<any, any>;
61
+ /**
62
+ * @tsplus macro remove
63
+ */
64
+ export declare function concrete(_: Supervisor<any>): asserts _ is Concrete;
@@ -0,0 +1,61 @@
1
+ import { Supervisor } from "@fncts/io/Supervisor/definition";
2
+ import { List } from "@fncts/base/collection/immutable/List/definition";
3
+ export declare const SupervisorPatchTypeId: unique symbol;
4
+ export type SupervisorPatchTypeId = typeof SupervisorPatchTypeId;
5
+ export declare const enum SupervisorPatchTag {
6
+ AddSupervisor = 0,
7
+ Combine = 1,
8
+ Empty = 2,
9
+ RemoveSupervisor = 3
10
+ }
11
+ /**
12
+ * @tsplus type fncts.io.SupervisorPatch
13
+ * @tsplus companion fncts.io.SupervisorPatchOps
14
+ */
15
+ export declare abstract class SupervisorPatch {
16
+ readonly _typeId: SupervisorPatchTypeId;
17
+ }
18
+ export declare class AddSupervisor extends SupervisorPatch {
19
+ readonly supervisor: Supervisor<any>;
20
+ readonly _tag = SupervisorPatchTag.AddSupervisor;
21
+ constructor(supervisor: Supervisor<any>);
22
+ }
23
+ export declare class Combine extends SupervisorPatch {
24
+ readonly first: SupervisorPatch;
25
+ readonly second: SupervisorPatch;
26
+ readonly _tag = SupervisorPatchTag.Combine;
27
+ constructor(first: SupervisorPatch, second: SupervisorPatch);
28
+ }
29
+ export declare class Empty extends SupervisorPatch {
30
+ readonly _tag = SupervisorPatchTag.Empty;
31
+ }
32
+ export declare class RemoveSupervisor extends SupervisorPatch {
33
+ readonly supervisor: Supervisor<any>;
34
+ readonly _tag = SupervisorPatchTag.RemoveSupervisor;
35
+ constructor(supervisor: Supervisor<any>);
36
+ }
37
+ export type Concrete = AddSupervisor | Combine | Empty | RemoveSupervisor;
38
+ /**
39
+ * @tsplus macro remove
40
+ */
41
+ export declare function concrete(_: SupervisorPatch): asserts _ is Concrete;
42
+ /**
43
+ * @tsplus static fncts.io.SupervisorPatchOps empty
44
+ * @tsplus location "@fncts/io/SupervisorPatch"
45
+ */
46
+ export declare const empty: SupervisorPatch;
47
+ /**
48
+ * @tsplus fluent fncts.io.SupervisorPatch combine
49
+ * @tsplus location "@fncts/io/SupervisorPatch"
50
+ */
51
+ export declare function combine(first: SupervisorPatch, second: SupervisorPatch): SupervisorPatch;
52
+ /**
53
+ * @tsplus static fncts.io.SupervisorPatchOps diff
54
+ * @tsplus location "@fncts/io/SupervisorPatch"
55
+ */
56
+ export declare function diff(oldValue: Supervisor<any>, newValue: Supervisor<any>): SupervisorPatch;
57
+ /**
58
+ * @tsplus fluent fncts.io.SupervisorPatch __call
59
+ * @tsplus location "@fncts/io/SupervisorPatch"
60
+ */
61
+ export declare function apply(self: SupervisorPatch, supervisor: Supervisor<any>): Supervisor<any>;
@@ -18,10 +18,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
18
18
  class Clock {}
19
19
  /**
20
20
  * @tsplus static fncts.io.ClockOps Tag
21
+ * @tsplus implicit
21
22
  */
22
23
 
23
24
 
24
25
  exports.Clock = Clock;
25
- const ClockTag = /*#__PURE__*/tsplus_module_1.makeTag("19435fc3-3855-4914-989b-3d23ff58fa87");
26
+ const ClockTag = /*#__PURE__*/tsplus_module_1.makeTag("fncts.io.Clock");
26
27
  exports.ClockTag = ClockTag;
27
28
  //# sourceMappingURL=definition.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.cjs","mappings":";;;;;;;;;;;;;AAAA;;;;AAIM,MAAgBA,KAAhB,CAAqB;AAK3B;;;;;;AAGO,MAAMC,QAAQ,gBAAGC,+DAAjB","names":["Clock","ClockTag","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/Clock/definition.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"definition.cjs","mappings":";;;;;;;;;;;;;AAAA;;;;AAIM,MAAgBA,KAAhB,CAAqB;AAK3B;;;;;;;AAIO,MAAMC,QAAQ,gBAAGC,wBAAW,gBAAX,CAAjB","names":["Clock","ClockTag","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/Clock/definition.ts"],"sourcesContent":[null]}
@@ -22,6 +22,6 @@ class Console {}
22
22
 
23
23
 
24
24
  exports.Console = Console;
25
- const ConsoleTag = /*#__PURE__*/tsplus_module_1.makeTag("d4a1e3a7-acd8-4e99-90cd-6d866a63acff");
25
+ const ConsoleTag = /*#__PURE__*/tsplus_module_1.makeTag("fncts.io.Console");
26
26
  exports.ConsoleTag = ConsoleTag;
27
27
  //# sourceMappingURL=definition.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.cjs","mappings":";;;;;;;;;;;;;AAAA;;;;AAIM,MAAgBA,OAAhB,CAAuB;AAM7B;;;;;;AAGO,MAAMC,UAAU,gBAAGC,+DAAnB","names":["Console","ConsoleTag","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/Console/definition.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"definition.cjs","mappings":";;;;;;;;;;;;;AAAA;;;;AAIM,MAAgBA,OAAhB,CAAuB;AAM7B;;;;;;AAGO,MAAMC,UAAU,gBAAGC,wBAAa,kBAAb,CAAnB","names":["Console","ConsoleTag","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/Console/definition.ts"],"sourcesContent":[null]}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.environment = environment;
7
+ exports.supervisor = supervisor;
8
+ exports.update = update;
9
+
10
+ var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/function/api"));
11
+
12
+ var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/EnvironmentPatch"));
13
+
14
+ var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/SupervisorPatch"));
15
+
16
+ var _definition = /*#__PURE__*/require("./definition.cjs");
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ /**
23
+ * Constructs a differ that just diffs two values by returning a function that
24
+ * sets the value to the new value. This differ does not support combining
25
+ * multiple updates to the value compositionally and should only be used when
26
+ * there is no compositional way to update them.
27
+ *
28
+ * @tsplus static fncts.io.DifferOps update
29
+ */
30
+ function update() {
31
+ return new class extends _definition.Differ {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.empty = tsplus_module_1.identity;
35
+ }
36
+
37
+ combine(first, second) {
38
+ if (first === this.empty) return second;else if (second === this.empty) return first;
39
+ return tsplus_module_1.compose_(first, second);
40
+ }
41
+
42
+ diff(oldValue, newValue) {
43
+ if (oldValue === newValue) return this.empty;else return () => newValue;
44
+ }
45
+
46
+ patch(patch) {
47
+ return patch;
48
+ }
49
+
50
+ }();
51
+ }
52
+ /**
53
+ * Constructs a differ that knows how to diff `Environment` values.
54
+ *
55
+ * @tsplus static fncts.io.DifferOps environment
56
+ */
57
+
58
+
59
+ function environment() {
60
+ return new class extends _definition.Differ {
61
+ constructor() {
62
+ super(...arguments);
63
+ this.empty = tsplus_module_2.empty();
64
+ }
65
+
66
+ combine(first, second) {
67
+ return tsplus_module_2.combine(first, second);
68
+ }
69
+
70
+ diff(oldValue, newValue) {
71
+ return tsplus_module_2.diff(oldValue, newValue);
72
+ }
73
+
74
+ patch(patch) {
75
+ return oldValue => tsplus_module_2.apply(patch, oldValue);
76
+ }
77
+
78
+ }();
79
+ }
80
+ /**
81
+ * Constructs a differ that knows how to diff `Supervisor` values.
82
+ *
83
+ * @tsplus static fncts.io.DifferOps supervisor
84
+ */
85
+
86
+
87
+ function supervisor() {
88
+ return new class extends _definition.Differ {
89
+ constructor() {
90
+ super(...arguments);
91
+ this.empty = tsplus_module_3.empty;
92
+ }
93
+
94
+ combine(first, second) {
95
+ return tsplus_module_3.combine(first, second);
96
+ }
97
+
98
+ diff(oldValue, newValue) {
99
+ return tsplus_module_3.diff(oldValue, newValue);
100
+ }
101
+
102
+ patch(patch) {
103
+ return oldValue => tsplus_module_3.apply(patch, oldValue);
104
+ }
105
+
106
+ }();
107
+ }
108
+ //# sourceMappingURL=api.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.cjs","mappings":";;;;;;;;;;;;;;;AAKA;;;;;;AAEA;;;;;;;;AAQM,SAAUA,MAAV,GAAgB;EACpB,OAAO,IAAK,cAAcC,kBAAd,CAAoC;IAApCC;;MAUV,aAAKC,wBAAL;IAID;;IAbCC,OAAO,CAACC,KAAD,EAAqBC,MAArB,EAAwC;MAC7C,IAAID,KAAK,KAAK,KAAKE,KAAnB,EAA0B,OAAOD,MAAP,CAA1B,KACK,IAAIA,MAAM,KAAK,KAAKC,KAApB,EAA2B,OAAOF,KAAP;MAChC,OAAOF,gCAAcG,MAAd,CAAP;IACD;;IACDE,IAAI,CAACC,QAAD,EAAcC,QAAd,EAAyB;MAC3B,IAAID,QAAQ,KAAKC,QAAjB,EAA2B,OAAO,KAAKH,KAAZ,CAA3B,KACK,OAAO,MAAMG,QAAb;IACN;;IAEDC,KAAK,CAACA,KAAD,EAAmB;MACtB,OAAOA,KAAP;IACD;;EAb6C,CAAzC,EAAP;AAeD;AAED;;;;;;;AAKM,SAAUC,WAAV,GAAqB;EACzB,OAAO,IAAK,cAAcX,kBAAd,CAA6D;IAA7DC;;MAOV,aAAQW,uBAAR;IAID;;IAVCT,OAAO,CAACC,KAAD,EAAiCC,MAAjC,EAAgE;MACrE,OAAOO,+BAAcP,MAAd,CAAP;IACD;;IACDE,IAAI,CAACC,QAAD,EAA2BC,QAA3B,EAAmD;MACrD,OAAOG,qBAAsBJ,QAAtB,EAAgCC,QAAhC,CAAP;IACD;;IAEDC,KAAK,CAACA,KAAD,EAA+B;MAClC,OAAQF,QAAD,IAAcI,6BAAMJ,QAAN,CAArB;IACD;;EAVsE,CAAlE,EAAP;AAYD;AAED;;;;;;;AAKM,SAAUK,UAAV,GAAoB;EACxB,OAAO,IAAK,cAAcb,kBAAd,CAAuD;IAAvDC;;MAOV,aAAKa,qBAAL;IAID;;IAVCX,OAAO,CAACC,KAAD,EAAyBC,MAAzB,EAAgD;MACrD,OAAOS,+BAAcT,MAAd,CAAP;IACD;;IACDE,IAAI,CAACC,QAAD,EAA4BC,QAA5B,EAAqD;MACvD,OAAOK,qBAAqBN,QAArB,EAA+BC,QAA/B,CAAP;IACD;;IAEDC,KAAK,CAACA,KAAD,EAAuB;MAC1B,OAAQF,QAAD,IAAcM,6BAAMN,QAAN,CAArB;IACD;;EAVgE,CAA5D,EAAP;AAYD","names":["update","Differ","constructor","tsplus_module_1","combine","first","second","empty","diff","oldValue","newValue","patch","environment","tsplus_module_2","supervisor","tsplus_module_3"],"sourceRoot":"","sources":["../../_src/Differ/api.ts"],"sourcesContent":[null]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DifferTypeId = exports.Differ = void 0;
7
+ const DifferTypeId = /*#__PURE__*/Symbol.for("fncts.io.Differ");
8
+ /**
9
+ * @tsplus type fncts.io.Differ
10
+ * @tsplus companion fncts.io.DifferOps
11
+ */
12
+
13
+ exports.DifferTypeId = DifferTypeId;
14
+
15
+ class Differ {
16
+ constructor() {
17
+ this._typeId = DifferTypeId;
18
+ }
19
+
20
+ }
21
+
22
+ exports.Differ = Differ;
23
+ //# sourceMappingURL=definition.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition.cjs","mappings":";;;;;;AAAO,MAAMA,YAAY,gBAAGC,MAAM,CAACC,GAAP,CAAW,iBAAX,CAArB;AAGP;;;;;;;AAIM,MAAgBC,MAAhB,CAAsB;EAA5BC;IACW,eAAwBJ,YAAxB;EAOV;;AAR2B","names":["DifferTypeId","Symbol","for","Differ","constructor"],"sourceRoot":"","sources":["../../_src/Differ/definition.ts"],"sourcesContent":[null]}