@fncts/base 0.0.17 → 0.0.19

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 (93) hide show
  1. package/_cjs/collection/compat/Record/instances.cjs +1 -1
  2. package/_cjs/collection/weak/IterableWeakMap.cjs +7 -1
  3. package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
  4. package/_cjs/data/Branded/definition.cjs +10 -9
  5. package/_cjs/data/Branded/definition.cjs.map +1 -1
  6. package/_cjs/data/Decoder/api.cjs.map +1 -1
  7. package/_cjs/data/Decoder/definition.cjs +1 -0
  8. package/_cjs/data/Decoder/definition.cjs.map +1 -1
  9. package/_mjs/collection/compat/Record/instances.mjs +1 -1
  10. package/_mjs/collection/weak/IterableWeakMap.mjs +3 -1
  11. package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
  12. package/_mjs/data/Branded/definition.mjs +7 -6
  13. package/_mjs/data/Branded/definition.mjs.map +1 -1
  14. package/_mjs/data/Decoder/api.mjs.map +1 -1
  15. package/_mjs/data/Decoder/definition.mjs +1 -0
  16. package/_mjs/data/Decoder/definition.mjs.map +1 -1
  17. package/_src/collection/weak/IterableWeakMap.ts +1 -1
  18. package/_src/data/Branded/definition.ts +27 -24
  19. package/_src/data/Branded/derivations.ts +10 -10
  20. package/_src/data/Decoder/api.ts +1 -1
  21. package/_src/data/Decoder/definition.ts +2 -2
  22. package/_src/global.ts +1 -1
  23. package/collection/compat/Array/definition.d.ts +2 -2
  24. package/collection/compat/Array/derivations.d.ts +1 -1
  25. package/collection/compat/Record/instances.d.ts +1 -1
  26. package/collection/immutable/Conc/definition.d.ts +1 -1
  27. package/collection/immutable/Conc/derivations.d.ts +1 -1
  28. package/collection/immutable/HashMap/definition.d.ts +1 -1
  29. package/collection/immutable/HashMap/internal.d.ts +3 -3
  30. package/collection/immutable/HashSet/definition.d.ts +1 -1
  31. package/collection/immutable/ImmutableArray/definition.d.ts +1 -1
  32. package/collection/immutable/ImmutableArray/derivations.d.ts +1 -1
  33. package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +1 -1
  34. package/collection/immutable/List/definition.d.ts +1 -1
  35. package/collection/immutable/RoseTree/definition.d.ts +1 -1
  36. package/collection/immutable/SortedMap/node.d.ts +2 -2
  37. package/collection/immutable/Vector/definition.d.ts +1 -1
  38. package/collection/immutable/Vector/internal.d.ts +2 -2
  39. package/collection/weak/IterableWeakMap.d.ts +1 -1
  40. package/control/Eval/definition.d.ts +2 -2
  41. package/control/Z/definition.d.ts +3 -3
  42. package/data/Branded/definition.d.ts +25 -22
  43. package/data/Branded/derivations.d.ts +7 -7
  44. package/data/Byte.d.ts +1 -1
  45. package/data/CaseClass.d.ts +1 -1
  46. package/data/Cause/definition.d.ts +2 -2
  47. package/data/Datum/definition.d.ts +2 -2
  48. package/data/DatumEither/definition.d.ts +1 -1
  49. package/data/DecodeError/definition.d.ts +1 -1
  50. package/data/Decoder/api.d.ts +1 -1
  51. package/data/Decoder/definition.d.ts +3 -3
  52. package/data/Duration/definition.d.ts +1 -1
  53. package/data/Either/definition.d.ts +1 -1
  54. package/data/Either/instances.d.ts +1 -1
  55. package/data/EitherT/definition.d.ts +1 -1
  56. package/data/Environment/api.d.ts +1 -1
  57. package/data/Environment/definition.d.ts +1 -1
  58. package/data/ExecutionStrategy.d.ts +1 -1
  59. package/data/Exit/definition.d.ts +2 -2
  60. package/data/FiberId/definition.d.ts +3 -3
  61. package/data/Maybe/definition.d.ts +1 -1
  62. package/data/Maybe/instances.d.ts +1 -1
  63. package/data/Patch/definition.d.ts +2 -2
  64. package/data/Struct/api.d.ts +5 -5
  65. package/data/Tag/definition.d.ts +1 -1
  66. package/data/These/definition.d.ts +2 -2
  67. package/data/These/instances.d.ts +1 -1
  68. package/data/TraceElement/definition.d.ts +1 -1
  69. package/data/Zipped.d.ts +2 -2
  70. package/data/exceptions/InterruptedException.d.ts +1 -1
  71. package/global.d.ts +1 -1
  72. package/json/EitherJson.d.ts +2 -2
  73. package/json/MaybeJson.d.ts +2 -2
  74. package/json/TheseJson.d.ts +2 -2
  75. package/optics/At/definition.d.ts +1 -1
  76. package/optics/Index/definition.d.ts +1 -1
  77. package/package.json +3 -3
  78. package/typeclass/Applicative.d.ts +1 -1
  79. package/typeclass/Apply.d.ts +2 -2
  80. package/typeclass/Equatable/fast-equals.d.ts +4 -4
  81. package/typeclass/Guard/definition.d.ts +1 -1
  82. package/typeclass/Has.d.ts +1 -1
  83. package/typeclass/HashEq.d.ts +1 -1
  84. package/typeclass/Monoid.d.ts +1 -1
  85. package/typeclass/Ordering.d.ts +1 -1
  86. package/typeclass/Showable/show.d.ts +4 -4
  87. package/typeclass/Showable/styles.d.ts +5 -5
  88. package/types/extractions.d.ts +8 -8
  89. package/types/utility.d.ts +4 -4
  90. package/util/PCGRandom.d.ts +2 -2
  91. package/util/predicates.d.ts +1 -1
  92. package/util/rand/distribution/Distribution.d.ts +1 -1
  93. package/util/rand/distribution/internals/ArrayInt.d.ts +2 -2
@@ -40,7 +40,7 @@ export declare const mask = 31;
40
40
  /**
41
41
  * @internal
42
42
  */
43
- declare type Sizes = number[] | undefined;
43
+ type Sizes = number[] | undefined;
44
44
  /** @internal */
45
45
  export declare class Node {
46
46
  sizes: Sizes;
@@ -176,7 +176,7 @@ export declare function sliceTreeVector<A>(from: number, to: number, tree: Node,
176
176
  * @internal
177
177
  */
178
178
  export declare function zeroOffset(): void;
179
- declare type FoldCb<Input, State> = (input: Input, state: State, index: number) => boolean;
179
+ type FoldCb<Input, State> = (input: Input, state: State, index: number) => boolean;
180
180
  /**
181
181
  * This function is a lot like a fold. But the reducer function is
182
182
  * supposed to mutate its state instead of returning it. Instead of
@@ -6,7 +6,7 @@ export declare class IterableWeakMap<K extends object, V> implements Iterable<re
6
6
  private refSet;
7
7
  private finalizationGroup;
8
8
  private static cleanup;
9
- constructor(iterable: Iterable<readonly [K, V]>);
9
+ constructor(iterable?: Iterable<readonly [K, V]>);
10
10
  set(this: this, key: K, value: V): this;
11
11
  get(this: this, key: K): V | undefined;
12
12
  delete(this: this, key: K): boolean;
@@ -1,6 +1,6 @@
1
1
  import { HKT } from "@fncts/typelevel/HKT";
2
2
  export declare const EvalTypeId: unique symbol;
3
- export declare type EvalTypeId = typeof EvalTypeId;
3
+ export type EvalTypeId = typeof EvalTypeId;
4
4
  export interface EvalF extends HKT {
5
5
  type: Eval<this["A"]>;
6
6
  variance: {
@@ -47,7 +47,7 @@ export declare class Chain<A, B> implements Eval<B> {
47
47
  readonly _A: () => B;
48
48
  constructor(self: Eval<A>, f: (a: A) => Eval<B>);
49
49
  }
50
- declare type Concrete = Value<any> | Defer<any> | Chain<any, any>;
50
+ type Concrete = Value<any> | Defer<any> | Chain<any, any>;
51
51
  /**
52
52
  * @tsplus smart:remove
53
53
  */
@@ -13,7 +13,7 @@ export interface ZF extends HKT {
13
13
  };
14
14
  }
15
15
  export declare const ZTypeId: unique symbol;
16
- export declare type ZTypeId = typeof ZTypeId;
16
+ export type ZTypeId = typeof ZTypeId;
17
17
  /**
18
18
  * `Z<W, S1, S2, R, E, A>` is a purely functional description of a synchronous computation
19
19
  * that requires an environment `R` and an initial state `S1` and may either
@@ -131,14 +131,14 @@ export declare class MapLog<W, S1, S2, R, E, A, W1> extends Z<W1, S1, S2, R, E,
131
131
  readonly _tag = ZTag.MapLog;
132
132
  constructor(ma: Z<W, S1, S2, R, E, A>, modifyLog: (ws: Conc<W>) => Conc<W1>);
133
133
  }
134
- export declare type Concrete = SucceedNow<any> | Fail<any> | Modify<any, any, any> | Chain<any, any, any, any, any, any, any, any, any, any, any> | Match<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any> | Access<any, any, any, any, any, any, any> | Provide<any, any, any, any, any, any> | Defer<any, any, any, any, any, any> | Succeed<any> | Tell<any> | MapLog<any, any, any, any, any, any, any>;
134
+ export type Concrete = SucceedNow<any> | Fail<any> | Modify<any, any, any> | Chain<any, any, any, any, any, any, any, any, any, any, any> | Match<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any> | Access<any, any, any, any, any, any, any> | Provide<any, any, any, any, any, any> | Defer<any, any, any, any, any, any> | Succeed<any> | Tell<any> | MapLog<any, any, any, any, any, any, any>;
135
135
  /**
136
136
  * @tsplus static fncts.control.ZOps concrete
137
137
  * @tsplus location "@fncts/base/control/Z/definition"
138
138
  */
139
139
  export declare function concrete(_: Z<any, any, any, any, any, any>): asserts _ is Concrete;
140
140
  export declare const ZErrorTypeId: unique symbol;
141
- export declare type ZErrorTypeId = typeof ZErrorTypeId;
141
+ export type ZErrorTypeId = typeof ZErrorTypeId;
142
142
  export declare class ZError<E> {
143
143
  readonly cause: Cause<E>;
144
144
  readonly _typeId: ZErrorTypeId;
@@ -1,36 +1,39 @@
1
1
  import { Refinement } from "@fncts/base/data/Refinement/definition";
2
2
  import { Predicate } from "@fncts/base/data/Predicate/definition";
3
3
  import type { Union } from "@fncts/typelevel";
4
- declare type Brand_<A, K extends string> = Brand<A, K>;
5
- export declare namespace Branded {
6
- const Symbol: unique symbol;
7
- type Symbol = typeof Symbol;
8
- interface Brand<A, K extends string> {
9
- readonly [Branded.Symbol]: {
4
+ declare const validSym: unique symbol;
5
+ export declare namespace Brand {
6
+ type valid = typeof validSym;
7
+ /**
8
+ * @tsplus derive nominal
9
+ */
10
+ interface Valid<in out A, in out K extends string> {
11
+ [validSym]: {
10
12
  [_ in K]: A;
11
13
  };
12
14
  }
13
- type Type<A extends Brand_<any, any>> = [A] extends [Brand_<infer A, infer K>] ? Validated<A, K> : never;
14
- type Validated<A, K extends string> = A & Brand<A, K>;
15
- type IsValidated<P extends Brand<any, any>> = {
16
- [K in keyof P[Branded.Symbol]]: P extends P[Branded.Symbol][K] ? 0 : 1;
17
- }[keyof P[Branded.Symbol]] extends 0 ? unknown : never;
18
- type Unbrand<P extends Brand<any, any>> = P extends infer Q & Brands<P> ? Q : P;
19
- type Brands<P extends Brand<any, any>> = Union.IntersectionOf<{
20
- [K in keyof P[Branded.Symbol]]: P extends P[Branded.Symbol][K] ? K extends string ? Brand<P[Branded.Symbol][K], K> : never : never;
21
- }[keyof P[Branded.Symbol]]>;
15
+ type Type<A extends Validation<any, any>> = A extends Validation<infer A, infer K> ? Validated<A, K> : never;
16
+ type Validated<A, K extends string> = A & Brand.Valid<A, K>;
17
+ type IsValidated<P extends Valid<any, any>> = {
18
+ [K in keyof P[Brand.valid]]: P extends P[Brand.valid][K] ? 0 : 1;
19
+ }[keyof P[Brand.valid]] extends 0 ? unknown : never;
20
+ type Unbranded<P> = P extends infer Q & Brands<P> ? Q : P;
21
+ type Brands<P> = P extends Valid<any, any> ? Union.IntersectionOf<{
22
+ [K in keyof P[Brand.valid]]: P extends P[Brand.valid][K] ? K extends string ? Valid<P[Brand.valid][K], K> : never : never;
23
+ }[keyof P[Brand.valid]]> : unknown;
22
24
  }
23
25
  /**
24
- * @tsplus type fncts.Brand
25
- * @tsplus companion fncts.BrandOps
26
+ * @tsplus type fncts.Validation
27
+ * @tsplus companion fncts.ValidationOps
28
+ * @tsplus derive nominal
26
29
  */
27
- export declare class Brand<A, K extends string> {
28
- readonly validate: Refinement<A, A & Branded.Brand<A, K>>;
29
- constructor(validate: Refinement<A, A & Branded.Brand<A, K>>);
30
+ export declare class Validation<in out A, in out K extends string> {
31
+ readonly validate: Refinement<A, A & Brand.Valid<A, K>>;
32
+ constructor(validate: Refinement<A, A & Brand.Valid<A, K>>);
30
33
  }
31
34
  /**
32
- * @tsplus static fncts.BrandOps __call
35
+ * @tsplus static fncts.ValidationOps __call
33
36
  * @tsplus location "@fncts/base/data/Branded/definition"
34
37
  */
35
- export declare function makeBrand<A, K extends string>(p: Predicate<A>): Brand<A, K>;
38
+ export declare function makeValidation<A, K extends string>(p: Predicate<A>): Validation<A, K>;
36
39
  export {};
@@ -1,24 +1,24 @@
1
1
  import { Guard } from "@fncts/base/typeclass/Guard";
2
- import type { Brand, Branded } from "@fncts/base/data/Branded/definition";
2
+ import type { Validation, Brand } from "@fncts/base/data/Branded/definition";
3
3
  import type { Check } from "@fncts/typelevel/Check";
4
4
  import { Decoder } from "@fncts/base/data/Decoder/definition";
5
5
  /**
6
6
  * @tsplus derive fncts.Guard<_> 10
7
7
  * @tsplus location "@fncts/base/data/Branded/derivations"
8
8
  */
9
- export declare function deriveGuard<A extends Branded.Brand<any, any>>(...[base, brands]: Check<Branded.IsValidated<A>> extends Check.True ? [
10
- base: Guard<Branded.Unbrand<A>>,
9
+ export declare function deriveGuard<A extends Brand.Valid<any, any>>(...[base, brands]: Check<Brand.IsValidated<A>> extends Check.True ? [
10
+ base: Guard<Brand.Unbranded<A>>,
11
11
  brands: {
12
- [K in keyof A[Branded.Symbol] & string]: Brand<A[Branded.Symbol][K], K>;
12
+ [K in keyof A[Brand.valid] & string]: Validation<A[Brand.valid][K], K>;
13
13
  }
14
14
  ] : never): Guard<A>;
15
15
  /**
16
16
  * @tsplus derive fncts.Decoder<_> 10
17
17
  * @tsplus location "@fncts/base/data/Branded/derivations"
18
18
  */
19
- export declare function deriveDecoder<A extends Branded.Brand<any, any>>(...[base, brands]: Check<Branded.IsValidated<A>> extends Check.True ? [
20
- base: Decoder<Branded.Unbrand<A>>,
19
+ export declare function deriveDecoder<A extends Brand.Valid<any, any>>(...[base, brands]: Check<Brand.IsValidated<A>> extends Check.True ? [
20
+ base: Decoder<Brand.Unbranded<A>>,
21
21
  brands: {
22
- [K in keyof A[Branded.Symbol] & string]: Brand<A[Branded.Symbol][K], K>;
22
+ [K in (keyof A[Brand.valid]) & string]: Validation<A[Brand.valid][K], K>;
23
23
  }
24
24
  ] : never): Decoder<A>;
package/data/Byte.d.ts CHANGED
@@ -1 +1 @@
1
- export declare type Byte = number;
1
+ export type Byte = number;
@@ -4,7 +4,7 @@ import { Equatable } from "@fncts/base/typeclass/Equatable";
4
4
  import type { Equals } from "@fncts/typelevel/Any";
5
5
  import type { True } from "@fncts/typelevel/Boolean";
6
6
  export declare const CaseClassTypeId: unique symbol;
7
- export declare type CaseClassTypeId = typeof CaseClassTypeId;
7
+ export type CaseClassTypeId = typeof CaseClassTypeId;
8
8
  export interface CaseArgs {
9
9
  readonly [CaseClassTypeId]: ImmutableArray<string>;
10
10
  }
@@ -5,11 +5,11 @@ import { Conc } from "@fncts/base/collection/immutable/Conc";
5
5
  import { List } from "@fncts/base/collection/immutable/List/definition";
6
6
  import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
7
7
  export declare const CauseTypeId: unique symbol;
8
- export declare type CauseTypeId = typeof CauseTypeId;
8
+ export type CauseTypeId = typeof CauseTypeId;
9
9
  /**
10
10
  * @tsplus type fncts.Cause
11
11
  */
12
- export declare type Cause<E> = Empty | Halt | Interrupt | Fail<E> | Then<E> | Both<E> | Stackless<E>;
12
+ export type Cause<E> = Empty | Halt | Interrupt | Fail<E> | Then<E> | Both<E> | Stackless<E>;
13
13
  /**
14
14
  * @tsplus type fncts.CauseOps
15
15
  */
@@ -8,7 +8,7 @@ export declare const enum DatumTag {
8
8
  Replete = "Replete"
9
9
  }
10
10
  export declare const DatumTypeId: unique symbol;
11
- export declare type DatumTypeId = typeof DatumTypeId;
11
+ export type DatumTypeId = typeof DatumTypeId;
12
12
  export interface DatumF extends HKT {
13
13
  type: Datum<this["A"]>;
14
14
  variance: {
@@ -18,7 +18,7 @@ export interface DatumF extends HKT {
18
18
  /**
19
19
  * @tsplus type fncts.Datum
20
20
  */
21
- export declare type Datum<A> = Initial | Pending | Refresh<A> | Replete<A>;
21
+ export type Datum<A> = Initial | Pending | Refresh<A> | Replete<A>;
22
22
  /**
23
23
  * @tsplus type fncts.DatumOps
24
24
  */
@@ -12,7 +12,7 @@ export interface DatumEitherF extends HKT {
12
12
  * @tsplus type fncts.DatumEither
13
13
  * @tsplus no-inherit fncts.Datum
14
14
  */
15
- export declare type DatumEither<E, A> = Datum<Either<E, A>>;
15
+ export type DatumEither<E, A> = Datum<Either<E, A>>;
16
16
  /**
17
17
  * @tsplus type fncts.DatumEitherOps
18
18
  */
@@ -2,7 +2,7 @@ import { Eval } from "@fncts/base/control/Eval/definition";
2
2
  import { RoseTree } from "@fncts/base/collection/immutable/RoseTree";
3
3
  import { Vector } from "@fncts/base/collection/immutable/Vector";
4
4
  export declare const DecodeErrorTypeId: unique symbol;
5
- export declare type DecodeErrorTypeId = typeof DecodeErrorTypeId;
5
+ export type DecodeErrorTypeId = typeof DecodeErrorTypeId;
6
6
  export declare abstract class DecodeError {
7
7
  readonly _typeId: DecodeErrorTypeId;
8
8
  abstract render: Eval<RoseTree<string>>;
@@ -8,7 +8,7 @@ import { Decoder } from "@fncts/base/data/Decoder/definition";
8
8
  * @tsplus fluent fncts.Decoder __call
9
9
  * @tsplus location "@fncts/base/data/Decoder/api"
10
10
  */
11
- export declare function decode<I, E, A>(self: Decoder<A>, input: unknown): These<DecodeError, A>;
11
+ export declare function decode<A>(self: Decoder<A>, input: unknown): These<DecodeError, A>;
12
12
  export declare function fromGuard<A>(guard: Guard<A>, onFalse: (i: unknown) => DecodeError, label: string): Decoder<A>;
13
13
  /**
14
14
  * @tsplus implicit
@@ -2,7 +2,7 @@ import { HKT } from "@fncts/typelevel/HKT";
2
2
  import { These } from "@fncts/base/data/These";
3
3
  import type { DecodeError } from "@fncts/base/data/DecodeError";
4
4
  export declare const DecoderTypeId: unique symbol;
5
- export declare type DecoderTypeId = typeof DecoderTypeId;
5
+ export type DecoderTypeId = typeof DecoderTypeId;
6
6
  export interface DecoderF extends HKT {
7
7
  type: Decoder<this["A"]>;
8
8
  variance: {
@@ -12,12 +12,12 @@ export interface DecoderF extends HKT {
12
12
  /**
13
13
  * @tsplus type fncts.Decoder
14
14
  * @tsplus companion fncts.DecoderOps
15
+ * @tsplus derive nominal
15
16
  */
16
- export declare class Decoder<A> {
17
+ export declare class Decoder<in out A> {
17
18
  readonly decode: (input: unknown) => These<DecodeError, A>;
18
19
  readonly label: string;
19
20
  readonly _typeId: DecoderTypeId;
20
- readonly _A: () => A;
21
21
  constructor(decode: (input: unknown) => These<DecodeError, A>, label: string);
22
22
  }
23
23
  /**
@@ -1,7 +1,7 @@
1
1
  import { Equatable } from "@fncts/base/typeclass/Equatable";
2
2
  import { Hashable } from "@fncts/base/typeclass/Hashable";
3
3
  export declare const DurationTypeId: unique symbol;
4
- export declare type DurationTypeId = typeof DurationTypeId;
4
+ export type DurationTypeId = typeof DurationTypeId;
5
5
  /**
6
6
  * @tsplus type fncts.Duration
7
7
  * @tsplus companion fncts.DurationOps
@@ -4,7 +4,7 @@ export declare const enum EitherTag {
4
4
  Right = "Right"
5
5
  }
6
6
  export declare const EitherTypeId: unique symbol;
7
- export declare type EitherTypeId = typeof EitherTypeId;
7
+ export type EitherTypeId = typeof EitherTypeId;
8
8
  export interface EitherF extends HKT {
9
9
  type: Either<this["E"], this["A"]>;
10
10
  variance: {
@@ -1,7 +1,7 @@
1
1
  import { HKT } from "@fncts/typelevel/HKT";
2
2
  import { Predicate } from "@fncts/base/data/Predicate/definition";
3
3
  import { Guard } from "@fncts/base/typeclass/Guard";
4
- import { Decoder } from "@fncts/base/data/Decoder";
4
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
5
5
  import type { EitherF } from "@fncts/base/data/Either/definition.js";
6
6
  import { Either } from "@fncts/base/data/Either/definition";
7
7
  import * as P from "../../typeclass.js";
@@ -3,7 +3,7 @@ import { Either } from "@fncts/base/data/Either/definition";
3
3
  /**
4
4
  * @tsplus type fncts.EitherT
5
5
  */
6
- export declare type EitherT<F extends HKT, FC, K, Q, W, X, I, S, R, EF, E, A> = HKT.Kind<F, FC, K, Q, W, X, I, S, R, EF, Either<E, A>>;
6
+ export type EitherT<F extends HKT, FC, K, Q, W, X, I, S, R, EF, E, A> = HKT.Kind<F, FC, K, Q, W, X, I, S, R, EF, Either<E, A>>;
7
7
  /**
8
8
  * @tsplus type fncts.EitherTOps
9
9
  */
@@ -12,7 +12,7 @@ export declare function add<R, H extends S, S = H>(self: Environment<R>, service
12
12
  * @tsplus location "@fncts/base/data/Environment/api"
13
13
  */
14
14
  export declare const empty: import("./definition").Environment<never>;
15
- declare type Tags<R> = R extends infer S ? Tag<S> : never;
15
+ type Tags<R> = R extends infer S ? Tag<S> : never;
16
16
  /**
17
17
  * @tsplus fluent fncts.Environment get
18
18
  * @tsplus location "@fncts/base/data/Environment/api"
@@ -7,7 +7,7 @@ import { Tag } from "@fncts/base/data/Tag/definition";
7
7
  * @tsplus location "@fncts/base/data/Environment/definition"
8
8
  */
9
9
  export declare const EnvSymbol: unique symbol;
10
- export declare type EnvSymbol = typeof EnvSymbol;
10
+ export type EnvSymbol = typeof EnvSymbol;
11
11
  /**
12
12
  * @tsplus type fncts.Environment
13
13
  * @tsplus companion fncts.EnvironmentOps
@@ -26,7 +26,7 @@ export declare function concurrentBounded(fiberBound: number): ConcurrentBounded
26
26
  /**
27
27
  * @tsplus type fncts.ExecutionStrategy
28
28
  */
29
- export declare type ExecutionStrategy = Sequential | Concurrent | ConcurrentBounded;
29
+ export type ExecutionStrategy = Sequential | Concurrent | ConcurrentBounded;
30
30
  /**
31
31
  * @tsplus type fncts.ExecutionStrategyOps
32
32
  */
@@ -2,11 +2,11 @@ import { Cause } from "@fncts/base/data/Cause/definition";
2
2
  import { Hashable } from "@fncts/base/typeclass/Hashable";
3
3
  import * as P from "../../typeclass.js";
4
4
  export declare const ExitTypeId: unique symbol;
5
- export declare type ExitTypeId = typeof ExitTypeId;
5
+ export type ExitTypeId = typeof ExitTypeId;
6
6
  /**
7
7
  * @tsplus type fncts.Exit
8
8
  */
9
- export declare type Exit<E, A> = Success<A> | Failure<E>;
9
+ export type Exit<E, A> = Success<A> | Failure<E>;
10
10
  /**
11
11
  * @tsplus type fncts.ExitOps
12
12
  */
@@ -3,7 +3,7 @@ import { Equatable } from "@fncts/base/typeclass/Equatable";
3
3
  import { TraceElement } from "@fncts/base/data/TraceElement/definition";
4
4
  import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
5
5
  export declare const FiberIdTypeId: unique symbol;
6
- export declare type FiberIdTypeId = typeof FiberIdTypeId;
6
+ export type FiberIdTypeId = typeof FiberIdTypeId;
7
7
  export declare class None implements Hashable, Equatable {
8
8
  readonly _typeId: FiberIdTypeId;
9
9
  readonly _tag = "None";
@@ -31,14 +31,14 @@ export declare class Composite implements Hashable, Equatable {
31
31
  /**
32
32
  * @tsplus type fncts.FiberId
33
33
  */
34
- export declare type FiberId = None | Runtime | Composite;
34
+ export type FiberId = None | Runtime | Composite;
35
35
  /**
36
36
  * @tsplus type fncts.FiberIdOps
37
37
  */
38
38
  export interface FiberIdOps {
39
39
  }
40
40
  export declare const FiberId: FiberIdOps;
41
- declare type RuntimeFiberId = Runtime;
41
+ type RuntimeFiberId = Runtime;
42
42
  export declare namespace FiberId {
43
43
  type Runtime = RuntimeFiberId;
44
44
  }
@@ -6,7 +6,7 @@ export declare const enum MaybeTag {
6
6
  Nothing = "Nothing"
7
7
  }
8
8
  export declare const MaybeTypeId: unique symbol;
9
- export declare type MaybeTypdId = typeof MaybeTypeId;
9
+ export type MaybeTypdId = typeof MaybeTypeId;
10
10
  export interface MaybeF extends HKT {
11
11
  type: Maybe<this["A"]>;
12
12
  variance: {
@@ -1,6 +1,6 @@
1
1
  import { Maybe } from "@fncts/base/data/Maybe/definition";
2
2
  import { Guard } from "@fncts/base/typeclass/Guard";
3
- import { Decoder } from "@fncts/base/data/Decoder";
3
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
4
4
  import type * as P from "../../typeclass.js";
5
5
  import type { MaybeF } from "@fncts/base/data/Maybe/definition";
6
6
  export declare const Functor: P.Functor<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
@@ -1,7 +1,7 @@
1
1
  import { Has } from "@fncts/base/typeclass/Has";
2
2
  import { Tag } from "@fncts/base/data/Tag/definition";
3
3
  export declare const PatchTypeId: unique symbol;
4
- export declare type PatchTypeId = typeof PatchTypeId;
4
+ export type PatchTypeId = typeof PatchTypeId;
5
5
  /**
6
6
  * @tsplus type fncts.Environment.Patch
7
7
  * @tsplus companion fncts.Environment.PatchOps
@@ -37,7 +37,7 @@ export declare class UpdateService<Env, Service> extends Patch<Env & Has<Service
37
37
  readonly _tag = "UpdateService";
38
38
  constructor(update: (_: Service) => Service, tag: Tag<Service>);
39
39
  }
40
- export declare type Concrete = AddService<any, any> | Compose<any, any, any> | Empty<any> | RemoveService<any, any> | UpdateService<any, any>;
40
+ export type Concrete = AddService<any, any> | Compose<any, any, any> | Empty<any> | RemoveService<any, any> | UpdateService<any, any>;
41
41
  /**
42
42
  * @tsplus macro remove
43
43
  */
@@ -1,10 +1,10 @@
1
1
  import type { Union } from "@fncts/typelevel";
2
2
  import { Struct } from "./definition.js";
3
- export declare type EnsureLiteral<N> = string extends N ? never : [N] extends [Union.IntersectionOf<N>] ? N : never;
4
- export declare type TestLiteral<N> = string extends N ? unknown : [N] extends [Union.IntersectionOf<N>] ? N : unknown;
5
- export declare type EnsureNonexistentProperty<T, N extends string> = Extract<keyof T, N> extends never ? T : never;
6
- export declare type EnsureLiteralKeys<O> = string extends keyof O ? never : O;
7
- export declare type EnsureLiteralTuple<A extends ReadonlyArray<unknown>> = unknown extends {
3
+ export type EnsureLiteral<N> = string extends N ? never : [N] extends [Union.IntersectionOf<N>] ? N : never;
4
+ export type TestLiteral<N> = string extends N ? unknown : [N] extends [Union.IntersectionOf<N>] ? N : unknown;
5
+ export type EnsureNonexistentProperty<T, N extends string> = Extract<keyof T, N> extends never ? T : never;
6
+ export type EnsureLiteralKeys<O> = string extends keyof O ? never : O;
7
+ export type EnsureLiteralTuple<A extends ReadonlyArray<unknown>> = unknown extends {
8
8
  [K in keyof A]: A[K] extends string ? TestLiteral<A[K]> : unknown;
9
9
  }[number] ? never : A;
10
10
  /**
@@ -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 TagTypeId: unique symbol;
4
- export declare type TagTypeId = typeof TagTypeId;
4
+ export type TagTypeId = typeof TagTypeId;
5
5
  /**
6
6
  * Tag Encodes capabilities of reading and writing a service T into a generic environment
7
7
  *
@@ -4,7 +4,7 @@ export declare const enum TheseTag {
4
4
  Both = "Both"
5
5
  }
6
6
  export declare const TheseTypeId: unique symbol;
7
- export declare type TheseTypeId = typeof TheseTypeId;
7
+ export type TheseTypeId = typeof TheseTypeId;
8
8
  /**
9
9
  * @tsplus type fncts.These.Left
10
10
  */
@@ -36,7 +36,7 @@ export declare class Both<E, A> {
36
36
  /**
37
37
  * @tsplus type fncts.These
38
38
  */
39
- export declare type These<E, A> = Left<E> | Right<A> | Both<E, A>;
39
+ export type These<E, A> = Left<E> | Right<A> | Both<E, A>;
40
40
  /**
41
41
  * @tsplus type fncts.TheseOps
42
42
  */
@@ -1,6 +1,6 @@
1
1
  import { These } from "@fncts/base/data/These";
2
2
  import { Guard } from "@fncts/base/typeclass/Guard";
3
- import { Decoder } from "@fncts/base/data/Decoder";
3
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
4
4
  /**
5
5
  * @tsplus derive fncts.Guard[fncts.These]<_> 10
6
6
  * @tsplus location "@fncts/base/data/These/instances"
@@ -10,7 +10,7 @@ export interface SourceLocation {
10
10
  /**
11
11
  * @tsplus type fncts.TraceElement
12
12
  */
13
- export declare type TraceElement = NoLocation | SourceLocation;
13
+ export type TraceElement = NoLocation | SourceLocation;
14
14
  /**
15
15
  * @tsplus type fncts.TraceElementOps
16
16
  */
package/data/Zipped.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const ZippedTypeId: unique symbol;
2
- export declare type ZippedTypeId = typeof ZippedTypeId;
3
- export declare type Zipped<A extends Array<any>> = Readonly<A> & {
2
+ export type ZippedTypeId = typeof ZippedTypeId;
3
+ export type Zipped<A extends Array<any>> = Readonly<A> & {
4
4
  readonly [ZippedTypeId]: ZippedTypeId;
5
5
  };
6
6
  export declare namespace Zipped {
@@ -1,5 +1,5 @@
1
1
  export declare const InterruptedExceptionTypeId: unique symbol;
2
- export declare type InterruptedExceptionTypeId = typeof InterruptedExceptionTypeId;
2
+ export type InterruptedExceptionTypeId = typeof InterruptedExceptionTypeId;
3
3
  export declare class InterruptedException {
4
4
  readonly message?: string | undefined;
5
5
  readonly _typeId: InterruptedExceptionTypeId;
package/global.d.ts CHANGED
@@ -105,7 +105,7 @@ import { DatumEither } from "@fncts/base/data/DatumEither/definition";
105
105
  /**
106
106
  * @tsplus global
107
107
  */
108
- import { Decoder } from "@fncts/base/data/Decoder";
108
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
109
109
  /**
110
110
  * @tsplus global
111
111
  */
@@ -1,4 +1,4 @@
1
- import { Decoder } from "@fncts/base/data/Decoder";
1
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
2
2
  export interface RightJson<A> {
3
3
  readonly _tag: "Right";
4
4
  readonly right: A;
@@ -10,7 +10,7 @@ export interface LeftJson<E> {
10
10
  /**
11
11
  * @tsplus type fncts.EitherJson
12
12
  */
13
- export declare type EitherJson<E, A> = LeftJson<E> | RightJson<A>;
13
+ export type EitherJson<E, A> = LeftJson<E> | RightJson<A>;
14
14
  /**
15
15
  * @tsplus type fncts.EitherJsonOps
16
16
  */
@@ -1,4 +1,4 @@
1
- import { Decoder } from "@fncts/base/data/Decoder";
1
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
2
2
  export interface NothingJson {
3
3
  readonly _tag: "Nothing";
4
4
  }
@@ -9,7 +9,7 @@ export interface JustJson<A> {
9
9
  /**
10
10
  * @tsplus type fncts.MaybeJson
11
11
  */
12
- export declare type MaybeJson<A> = NothingJson | JustJson<A>;
12
+ export type MaybeJson<A> = NothingJson | JustJson<A>;
13
13
  /**
14
14
  * @tsplus type fncts.MaybeJsonOps
15
15
  */
@@ -1,4 +1,4 @@
1
- import { Decoder } from "@fncts/base/data/Decoder";
1
+ import { Decoder } from "@fncts/base/data/Decoder/definition";
2
2
  export interface LeftJson<E> {
3
3
  readonly _tag: "Left";
4
4
  readonly left: E;
@@ -12,7 +12,7 @@ export interface BothJson<E, A> {
12
12
  readonly left: E;
13
13
  readonly right: A;
14
14
  }
15
- export declare type TheseJson<E, A> = LeftJson<E> | RightJson<A> | BothJson<E, A>;
15
+ export type TheseJson<E, A> = LeftJson<E> | RightJson<A> | BothJson<E, A>;
16
16
  /**
17
17
  * @tsplus type fncts.TheseJsonOps
18
18
  */
@@ -5,7 +5,7 @@ import { Lens } from "@fncts/base/optics/Lens";
5
5
  export interface At<S, I, A> {
6
6
  readonly at: (i: I) => Lens<S, A>;
7
7
  }
8
- export declare type AtMin<S, I, A> = {
8
+ export type AtMin<S, I, A> = {
9
9
  readonly get: (i: I) => (s: S) => A;
10
10
  readonly set: (i: I) => (s: S, a: A) => S;
11
11
  } | At<S, I, A>;
@@ -5,7 +5,7 @@ import type { Optional } from "@fncts/base/optics/Optional";
5
5
  export interface Index<S, I, A> {
6
6
  readonly index: (i: I) => Optional<S, A>;
7
7
  }
8
- export declare type IndexMin<S, I, A> = Index<S, I, A>;
8
+ export type IndexMin<S, I, A> = Index<S, I, A>;
9
9
  /**
10
10
  * @tsplus type fncts.optics.IndexOps
11
11
  */
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@fncts/base",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "dependencies": {
5
- "@fncts/typelevel": "0.0.13",
6
- "uuid": "^8.3.2"
5
+ "@fncts/typelevel": "0.0.14",
6
+ "uuid": "^9.0.0"
7
7
  },
8
8
  "exports": {
9
9
  "./*": {
@@ -9,4 +9,4 @@ export interface Applicative<F extends HKT, FC = HKT.None> extends Apply<F, FC>,
9
9
  export interface ApplicativeOps {
10
10
  }
11
11
  export declare const Applicative: ApplicativeOps;
12
- export declare type CompatibleApplicative<F extends HKT, FC, A> = Applicative<F, FC> & ([A] extends [HKT.Kind<F, any, any, any, any, any, any, any, any, any, any>] ? unknown : ["invalid Applicative instance for", A]);
12
+ export type CompatibleApplicative<F extends HKT, FC, A> = Applicative<F, FC> & ([A] extends [HKT.Kind<F, any, any, any, any, any, any, any, any, any, any>] ? unknown : ["invalid Applicative instance for", A]);
@@ -48,13 +48,13 @@ export declare function sequenceT<F extends HKT, FC = HKT.None>(F: Apply<F, FC>)
48
48
  /**
49
49
  * @internal
50
50
  */
51
- declare type InferMixStruct<F extends HKT, FC, P extends HKT.ParamName, T, KS> = HKT.MixStruct<F, P, T, {
51
+ type InferMixStruct<F extends HKT, FC, P extends HKT.ParamName, T, KS> = HKT.MixStruct<F, P, T, {
52
52
  [K in keyof KS]: HKT.Infer<F, FC, P, KS[K]>;
53
53
  }>;
54
54
  /**
55
55
  * @internal
56
56
  */
57
- declare type InferMixTuple<F extends HKT, FC, P extends HKT.ParamName, T, KT> = HKT.MixStruct<F, P, T, {
57
+ type InferMixTuple<F extends HKT, FC, P extends HKT.ParamName, T, KT> = HKT.MixStruct<F, P, T, {
58
58
  [K in keyof KT & number]: HKT.Infer<F, FC, P, KT[K]>;
59
59
  }>;
60
60
  export {};