@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.
- package/collection/compat/Array/definition.d.ts +2 -2
- package/collection/immutable/Conc/definition.d.ts +1 -1
- package/collection/immutable/HashMap/definition.d.ts +1 -1
- package/collection/immutable/HashMap/internal.d.ts +3 -3
- package/collection/immutable/HashSet/definition.d.ts +1 -1
- package/collection/immutable/ImmutableArray/definition.d.ts +1 -1
- package/collection/immutable/List/definition.d.ts +1 -1
- package/collection/immutable/RoseTree/definition.d.ts +1 -1
- package/collection/immutable/SortedMap/node.d.ts +2 -2
- package/collection/immutable/Vector/definition.d.ts +1 -1
- package/collection/immutable/Vector/internal.d.ts +2 -2
- package/control/Eval/definition.d.ts +2 -2
- package/control/Z/definition.d.ts +3 -3
- package/data/Branded/definition.d.ts +1 -1
- package/data/Byte.d.ts +1 -1
- package/data/CaseClass.d.ts +1 -1
- package/data/Cause/definition.d.ts +2 -2
- package/data/Datum/definition.d.ts +2 -2
- package/data/DatumEither/definition.d.ts +1 -1
- package/data/DecodeError/definition.d.ts +1 -1
- package/data/Decoder/definition.d.ts +1 -1
- package/data/Duration/definition.d.ts +1 -1
- package/data/Either/definition.d.ts +1 -1
- package/data/EitherT/definition.d.ts +1 -1
- package/data/Environment/api.d.ts +1 -1
- package/data/Environment/definition.d.ts +1 -1
- package/data/ExecutionStrategy.d.ts +1 -1
- package/data/Exit/definition.d.ts +2 -2
- package/data/FiberId/definition.d.ts +3 -3
- package/data/Maybe/definition.d.ts +1 -1
- package/data/Patch/definition.d.ts +2 -2
- package/data/Struct/api.d.ts +5 -5
- package/data/Tag/definition.d.ts +1 -1
- package/data/These/definition.d.ts +2 -2
- package/data/TraceElement/definition.d.ts +1 -1
- package/data/Zipped.d.ts +2 -2
- package/data/exceptions/InterruptedException.d.ts +1 -1
- package/json/EitherJson.d.ts +1 -1
- package/json/MaybeJson.d.ts +1 -1
- package/json/TheseJson.d.ts +1 -1
- package/optics/At/definition.d.ts +1 -1
- package/optics/Index/definition.d.ts +1 -1
- package/package.json +2 -2
- package/typeclass/Applicative.d.ts +1 -1
- package/typeclass/Apply.d.ts +2 -2
- package/typeclass/Equatable/fast-equals.d.ts +4 -4
- package/typeclass/Guard/definition.d.ts +1 -1
- package/typeclass/Has.d.ts +1 -1
- package/typeclass/HashEq.d.ts +1 -1
- package/typeclass/Monoid.d.ts +1 -1
- package/typeclass/Ordering.d.ts +1 -1
- package/typeclass/Showable/show.d.ts +4 -4
- package/typeclass/Showable/styles.d.ts +5 -5
- package/types/extractions.d.ts +8 -8
- package/types/utility.d.ts +4 -4
- package/util/PCGRandom.d.ts +2 -2
- package/util/predicates.d.ts +1 -1
- package/util/rand/distribution/Distribution.d.ts +1 -1
- 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
|
19
|
-
export
|
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
|
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
|
-
|
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
|
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
|
33
|
-
export
|
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
|
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
|
5
|
+
export type ImmutableArrayTypeId = typeof ImmutableArrayTypeId;
|
6
6
|
export interface ImmutableArrayF extends HKT {
|
7
7
|
type: ImmutableArray<this["A"]>;
|
8
8
|
variance: {
|
@@ -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
|
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
|
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
|
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
|
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
|
-
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
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
|
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
|
-
|
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
|
1
|
+
export type Byte = number;
|
package/data/CaseClass.d.ts
CHANGED
@@ -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
|
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
|
8
|
+
export type CauseTypeId = typeof CauseTypeId;
|
9
9
|
/**
|
10
10
|
* @tsplus type fncts.Cause
|
11
11
|
*/
|
12
|
-
export
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
-
|
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
|
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
|
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
|
5
|
+
export type ExitTypeId = typeof ExitTypeId;
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.Exit
|
8
8
|
*/
|
9
|
-
export
|
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
|
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
|
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
|
-
|
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
|
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
|
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
|
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
|
*/
|
package/data/Struct/api.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { Union } from "@fncts/typelevel";
|
2
2
|
import { Struct } from "./definition.js";
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
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
|
/**
|
package/data/Tag/definition.d.ts
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
3
|
-
export
|
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
|
2
|
+
export type InterruptedExceptionTypeId = typeof InterruptedExceptionTypeId;
|
3
3
|
export declare class InterruptedException {
|
4
4
|
readonly message?: string | undefined;
|
5
5
|
readonly _typeId: InterruptedExceptionTypeId;
|
package/json/EitherJson.d.ts
CHANGED
@@ -10,7 +10,7 @@ export interface LeftJson<E> {
|
|
10
10
|
/**
|
11
11
|
* @tsplus type fncts.EitherJson
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export type EitherJson<E, A> = LeftJson<E> | RightJson<A>;
|
14
14
|
/**
|
15
15
|
* @tsplus type fncts.EitherJsonOps
|
16
16
|
*/
|
package/json/MaybeJson.d.ts
CHANGED
package/json/TheseJson.d.ts
CHANGED
@@ -12,7 +12,7 @@ export interface BothJson<E, A> {
|
|
12
12
|
readonly left: E;
|
13
13
|
readonly right: A;
|
14
14
|
}
|
15
|
-
export
|
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
|
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
|
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
@@ -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
|
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]);
|
package/typeclass/Apply.d.ts
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
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
|
5
|
+
export type GuardTypeId = typeof GuardTypeId;
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.Guard
|
8
8
|
* @tsplus companion fncts.GuardOps
|
package/typeclass/Has.d.ts
CHANGED
package/typeclass/HashEq.d.ts
CHANGED
@@ -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
|
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"
|
package/typeclass/Monoid.d.ts
CHANGED
@@ -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
|
16
|
+
export type MonoidMin<A> = Semigroup<A> & {
|
17
17
|
readonly nat: A;
|
18
18
|
};
|
19
19
|
/**
|
package/typeclass/Ordering.d.ts
CHANGED
@@ -31,9 +31,9 @@ export interface ShowOptions {
|
|
31
31
|
}
|
32
32
|
export declare class ShowContext extends CaseClass<ShowContextArgs> {
|
33
33
|
}
|
34
|
-
export
|
35
|
-
export
|
36
|
-
export
|
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
|
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
|
2
|
-
export
|
3
|
-
export
|
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
|
6
|
-
export
|
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;
|
package/types/extractions.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
export
|
1
|
+
export type ExtractContravariantPhantom<A, P extends PropertyKey> = [A] extends [{
|
2
2
|
[K in P]: (_: infer T) => void;
|
3
3
|
}] ? T : never;
|
4
|
-
export
|
4
|
+
export type ExtractCovariantPhantom<A, P extends PropertyKey> = [A] extends [{
|
5
5
|
[K in P]: () => infer T;
|
6
6
|
}] ? T : never;
|
7
|
-
export
|
8
|
-
export
|
9
|
-
export
|
10
|
-
export
|
11
|
-
export
|
12
|
-
export
|
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">;
|
package/types/utility.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export
|
2
|
-
export
|
1
|
+
export type Primitive = string | number | boolean | null | symbol;
|
2
|
+
export type Constructor<A> = {
|
3
3
|
new (...args: any[]): A;
|
4
4
|
};
|
5
|
-
export
|
6
|
-
export
|
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
|
}
|
package/util/PCGRandom.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare function isNothing<T>(value: T | null | undefined): boolean;
|
2
|
-
export
|
3
|
-
export
|
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.
|
package/util/predicates.d.ts
CHANGED
@@ -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
|
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
|
-
|
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
|
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
|
44
|
+
export type ArrayInt64 = Required<ArrayInt> & {
|
45
45
|
data: [number, number];
|
46
46
|
};
|
47
47
|
/**
|