@fncts/base 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/collection/compat/Array/definition.d.ts +2 -2
  2. package/collection/immutable/Conc/definition.d.ts +1 -1
  3. package/collection/immutable/HashMap/definition.d.ts +1 -1
  4. package/collection/immutable/HashMap/internal.d.ts +3 -3
  5. package/collection/immutable/HashSet/definition.d.ts +1 -1
  6. package/collection/immutable/ImmutableArray/definition.d.ts +1 -1
  7. package/collection/immutable/List/definition.d.ts +1 -1
  8. package/collection/immutable/RoseTree/definition.d.ts +1 -1
  9. package/collection/immutable/SortedMap/node.d.ts +2 -2
  10. package/collection/immutable/Vector/definition.d.ts +1 -1
  11. package/collection/immutable/Vector/internal.d.ts +2 -2
  12. package/control/Eval/definition.d.ts +2 -2
  13. package/control/Z/definition.d.ts +3 -3
  14. package/data/Branded/definition.d.ts +1 -1
  15. package/data/Byte.d.ts +1 -1
  16. package/data/CaseClass.d.ts +1 -1
  17. package/data/Cause/definition.d.ts +2 -2
  18. package/data/Datum/definition.d.ts +2 -2
  19. package/data/DatumEither/definition.d.ts +1 -1
  20. package/data/DecodeError/definition.d.ts +1 -1
  21. package/data/Decoder/definition.d.ts +1 -1
  22. package/data/Duration/definition.d.ts +1 -1
  23. package/data/Either/definition.d.ts +1 -1
  24. package/data/EitherT/definition.d.ts +1 -1
  25. package/data/Environment/api.d.ts +1 -1
  26. package/data/Environment/definition.d.ts +1 -1
  27. package/data/ExecutionStrategy.d.ts +1 -1
  28. package/data/Exit/definition.d.ts +2 -2
  29. package/data/FiberId/definition.d.ts +3 -3
  30. package/data/Maybe/definition.d.ts +1 -1
  31. package/data/Patch/definition.d.ts +2 -2
  32. package/data/Struct/api.d.ts +5 -5
  33. package/data/Tag/definition.d.ts +1 -1
  34. package/data/These/definition.d.ts +2 -2
  35. package/data/TraceElement/definition.d.ts +1 -1
  36. package/data/Zipped.d.ts +2 -2
  37. package/data/exceptions/InterruptedException.d.ts +1 -1
  38. package/json/EitherJson.d.ts +1 -1
  39. package/json/MaybeJson.d.ts +1 -1
  40. package/json/TheseJson.d.ts +1 -1
  41. package/optics/At/definition.d.ts +1 -1
  42. package/optics/Index/definition.d.ts +1 -1
  43. package/package.json +2 -2
  44. package/typeclass/Applicative.d.ts +1 -1
  45. package/typeclass/Apply.d.ts +2 -2
  46. package/typeclass/Equatable/fast-equals.d.ts +4 -4
  47. package/typeclass/Guard/definition.d.ts +1 -1
  48. package/typeclass/Has.d.ts +1 -1
  49. package/typeclass/HashEq.d.ts +1 -1
  50. package/typeclass/Monoid.d.ts +1 -1
  51. package/typeclass/Ordering.d.ts +1 -1
  52. package/typeclass/Showable/show.d.ts +4 -4
  53. package/typeclass/Showable/styles.d.ts +5 -5
  54. package/types/extractions.d.ts +8 -8
  55. package/types/utility.d.ts +4 -4
  56. package/util/PCGRandom.d.ts +2 -2
  57. package/util/predicates.d.ts +1 -1
  58. package/util/rand/distribution/Distribution.d.ts +1 -1
  59. package/util/rand/distribution/internals/ArrayInt.d.ts +2 -2
@@ -15,6 +15,6 @@ declare global {
15
15
  export interface ArrayConstructor {
16
16
  }
17
17
  }
18
- export declare type ESArray<A> = globalThis.Array<A>;
19
- export declare type ESReadonlyArray<A> = globalThis.ReadonlyArray<A>;
18
+ export type ESArray<A> = globalThis.Array<A>;
19
+ export type ESReadonlyArray<A> = globalThis.ReadonlyArray<A>;
20
20
  export declare const ESArray: ArrayConstructor;
@@ -7,7 +7,7 @@ import { unsafeCoerce } from "@fncts/base/data/function/api";
7
7
  export declare const BUFFER_SIZE = 64;
8
8
  export declare const UPDATE_BUFFER_SIZE = 256;
9
9
  export declare const ConcTypeId: unique symbol;
10
- export declare type ConcTypeId = typeof ConcTypeId;
10
+ export type ConcTypeId = typeof ConcTypeId;
11
11
  export declare const enum ConcTag {
12
12
  Empty = "Empty",
13
13
  Concat = "Concat",
@@ -37,7 +37,7 @@ export declare class HashMapIterator<K, V, T> implements IterableIterator<T> {
37
37
  next(): IteratorResult<T>;
38
38
  [Symbol.iterator](): IterableIterator<T>;
39
39
  }
40
- declare type Cont<K, V, A> = [len: number, children: Node<K, V>[], i: number, f: (node: readonly [K, V]) => A, cont: Cont<K, V, A>] | undefined;
40
+ type Cont<K, V, A> = [len: number, children: Node<K, V>[], i: number, f: (node: readonly [K, V]) => A, cont: Cont<K, V, A>] | undefined;
41
41
  interface VisitResult<K, V, A> {
42
42
  value: A;
43
43
  cont: Cont<K, V, A>;
@@ -17,7 +17,7 @@ export declare function popcount(x: number): number;
17
17
  export declare function hashFragment(shift: number, h: number): number;
18
18
  export declare function toBitmap(x: number): number;
19
19
  export declare function fromBitmap(bitmap: number, bit: number): number;
20
- export declare type Node<K, V> = LeafNode<K, V> | CollisionNode<K, V> | IndexedNode<K, V> | ArrayNode<K, V> | EmptyNode<K, V>;
20
+ export type Node<K, V> = LeafNode<K, V> | CollisionNode<K, V> | IndexedNode<K, V> | ArrayNode<K, V> | EmptyNode<K, V>;
21
21
  export interface SizeRef {
22
22
  value: number;
23
23
  }
@@ -29,8 +29,8 @@ export declare const _EmptyNode: EmptyNode<never, never>;
29
29
  export declare function isEmptyNode(a: unknown): a is EmptyNode<unknown, unknown>;
30
30
  export declare function isLeaf<K, V>(node: Node<K, V>): node is EmptyNode<K, V> | LeafNode<K, V> | CollisionNode<K, V>;
31
31
  export declare function canEditNode<K, V>(edit: number, node: Node<K, V>): boolean;
32
- export declare type KeyEq<K> = Eq<K>["equals"];
33
- export declare type UpdateFn<V> = (v: Maybe<V>) => Maybe<V>;
32
+ export type KeyEq<K> = Eq<K>["equals"];
33
+ export type UpdateFn<V> = (v: Maybe<V>) => Maybe<V>;
34
34
  export declare class LeafNode<K, V> {
35
35
  readonly edit: number;
36
36
  readonly hash: number;
@@ -55,7 +55,7 @@ interface SizeRef {
55
55
  value: number;
56
56
  }
57
57
  export declare function canEditNode<A>(edit: number, node: Node<A>): boolean;
58
- export declare type Node<A> = EmptyNode<A> | LeafNode<A> | CollisionNode<A> | IndexedNode<A> | ArrayNode<A>;
58
+ export type Node<A> = EmptyNode<A> | LeafNode<A> | CollisionNode<A> | IndexedNode<A> | ArrayNode<A>;
59
59
  export declare class EmptyNode<A> {
60
60
  readonly _tag = "EmptyNode";
61
61
  modify(remove: boolean, edit: number, eq: (x: A, y: A) => boolean, shift: number, hash: number, value: A, size: SizeRef): this | LeafNode<A>;
@@ -2,7 +2,7 @@ import { HKT } from "@fncts/typelevel/HKT";
2
2
  import { Equatable } from "@fncts/base/typeclass/Equatable";
3
3
  import { Hashable } from "@fncts/base/typeclass/Hashable";
4
4
  export declare const ImmutableArrayTypeId: unique symbol;
5
- export declare type ImmutableArrayTypeId = typeof ImmutableArrayTypeId;
5
+ export type ImmutableArrayTypeId = typeof ImmutableArrayTypeId;
6
6
  export interface ImmutableArrayF extends HKT {
7
7
  type: ImmutableArray<this["A"]>;
8
8
  variance: {
@@ -21,7 +21,7 @@ export declare const _Nil: Nil<never>;
21
21
  /**
22
22
  * @tsplus type fncts.List
23
23
  */
24
- export declare type List<A> = Cons<A> | Nil<A>;
24
+ export type List<A> = Cons<A> | Nil<A>;
25
25
  /**
26
26
  * @tsplus type fncts.ListOps
27
27
  */
@@ -3,7 +3,7 @@ import { Hashable } from "@fncts/base/typeclass/Hashable";
3
3
  import { Equatable } from "@fncts/base/typeclass/Equatable";
4
4
  import { Vector } from "@fncts/base/collection/immutable/Vector";
5
5
  export declare const RoseTreeTypeId: unique symbol;
6
- export declare type RoseTreeTypeId = typeof RoseTreeTypeId;
6
+ export type RoseTreeTypeId = typeof RoseTreeTypeId;
7
7
  export interface RoseTreeF extends HKT {
8
8
  type: RoseTree<this["A"]>;
9
9
  variance: {
@@ -2,7 +2,7 @@ export declare const enum Color {
2
2
  R = 0,
3
3
  B = 1
4
4
  }
5
- export declare type Leaf = null;
5
+ export type Leaf = null;
6
6
  export declare class Node<K, V> {
7
7
  color: Color;
8
8
  left: RBNode<K, V>;
@@ -13,4 +13,4 @@ export declare class Node<K, V> {
13
13
  constructor(color: Color, left: RBNode<K, V>, key: K, value: V, right: RBNode<K, V>, count: number);
14
14
  }
15
15
  export declare const Leaf: null;
16
- export declare type RBNode<K, V> = Node<K, V> | Leaf;
16
+ export type RBNode<K, V> = Node<K, V> | Leaf;
@@ -3,7 +3,7 @@ import { Hashable } from "@fncts/base/typeclass/Hashable";
3
3
  import { Equatable } from "@fncts/base/typeclass/Equatable";
4
4
  import type { Node } from "@fncts/base/collection/immutable/Vector/internal";
5
5
  export declare const VectorTypeId: unique symbol;
6
- export declare type VectorTypeId = typeof VectorTypeId;
6
+ export type VectorTypeId = typeof VectorTypeId;
7
7
  export interface VectorF extends HKT {
8
8
  type: Vector<this["A"]>;
9
9
  variance: {
@@ -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
@@ -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,7 +1,7 @@
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>;
4
+ type Brand_<A, K extends string> = Brand<A, K>;
5
5
  export declare namespace Branded {
6
6
  const Symbol: unique symbol;
7
7
  type Symbol = typeof Symbol;
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>>;
@@ -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: {
@@ -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: {
@@ -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,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
  */
@@ -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;
@@ -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
  */
@@ -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
  */
@@ -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,8 +1,8 @@
1
1
  {
2
2
  "name": "@fncts/base",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "dependencies": {
5
- "@fncts/typelevel": "0.0.13",
5
+ "@fncts/typelevel": "0.0.14",
6
6
  "uuid": "^8.3.2"
7
7
  },
8
8
  "exports": {
@@ -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 {};
@@ -1,4 +1,4 @@
1
- declare type Cache = {
1
+ type Cache = {
2
2
  add: (value: any) => void;
3
3
  has: (value: any) => boolean;
4
4
  };
@@ -11,7 +11,7 @@ declare type Cache = {
11
11
  * @param cache the cache to add to
12
12
  */
13
13
  export declare function addToCache(value: any, cache: Cache): void;
14
- export declare type EqualityComparator = (a: any, b: any, meta?: any) => boolean;
14
+ export type EqualityComparator = (a: any, b: any, meta?: any) => boolean;
15
15
  /**
16
16
  * @function hasPair
17
17
  *
@@ -156,7 +156,7 @@ export declare function areArraysEqual(a: any[], b: any[], isEqual: EqualityComp
156
156
  * @returns are the maps equal
157
157
  */
158
158
  export declare function areMapsEqual(a: Map<any, any>, b: Map<any, any>, isEqual: EqualityComparator, meta: any): boolean;
159
- declare type Dictionary<Type> = {
159
+ type Dictionary<Type> = {
160
160
  [key: string]: Type;
161
161
  [index: number]: Type;
162
162
  };
@@ -197,6 +197,6 @@ export declare function areRegExpsEqual(a: RegExp, b: RegExp): boolean;
197
197
  * @returns are the sets equal
198
198
  */
199
199
  export declare function areSetsEqual(a: Set<any>, b: Set<any>, isEqual: EqualityComparator, meta: any): boolean;
200
- declare type EqualityComparatorCreator = (fn: EqualityComparator) => EqualityComparator;
200
+ type EqualityComparatorCreator = (fn: EqualityComparator) => EqualityComparator;
201
201
  export declare function createComparator(createIsEqual?: EqualityComparatorCreator): (a: any, b: any, meta?: any) => boolean;
202
202
  export {};
@@ -2,7 +2,7 @@ import { Refinement } from "@fncts/base/data/Refinement/definition";
2
2
  export interface GuardF extends Guard<any> {
3
3
  }
4
4
  export declare const GuardTypeId: unique symbol;
5
- export declare type GuardTypeId = typeof GuardTypeId;
5
+ export type GuardTypeId = typeof GuardTypeId;
6
6
  /**
7
7
  * @tsplus type fncts.Guard
8
8
  * @tsplus companion fncts.GuardOps
@@ -1,5 +1,5 @@
1
1
  export declare const HasTypeId: unique symbol;
2
- export declare type HasTypeId = typeof HasTypeId;
2
+ export type HasTypeId = typeof HasTypeId;
3
3
  /**
4
4
  * @tsplus type fncts.Has
5
5
  */
@@ -11,7 +11,7 @@ export interface HashEq<A> extends Hash<A>, Eq<A> {
11
11
  export interface HashEqOps {
12
12
  }
13
13
  export declare const HashEq: HashEqOps;
14
- export declare type HashEqMin<A> = Hash<A> & Eq<A>;
14
+ export type HashEqMin<A> = Hash<A> & Eq<A>;
15
15
  /**
16
16
  * @tsplus static fncts.HashEqOps __call
17
17
  * @tsplus location "@fncts/base/typeclass/HashEq"
@@ -13,7 +13,7 @@ export interface Monoid<A> extends Semigroup<A> {
13
13
  export interface MonoidOps {
14
14
  }
15
15
  export declare const Monoid: MonoidOps;
16
- export declare type MonoidMin<A> = Semigroup<A> & {
16
+ export type MonoidMin<A> = Semigroup<A> & {
17
17
  readonly nat: A;
18
18
  };
19
19
  /**
@@ -1,4 +1,4 @@
1
- export declare type Ordering = -1 | 0 | 1;
1
+ export type Ordering = -1 | 0 | 1;
2
2
  /**
3
3
  * @tsplus static fncts.Ordering LT
4
4
  * @tsplus location "@fncts/base/typeclass/Ordering"
@@ -31,9 +31,9 @@ export interface ShowOptions {
31
31
  }
32
32
  export declare class ShowContext extends CaseClass<ShowContextArgs> {
33
33
  }
34
- export declare type ShowComputationZ<A> = Z<never, ShowContext, ShowContext, never, never, A>;
35
- export declare type ShowComputation = ShowComputationZ<string>;
36
- export declare type ShowComputationChunk = ShowComputationZ<Conc<string>>;
34
+ export type ShowComputationZ<A> = Z<never, ShowContext, ShowContext, never, never, A>;
35
+ export type ShowComputation = ShowComputationZ<string>;
36
+ export type ShowComputationChunk = ShowComputationZ<Conc<string>>;
37
37
  export interface ShowComputationPrimitive {
38
38
  readonly _tag: "Primitive";
39
39
  readonly computation: ShowComputation;
@@ -48,7 +48,7 @@ export interface ShowComputationComplex {
48
48
  braces?: [string, string];
49
49
  }
50
50
  export declare function showComputationComplex(args: Omit<ShowComputationComplex, "_tag">): ShowComputationComplex;
51
- export declare type ShowComputationExternal = ShowComputationPrimitive | ShowComputationComplex;
51
+ export type ShowComputationExternal = ShowComputationPrimitive | ShowComputationComplex;
52
52
  export declare function show(value: unknown): string;
53
53
  export declare function showWithOptions(value: unknown, options: Partial<ShowOptions>): string;
54
54
  export declare function _show(value: unknown): ShowComputation;
@@ -1,8 +1,8 @@
1
- export declare type Style = "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "bold" | "italic" | "underline";
2
- export declare type ShowGroup = "string" | "number" | "boolean" | "bigint" | "special" | "undefined" | "null" | "symbol" | "date" | "regexp" | "module" | "dim";
3
- export declare type ShowStyle = Record<ShowGroup, (s: string) => string>;
1
+ export type Style = "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "bold" | "italic" | "underline";
2
+ export type ShowGroup = "string" | "number" | "boolean" | "bigint" | "special" | "undefined" | "null" | "symbol" | "date" | "regexp" | "module" | "dim";
3
+ export type ShowStyle = Record<ShowGroup, (s: string) => string>;
4
4
  export declare const defaultShowStyle: ShowStyle;
5
- export declare type StyleFunction = (str: string, group: ShowGroup) => string;
6
- export declare type GetStyle = (group: ShowGroup) => string;
5
+ export type StyleFunction = (str: string, group: ShowGroup) => string;
6
+ export type GetStyle = (group: ShowGroup) => string;
7
7
  export declare function stylizeWithColor(str: string, group: ShowGroup): string;
8
8
  export declare function stylizeNoColor(str: string, _: ShowGroup): string;
@@ -1,12 +1,12 @@
1
- export declare type ExtractContravariantPhantom<A, P extends PropertyKey> = [A] extends [{
1
+ export type ExtractContravariantPhantom<A, P extends PropertyKey> = [A] extends [{
2
2
  [K in P]: (_: infer T) => void;
3
3
  }] ? T : never;
4
- export declare type ExtractCovariantPhantom<A, P extends PropertyKey> = [A] extends [{
4
+ export type ExtractCovariantPhantom<A, P extends PropertyKey> = [A] extends [{
5
5
  [K in P]: () => infer T;
6
6
  }] ? T : never;
7
- export declare type _W<A> = ExtractCovariantPhantom<A, "_W">;
8
- export declare type _S1<A> = ExtractContravariantPhantom<A, "_S1">;
9
- export declare type _S2<A> = ExtractCovariantPhantom<A, "_S2">;
10
- export declare type _R<A> = ExtractCovariantPhantom<A, "_R">;
11
- export declare type _E<A> = ExtractCovariantPhantom<A, "_E">;
12
- export declare type _A<A> = ExtractCovariantPhantom<A, "_A">;
7
+ export type _W<A> = ExtractCovariantPhantom<A, "_W">;
8
+ export type _S1<A> = ExtractContravariantPhantom<A, "_S1">;
9
+ export type _S2<A> = ExtractCovariantPhantom<A, "_S2">;
10
+ export type _R<A> = ExtractCovariantPhantom<A, "_R">;
11
+ export type _E<A> = ExtractCovariantPhantom<A, "_E">;
12
+ export type _A<A> = ExtractCovariantPhantom<A, "_A">;
@@ -1,8 +1,8 @@
1
- export declare type Primitive = string | number | boolean | null | symbol;
2
- export declare type Constructor<A> = {
1
+ export type Primitive = string | number | boolean | null | symbol;
2
+ export type Constructor<A> = {
3
3
  new (...args: any[]): A;
4
4
  };
5
- export declare type Nullable<A> = A | null | undefined;
6
- export declare type IsInt<N extends number> = N & (`${N}` extends `${bigint}` ? N : never);
5
+ export type Nullable<A> = A | null | undefined;
6
+ export type IsInt<N extends number> = N & (`${N}` extends `${bigint}` ? N : never);
7
7
  export interface Spreadable extends Record<PropertyKey, any> {
8
8
  }
@@ -1,6 +1,6 @@
1
1
  export declare function isNothing<T>(value: T | null | undefined): boolean;
2
- export declare type PCGRandomState = [number, number, number, number];
3
- export declare type OptionalNumber = number | null | undefined;
2
+ export type PCGRandomState = [number, number, number, number];
3
+ export type OptionalNumber = number | null | undefined;
4
4
  /**
5
5
  * PCG is a family of simple fast space-efficient statistically good algorithms for random number generation. Unlike
6
6
  * many general-purpose RNGs, they are also hard to predict.
@@ -29,7 +29,7 @@ export declare function isPromise(u: unknown): u is Promise<unknown>;
29
29
  export declare function isSet(u: unknown): u is Set<unknown>;
30
30
  export declare function isWeakSet(u: unknown): u is WeakSet<object>;
31
31
  export declare function isDate(u: unknown): u is Date;
32
- export declare type TypedArray = BigInt64Array | BigUint64Array | Float64Array | Float32Array | Int32Array | Int16Array | Int8Array | Uint32Array | Uint16Array | Uint8Array | Uint8ClampedArray;
32
+ export type TypedArray = BigInt64Array | BigUint64Array | Float64Array | Float32Array | Int32Array | Int16Array | Int8Array | Uint32Array | Uint16Array | Uint8Array | Uint8ClampedArray;
33
33
  export declare function isTypedArray(u: unknown): u is TypedArray;
34
34
  export declare function isRegExp(u: unknown): u is RegExp;
35
35
  export declare function isAnyArrayBuffer(u: unknown): u is ArrayBuffer | SharedArrayBuffer;
@@ -4,6 +4,6 @@ import type { RandomGenerator } from "@fncts/base/util/rand/generator/RandomGene
4
4
  * Return the generated value and an offsetted version of the RandomGenerator.
5
5
  * @public
6
6
  */
7
- declare type Distribution<T> = (rng: RandomGenerator) => T;
7
+ type Distribution<T> = (rng: RandomGenerator) => T;
8
8
  export default Distribution;
9
9
  export { Distribution };
@@ -10,7 +10,7 @@
10
10
  * { sign: -1, data: [ 1, 5, 42 ] } // = -1 * (1 * 2**64 + 5 * 2**32 + 42)
11
11
  * ```
12
12
  */
13
- export declare type ArrayInt = {
13
+ export type ArrayInt = {
14
14
  /**
15
15
  * Sign of the represented number
16
16
  */
@@ -41,7 +41,7 @@ export declare function substractArrayIntToNew(arrayIntA: ArrayInt, arrayIntB: A
41
41
  */
42
42
  export declare function trimArrayIntInplace(arrayInt: ArrayInt): ArrayInt;
43
43
  /** @internal */
44
- export declare type ArrayInt64 = Required<ArrayInt> & {
44
+ export type ArrayInt64 = Required<ArrayInt> & {
45
45
  data: [number, number];
46
46
  };
47
47
  /**