@fncts/base 0.0.15 → 0.0.18
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.
- package/_cjs/data/Environment/api.cjs +15 -25
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs +1 -2
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/Patch/api.cjs +3 -3
- package/_cjs/data/Patch/api.cjs.map +1 -1
- package/_cjs/data/Tag/constructors.cjs +5 -2
- package/_cjs/data/Tag/constructors.cjs.map +1 -1
- package/_cjs/data/Tag/definition.cjs +3 -3
- package/_cjs/data/Tag/definition.cjs.map +1 -1
- package/_mjs/data/Environment/api.mjs +12 -21
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs +1 -2
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/Patch/api.mjs +3 -3
- package/_mjs/data/Patch/api.mjs.map +1 -1
- package/_mjs/data/Tag/constructors.mjs +4 -2
- package/_mjs/data/Tag/constructors.mjs.map +1 -1
- package/_mjs/data/Tag/definition.mjs +3 -3
- package/_mjs/data/Tag/definition.mjs.map +1 -1
- package/_src/data/Environment/api.ts +8 -14
- package/_src/data/Environment/definition.ts +1 -2
- package/_src/data/Patch/api.ts +4 -4
- package/_src/data/Tag/constructors.ts +5 -2
- package/_src/data/Tag/definition.ts +3 -2
- 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 +3 -4
- 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/constructors.d.ts +2 -1
- package/data/Tag/definition.d.ts +3 -2
- 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 +3 -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
|
@@ -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,18 +7,17 @@ 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
|
|
14
14
|
*/
|
|
15
15
|
export declare class Environment<R> implements Hashable, Equatable {
|
|
16
|
-
readonly map: HashMap<Tag<any>,
|
|
17
|
-
readonly index: number;
|
|
16
|
+
readonly map: HashMap<Tag<any>, unknown>;
|
|
18
17
|
cache: HashMap<Tag<any>, unknown>;
|
|
19
18
|
readonly _typeId: EnvSymbol;
|
|
20
19
|
readonly [EnvSymbol]: (_: never) => R;
|
|
21
|
-
constructor(map: HashMap<Tag<any>,
|
|
20
|
+
constructor(map: HashMap<Tag<any>, unknown>, cache?: HashMap<Tag<any>, unknown>);
|
|
22
21
|
get [Symbol.hash](): number;
|
|
23
22
|
[Symbol.equals](that: unknown): boolean;
|
|
24
23
|
}
|
|
@@ -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
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tag } from "@fncts/base/data/Tag/definition";
|
|
2
2
|
/**
|
|
3
3
|
* @tsplus static fncts.TagOps __call
|
|
4
|
+
* @fncts tag
|
|
4
5
|
* @tsplus location "@fncts/base/data/Tag/constructors"
|
|
5
6
|
*/
|
|
6
|
-
export declare function makeTag<T>(): Tag<T>;
|
|
7
|
+
export declare function makeTag<T>(id?: string): Tag<T>;
|
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
|
*
|
|
@@ -9,10 +9,11 @@ export declare type TagTypeId = typeof TagTypeId;
|
|
|
9
9
|
* @tsplus companion fncts.TagOps
|
|
10
10
|
*/
|
|
11
11
|
export declare class Tag<in out T> implements Hashable, Equatable {
|
|
12
|
+
readonly id: string;
|
|
12
13
|
_T: (_: T) => T;
|
|
13
14
|
readonly _typeId: TagTypeId;
|
|
14
15
|
private static counter;
|
|
15
|
-
|
|
16
|
+
constructor(id: string);
|
|
16
17
|
get [Symbol.hash](): number;
|
|
17
18
|
[Symbol.equals](that: unknown): boolean;
|
|
18
19
|
}
|
|
@@ -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