@fncts/base 0.0.22 → 0.0.23
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/collection/immutable/Conc/definition.cjs +6 -5
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +9 -6
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/definition.cjs +9 -6
- package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +7 -4
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/definition.cjs +7 -4
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/definition.cjs +3 -2
- package/_cjs/collection/immutable/SortedMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +7 -4
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +11 -5
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +16 -9
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/data/CaseClass.cjs +1 -1
- package/_cjs/data/CaseClass.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +26 -1
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Cause/definition.cjs +3 -1
- package/_cjs/data/Cause/definition.cjs.map +1 -1
- package/_cjs/data/Datum/definition.cjs +10 -9
- package/_cjs/data/Datum/definition.cjs.map +1 -1
- package/_cjs/data/DatumEither/definition.cjs.map +1 -1
- package/_cjs/data/DatumEither.cjs +28 -0
- package/_cjs/data/DatumEither.cjs.map +1 -0
- package/_cjs/data/DecodeError/definition.cjs +3 -1
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/Decoder/definition.cjs +4 -2
- package/_cjs/data/Decoder/definition.cjs.map +1 -1
- package/_cjs/data/Duration/definition.cjs +5 -4
- package/_cjs/data/Duration/definition.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +6 -6
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +7 -3
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Encoder/definition.cjs +3 -1
- package/_cjs/data/Encoder/definition.cjs.map +1 -1
- package/_cjs/data/Environment/api.cjs +5 -15
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs +9 -10
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/EnvironmentPatch.cjs +6 -2
- package/_cjs/data/EnvironmentPatch.cjs.map +1 -1
- package/_cjs/data/Exit/definition.cjs +12 -9
- package/_cjs/data/Exit/definition.cjs.map +1 -1
- package/_cjs/data/FiberId/definition.cjs +9 -8
- package/_cjs/data/FiberId/definition.cjs.map +1 -1
- package/_cjs/data/Guard/definition.cjs +7 -3
- package/_cjs/data/Guard/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +8 -4
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Tag/definition.cjs +7 -4
- package/_cjs/data/Tag/definition.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +10 -6
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/exceptions/InterruptedException.cjs +7 -3
- package/_cjs/data/exceptions/InterruptedException.cjs.map +1 -1
- package/_cjs/util/predicates.cjs +1 -1
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +6 -5
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +6 -4
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/definition.mjs +6 -4
- package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +5 -3
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/definition.mjs +5 -3
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/definition.mjs +3 -2
- package/_mjs/collection/immutable/SortedMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +5 -3
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +9 -3
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +11 -7
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/data/CaseClass.mjs +1 -1
- package/_mjs/data/CaseClass.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +22 -0
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Cause/definition.mjs +1 -0
- package/_mjs/data/Cause/definition.mjs.map +1 -1
- package/_mjs/data/Datum/definition.mjs +10 -9
- package/_mjs/data/Datum/definition.mjs.map +1 -1
- package/_mjs/data/DatumEither/definition.mjs.map +1 -1
- package/_mjs/data/DatumEither.mjs +4 -0
- package/_mjs/data/DatumEither.mjs.map +1 -0
- package/_mjs/data/DecodeError/definition.mjs +3 -1
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/Decoder/definition.mjs +3 -1
- package/_mjs/data/Decoder/definition.mjs.map +1 -1
- package/_mjs/data/Duration/definition.mjs +5 -4
- package/_mjs/data/Duration/definition.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +6 -6
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +4 -1
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Encoder/definition.mjs +3 -1
- package/_mjs/data/Encoder/definition.mjs.map +1 -1
- package/_mjs/data/Environment/api.mjs +4 -12
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs +6 -8
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/EnvironmentPatch.mjs +4 -1
- package/_mjs/data/EnvironmentPatch.mjs.map +1 -1
- package/_mjs/data/Exit/definition.mjs +10 -8
- package/_mjs/data/Exit/definition.mjs.map +1 -1
- package/_mjs/data/FiberId/definition.mjs +9 -8
- package/_mjs/data/FiberId/definition.mjs.map +1 -1
- package/_mjs/data/Guard/definition.mjs +4 -1
- package/_mjs/data/Guard/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +5 -2
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Tag/definition.mjs +5 -3
- package/_mjs/data/Tag/definition.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +10 -4
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/exceptions/InterruptedException.mjs +5 -3
- package/_mjs/data/exceptions/InterruptedException.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +1 -1
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_src/collection/immutable/Conc/definition.ts +3 -3
- package/_src/collection/immutable/HashMap/definition.ts +12 -7
- package/_src/collection/immutable/HashSet/definition.ts +11 -5
- package/_src/collection/immutable/ImmutableArray/definition.ts +8 -3
- package/_src/collection/immutable/RoseTree/definition.ts +8 -3
- package/_src/collection/immutable/SortedMap/definition.ts +1 -1
- package/_src/collection/immutable/Vector/definition.ts +12 -5
- package/_src/control/Eval/definition.ts +22 -10
- package/_src/control/Z/definition.ts +17 -14
- package/_src/data/CaseClass.ts +1 -1
- package/_src/data/Cause/api.ts +24 -0
- package/_src/data/Cause/definition.ts +25 -15
- package/_src/data/Datum/definition.ts +8 -7
- package/_src/data/DatumEither/definition.ts +0 -1
- package/_src/data/DatumEither.ts +4 -0
- package/_src/data/DecodeError/definition.ts +1 -1
- package/_src/data/Decoder/definition.ts +1 -1
- package/_src/data/Duration/definition.ts +2 -4
- package/_src/data/Either/api.ts +1 -3
- package/_src/data/Either/definition.ts +8 -3
- package/_src/data/Encoder/definition.ts +1 -1
- package/_src/data/Environment/api.ts +0 -11
- package/_src/data/Environment/definition.ts +9 -8
- package/_src/data/EnvironmentPatch.ts +8 -3
- package/_src/data/Exit/definition.ts +16 -12
- package/_src/data/FiberId/definition.ts +7 -9
- package/_src/data/Guard/definition.ts +7 -2
- package/_src/data/Maybe/definition.ts +11 -18
- package/_src/data/Tag/definition.ts +7 -4
- package/_src/data/These/definition.ts +7 -7
- package/_src/data/exceptions/InterruptedException.ts +2 -4
- package/_src/data.ts +1 -0
- package/_src/util/predicates.ts +2 -2
- package/collection/immutable/Conc/definition.d.ts +2 -2
- package/collection/immutable/HashMap/definition.d.ts +10 -6
- package/collection/immutable/HashSet/definition.d.ts +9 -4
- package/collection/immutable/ImmutableArray/definition.d.ts +6 -2
- package/collection/immutable/RoseTree/definition.d.ts +6 -2
- package/collection/immutable/SortedMap/definition.d.ts +1 -1
- package/collection/immutable/Vector/definition.d.ts +10 -4
- package/control/Eval/definition.d.ts +18 -7
- package/control/Z/definition.d.ts +12 -8
- package/data/Cause/api.d.ts +12 -0
- package/data/Cause/definition.d.ts +23 -7
- package/data/Datum/definition.d.ts +4 -3
- package/data/DatumEither/definition.d.ts +0 -1
- package/data/DatumEither.d.ts +2 -0
- 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 +7 -3
- package/data/EitherT/api.d.ts +2 -2
- package/data/Encoder/definition.d.ts +1 -1
- package/data/Environment/api.d.ts +0 -5
- package/data/Environment/definition.d.ts +8 -8
- package/data/EnvironmentPatch.d.ts +7 -3
- package/data/Exit/definition.d.ts +12 -6
- package/data/FiberId/definition.d.ts +3 -3
- package/data/Guard/definition.d.ts +6 -2
- package/data/Maybe/definition.d.ts +13 -11
- package/data/Tag/definition.d.ts +6 -2
- package/data/These/definition.d.ts +3 -3
- package/data/exceptions/InterruptedException.d.ts +1 -1
- package/data.d.ts +1 -0
- package/package.json +1 -1
- package/util/predicates.d.ts +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
|
2
|
+
export declare const EvalVariance: unique symbol;
|
|
3
|
+
export type EvalVariance = typeof EvalVariance;
|
|
2
4
|
export declare const EvalTypeId: unique symbol;
|
|
3
5
|
export type EvalTypeId = typeof EvalTypeId;
|
|
4
6
|
export interface EvalF extends HKT {
|
|
@@ -11,8 +13,10 @@ export interface EvalF extends HKT {
|
|
|
11
13
|
* @tsplus type fncts.control.Eval
|
|
12
14
|
*/
|
|
13
15
|
export interface Eval<A> {
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
+
readonly [EvalTypeId]: EvalTypeId;
|
|
17
|
+
readonly [EvalVariance]: {
|
|
18
|
+
readonly _A: (_: never) => A;
|
|
19
|
+
};
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* @tsplus type fncts.control.EvalOps
|
|
@@ -28,13 +32,18 @@ export declare const enum EvalTag {
|
|
|
28
32
|
export declare class Value<A> implements Eval<A> {
|
|
29
33
|
readonly value: A;
|
|
30
34
|
readonly _tag = EvalTag.Value;
|
|
31
|
-
readonly
|
|
32
|
-
|
|
35
|
+
readonly [EvalTypeId]: EvalTypeId;
|
|
36
|
+
[EvalVariance]: {
|
|
37
|
+
readonly _A: (_: never) => A;
|
|
38
|
+
};
|
|
33
39
|
constructor(value: A);
|
|
34
40
|
}
|
|
35
41
|
export declare class Defer<A> implements Eval<A> {
|
|
36
42
|
readonly make: () => Eval<A>;
|
|
37
|
-
readonly
|
|
43
|
+
readonly [EvalTypeId]: EvalTypeId;
|
|
44
|
+
[EvalVariance]: {
|
|
45
|
+
readonly _A: (_: never) => A;
|
|
46
|
+
};
|
|
38
47
|
readonly _tag = EvalTag.Defer;
|
|
39
48
|
readonly _A: () => A;
|
|
40
49
|
constructor(make: () => Eval<A>);
|
|
@@ -42,9 +51,11 @@ export declare class Defer<A> implements Eval<A> {
|
|
|
42
51
|
export declare class Chain<A, B> implements Eval<B> {
|
|
43
52
|
readonly self: Eval<A>;
|
|
44
53
|
readonly f: (a: A) => Eval<B>;
|
|
45
|
-
readonly
|
|
54
|
+
readonly [EvalTypeId]: EvalTypeId;
|
|
55
|
+
[EvalVariance]: {
|
|
56
|
+
readonly _A: (_: never) => B;
|
|
57
|
+
};
|
|
46
58
|
readonly _tag = EvalTag.Chain;
|
|
47
|
-
readonly _A: () => B;
|
|
48
59
|
constructor(self: Eval<A>, f: (a: A) => Eval<B>);
|
|
49
60
|
}
|
|
50
61
|
type Concrete = Value<any> | Defer<any> | Chain<any, any>;
|
|
@@ -12,6 +12,8 @@ export interface ZF extends HKT {
|
|
|
12
12
|
A: "+";
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
export declare const ZVariance: unique symbol;
|
|
16
|
+
export type ZVariance = typeof ZVariance;
|
|
15
17
|
export declare const ZTypeId: unique symbol;
|
|
16
18
|
export type ZTypeId = typeof ZTypeId;
|
|
17
19
|
/**
|
|
@@ -28,13 +30,15 @@ export type ZTypeId = typeof ZTypeId;
|
|
|
28
30
|
* @tsplus companion fncts.control.ZOps
|
|
29
31
|
*/
|
|
30
32
|
export declare abstract class Z<W, S1, S2, R, E, A> {
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
readonly [ZTypeId]: ZTypeId;
|
|
34
|
+
[ZVariance]: {
|
|
35
|
+
readonly _W: (_: never) => W;
|
|
36
|
+
readonly _S1: (_: S1) => void;
|
|
37
|
+
readonly _S2: (_: never) => S2;
|
|
38
|
+
readonly _R: (_: never) => R;
|
|
39
|
+
readonly _E: (_: never) => E;
|
|
40
|
+
readonly _A: (_: never) => A;
|
|
41
|
+
};
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* @tsplus unify fncts.control.Z
|
|
@@ -141,7 +145,7 @@ export declare const ZErrorTypeId: unique symbol;
|
|
|
141
145
|
export type ZErrorTypeId = typeof ZErrorTypeId;
|
|
142
146
|
export declare class ZError<E> {
|
|
143
147
|
readonly cause: Cause<E>;
|
|
144
|
-
readonly
|
|
148
|
+
readonly [ZErrorTypeId]: ZErrorTypeId;
|
|
145
149
|
constructor(cause: Cause<E>);
|
|
146
150
|
}
|
|
147
151
|
export declare function isZError(u: unknown): u is ZError<unknown>;
|
package/data/Cause/api.d.ts
CHANGED
|
@@ -194,6 +194,18 @@ export declare function isInterrupt<E>(self: Cause<E>): self is Interrupt;
|
|
|
194
194
|
* @tsplus location "@fncts/base/data/Cause/api"
|
|
195
195
|
*/
|
|
196
196
|
export declare function isInterrupted<E>(self: Cause<E>): boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Determines if the `Cause` contains only interruptions and not any `Die` or
|
|
199
|
+
* `Fail` causes.
|
|
200
|
+
* @tsplus getter fncts.Cause isInterruptedOnly
|
|
201
|
+
* @tsplus location "@fncts/base/data/Cause/api"
|
|
202
|
+
*/
|
|
203
|
+
export declare function isInterruptedOnly<E>(self: Cause<E>): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* @tsplus getter fncts.Cause isFailure
|
|
206
|
+
* @tsplus location "@fncts/base/data/Cause/api"
|
|
207
|
+
*/
|
|
208
|
+
export declare function isFailure<E>(self: Cause<E>): boolean;
|
|
197
209
|
/**
|
|
198
210
|
* A type-guard matching `Traced`
|
|
199
211
|
* @tsplus getter fncts.Cause isTraced
|
|
@@ -4,6 +4,8 @@ import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
|
4
4
|
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
|
+
export declare const CauseVariance: unique symbol;
|
|
8
|
+
export type CauseVariance = typeof CauseVariance;
|
|
7
9
|
export declare const CauseTypeId: unique symbol;
|
|
8
10
|
export type CauseTypeId = typeof CauseTypeId;
|
|
9
11
|
/**
|
|
@@ -30,8 +32,10 @@ export declare const enum CauseTag {
|
|
|
30
32
|
* @tsplus companion fncts.Cause.EmptyOps
|
|
31
33
|
*/
|
|
32
34
|
export declare class Empty {
|
|
33
|
-
readonly _E: () => never;
|
|
34
35
|
readonly [CauseTypeId]: CauseTypeId;
|
|
36
|
+
[CauseVariance]: {
|
|
37
|
+
readonly _E: (_: never) => never;
|
|
38
|
+
};
|
|
35
39
|
readonly _tag = CauseTag.Empty;
|
|
36
40
|
get [Symbol.hash](): number;
|
|
37
41
|
[Symbol.equals](that: unknown): boolean;
|
|
@@ -44,8 +48,10 @@ export declare const _Empty: Empty;
|
|
|
44
48
|
export declare class Fail<E> {
|
|
45
49
|
readonly value: E;
|
|
46
50
|
readonly trace: Trace;
|
|
47
|
-
readonly _E: () => E;
|
|
48
51
|
readonly [CauseTypeId]: CauseTypeId;
|
|
52
|
+
[CauseVariance]: {
|
|
53
|
+
readonly _E: (_: never) => E;
|
|
54
|
+
};
|
|
49
55
|
readonly _tag = CauseTag.Fail;
|
|
50
56
|
constructor(value: E, trace: Trace);
|
|
51
57
|
get [Symbol.hash](): number;
|
|
@@ -58,8 +64,10 @@ export declare class Fail<E> {
|
|
|
58
64
|
export declare class Halt {
|
|
59
65
|
readonly value: unknown;
|
|
60
66
|
readonly trace: Trace;
|
|
61
|
-
readonly _E: () => never;
|
|
62
67
|
readonly [CauseTypeId]: CauseTypeId;
|
|
68
|
+
[CauseVariance]: {
|
|
69
|
+
readonly _E: (_: never) => never;
|
|
70
|
+
};
|
|
63
71
|
readonly _tag = CauseTag.Halt;
|
|
64
72
|
constructor(value: unknown, trace: Trace);
|
|
65
73
|
get [Symbol.hash](): number;
|
|
@@ -72,8 +80,10 @@ export declare class Halt {
|
|
|
72
80
|
export declare class Interrupt {
|
|
73
81
|
readonly id: FiberId;
|
|
74
82
|
readonly trace: Trace;
|
|
75
|
-
readonly _E: () => never;
|
|
76
83
|
readonly [CauseTypeId]: CauseTypeId;
|
|
84
|
+
[CauseVariance]: {
|
|
85
|
+
readonly _E: (_: never) => never;
|
|
86
|
+
};
|
|
77
87
|
readonly _tag = CauseTag.Interrupt;
|
|
78
88
|
constructor(id: FiberId, trace: Trace);
|
|
79
89
|
get [Symbol.hash](): number;
|
|
@@ -86,8 +96,10 @@ export declare class Interrupt {
|
|
|
86
96
|
export declare class Then<E> {
|
|
87
97
|
readonly left: Cause<E>;
|
|
88
98
|
readonly right: Cause<E>;
|
|
89
|
-
readonly _E: () => E;
|
|
90
99
|
readonly [CauseTypeId]: CauseTypeId;
|
|
100
|
+
[CauseVariance]: {
|
|
101
|
+
readonly _E: (_: never) => E;
|
|
102
|
+
};
|
|
91
103
|
readonly _tag = CauseTag.Then;
|
|
92
104
|
constructor(left: Cause<E>, right: Cause<E>);
|
|
93
105
|
get [Symbol.hash](): number;
|
|
@@ -100,8 +112,10 @@ export declare class Then<E> {
|
|
|
100
112
|
export declare class Both<E> {
|
|
101
113
|
readonly left: Cause<E>;
|
|
102
114
|
readonly right: Cause<E>;
|
|
103
|
-
readonly _E: () => E;
|
|
104
115
|
readonly [CauseTypeId]: CauseTypeId;
|
|
116
|
+
[CauseVariance]: {
|
|
117
|
+
readonly _E: (_: never) => E;
|
|
118
|
+
};
|
|
105
119
|
readonly _tag = CauseTag.Both;
|
|
106
120
|
constructor(left: Cause<E>, right: Cause<E>);
|
|
107
121
|
get [Symbol.hash](): number;
|
|
@@ -114,8 +128,10 @@ export declare class Both<E> {
|
|
|
114
128
|
export declare class Stackless<E> {
|
|
115
129
|
readonly cause: Cause<E>;
|
|
116
130
|
readonly stackless: boolean;
|
|
117
|
-
readonly _E: () => E;
|
|
118
131
|
readonly [CauseTypeId]: CauseTypeId;
|
|
132
|
+
[CauseVariance]: {
|
|
133
|
+
readonly _E: (_: never) => E;
|
|
134
|
+
};
|
|
119
135
|
readonly _tag = CauseTag.Stackless;
|
|
120
136
|
constructor(cause: Cause<E>, stackless: boolean);
|
|
121
137
|
get [Symbol.hash](): number;
|
|
@@ -31,6 +31,7 @@ export declare const Datum: DatumOps;
|
|
|
31
31
|
*/
|
|
32
32
|
export declare class Initial implements Hashable, Equatable {
|
|
33
33
|
readonly _tag = DatumTag.Initial;
|
|
34
|
+
readonly [DatumTypeId]: DatumTypeId;
|
|
34
35
|
get [Symbol.hash](): number;
|
|
35
36
|
[Symbol.equals](that: unknown): boolean;
|
|
36
37
|
}
|
|
@@ -39,7 +40,7 @@ export declare class Initial implements Hashable, Equatable {
|
|
|
39
40
|
* @tsplus companion fncts.Datum.PendingOps
|
|
40
41
|
*/
|
|
41
42
|
export declare class Pending implements Hashable, Equatable {
|
|
42
|
-
readonly
|
|
43
|
+
readonly [DatumTypeId]: DatumTypeId;
|
|
43
44
|
readonly _tag = DatumTag.Pending;
|
|
44
45
|
get [Symbol.hash](): number;
|
|
45
46
|
[Symbol.equals](that: unknown): boolean;
|
|
@@ -50,7 +51,7 @@ export declare class Pending implements Hashable, Equatable {
|
|
|
50
51
|
*/
|
|
51
52
|
export declare class Refresh<A> implements Hashable, Equatable {
|
|
52
53
|
readonly value: A;
|
|
53
|
-
readonly
|
|
54
|
+
readonly [DatumTypeId]: DatumTypeId;
|
|
54
55
|
readonly _tag = DatumTag.Refresh;
|
|
55
56
|
constructor(value: A);
|
|
56
57
|
get [Symbol.hash](): number;
|
|
@@ -62,7 +63,7 @@ export declare class Refresh<A> implements Hashable, Equatable {
|
|
|
62
63
|
*/
|
|
63
64
|
export declare class Replete<A> implements Hashable, Equatable {
|
|
64
65
|
readonly value: A;
|
|
65
|
-
readonly
|
|
66
|
+
readonly [DatumTypeId]: DatumTypeId;
|
|
66
67
|
readonly _tag = DatumTag.Replete;
|
|
67
68
|
constructor(value: A);
|
|
68
69
|
get [Symbol.hash](): number;
|
|
@@ -5,7 +5,7 @@ import type { Literal } from "@fncts/typelevel/Any";
|
|
|
5
5
|
export declare const DecodeErrorTypeId: unique symbol;
|
|
6
6
|
export type DecodeErrorTypeId = typeof DecodeErrorTypeId;
|
|
7
7
|
export declare abstract class DecodeError {
|
|
8
|
-
readonly
|
|
8
|
+
readonly [DecodeErrorTypeId]: DecodeErrorTypeId;
|
|
9
9
|
abstract render: Eval<RoseTree<string>>;
|
|
10
10
|
}
|
|
11
11
|
export declare class RequiredKeyError extends DecodeError {
|
|
@@ -17,7 +17,7 @@ export interface DecoderF extends HKT {
|
|
|
17
17
|
export declare class Decoder<in out A> {
|
|
18
18
|
readonly decode: (input: unknown) => These<DecodeError, A>;
|
|
19
19
|
readonly label: string;
|
|
20
|
-
readonly
|
|
20
|
+
readonly [DecoderTypeId]: DecoderTypeId;
|
|
21
21
|
constructor(decode: (input: unknown) => These<DecodeError, A>, label: string);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -8,7 +8,7 @@ export type DurationTypeId = typeof DurationTypeId;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class Duration implements Equatable, Hashable {
|
|
10
10
|
readonly milliseconds: number;
|
|
11
|
-
readonly
|
|
11
|
+
readonly [DurationTypeId]: DurationTypeId;
|
|
12
12
|
constructor(milliseconds: number);
|
|
13
13
|
[Symbol.equals](that: unknown): boolean;
|
|
14
14
|
get [Symbol.hash](): number;
|
|
@@ -3,6 +3,8 @@ export declare const enum EitherTag {
|
|
|
3
3
|
Left = "Left",
|
|
4
4
|
Right = "Right"
|
|
5
5
|
}
|
|
6
|
+
export declare const EitherVariance: unique symbol;
|
|
7
|
+
export type EitherVariance = typeof EitherVariance;
|
|
6
8
|
export declare const EitherTypeId: unique symbol;
|
|
7
9
|
export type EitherTypeId = typeof EitherTypeId;
|
|
8
10
|
export interface EitherF extends HKT {
|
|
@@ -17,9 +19,11 @@ export interface EitherF extends HKT {
|
|
|
17
19
|
* @tsplus companion fncts.EitherOps
|
|
18
20
|
*/
|
|
19
21
|
export declare class Either<E, A> {
|
|
20
|
-
readonly
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
readonly [EitherTypeId]: EitherTypeId;
|
|
23
|
+
[EitherVariance]: {
|
|
24
|
+
readonly _E: (_: never) => E;
|
|
25
|
+
readonly _A: (_: never) => A;
|
|
26
|
+
};
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* @tsplus type fncts.Either.Left
|
package/data/EitherT/api.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare function leftF<F extends HKT, FC>(F: P.Functor<F, FC>): <K, Q, W,
|
|
|
32
32
|
* @tsplus static fncts.EitherTOps map
|
|
33
33
|
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
34
34
|
*/
|
|
35
|
-
export declare function map<F extends HKT, FC>(F: P.Functor<F, FC>): <A, B>(f: (a: A) => B) => <K, Q, W, X, I, S, R, FE, E>(self:
|
|
35
|
+
export declare function map<F extends HKT, FC>(F: P.Functor<F, FC>): <A, B>(f: (a: A) => B) => <K, Q, W, X, I, S, R, FE, E>(self: EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, B>;
|
|
36
36
|
/**
|
|
37
37
|
* @tsplus static fncts.EitherTOps mapLeft
|
|
38
38
|
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
@@ -47,7 +47,7 @@ export declare function bimap<F extends HKT, FC = HKT.None>(F: P.Functor<F, FC>)
|
|
|
47
47
|
* @tsplus static fncts.EitherTOps flatMap
|
|
48
48
|
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
49
49
|
*/
|
|
50
|
-
export declare function flatMap<F extends HKT, FC>(F: P.Monad<F, FC>): <K, Q, W, X, I, S, R, FE, A, K1, Q1, W1, X1, I1, S1, R1, FE1, E1, B>(f: (a: A) => import("@fncts/typelevel/HKT.js").HKT.Kind<F, FC, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "K", K, K1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "Q", Q, Q1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "W", W, W1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "X", X, X1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "I", I, I1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "S", S, S1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "R", R, R1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "E", FE, FE1>, import("../Either.js").Either<E1, B>>) => <E>(self:
|
|
50
|
+
export declare function flatMap<F extends HKT, FC>(F: P.Monad<F, FC>): <K, Q, W, X, I, S, R, FE, A, K1, Q1, W1, X1, I1, S1, R1, FE1, E1, B>(f: (a: A) => import("@fncts/typelevel/HKT.js").HKT.Kind<F, FC, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "K", K, K1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "Q", Q, Q1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "W", W, W1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "X", X, X1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "I", I, I1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "S", S, S1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "R", R, R1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "E", FE, FE1>, import("../Either.js").Either<E1, B>>) => <E>(self: EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>) => EitherT<F, FC, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "K", [K, K1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "Q", [Q, Q1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "W", [W, W1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "X", [X, X1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "I", [I, I1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "S", [S, S1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "R", [R, R1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "E", [FE, FE1]>, E1 | E, B>;
|
|
51
51
|
/**
|
|
52
52
|
* @tsplus static fncts.EitherTOps zipWith
|
|
53
53
|
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
@@ -8,7 +8,7 @@ export type EncoderTypeId = typeof EncoderTypeId;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class Encoder<in out A> {
|
|
10
10
|
readonly encode: (inp: A) => unknown;
|
|
11
|
-
readonly
|
|
11
|
+
readonly [EncoderTypeId]: EncoderTypeId;
|
|
12
12
|
constructor(encode: (inp: A) => unknown);
|
|
13
13
|
}
|
|
14
14
|
export interface EncoderF extends HKT {
|
|
@@ -34,11 +34,6 @@ export declare function make(): Environment<never>;
|
|
|
34
34
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
35
35
|
*/
|
|
36
36
|
export declare function union<R1>(that: Environment<R1>): <R>(self: import("./definition").Environment<R>) => import("./definition").Environment<R & R1>;
|
|
37
|
-
/**
|
|
38
|
-
* @tsplus getter fncts.Environment clean
|
|
39
|
-
* @tsplus location "@fncts/base/data/Environment/api"
|
|
40
|
-
*/
|
|
41
|
-
export declare function clean<R>(self: Environment<R>): Environment<R>;
|
|
42
37
|
/**
|
|
43
38
|
* @tsplus pipeable fncts.Environment unsafeGet
|
|
44
39
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
@@ -3,12 +3,10 @@ import { Equatable } from "@fncts/base/data/Equatable";
|
|
|
3
3
|
import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
|
|
4
4
|
import { Tag } from "@fncts/base/data/Tag/definition";
|
|
5
5
|
import type { EnvironmentPatch } from "@fncts/base/data/EnvironmentPatch";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const EnvSymbol: unique symbol;
|
|
11
|
-
export type EnvSymbol = typeof EnvSymbol;
|
|
6
|
+
export declare const EnvironmentVariance: unique symbol;
|
|
7
|
+
export type EnvironmentVariance = typeof EnvironmentVariance;
|
|
8
|
+
export declare const EnvironmentTypeId: unique symbol;
|
|
9
|
+
export type EnvironmentTypeId = typeof EnvironmentTypeId;
|
|
12
10
|
/**
|
|
13
11
|
* @tsplus type fncts.Environment
|
|
14
12
|
* @tsplus companion fncts.EnvironmentOps
|
|
@@ -16,8 +14,10 @@ export type EnvSymbol = typeof EnvSymbol;
|
|
|
16
14
|
export declare class Environment<R> implements Hashable, Equatable {
|
|
17
15
|
readonly map: HashMap<Tag<any>, unknown>;
|
|
18
16
|
cache: HashMap<Tag<any>, unknown>;
|
|
19
|
-
readonly
|
|
20
|
-
|
|
17
|
+
readonly [EnvironmentTypeId]: EnvironmentTypeId;
|
|
18
|
+
[EnvironmentVariance]: {
|
|
19
|
+
_R: (_: never) => R;
|
|
20
|
+
};
|
|
21
21
|
constructor(map: HashMap<Tag<any>, unknown>, cache?: HashMap<Tag<any>, unknown>);
|
|
22
22
|
get [Symbol.hash](): number;
|
|
23
23
|
[Symbol.equals](that: unknown): boolean;
|
|
@@ -9,6 +9,8 @@ export declare const enum EnvironmentPatchTag {
|
|
|
9
9
|
Combine = 3,
|
|
10
10
|
Empty = 4
|
|
11
11
|
}
|
|
12
|
+
export declare const EnvironmentPatchVariance: unique symbol;
|
|
13
|
+
export type EnvironmentPatchVariance = typeof EnvironmentPatchVariance;
|
|
12
14
|
export declare const EnvironmentPatchTypeId: unique symbol;
|
|
13
15
|
export type EnvironmentPatchTypeId = typeof EnvironmentPatchTypeId;
|
|
14
16
|
/**
|
|
@@ -16,9 +18,11 @@ export type EnvironmentPatchTypeId = typeof EnvironmentPatchTypeId;
|
|
|
16
18
|
* @tsplus companion fncts.Environment.PatchOps
|
|
17
19
|
*/
|
|
18
20
|
export declare abstract class EnvironmentPatch<In, Out> {
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
readonly [EnvironmentPatchTypeId]: EnvironmentPatchTypeId;
|
|
22
|
+
[EnvironmentPatchVariance]: {
|
|
23
|
+
readonly _R: (_: In) => void;
|
|
24
|
+
readonly _A: (_: never) => Out;
|
|
25
|
+
};
|
|
22
26
|
}
|
|
23
27
|
export declare class AddService<Env, Service> extends EnvironmentPatch<Env, Env & Has<Service>> {
|
|
24
28
|
readonly service: Service;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
2
2
|
import { Hashable } from "@fncts/base/data/Hashable";
|
|
3
3
|
import * as P from "../../typeclass.js";
|
|
4
|
+
export declare const ExitVariance: unique symbol;
|
|
5
|
+
export type ExitVariance = typeof ExitVariance;
|
|
4
6
|
export declare const ExitTypeId: unique symbol;
|
|
5
7
|
export type ExitTypeId = typeof ExitTypeId;
|
|
6
8
|
/**
|
|
@@ -23,9 +25,11 @@ export declare const enum ExitTag {
|
|
|
23
25
|
*/
|
|
24
26
|
export declare class Failure<E> {
|
|
25
27
|
readonly cause: Cause<E>;
|
|
26
|
-
readonly
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
readonly [ExitTypeId]: ExitTypeId;
|
|
29
|
+
[ExitVariance]: {
|
|
30
|
+
readonly _E: (_: never) => E;
|
|
31
|
+
readonly _A: (_: never) => never;
|
|
32
|
+
};
|
|
29
33
|
readonly _tag = ExitTag.Failure;
|
|
30
34
|
constructor(cause: Cause<E>);
|
|
31
35
|
get [Symbol.hash](): number;
|
|
@@ -37,9 +41,11 @@ export declare class Failure<E> {
|
|
|
37
41
|
*/
|
|
38
42
|
export declare class Success<A> implements P.Hashable, P.Equatable {
|
|
39
43
|
readonly value: A;
|
|
40
|
-
readonly
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
readonly [ExitTypeId]: ExitTypeId;
|
|
45
|
+
[ExitVariance]: {
|
|
46
|
+
readonly _E: (_: never) => never;
|
|
47
|
+
readonly _A: (_: never) => A;
|
|
48
|
+
};
|
|
43
49
|
readonly _tag = ExitTag.Success;
|
|
44
50
|
constructor(value: A);
|
|
45
51
|
get [Symbol.hash](): number;
|
|
@@ -4,7 +4,7 @@ import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
|
|
4
4
|
export declare const FiberIdTypeId: unique symbol;
|
|
5
5
|
export type FiberIdTypeId = typeof FiberIdTypeId;
|
|
6
6
|
export declare class None implements Hashable, Equatable {
|
|
7
|
-
readonly
|
|
7
|
+
readonly [FiberIdTypeId]: FiberIdTypeId;
|
|
8
8
|
readonly _tag = "None";
|
|
9
9
|
[Symbol.equals](that: unknown): boolean;
|
|
10
10
|
get [Symbol.hash](): number;
|
|
@@ -13,7 +13,7 @@ export declare class Runtime implements Hashable, Equatable {
|
|
|
13
13
|
readonly id: number;
|
|
14
14
|
readonly startTime: number;
|
|
15
15
|
readonly location?: string | undefined;
|
|
16
|
-
readonly
|
|
16
|
+
readonly [FiberIdTypeId]: FiberIdTypeId;
|
|
17
17
|
readonly _tag = "Runtime";
|
|
18
18
|
constructor(id: number, startTime: number, location?: string | undefined);
|
|
19
19
|
get [Symbol.hash](): number;
|
|
@@ -21,7 +21,7 @@ export declare class Runtime implements Hashable, Equatable {
|
|
|
21
21
|
}
|
|
22
22
|
export declare class Composite implements Hashable, Equatable {
|
|
23
23
|
readonly fiberIds: HashSet<Runtime>;
|
|
24
|
-
readonly
|
|
24
|
+
readonly [FiberIdTypeId]: FiberIdTypeId;
|
|
25
25
|
readonly _tag = "Composite";
|
|
26
26
|
constructor(fiberIds: HashSet<Runtime>);
|
|
27
27
|
[Symbol.equals](that: unknown): boolean;
|
|
@@ -3,6 +3,8 @@ import { Refinement } from "@fncts/base/data/Refinement/definition";
|
|
|
3
3
|
export interface GuardF extends HKT {
|
|
4
4
|
readonly type: Guard<this["A"]>;
|
|
5
5
|
}
|
|
6
|
+
export declare const GuardVariance: unique symbol;
|
|
7
|
+
export type GuardVariance = typeof GuardVariance;
|
|
6
8
|
export declare const GuardTypeId: unique symbol;
|
|
7
9
|
export type GuardTypeId = typeof GuardTypeId;
|
|
8
10
|
/**
|
|
@@ -11,8 +13,10 @@ export type GuardTypeId = typeof GuardTypeId;
|
|
|
11
13
|
*/
|
|
12
14
|
export declare class Guard<A> {
|
|
13
15
|
readonly is: Refinement<unknown, A>;
|
|
14
|
-
readonly
|
|
15
|
-
|
|
16
|
+
readonly [GuardTypeId]: GuardTypeId;
|
|
17
|
+
[GuardVariance]: {
|
|
18
|
+
readonly _A: (_: never) => A;
|
|
19
|
+
};
|
|
16
20
|
constructor(is: Refinement<unknown, A>);
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
@@ -5,8 +5,10 @@ export declare const enum MaybeTag {
|
|
|
5
5
|
Just = "Just",
|
|
6
6
|
Nothing = "Nothing"
|
|
7
7
|
}
|
|
8
|
+
export declare const MaybeVariance: unique symbol;
|
|
9
|
+
export type MaybeVariance = typeof MaybeVariance;
|
|
8
10
|
export declare const MaybeTypeId: unique symbol;
|
|
9
|
-
export type
|
|
11
|
+
export type MaybeTypeId = typeof MaybeTypeId;
|
|
10
12
|
export interface MaybeF extends HKT {
|
|
11
13
|
type: Maybe<this["A"]>;
|
|
12
14
|
variance: {
|
|
@@ -17,9 +19,11 @@ export interface MaybeF extends HKT {
|
|
|
17
19
|
* @tsplus type fncts.Maybe
|
|
18
20
|
* @tsplus companion fncts.MaybeOps
|
|
19
21
|
*/
|
|
20
|
-
export declare class Maybe<A> {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
export declare abstract class Maybe<A> {
|
|
23
|
+
[MaybeVariance]: {
|
|
24
|
+
readonly _A: (_: never) => A;
|
|
25
|
+
};
|
|
26
|
+
readonly [MaybeTypeId]: MaybeTypeId;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* @tsplus type fncts.Just
|
|
@@ -44,13 +48,11 @@ export declare class Nothing extends Maybe<never> {
|
|
|
44
48
|
/**
|
|
45
49
|
* @tsplus unify fncts.Maybe
|
|
46
50
|
*/
|
|
47
|
-
export declare function unifyMaybe<X extends Maybe<any>>(self: X): Maybe<[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
] ? A : never>;
|
|
51
|
+
export declare function unifyMaybe<X extends Maybe<any>>(self: X): Maybe<[X] extends [{
|
|
52
|
+
[MaybeVariance]: {
|
|
53
|
+
_A: (_: never) => infer A;
|
|
54
|
+
};
|
|
55
|
+
}] ? A : never>;
|
|
54
56
|
/**
|
|
55
57
|
* @tsplus static fncts.MaybeOps isMaybe
|
|
56
58
|
* @tsplus location "@fncts/base/data/Maybe/definition"
|
package/data/Tag/definition.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Hashable } from "@fncts/base/data/Hashable";
|
|
2
2
|
import { Equatable } from "@fncts/base/data/Equatable";
|
|
3
|
+
export declare const TagVariance: unique symbol;
|
|
4
|
+
export type TagVariance = typeof TagVariance;
|
|
3
5
|
export declare const TagTypeId: unique symbol;
|
|
4
6
|
export type TagTypeId = typeof TagTypeId;
|
|
5
7
|
/**
|
|
@@ -10,8 +12,10 @@ export type TagTypeId = typeof TagTypeId;
|
|
|
10
12
|
*/
|
|
11
13
|
export declare class Tag<in out T> implements Hashable, Equatable {
|
|
12
14
|
readonly id: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
readonly [TagTypeId]: TagTypeId;
|
|
16
|
+
[TagVariance]: {
|
|
17
|
+
readonly _T: (_: T) => T;
|
|
18
|
+
};
|
|
15
19
|
constructor(id: string);
|
|
16
20
|
get [Symbol.hash](): number;
|
|
17
21
|
[Symbol.equals](that: unknown): boolean;
|
|
@@ -10,7 +10,7 @@ export type TheseTypeId = typeof TheseTypeId;
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class Left<E> {
|
|
12
12
|
readonly left: E;
|
|
13
|
-
readonly
|
|
13
|
+
readonly [TheseTypeId]: TheseTypeId;
|
|
14
14
|
readonly _tag = TheseTag.Left;
|
|
15
15
|
constructor(left: E);
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ export declare class Left<E> {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare class Right<A> {
|
|
21
21
|
readonly right: A;
|
|
22
|
-
readonly
|
|
22
|
+
readonly [TheseTypeId]: TheseTypeId;
|
|
23
23
|
readonly _tag = TheseTag.Right;
|
|
24
24
|
constructor(right: A);
|
|
25
25
|
}
|
|
@@ -29,7 +29,7 @@ export declare class Right<A> {
|
|
|
29
29
|
export declare class Both<E, A> {
|
|
30
30
|
readonly left: E;
|
|
31
31
|
readonly right: A;
|
|
32
|
-
readonly
|
|
32
|
+
readonly [TheseTypeId]: TheseTypeId;
|
|
33
33
|
readonly _tag = TheseTag.Both;
|
|
34
34
|
constructor(left: E, right: A);
|
|
35
35
|
}
|
|
@@ -2,7 +2,7 @@ export declare const InterruptedExceptionTypeId: unique symbol;
|
|
|
2
2
|
export type InterruptedExceptionTypeId = typeof InterruptedExceptionTypeId;
|
|
3
3
|
export declare class InterruptedException {
|
|
4
4
|
readonly message?: string | undefined;
|
|
5
|
-
readonly
|
|
5
|
+
readonly [InterruptedExceptionTypeId]: InterruptedExceptionTypeId;
|
|
6
6
|
constructor(message?: string | undefined);
|
|
7
7
|
}
|
|
8
8
|
export declare function isInterruptedException(u: unknown): u is InterruptedException;
|
package/data.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type {} from "./data/Byte.js";
|
|
|
5
5
|
export type {} from "./data/CaseClass.js";
|
|
6
6
|
export type {} from "./data/Cause.js";
|
|
7
7
|
export type {} from "./data/Const.js";
|
|
8
|
+
export type {} from "./data/DatumEither.js";
|
|
8
9
|
export type {} from "./data/DecodeError.js";
|
|
9
10
|
export type {} from "./data/Decoder.js";
|
|
10
11
|
export type {} from "./data/Duration.js";
|
package/package.json
CHANGED
package/util/predicates.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare function isObject<A extends Function>(value: A): false;
|
|
|
12
12
|
export declare function isObject(value: unknown): value is object & Record<PropertyKey, any>;
|
|
13
13
|
export declare function isObject<A>(value: A | Primitive): value is A & Record<PropertyKey, unknown>;
|
|
14
14
|
export declare function hasTypeId<X extends symbol>(value: unknown, typeId: X): value is {
|
|
15
|
-
readonly
|
|
15
|
+
readonly [K in X]: X;
|
|
16
16
|
} & Record<PropertyKey, unknown>;
|
|
17
17
|
export declare function isFunction(value: unknown): value is Function;
|
|
18
18
|
export declare function isBoolean(value: unknown): value is boolean;
|