@fncts/test 0.0.12 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/TestSpec.d.ts +1 -1
  2. package/_cjs/api.cjs +9 -9
  3. package/_cjs/api.cjs.map +1 -1
  4. package/_cjs/control/Annotations/api.cjs +1 -1
  5. package/_cjs/control/Annotations/api.cjs.map +1 -1
  6. package/_cjs/control/Annotations/live.cjs +4 -4
  7. package/_cjs/control/Annotations/live.cjs.map +1 -1
  8. package/_cjs/control/Assertion/api.cjs +2 -0
  9. package/_cjs/control/Assertion/api.cjs.map +1 -1
  10. package/_cjs/control/AssertionIO/api.cjs +2 -0
  11. package/_cjs/control/AssertionIO/api.cjs.map +1 -1
  12. package/_cjs/control/DefaultTestReporter/render.cjs +2 -0
  13. package/_cjs/control/DefaultTestReporter/render.cjs.map +1 -1
  14. package/_cjs/control/FreeBooleanAlgebraIO/api.cjs +2 -2
  15. package/_cjs/control/FreeBooleanAlgebraIO/api.cjs.map +1 -1
  16. package/_cjs/control/Gen/api/char.cjs.map +1 -1
  17. package/_cjs/control/Gen/api/conc.cjs +4 -3
  18. package/_cjs/control/Gen/api/conc.cjs.map +1 -1
  19. package/_cjs/control/Gen/api/double.cjs +4 -4
  20. package/_cjs/control/Gen/api/double.cjs.map +1 -1
  21. package/_cjs/control/Gen/api/float.cjs +1 -1
  22. package/_cjs/control/Gen/api/float.cjs.map +1 -1
  23. package/_cjs/control/Gen/api/struct.cjs +1 -1
  24. package/_cjs/control/Gen/api/struct.cjs.map +1 -1
  25. package/_cjs/control/Gen/api.cjs +11 -11
  26. package/_cjs/control/Gen/api.cjs.map +1 -1
  27. package/_cjs/control/Gen/definition.cjs.map +1 -1
  28. package/_cjs/control/Live/definition.cjs +4 -4
  29. package/_cjs/control/Live/definition.cjs.map +1 -1
  30. package/_cjs/control/RunnableSpec.cjs +10 -12
  31. package/_cjs/control/RunnableSpec.cjs.map +1 -1
  32. package/_cjs/control/Sample/api.cjs +17 -17
  33. package/_cjs/control/Sample/api.cjs.map +1 -1
  34. package/_cjs/control/Sized/api.cjs +1 -1
  35. package/_cjs/control/Sized/api.cjs.map +1 -1
  36. package/_cjs/control/Sized/live.cjs +3 -3
  37. package/_cjs/control/Sized/live.cjs.map +1 -1
  38. package/_cjs/control/Spec/api.cjs +7 -7
  39. package/_cjs/control/Spec/api.cjs.map +1 -1
  40. package/_cjs/control/Spec/definition.cjs.map +1 -1
  41. package/_cjs/control/TestAspect/api.cjs +7 -7
  42. package/_cjs/control/TestAspect/api.cjs.map +1 -1
  43. package/_cjs/control/TestClock/api.cjs +14 -22
  44. package/_cjs/control/TestClock/api.cjs.map +1 -1
  45. package/_cjs/control/TestClock/definition.cjs +16 -16
  46. package/_cjs/control/TestClock/definition.cjs.map +1 -1
  47. package/_cjs/control/TestConsole/api.cjs +12 -15
  48. package/_cjs/control/TestConsole/api.cjs.map +1 -1
  49. package/_cjs/control/TestConsole/definition.cjs +11 -11
  50. package/_cjs/control/TestConsole/definition.cjs.map +1 -1
  51. package/_cjs/control/TestEnvironment.cjs +3 -2
  52. package/_cjs/control/TestEnvironment.cjs.map +1 -1
  53. package/_cjs/control/TestExecutor.cjs +6 -6
  54. package/_cjs/control/TestExecutor.cjs.map +1 -1
  55. package/_cjs/control/TestLogger.cjs +1 -1
  56. package/_cjs/control/TestLogger.cjs.map +1 -1
  57. package/_cjs/control/TestRandom/api.cjs +10 -18
  58. package/_cjs/control/TestRandom/api.cjs.map +1 -1
  59. package/_cjs/control/TestRandom/definition.cjs +17 -17
  60. package/_cjs/control/TestRandom/definition.cjs.map +1 -1
  61. package/_cjs/control/TestRunner.cjs +1 -1
  62. package/_cjs/control/TestRunner.cjs.map +1 -1
  63. package/_cjs/control.cjs +6 -0
  64. package/_cjs/control.cjs.map +1 -0
  65. package/_cjs/data/LogLine/Line.cjs +2 -0
  66. package/_cjs/data/LogLine/Line.cjs.map +1 -1
  67. package/_cjs/data/LogLine/Message.cjs +4 -3
  68. package/_cjs/data/LogLine/Message.cjs.map +1 -1
  69. package/_cjs/data/TestConfig.cjs +7 -5
  70. package/_cjs/data/TestConfig.cjs.map +1 -1
  71. package/_cjs/data.cjs +6 -0
  72. package/_cjs/data.cjs.map +1 -0
  73. package/_cjs/global.cjs +6 -0
  74. package/_cjs/global.cjs.map +1 -0
  75. package/_cjs/index.cjs +6 -0
  76. package/_cjs/index.cjs.map +1 -0
  77. package/_cjs/util/math.cjs +3 -3
  78. package/_cjs/util/math.cjs.map +1 -1
  79. package/_cjs/util.cjs +6 -0
  80. package/_cjs/util.cjs.map +1 -0
  81. package/_mjs/api.mjs +9 -9
  82. package/_mjs/api.mjs.map +1 -1
  83. package/_mjs/control/Annotations/api.mjs +1 -1
  84. package/_mjs/control/Annotations/api.mjs.map +1 -1
  85. package/_mjs/control/Annotations/live.mjs +4 -4
  86. package/_mjs/control/Annotations/live.mjs.map +1 -1
  87. package/_mjs/control/Assertion/api.mjs +1 -0
  88. package/_mjs/control/Assertion/api.mjs.map +1 -1
  89. package/_mjs/control/AssertionIO/api.mjs +1 -0
  90. package/_mjs/control/AssertionIO/api.mjs.map +1 -1
  91. package/_mjs/control/DefaultTestReporter/render.mjs +1 -0
  92. package/_mjs/control/DefaultTestReporter/render.mjs.map +1 -1
  93. package/_mjs/control/FreeBooleanAlgebraIO/api.mjs +2 -2
  94. package/_mjs/control/FreeBooleanAlgebraIO/api.mjs.map +1 -1
  95. package/_mjs/control/Gen/api/char.mjs.map +1 -1
  96. package/_mjs/control/Gen/api/conc.mjs +1 -0
  97. package/_mjs/control/Gen/api/conc.mjs.map +1 -1
  98. package/_mjs/control/Gen/api/double.mjs +4 -4
  99. package/_mjs/control/Gen/api/double.mjs.map +1 -1
  100. package/_mjs/control/Gen/api/float.mjs +1 -1
  101. package/_mjs/control/Gen/api/float.mjs.map +1 -1
  102. package/_mjs/control/Gen/api/struct.mjs +1 -1
  103. package/_mjs/control/Gen/api/struct.mjs.map +1 -1
  104. package/_mjs/control/Gen/api.mjs +11 -11
  105. package/_mjs/control/Gen/api.mjs.map +1 -1
  106. package/_mjs/control/Gen/definition.mjs.map +1 -1
  107. package/_mjs/control/Live/definition.mjs +4 -4
  108. package/_mjs/control/Live/definition.mjs.map +1 -1
  109. package/_mjs/control/RunnableSpec.mjs +10 -12
  110. package/_mjs/control/RunnableSpec.mjs.map +1 -1
  111. package/_mjs/control/Sample/api.mjs +15 -15
  112. package/_mjs/control/Sample/api.mjs.map +1 -1
  113. package/_mjs/control/Sized/api.mjs +1 -1
  114. package/_mjs/control/Sized/api.mjs.map +1 -1
  115. package/_mjs/control/Sized/live.mjs +3 -3
  116. package/_mjs/control/Sized/live.mjs.map +1 -1
  117. package/_mjs/control/Spec/api.mjs +7 -7
  118. package/_mjs/control/Spec/api.mjs.map +1 -1
  119. package/_mjs/control/Spec/definition.mjs.map +1 -1
  120. package/_mjs/control/TestAspect/api.mjs +7 -7
  121. package/_mjs/control/TestAspect/api.mjs.map +1 -1
  122. package/_mjs/control/TestClock/api.mjs +13 -21
  123. package/_mjs/control/TestClock/api.mjs.map +1 -1
  124. package/_mjs/control/TestClock/definition.mjs +16 -16
  125. package/_mjs/control/TestClock/definition.mjs.map +1 -1
  126. package/_mjs/control/TestConsole/api.mjs +10 -13
  127. package/_mjs/control/TestConsole/api.mjs.map +1 -1
  128. package/_mjs/control/TestConsole/definition.mjs +11 -11
  129. package/_mjs/control/TestConsole/definition.mjs.map +1 -1
  130. package/_mjs/control/TestEnvironment.mjs +3 -2
  131. package/_mjs/control/TestEnvironment.mjs.map +1 -1
  132. package/_mjs/control/TestExecutor.mjs +6 -6
  133. package/_mjs/control/TestExecutor.mjs.map +1 -1
  134. package/_mjs/control/TestLogger.mjs +1 -1
  135. package/_mjs/control/TestLogger.mjs.map +1 -1
  136. package/_mjs/control/TestRandom/api.mjs +10 -18
  137. package/_mjs/control/TestRandom/api.mjs.map +1 -1
  138. package/_mjs/control/TestRandom/definition.mjs +17 -17
  139. package/_mjs/control/TestRandom/definition.mjs.map +1 -1
  140. package/_mjs/control/TestRunner.mjs +1 -1
  141. package/_mjs/control/TestRunner.mjs.map +1 -1
  142. package/_mjs/control.mjs +2 -0
  143. package/_mjs/control.mjs.map +1 -0
  144. package/_mjs/data/LogLine/Line.mjs +1 -0
  145. package/_mjs/data/LogLine/Line.mjs.map +1 -1
  146. package/_mjs/data/LogLine/Message.mjs +1 -0
  147. package/_mjs/data/LogLine/Message.mjs.map +1 -1
  148. package/_mjs/data/TestConfig.mjs +6 -5
  149. package/_mjs/data/TestConfig.mjs.map +1 -1
  150. package/_mjs/data.mjs +2 -0
  151. package/_mjs/data.mjs.map +1 -0
  152. package/_mjs/global.mjs +2 -0
  153. package/_mjs/global.mjs.map +1 -0
  154. package/_mjs/index.mjs +2 -0
  155. package/_mjs/index.mjs.map +1 -0
  156. package/_mjs/util/math.mjs +3 -3
  157. package/_mjs/util/math.mjs.map +1 -1
  158. package/_mjs/util.mjs +2 -0
  159. package/_mjs/util.mjs.map +1 -0
  160. package/_src/api.ts +9 -9
  161. package/_src/control/AbstractRunnableSpec.ts +2 -2
  162. package/_src/control/Annotations/api.ts +4 -4
  163. package/_src/control/AssertionIO/definition.ts +1 -1
  164. package/_src/control/DefaultTestReporter/render.ts +1 -1
  165. package/_src/control/FreeBooleanAlgebraIO/api.ts +4 -4
  166. package/_src/control/Gen/api/array.ts +2 -2
  167. package/_src/control/Gen/api/char.ts +10 -10
  168. package/_src/control/Gen/api/conc.ts +2 -2
  169. package/_src/control/Gen/api/double.ts +2 -2
  170. package/_src/control/Gen/api/float.ts +1 -1
  171. package/_src/control/Gen/api/string.ts +8 -8
  172. package/_src/control/Gen/api.ts +20 -20
  173. package/_src/control/Gen/definition.ts +2 -0
  174. package/_src/control/Live/definition.ts +7 -7
  175. package/_src/control/RunnableSpec.ts +4 -4
  176. package/_src/control/Sample/api.ts +12 -12
  177. package/_src/control/Sized/api.ts +2 -2
  178. package/_src/control/Sized/live.ts +1 -1
  179. package/_src/control/Spec/api.ts +21 -24
  180. package/_src/control/Spec/definition.ts +3 -3
  181. package/_src/control/TestAspect/api.ts +12 -14
  182. package/_src/control/TestAspect/definition.ts +1 -1
  183. package/_src/control/TestClock/api.ts +10 -10
  184. package/_src/control/TestClock/definition.ts +3 -3
  185. package/_src/control/TestConsole/api.ts +5 -5
  186. package/_src/control/TestEnvironment.ts +11 -10
  187. package/_src/control/TestExecutor.ts +4 -6
  188. package/_src/control/TestLogger.ts +2 -2
  189. package/_src/control/TestRandom/api.ts +10 -10
  190. package/_src/control/TestRunner.ts +3 -3
  191. package/_src/control.ts +26 -0
  192. package/_src/data/TestConfig.ts +1 -1
  193. package/_src/data.ts +21 -0
  194. package/_src/global.ts +8 -0
  195. package/_src/index.ts +8 -0
  196. package/_src/util/math.ts +3 -3
  197. package/_src/util.ts +3 -0
  198. package/api.d.ts +7 -8
  199. package/control/AbstractRunnableSpec.d.ts +3 -4
  200. package/control/Annotations/api.d.ts +7 -8
  201. package/control/Annotations/definition.d.ts +3 -3
  202. package/control/Annotations/live.d.ts +8 -8
  203. package/control/Assertion/api.d.ts +2 -2
  204. package/control/Assertion/definition.d.ts +1 -1
  205. package/control/AssertionIO/definition.d.ts +1 -1
  206. package/control/DefaultRunnableSpec.d.ts +2 -2
  207. package/control/DefaultTestReporter/render.d.ts +5 -6
  208. package/control/FreeBooleanAlgebraIO/api.d.ts +5 -5
  209. package/control/FreeBooleanAlgebraIO/definition.d.ts +1 -1
  210. package/control/Gen/api/array.d.ts +2 -3
  211. package/control/Gen/api/char.d.ts +9 -9
  212. package/control/Gen/api/conc.d.ts +2 -3
  213. package/control/Gen/api/double.d.ts +2 -2
  214. package/control/Gen/api/float.d.ts +1 -1
  215. package/control/Gen/api/string.d.ts +8 -9
  216. package/control/Gen/api.d.ts +22 -23
  217. package/control/Gen/definition.d.ts +4 -2
  218. package/control/Live/definition.d.ts +5 -7
  219. package/control/RunnableSpec.d.ts +2 -3
  220. package/control/Sample/api.d.ts +13 -13
  221. package/control/Sample/definition.d.ts +2 -2
  222. package/control/Sized/api.d.ts +3 -4
  223. package/control/Sized/definition.d.ts +1 -1
  224. package/control/Sized/live.d.ts +2 -3
  225. package/control/Spec/api.d.ts +17 -19
  226. package/control/Spec/definition.d.ts +6 -7
  227. package/control/Test.d.ts +1 -1
  228. package/control/TestAnnotationRenderer/definition.d.ts +2 -2
  229. package/control/TestAspect/api.d.ts +9 -10
  230. package/control/TestAspect/definition.d.ts +1 -1
  231. package/control/TestClock/api.d.ts +4 -5
  232. package/control/TestClock/definition.d.ts +12 -12
  233. package/control/TestConsole/api.d.ts +2 -3
  234. package/control/TestConsole/definition.d.ts +7 -7
  235. package/control/TestEnvironment.d.ts +4 -5
  236. package/control/TestExecutor.d.ts +3 -4
  237. package/control/TestLogger.d.ts +3 -4
  238. package/control/TestRandom/api.d.ts +10 -10
  239. package/control/TestRandom/definition.d.ts +5 -5
  240. package/control/TestRenderer/ConsoleRenderer.d.ts +1 -1
  241. package/control/TestRunner.d.ts +5 -6
  242. package/control.d.ts +24 -0
  243. package/data/AssertionResult.d.ts +1 -1
  244. package/data/AssertionValue/api.d.ts +1 -1
  245. package/data/AssertionValue/definition.d.ts +1 -1
  246. package/data/ExecutionResult.d.ts +1 -1
  247. package/data/FailureDetails.d.ts +2 -2
  248. package/data/FreeBooleanAlgebra/api.d.ts +2 -2
  249. package/data/TestAnnotation/api.d.ts +2 -2
  250. package/data/TestAnnotation/definition.d.ts +3 -2
  251. package/data/TestAnnotationMap.d.ts +1 -1
  252. package/data/TestArgs/definition.d.ts +1 -1
  253. package/data/TestConfig.d.ts +5 -6
  254. package/data/TestFailure.d.ts +1 -1
  255. package/data.d.ts +19 -0
  256. package/global.d.ts +9 -0
  257. package/index.d.ts +6 -0
  258. package/package.json +8 -4
  259. package/util/math.d.ts +4 -4
  260. package/util.d.ts +1 -0
@@ -114,7 +114,7 @@ export class TestClock extends Clock {
114
114
  );
115
115
  }
116
116
 
117
- private get freeze(): IO<unknown, void, HashMap<FiberId, FiberStatus>> {
117
+ private get freeze(): IO<never, void, HashMap<FiberId, FiberStatus>> {
118
118
  return this.supervizedFibers.flatMap((fibers) =>
119
119
  IO.foldLeft(fibers, HashMap.makeDefault<FiberId, FiberStatus>(), (map, fiber) =>
120
120
  fiber.status.flatMap((status) => {
@@ -166,7 +166,7 @@ export class TestClock extends Clock {
166
166
  );
167
167
  }
168
168
 
169
- private get suspended(): IO<unknown, void, HashMap<FiberId, FiberStatus>> {
169
+ private get suspended(): IO<never, void, HashMap<FiberId, FiberStatus>> {
170
170
  return this.freeze.zip(this.delay > this.freeze).flatMap(([first, last]) => {
171
171
  if (Equatable.strictEquals(first, last)) {
172
172
  return IO.succeedNow(first);
@@ -190,7 +190,7 @@ export class TestClock extends Clock {
190
190
  Start: () =>
191
191
  Just(this.live.provide(Clock.sleep((5).seconds) > Console.print(warning)).interruptible.fork.map(Pending)),
192
192
  },
193
- () => Nothing<IO<unknown, never, WarningData>>(),
193
+ () => Nothing<IO<never, never, WarningData>>(),
194
194
  ),
195
195
  );
196
196
  }
@@ -7,15 +7,15 @@ import { TestConsole } from "@fncts/test/control/TestConsole/definition";
7
7
  /**
8
8
  * @tsplus static fncts.test.TestConsoleOps make
9
9
  */
10
- export function make(data: ConsoleData, debug = true): Layer<Has<Live>, never, Has<TestConsole>> {
10
+ export function make(data: ConsoleData, debug = true): Layer<Live, never, TestConsole> {
11
11
  return Layer.scopedEnvironment(
12
12
  IO.serviceWithIO(
13
13
  (live) =>
14
- IO.gen(function* (_) {
15
- const ref = yield* _(Ref.make(data));
16
- const debugRef = yield* _(FiberRef.make(debug));
14
+ Do((_) => {
15
+ const ref = _(Ref.make(data));
16
+ const debugRef = _(FiberRef.make(debug));
17
17
  const test = new TestConsole(ref, live, debugRef);
18
- yield* _(IOEnv.services.locallyScopedWith((_) => _.add(test, Console.Tag)));
18
+ _(IOEnv.services.locallyScopedWith((_) => _.add(test, Console.Tag)));
19
19
  return Environment.empty.add(test, TestConsole.Tag);
20
20
  }),
21
21
  Live.Tag,
@@ -9,16 +9,17 @@ import { TestConsole } from "@fncts/test/control/TestConsole";
9
9
  import { TestRandom } from "@fncts/test/control/TestRandom";
10
10
  import { TestConfig } from "@fncts/test/data/TestConfig";
11
11
 
12
- export type TestEnvironment = Has<Annotations> &
13
- Has<Live> &
14
- Has<Sized> &
15
- Has<TestClock> &
16
- Has<TestConfig> &
17
- Has<TestRandom> &
18
- Has<Clock> &
19
- Has<Random> &
20
- Has<Console> &
21
- Has<TestConsole>;
12
+ export type TestEnvironment =
13
+ | Annotations
14
+ | Live
15
+ | Sized
16
+ | TestClock
17
+ | TestConfig
18
+ | TestRandom
19
+ | Clock
20
+ | Random
21
+ | Console
22
+ | TestConsole;
22
23
 
23
24
  export const LiveTestEnvironment: Layer<IOEnv, never, TestEnvironment> = Annotations.Live.and(Live.Default)
24
25
  .and(Sized.Live(100))
@@ -11,15 +11,13 @@ import { TestAnnotationMap } from "../data/TestAnnotationMap.js";
11
11
  import { RuntimeFailure } from "../data/TestFailure.js";
12
12
 
13
13
  export interface TestExecutor<R> {
14
- readonly run: <E>(spec: Spec<R & Has<Annotations>, E>, defExec: ExecutionStrategy) => UIO<ExecutedSpec<E>>;
14
+ readonly run: <E>(spec: Spec<R | Annotations, E>, defExec: ExecutionStrategy) => UIO<ExecutedSpec<E>>;
15
15
  readonly environment: Layer<unknown, never, R>;
16
16
  }
17
17
 
18
- export function defaultTestExecutor<R>(
19
- env: Layer<unknown, never, R & Has<Annotations>>,
20
- ): TestExecutor<R & Has<Annotations>> {
18
+ export function defaultTestExecutor<R>(env: Layer<never, never, R | Annotations>): TestExecutor<R | Annotations> {
21
19
  return {
22
- run: <E>(spec: Spec<R & Has<Annotations>, E>, defExec: ExecutionStrategy): UIO<ExecutedSpec<E>> =>
20
+ run: <E>(spec: Spec<R | Annotations, E>, defExec: ExecutionStrategy): UIO<ExecutedSpec<E>> =>
23
21
  spec.annotated
24
22
  .provideLayer(env)
25
23
  .foreachExec(
@@ -35,7 +33,7 @@ export function defaultTestExecutor<R>(
35
33
  .scoped.flatMap(
36
34
  (s) =>
37
35
  s.foldScoped(
38
- (spec: SpecCase<unknown, never, Annotated<Either<TestFailure<E>, TestSuccess>>, ExecutedSpec<E>>) =>
36
+ (spec: SpecCase<never, never, Annotated<Either<TestFailure<E>, TestSuccess>>, ExecutedSpec<E>>) =>
39
37
  matchTag_(spec, {
40
38
  Exec: ({ spec }) => IO.succeedNow(spec),
41
39
  Labeled: ({ label, spec }) => IO.succeedNow(ExecutedSpec.labeled(spec, label)),
@@ -16,7 +16,7 @@ export const TestLoggerTag = Tag<TestLogger>();
16
16
  /**
17
17
  * @tsplus static fncts.test.TestLoggerOps fromConsole
18
18
  */
19
- export const fromConsole: Layer<unknown, never, Has<TestLogger>> = Layer.fromIO(
19
+ export const fromConsole: Layer<never, never, TestLogger> = Layer.fromIO(
20
20
  IO.consoleWith((console) =>
21
21
  IO.succeedNow(
22
22
  new (class extends TestLogger {
@@ -32,6 +32,6 @@ export const fromConsole: Layer<unknown, never, Has<TestLogger>> = Layer.fromIO(
32
32
  /**
33
33
  * @tsplus static fncts.test.TestLoggerOps logLine
34
34
  */
35
- export function logLine(line: string): URIO<Has<TestLogger>, void> {
35
+ export function logLine(line: string): URIO<TestLogger, void> {
36
36
  return IO.serviceWithIO((testLogger) => testLogger.logLine(line), TestLogger.Tag);
37
37
  }
@@ -41,11 +41,11 @@ export function feedBooleans(...booleans: ReadonlyArray<boolean>) {
41
41
  /**
42
42
  * @tsplus static fncts.test.TestRandomOps make
43
43
  */
44
- export function make(initialData: Data): Layer<unknown, never, unknown & Has<TestRandom>> {
44
+ export function make(initialData: Data): Layer<never, never, Random | TestRandom> {
45
45
  return Layer.fromIOEnvironment(
46
- IO.gen(function* (_) {
47
- const data = yield* _(Ref.make(initialData));
48
- const buffer = yield* _(Ref.make(new Buffer()));
46
+ Do((_) => {
47
+ const data = _(Ref.make(initialData));
48
+ const buffer = _(Ref.make(new Buffer()));
49
49
  const test = new TestRandom(data, buffer);
50
50
  return Environment().add(test, TestRandom.Tag).add(test, Random.Tag);
51
51
  }),
@@ -62,13 +62,13 @@ export const determinictic = TestRandom.make(defaultData);
62
62
  /**
63
63
  * @tsplus static fncts.test.TestRandomOps Random
64
64
  */
65
- export const random: Layer<unknown, never, Has<TestRandom>> = determinictic.to(
65
+ export const random: Layer<unknown, never, TestRandom> = determinictic.to(
66
66
  Layer.scoped(
67
- IO.gen(function* (_) {
68
- const testRandom = yield* _(IO.service(TestRandom.Tag));
69
- const time = yield* _(Clock.currentTime);
70
- yield* _(testRandom.setSeed(time));
71
- yield* _(IOEnv.services.locallyScopedWith((_) => _.add(testRandom, Random.Tag)));
67
+ Do((_) => {
68
+ const testRandom = _(IO.service(TestRandom.Tag));
69
+ const time = _(Clock.currentTime);
70
+ _(testRandom.setSeed(time));
71
+ _(IOEnv.services.locallyScopedWith((_) => _.add(testRandom, Random.Tag)));
72
72
  return testRandom;
73
73
  }),
74
74
  TestRandom.Tag,
@@ -14,18 +14,18 @@ import { ConsoleRenderer } from "@fncts/test/control/TestRenderer/ConsoleRendere
14
14
 
15
15
  export class TestRunner<R, E> {
16
16
  readonly reporter: TestReporter<E>;
17
- readonly bootstrap: Layer<unknown, never, Has<TestLogger>>;
17
+ readonly bootstrap: Layer<never, never, TestLogger>;
18
18
  constructor(
19
19
  readonly executor: TestExecutor<R>,
20
20
  readonly runtimeConfig: RuntimeConfig = defaultRuntimeConfig,
21
21
  reporter?: TestReporter<E>,
22
- bootstrap?: Layer<unknown, never, Has<TestLogger>>,
22
+ bootstrap?: Layer<never, never, TestLogger>,
23
23
  ) {
24
24
  this.reporter = reporter ?? DefaultTestReporter.report(ConsoleRenderer.render, TestAnnotationRenderer.Default);
25
25
  this.bootstrap = bootstrap ?? TestLogger.fromConsole;
26
26
  }
27
27
 
28
- run(spec: Spec<R & Has<Annotations>, E>): URIO<Has<TestLogger>, ExecutedSpec<E>> {
28
+ run(spec: Spec<R | Annotations, E>): URIO<TestLogger, ExecutedSpec<E>> {
29
29
  return this.executor
30
30
  .run(spec, ExecutionStrategy.concurrentBounded(10))
31
31
  .timedWith(Clock.currentTime)
@@ -0,0 +1,26 @@
1
+ // codegen:start { preset: type-barrel, include: ./control/*.ts }
2
+ export type {} from "./control/AbstractRunnableSpec.js";
3
+ export type {} from "./control/Annotations.js";
4
+ export type {} from "./control/Assertion.js";
5
+ export type {} from "./control/AssertionIO.js";
6
+ export type {} from "./control/DefaultRunnableSpec.js";
7
+ export type {} from "./control/DefaultTestReporter.js";
8
+ export type {} from "./control/FreeBooleanAlgebraIO.js";
9
+ export type {} from "./control/Gen.js";
10
+ export type {} from "./control/Live.js";
11
+ export type {} from "./control/RunnableSpec.js";
12
+ export type {} from "./control/Sample.js";
13
+ export type {} from "./control/Sized.js";
14
+ export type {} from "./control/Spec.js";
15
+ export type {} from "./control/SummaryBuilder.js";
16
+ export type {} from "./control/Test.js";
17
+ export type {} from "./control/TestAnnotationRenderer.js";
18
+ export type {} from "./control/TestAspect.js";
19
+ export type {} from "./control/TestClock.js";
20
+ export type {} from "./control/TestConsole.js";
21
+ export type {} from "./control/TestEnvironment.js";
22
+ export type {} from "./control/TestExecutor.js";
23
+ export type {} from "./control/TestLogger.js";
24
+ export type {} from "./control/TestRandom.js";
25
+ export type {} from "./control/TestRunner.js";
26
+ // codegen:end
@@ -17,7 +17,7 @@ export const TestConfigTag = Tag<TestConfig>();
17
17
  /**
18
18
  * @tsplus static fncts.test.data.TestConfigOps Live
19
19
  */
20
- export function live(_: TestConfig): Layer<unknown, never, Has<TestConfig>> {
20
+ export function live(_: TestConfig): Layer<never, never, TestConfig> {
21
21
  return Layer.succeed(
22
22
  new (class extends TestConfig {
23
23
  repeats = _.repeats;
package/_src/data.ts ADDED
@@ -0,0 +1,21 @@
1
+ // codegen:start { preset: type-barrel, include: ./data/*.ts }
2
+ export type {} from "./data/AssertionData.js";
3
+ export type {} from "./data/AssertionResult.js";
4
+ export type {} from "./data/AssertionValue.js";
5
+ export type {} from "./data/ExecutedSpec.js";
6
+ export type {} from "./data/ExecutionResult.js";
7
+ export type {} from "./data/FailureDetails.js";
8
+ export type {} from "./data/FreeBooleanAlgebra.js";
9
+ export type {} from "./data/GenFailureDetails.js";
10
+ export type {} from "./data/LogLine.js";
11
+ export type {} from "./data/Render.js";
12
+ export type {} from "./data/RenderParam.js";
13
+ export type {} from "./data/Summary.js";
14
+ export type {} from "./data/TestAnnotation.js";
15
+ export type {} from "./data/TestAnnotationMap.js";
16
+ export type {} from "./data/TestArgs.js";
17
+ export type {} from "./data/TestConfig.js";
18
+ export type {} from "./data/TestFailure.js";
19
+ export type {} from "./data/TestSuccess.js";
20
+ export type {} from "./data/TestTimeoutException.js";
21
+ // codegen:end
package/_src/global.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @tsplus global
3
+ */
4
+ import type {} from "@fncts/io/global";
5
+ /**
6
+ * @tsplus global
7
+ */
8
+ import type {} from "@fncts/test";
package/_src/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ // codegen:start { preset: type-barrel, include: ./*.ts }
2
+ export type {} from "./api.js";
3
+ export type {} from "./control.js";
4
+ export type {} from "./data.js";
5
+ export type {} from "./demo.js";
6
+ export type {} from "./global.js";
7
+ export type {} from "./util.js";
8
+ // codegen:end
package/_src/util/math.ts CHANGED
@@ -10,7 +10,7 @@ const INDEX_POSITIVE_INFINITY_32 = 2139095040; // floatToIndex(MAX_VALUE_32) + 1
10
10
  /** @internal */
11
11
  const INDEX_NEGATIVE_INFINITY_32 = -2139095041; // floatToIndex(-MAX_VALUE_32) - 1
12
12
 
13
- export function safeFloatToIndex(f: number, label: string): IO<unknown, never, number> {
13
+ export function safeFloatToIndex(f: number, label: string): IO<never, never, number> {
14
14
  const conversionTrick = "you can convert any double to a 32-bit float by using `new Float32Array([myDouble])[0]`";
15
15
  const errorMessage = "fc.floatNext constraints." + label + " must be a 32-bit float - " + conversionTrick;
16
16
  if (Number.isNaN(f) || (Number.isFinite(f) && (f < -MAX_VALUE_32 || f > MAX_VALUE_32))) {
@@ -397,7 +397,7 @@ export function indexToDouble(index: ArrayInt64): number {
397
397
  *
398
398
  * @internal
399
399
  */
400
- export function safeDoubleToIndex(d: number, label: string): IO<unknown, never, ArrayInt64> {
400
+ export function safeDoubleToIndex(d: number, label: string): IO<never, never, ArrayInt64> {
401
401
  if (Number.isNaN(d)) {
402
402
  // Number.NaN does not have any associated index in the current implementation
403
403
  return IO.haltNow(new Error("fc.doubleNext constraints." + label + " must be a 32-bit float"));
@@ -478,7 +478,7 @@ export function computeArrayInt64GenerateRange(
478
478
  max: ArrayInt64,
479
479
  biasFactor: number | undefined,
480
480
  biasedRanges: { min: ArrayInt64; max: ArrayInt64 }[] | undefined,
481
- ): URIO<unknown, { min: ArrayInt64; max: ArrayInt64 }> {
481
+ ): UIO<{ min: ArrayInt64; max: ArrayInt64 }> {
482
482
  return IO.gen(function* (_) {
483
483
  if (biasFactor === undefined || (yield* _(Random.nextIntBetween(1, biasFactor))) !== 1) {
484
484
  return { min, max };
package/_src/util.ts ADDED
@@ -0,0 +1,3 @@
1
+ // codegen:start { preset: type-barrel, include: ./util/*.ts }
2
+ export type {} from "./util/math.js";
3
+ // codegen:end
package/api.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { IO } from "@fncts/io/IO";
1
+ import { IO } from "@fncts/io/IO/definition";
2
2
  import { Lazy } from "@fncts/base/data/function/definition";
3
- import { Has } from "@fncts/base/typeclass";
4
- import { Stream } from "@fncts/io/Stream";
3
+ import { Stream } from "@fncts/io/Stream/definition";
5
4
  import { Either } from "@fncts/base/data/Either/definition";
6
5
  import type { AssertResult } from "./control/Assertion.js";
7
6
  import type { AssertionIO } from "./control/AssertionIO.js";
@@ -24,24 +23,24 @@ export declare function assert_<A>(value: A, assertion: Assertion<A>): TestResul
24
23
  export declare function assertIO_<R, E, A>(io: IO<R, E, A>, assertion: AssertionIO<A>): IO<R, E, TestResult>;
25
24
  export declare function suite<Specs extends ReadonlyArray<Spec<any, any>>>(label: string, ...specs: Specs): Spec<_R<Specs[number]>, _E<Specs[number]>>;
26
25
  export declare function testIO<R, E>(label: string, assertion: Lazy<IO<R, E, TestResult>>): Spec<R, E>;
27
- export declare function test(label: string, assertion: Lazy<TestResult>): Spec<unknown, never>;
26
+ export declare function test(label: string, assertion: Lazy<TestResult>): Spec<never, never>;
28
27
  /**
29
28
  * @tsplus fluent fncts.test.Gen check
30
29
  * @tsplus location "@fncts/test/api"
31
30
  */
32
- export declare function check<R, A>(rv: Gen<R, A>, test: (a: A) => TestResult): IO<R & Has<TestConfig>, never, TestResult>;
31
+ export declare function check<R, A>(rv: Gen<R, A>, test: (a: A) => TestResult): IO<R | TestConfig, never, TestResult>;
33
32
  /**
34
33
  * @tsplus fluent fncts.test.Gen check
35
34
  * @tsplus location "@fncts/test/api"
36
35
  */
37
- export declare function checkIO<R, A, R1, E>(rv: Gen<R, A>, test: (a: A) => IO<R1, E, TestResult>): IO<R & R1 & Has<TestConfig>, E, TestResult>;
36
+ export declare function checkIO<R, A, R1, E>(rv: Gen<R, A>, test: (a: A) => IO<R1, E, TestResult>): IO<R | R1 | TestConfig, E, TestResult>;
38
37
  /**
39
38
  * @tsplus fluent fncts.test.Gen checkAllC
40
39
  * @tsplus location "@fncts/test/api"
41
40
  */
42
- export declare function checkAllC<R, A>(rv: Gen<R, A>, concurrency: number, test: (a: A) => TestResult): IO<R & Has<TestConfig>, never, TestResult>;
41
+ export declare function checkAllC<R, A>(rv: Gen<R, A>, concurrency: number, test: (a: A) => TestResult): IO<R | TestConfig, never, TestResult>;
43
42
  /**
44
43
  * @tsplus fluent fncts.test.Gen checkAllC
45
44
  * @tsplus location "@fncts/test/api"
46
45
  */
47
- export declare function checkAllIOC<R, A, R1, E>(rv: Gen<R, A>, concurrency: number, test: (a: A) => IO<R1, E, TestResult>): IO<R & R1 & Has<TestConfig>, E, TestResult>;
46
+ export declare function checkAllIOC<R, A, R1, E>(rv: Gen<R, A>, concurrency: number, test: (a: A) => IO<R1, E, TestResult>): IO<R | R1 | TestConfig, E, TestResult>;
@@ -1,5 +1,4 @@
1
- import { URIO } from "@fncts/io/IO";
2
- import { Has } from "@fncts/base/typeclass";
1
+ import { URIO } from "@fncts/io/IO/definition";
3
2
  import type { Spec } from "@fncts/test/control/Spec";
4
3
  import type { TestAspect } from "@fncts/test/control/TestAspect";
5
4
  import type { TestLogger } from "@fncts/test/control/TestLogger";
@@ -9,7 +8,7 @@ export declare abstract class AbstractRunnableSpec<R, E> {
9
8
  abstract aspects: ReadonlyArray<TestAspect<R, any>>;
10
9
  abstract runner: TestRunner<R, E>;
11
10
  abstract spec: Spec<R, E>;
12
- get _run(): URIO<Has<TestLogger>, ExecutedSpec<E>>;
13
- runSpec(spec: Spec<R, E>): URIO<Has<TestLogger>, ExecutedSpec<E>>;
11
+ get _run(): URIO<TestLogger, ExecutedSpec<E>>;
12
+ runSpec(spec: Spec<R, E>): URIO<TestLogger, ExecutedSpec<E>>;
14
13
  get platform(): import("@fncts/io/RuntimeConfig").RuntimeConfig;
15
14
  }
@@ -1,7 +1,6 @@
1
- import { URIO, IO } from "@fncts/io/IO";
2
- import { Has } from "@fncts/base/typeclass";
3
- import { HashSet } from "@fncts/base/collection/immutable/HashSet";
4
- import { Fiber } from "@fncts/io/Fiber";
1
+ import { URIO, IO } from "@fncts/io/IO/definition";
2
+ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
3
+ import { Fiber } from "@fncts/io/Fiber/definition";
5
4
  import type { TestAnnotation } from "../../data/TestAnnotation.js";
6
5
  import type { Annotated } from "./definition.js";
7
6
  import { Annotations } from "./definition.js";
@@ -9,19 +8,19 @@ import { Annotations } from "./definition.js";
9
8
  * @tsplus static fncts.test.AnnotationsOps annotate
10
9
  * @tsplus location "@fncts/test/control/Annotations/api"
11
10
  */
12
- export declare function annotate<V>(key: TestAnnotation<V>, value: V): URIO<Has<Annotations>, void>;
11
+ export declare function annotate<V>(key: TestAnnotation<V>, value: V): URIO<Annotations, void>;
13
12
  /**
14
13
  * @tsplus static fncts.test.AnnotationsOps get
15
14
  * @tsplus location "@fncts/test/control/Annotations/api"
16
15
  */
17
- export declare function get<V>(key: TestAnnotation<V>): URIO<Has<Annotations>, V>;
16
+ export declare function get<V>(key: TestAnnotation<V>): URIO<Annotations, V>;
18
17
  /**
19
18
  * @tsplus static fncts.test.AnnotationsOps withAnnotations
20
19
  * @tsplus location "@fncts/test/control/Annotations/api"
21
20
  */
22
- export declare function withAnnotation<R, E, A>(io: IO<R, E, A>): IO<R & Has<Annotations>, Annotated<E>, Annotated<A>>;
21
+ export declare function withAnnotation<R, E, A>(io: IO<R, E, A>): IO<R | Annotations, Annotated<E>, Annotated<A>>;
23
22
  /**
24
23
  * @tsplus static fncts.test.AnnotationsOps supervisedFibers
25
24
  * @tsplus location "@fncts/test/control/Annotations/api"
26
25
  */
27
- export declare const supervisedFibers: URIO<Has<Annotations>, HashSet<Fiber.Runtime<any, any>>>;
26
+ export declare const supervisedFibers: URIO<Annotations, HashSet<Fiber.Runtime<any, any>>>;
@@ -1,6 +1,6 @@
1
- import { UIO, IO } from "@fncts/io/IO";
2
- import { HashSet } from "@fncts/base/collection/immutable/HashSet";
3
- import { Fiber } from "@fncts/io/Fiber";
1
+ import { UIO, IO } from "@fncts/io/IO/definition";
2
+ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
3
+ import { Fiber } from "@fncts/io/Fiber/definition";
4
4
  import type { TestAnnotation } from "../../data/TestAnnotation.js";
5
5
  import type { TestAnnotationMap } from "../../data/TestAnnotationMap.js";
6
6
  export declare type Annotated<A> = readonly [A, TestAnnotationMap];
@@ -1,8 +1,8 @@
1
- import { FiberRef } from "@fncts/io/FiberRef";
2
- import { UIO, IO } from "@fncts/io/IO";
3
- import { HashSet } from "@fncts/base/collection/immutable/HashSet";
4
- import { Fiber } from "@fncts/io/Fiber";
5
- import { Equatable } from "@fncts/base/typeclass";
1
+ import { FiberRef } from "@fncts/io/FiberRef/definition";
2
+ import { UIO, IO } from "@fncts/io/IO/definition";
3
+ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
4
+ import { Fiber } from "@fncts/io/Fiber/definition";
5
+ import { Equatable } from "@fncts/base/typeclass/Equatable";
6
6
  import { TestAnnotation } from "../../data/TestAnnotation.js";
7
7
  import { TestAnnotationMap } from "../../data/TestAnnotationMap.js";
8
8
  import { Annotations } from "./definition.js";
@@ -10,12 +10,12 @@ export declare class LiveAnnotations extends Annotations {
10
10
  private fiberRef;
11
11
  constructor(fiberRef: FiberRef<TestAnnotationMap>);
12
12
  annotate<V>(key: TestAnnotation<V>, value: V): UIO<void>;
13
- get<V>(key: TestAnnotation<V>): import("@fncts/io/IO.js").IO<unknown, never, V>;
13
+ get<V>(key: TestAnnotation<V>): import("@fncts/io/IO.js").IO<never, never, V>;
14
14
  withAnnotation<R, E, A>(io: IO<R, E, A>): import("@fncts/io/IO.js").IO<R, readonly [E, TestAnnotationMap], readonly [A, TestAnnotationMap]>;
15
- supervisedFibers: import("@fncts/io/IO.js").IO<unknown, never, import("@fncts/base/collection/immutable/HashSet.js").HashSet<import("@fncts/io/Fiber.js").Fiber.Runtime<any, any>>>;
15
+ supervisedFibers: import("@fncts/io/IO.js").IO<never, never, import("@fncts/base/collection/immutable/HashSet.js").HashSet<import("@fncts/io/Fiber.js").Fiber.Runtime<any, any>>>;
16
16
  }
17
17
  /**
18
18
  * @tsplus static fncts.test.AnnotationsOps Live
19
19
  * @tsplus location "@fncts/test/control/Annotations/live"
20
20
  */
21
- export declare const live: import("@fncts/io/Layer.js").Layer<unknown, never, import("@fncts/base/typeclass.js").Has<Annotations>>;
21
+ export declare const live: import("@fncts/io/Layer.js").Layer<never, never, Annotations>;
@@ -1,6 +1,6 @@
1
1
  import { LazyValue } from "@fncts/base/control/LazyValue";
2
- import { Maybe } from "@fncts/base/data/Maybe";
3
- import { Cause } from "@fncts/base/data/Cause";
2
+ import { Maybe } from "@fncts/base/data/Maybe/definition";
3
+ import { Cause } from "@fncts/base/data/Cause/definition";
4
4
  import { Exit } from "@fncts/base/data/Exit/definition";
5
5
  import { Either } from "@fncts/base/data/Either/definition";
6
6
  import type { Eq } from "@fncts/base/typeclass";
@@ -1,4 +1,4 @@
1
- import { IO } from "@fncts/io/IO";
1
+ import { IO } from "@fncts/io/IO/definition";
2
2
  import type { AssertionValue } from "../../data/AssertionValue.js";
3
3
  import type { FreeBooleanAlgebra } from "../../data/FreeBooleanAlgebra.js";
4
4
  import type { Render } from "../../data/Render.js";
@@ -1,7 +1,7 @@
1
1
  import type { AssertionValue } from "../../data/AssertionValue.js";
2
2
  import type { Render } from "../../data/Render.js";
3
3
  import type { FreeBooleanAlgebraIO } from "../FreeBooleanAlgebraIO.js";
4
- export declare type AssertResultIO<A> = FreeBooleanAlgebraIO<unknown, never, AssertionValue<A>>;
4
+ export declare type AssertResultIO<A> = FreeBooleanAlgebraIO<never, never, AssertionValue<A>>;
5
5
  export declare const AssertionIOTypeId: unique symbol;
6
6
  export declare type AssertionIOTypeId = typeof AssertionIOTypeId;
7
7
  /**
@@ -2,6 +2,6 @@ import { RunnableSpec } from "@fncts/test/control/RunnableSpec";
2
2
  import { TestEnvironment } from "@fncts/test/control/TestEnvironment";
3
3
  import { TestRunner } from "@fncts/test/control/TestRunner";
4
4
  export declare abstract class DefaultRunnableSpec extends RunnableSpec<TestEnvironment, any> {
5
- aspects: import("@fncts/test/control/TestAspect").TestAspect<import("@fncts/base/typeclass").Has<import("./Live").Live>, any>[];
6
- runner: TestRunner<import("@fncts/base/typeclass").Has<import("./Live").Live> & import("@fncts/base/typeclass").Has<import("./Sized").Sized> & import("@fncts/base/typeclass").Has<import("./TestClock").TestClock> & import("@fncts/base/typeclass").Has<import("../data/TestConfig").TestConfig> & import("@fncts/base/typeclass").Has<import("./TestRandom").TestRandom> & import("@fncts/base/typeclass").Has<import("@fncts/io/Clock").Clock> & import("@fncts/base/typeclass").Has<import("@fncts/io/Random").Random> & import("@fncts/base/typeclass").Has<import("@fncts/io/Console").Console> & import("@fncts/base/typeclass").Has<import("./TestConsole").TestConsole> & import("@fncts/base/typeclass").Has<import("./Annotations").Annotations>, unknown>;
5
+ aspects: import("@fncts/test/control/TestAspect").TestAspect<import("./Live").Live, any>[];
6
+ runner: TestRunner<import("./Sized").Sized | import("./Annotations").Annotations | import("../data/TestConfig").TestConfig | import("@fncts/io/Clock").Clock | import("@fncts/io/Random").Random | import("@fncts/io/Console").Console | import("./Live").Live | import("./TestClock").TestClock | import("./TestConsole").TestConsole | import("./TestRandom").TestRandom, unknown>;
7
7
  }
@@ -1,15 +1,14 @@
1
- import { URIO } from "@fncts/io/IO";
2
- import { Has } from "@fncts/base/typeclass";
1
+ import { URIO } from "@fncts/io/IO/definition";
3
2
  import { Vector } from "@fncts/base/collection/immutable/Vector";
4
- import { List, Cons } from "@fncts/base/collection/immutable/List";
5
- import { Maybe } from "@fncts/base/data/Maybe";
6
- import { Cause } from "@fncts/base/data/Cause";
3
+ import { List, Cons } from "@fncts/base/collection/immutable/List/definition";
4
+ import { Maybe } from "@fncts/base/data/Maybe/definition";
5
+ import { Cause } from "@fncts/base/data/Cause/definition";
7
6
  import type { ExecutedSpec } from "../../data/ExecutedSpec.js";
8
7
  import type { ExecutionResult } from "../../data/ExecutionResult.js";
9
8
  import type { TestAnnotationRenderer } from "../TestAnnotationRenderer.js";
10
9
  import type { TestRenderer } from "../TestRenderer/definition.js";
11
10
  import { TestLogger } from "../TestLogger.js";
12
- export declare type TestReporter<E> = (duration: number, spec: ExecutedSpec<E>) => URIO<Has<TestLogger>, void>;
11
+ export declare type TestReporter<E> = (duration: number, spec: ExecutedSpec<E>) => URIO<TestLogger, void>;
13
12
  /**
14
13
  * @tsplus static fncts.test.DefaultTestReporter report
15
14
  * @tsplus location "@fncts/test/control/DefaultTestReporter/render"
@@ -1,17 +1,17 @@
1
- import { IO } from "@fncts/io/IO";
1
+ import { IO } from "@fncts/io/IO/definition";
2
2
  import type { FreeBooleanAlgebraIO } from "./definition.js";
3
3
  /**
4
4
  * @tsplus fluent fncts.test.FreeBooleanAlgebraIO and
5
5
  * @tsplus operator fncts.test.FreeBooleanAlgebraIO &&
6
6
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
7
7
  */
8
- export declare function and_<R, E, A extends A1, R1, E1, A1>(self: FreeBooleanAlgebraIO<R, E, A>, that: FreeBooleanAlgebraIO<R1, E1, A1>): FreeBooleanAlgebraIO<R & R1, E | E1, A | A1>;
8
+ export declare function and_<R, E, A extends A1, R1, E1, A1>(self: FreeBooleanAlgebraIO<R, E, A>, that: FreeBooleanAlgebraIO<R1, E1, A1>): FreeBooleanAlgebraIO<R | R1, E | E1, A | A1>;
9
9
  /**
10
10
  * @tsplus fluent fncts.test.FreeBooleanAlgebraIO or
11
11
  * @tsplus operator fncts.test.FreeBooleanAlgebraIO ||
12
12
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
13
13
  */
14
- export declare function or_<R, E, A extends A1, R1, E1, A1>(self: FreeBooleanAlgebraIO<R, E, A>, that: FreeBooleanAlgebraIO<R1, E1, A1>): FreeBooleanAlgebraIO<R & R1, E | E1, A | A1>;
14
+ export declare function or_<R, E, A extends A1, R1, E1, A1>(self: FreeBooleanAlgebraIO<R, E, A>, that: FreeBooleanAlgebraIO<R1, E1, A1>): FreeBooleanAlgebraIO<R | R1, E | E1, A | A1>;
15
15
  /**
16
16
  * @tsplus fluent fncts.test.FreeBooleanAlgebraIO invert
17
17
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
@@ -31,12 +31,12 @@ export declare function isFailure<R, E, A>(self: FreeBooleanAlgebraIO<R, E, A>):
31
31
  * @tsplus static fncts.test.FreeBooleanAlgebraIOOps success
32
32
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
33
33
  */
34
- export declare function success<A>(a: A): FreeBooleanAlgebraIO<unknown, never, A>;
34
+ export declare function success<A>(a: A): FreeBooleanAlgebraIO<never, never, A>;
35
35
  /**
36
36
  * @tsplus static fncts.test.FreeBooleanAlgebraIOOps failure
37
37
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
38
38
  */
39
- export declare function failure<A>(a: A): FreeBooleanAlgebraIO<unknown, never, A>;
39
+ export declare function failure<A>(a: A): FreeBooleanAlgebraIO<never, never, A>;
40
40
  /**
41
41
  * @tsplus static fncts.test.FreeBooleanAlgebraIOOps fromIO
42
42
  * @tsplus location "@fncts/test/control/FreeBooleanAlgebraIO/api"
@@ -1,4 +1,4 @@
1
- import { IO } from "@fncts/io/IO";
1
+ import { IO } from "@fncts/io/IO/definition";
2
2
  import type { FreeBooleanAlgebra } from "../../data/FreeBooleanAlgebra.js";
3
3
  /**
4
4
  * @tsplus type fncts.test.FreeBooleanAlgebraIO
@@ -1,4 +1,3 @@
1
- import { Has } from "@fncts/base/typeclass";
2
1
  import type { Sized } from "../../Sized.js";
3
2
  import type { EqConstraint, LengthConstraints } from "../constraints.js";
4
3
  import { Gen } from "../definition.js";
@@ -6,7 +5,7 @@ import { Gen } from "../definition.js";
6
5
  * @tsplus fluent fncts.test.Gen array
7
6
  * @tsplus location "@fncts/test/control/Gen/api/array"
8
7
  */
9
- export declare function array<R, A>(g: Gen<R, A>, constraints?: LengthConstraints): Gen<R & Has<Sized>, ReadonlyArray<A>>;
8
+ export declare function array<R, A>(g: Gen<R, A>, constraints?: LengthConstraints): Gen<R | Sized, ReadonlyArray<A>>;
10
9
  /**
11
10
  * @tsplus fluent fncts.test.Gen arrayN
12
11
  * @tsplus location "@fncts/test/control/Gen/api/array"
@@ -16,4 +15,4 @@ export declare function arrayN_<R, A>(self: Gen<R, A>, n: number): Gen<R, Readon
16
15
  * @tsplus fluent fncts.test.Gen uniqueArray
17
16
  * @tsplus location "@fncts/test/control/Gen/api/array"
18
17
  */
19
- export declare function uniqueArray_<R, A>(gen: Gen<R, A>, constraints?: LengthConstraints & EqConstraint<A>): Gen<Has<Sized> & R, ReadonlyArray<A>>;
18
+ export declare function uniqueArray_<R, A>(gen: Gen<R, A>, constraints?: LengthConstraints & EqConstraint<A>): Gen<Sized | R, ReadonlyArray<A>>;
@@ -4,44 +4,44 @@ import { Gen } from "../definition.js";
4
4
  * @tsplus static fncts.test.GenOps alphaNumericChar
5
5
  * @tsplus location "@fncts/test/control/Gen/api/char"
6
6
  */
7
- export declare const alphaNumericChar: Gen<unknown, string>;
7
+ export declare const alphaNumericChar: Gen<never, string>;
8
8
  /**
9
9
  * @tsplus static fncts.test.GenOps asciiChar
10
10
  * @tsplus location "@fncts/test/control/Gen/api/char"
11
11
  */
12
- export declare const asciiChar: Gen<unknown, string>;
12
+ export declare const asciiChar: Gen<never, string>;
13
13
  /**
14
14
  * @tsplus static fncts.test.GenOps base64Char
15
15
  * @tsplus location "@fncts/test/control/Gen/api/char"
16
16
  */
17
- export declare const base64Char: Gen<unknown, string>;
17
+ export declare const base64Char: Gen<never, string>;
18
18
  /**
19
19
  * @tsplus static fncts.test.GenOps char
20
20
  * @tsplus location "@fncts/test/control/Gen/api/char"
21
21
  */
22
- export declare function char(constraints: Required<NumberConstraints>): Gen<unknown, string>;
22
+ export declare function char(constraints: Required<NumberConstraints>): Gen<never, string>;
23
23
  /**
24
24
  * @tsplus static fncts.test.GenOps char16
25
25
  * @tsplus location "@fncts/test/control/Gen/api/char"
26
26
  */
27
- export declare const char16: Gen<unknown, string>;
27
+ export declare const char16: Gen<never, string>;
28
28
  /**
29
29
  * @tsplus static fncts.test.GenOps fullUnicodeChar
30
30
  * @tsplus location "@fncts/test/control/Gen/api/char"
31
31
  */
32
- export declare const fullUnicodeChar: Gen<unknown, string>;
32
+ export declare const fullUnicodeChar: Gen<never, string>;
33
33
  /**
34
34
  * @tsplus static fncts.test.GenOps hexChar
35
35
  * @tsplus location "@fncts/test/control/Gen/api/char"
36
36
  */
37
- export declare const hexChar: Gen<unknown, string>;
37
+ export declare const hexChar: Gen<never, string>;
38
38
  /**
39
39
  * @tsplus static fncts.test.GenOps printableChar
40
40
  * @tsplus location "@fncts/test/control/Gen/api/char"
41
41
  */
42
- export declare const printableChar: Gen<unknown, string>;
42
+ export declare const printableChar: Gen<never, string>;
43
43
  /**
44
44
  * @tsplus static fncts.test.GenOps unicodeChar
45
45
  * @tsplus location "@fncts/test/control/Gen/api/char"
46
46
  */
47
- export declare const unicodeChar: Gen<unknown, string>;
47
+ export declare const unicodeChar: Gen<never, string>;