@fncts/base 0.0.34 → 0.0.36
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/Iterable/api.cjs +9 -2
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/{data/DecodeError/instances.cjs → collection/compat/Map/definition.cjs} +1 -1
- package/_cjs/collection/compat/Map/definition.cjs.map +1 -0
- package/_cjs/collection/compat/Map.cjs +17 -0
- package/_cjs/collection/compat/Map.cjs.map +1 -0
- package/_cjs/collection/compat/Set/definition.cjs +6 -0
- package/_cjs/collection/compat/Set/definition.cjs.map +1 -0
- package/_cjs/collection/compat/Set.cjs +17 -0
- package/_cjs/collection/compat/Set.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api.cjs +1 -4
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +4 -7
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/api.cjs +4 -7
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +6 -9
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/control/Pure/api.cjs +8 -20
- package/_cjs/control/Pure/api.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +2 -8
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Datum/api.cjs +2 -8
- package/_cjs/data/Datum/api.cjs.map +1 -1
- package/_cjs/data/DatumEither/api.cjs +2 -8
- package/_cjs/data/DatumEither/api.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +6 -24
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/destructors.cjs +3 -3
- package/_cjs/data/Either/destructors.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +7 -27
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +2 -8
- package/_cjs/data/EitherT/api.cjs.map +1 -1
- package/_cjs/data/Eq/api.cjs +22 -0
- package/_cjs/data/Eq/api.cjs.map +1 -1
- package/_cjs/data/Exit/constructors.cjs +1 -4
- package/_cjs/data/Exit/constructors.cjs.map +1 -1
- package/_cjs/data/Guard/api.cjs +4 -2
- package/_cjs/data/Guard/api.cjs.map +1 -1
- package/_cjs/data/Maybe/api.cjs +1 -4
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +13 -46
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Ord/api.cjs +46 -0
- package/_cjs/data/Ord/api.cjs.map +1 -1
- package/_cjs/data/Showable/show.cjs.map +1 -1
- package/_cjs/data/These/instances.cjs +0 -11
- package/_cjs/data/These/instances.cjs.map +1 -1
- package/_cjs/json/EitherJson.cjs +0 -18
- package/_cjs/json/EitherJson.cjs.map +1 -1
- package/_cjs/json/MaybeJson.cjs +0 -16
- package/_cjs/json/MaybeJson.cjs.map +1 -1
- package/_cjs/json/TheseJson.cjs +0 -22
- package/_cjs/json/TheseJson.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +1 -4
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Prism/definition.cjs +1 -4
- package/_cjs/optics/Prism/definition.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +1 -4
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/util/predicates.cjs +9 -0
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +8 -2
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/compat/Map/definition.mjs +2 -0
- package/_mjs/collection/compat/Map/definition.mjs.map +1 -0
- package/_mjs/collection/compat/Map.mjs +3 -0
- package/_mjs/collection/compat/Map.mjs.map +1 -0
- package/_mjs/collection/compat/Set/definition.mjs +2 -0
- package/_mjs/collection/compat/Set/definition.mjs.map +1 -0
- package/_mjs/collection/compat/Set.mjs +3 -0
- package/_mjs/collection/compat/Set.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api.mjs +1 -4
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +4 -7
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +4 -7
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +6 -9
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/control/Pure/api.mjs +8 -20
- package/_mjs/control/Pure/api.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +2 -8
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +2 -8
- package/_mjs/data/Datum/api.mjs.map +1 -1
- package/_mjs/data/DatumEither/api.mjs +2 -8
- package/_mjs/data/DatumEither/api.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +6 -24
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/destructors.mjs +3 -3
- package/_mjs/data/Either/destructors.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +6 -25
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +2 -8
- package/_mjs/data/EitherT/api.mjs.map +1 -1
- package/_mjs/data/Eq/api.mjs +21 -0
- package/_mjs/data/Eq/api.mjs.map +1 -1
- package/_mjs/data/Exit/constructors.mjs +1 -4
- package/_mjs/data/Exit/constructors.mjs.map +1 -1
- package/_mjs/data/Guard/api.mjs +5 -3
- package/_mjs/data/Guard/api.mjs.map +1 -1
- package/_mjs/data/Maybe/api.mjs +1 -4
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +0 -31
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Ord/api.mjs +33 -0
- package/_mjs/data/Ord/api.mjs.map +1 -1
- package/_mjs/data/Showable/show.mjs.map +1 -1
- package/_mjs/data/These/instances.mjs +0 -10
- package/_mjs/data/These/instances.mjs.map +1 -1
- package/_mjs/json/EitherJson.mjs +0 -15
- package/_mjs/json/EitherJson.mjs.map +1 -1
- package/_mjs/json/MaybeJson.mjs +0 -13
- package/_mjs/json/MaybeJson.mjs.map +1 -1
- package/_mjs/json/TheseJson.mjs +0 -19
- package/_mjs/json/TheseJson.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +1 -4
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Prism/definition.mjs +1 -4
- package/_mjs/optics/Prism/definition.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +1 -4
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +8 -0
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_src/collection/Iterable/api.ts +7 -0
- package/_src/collection/compat/Map/definition.ts +6 -0
- package/_src/collection/compat/Map.ts +3 -0
- package/_src/collection/compat/Set/definition.ts +6 -0
- package/_src/collection/compat/Set.ts +3 -0
- package/_src/collection/compat.ts +2 -0
- package/_src/collection/immutable/Conc/api.ts +4 -4
- package/_src/collection/immutable/HashMap/api.ts +4 -4
- package/_src/collection/immutable/HashSet/api.ts +4 -4
- package/_src/collection/immutable/ImmutableArray/api.ts +4 -4
- package/_src/collection/immutable/ImmutableArray/instances.ts +0 -2
- package/_src/control/Pure/api.ts +4 -7
- package/_src/data/Cause/api.ts +8 -8
- package/_src/data/Datum/api.ts +8 -8
- package/_src/data/DatumEither/api.ts +8 -8
- package/_src/data/Either/api.ts +18 -18
- package/_src/data/Either/destructors.ts +3 -3
- package/_src/data/Either/instances.ts +12 -31
- package/_src/data/EitherT/api.ts +8 -8
- package/_src/data/Eq/api.ts +23 -0
- package/_src/data/Exit/constructors.ts +1 -1
- package/_src/data/Guard/api.ts +6 -3
- package/_src/data/Maybe/api.ts +4 -4
- package/_src/data/Maybe/instances.ts +0 -39
- package/_src/data/Ord/api.ts +35 -0
- package/_src/data/Showable/show.ts +1 -1
- package/_src/data/These/instances.ts +0 -22
- package/_src/global.ts +0 -8
- package/_src/json/EitherJson.ts +0 -7
- package/_src/json/MaybeJson.ts +0 -7
- package/_src/json/TheseJson.ts +0 -7
- package/_src/optics/Optional/definition.ts +4 -4
- package/_src/optics/Prism/definition.ts +1 -1
- package/_src/typeclass/MonadExcept.ts +1 -1
- package/_src/util/predicates.ts +9 -0
- package/collection/Iterable/api.d.ts +5 -0
- package/collection/compat/Map/definition.d.ts +8 -0
- package/collection/compat/Map.d.ts +1 -0
- package/collection/compat/Set/definition.d.ts +8 -0
- package/collection/compat/Set.d.ts +1 -0
- package/collection/compat.d.ts +2 -0
- package/data/Either/destructors.d.ts +1 -4
- package/data/Either/instances.d.ts +0 -6
- package/data/Eq/api.d.ts +5 -0
- package/data/Guard/api.d.ts +1 -2
- package/data/Maybe/instances.d.ts +0 -12
- package/data/Ord/api.d.ts +13 -0
- package/data/Showable/show.d.ts +1 -1
- package/data/These/instances.d.ts +0 -6
- package/global.d.ts +0 -8
- package/json/EitherJson.d.ts +0 -6
- package/json/MaybeJson.d.ts +0 -6
- package/json/TheseJson.d.ts +0 -6
- package/package.json +2 -2
- package/util/predicates.d.ts +5 -0
- package/_cjs/data/DecodeError/definition.cjs +0 -240
- package/_cjs/data/DecodeError/definition.cjs.map +0 -1
- package/_cjs/data/DecodeError/instances.cjs.map +0 -1
- package/_cjs/data/DecodeError.cjs +0 -28
- package/_cjs/data/DecodeError.cjs.map +0 -1
- package/_cjs/data/Decoder/api.cjs +0 -572
- package/_cjs/data/Decoder/api.cjs.map +0 -1
- package/_cjs/data/Decoder/definition.cjs +0 -30
- package/_cjs/data/Decoder/definition.cjs.map +0 -1
- package/_cjs/data/Decoder.cjs +0 -28
- package/_cjs/data/Decoder.cjs.map +0 -1
- package/_cjs/data/Encoder/api.cjs +0 -315
- package/_cjs/data/Encoder/api.cjs.map +0 -1
- package/_cjs/data/Encoder/definition.cjs +0 -22
- package/_cjs/data/Encoder/definition.cjs.map +0 -1
- package/_cjs/data/Encoder.cjs +0 -28
- package/_cjs/data/Encoder.cjs.map +0 -1
- package/_mjs/data/DecodeError/definition.mjs +0 -209
- package/_mjs/data/DecodeError/definition.mjs.map +0 -1
- package/_mjs/data/DecodeError/instances.mjs +0 -2
- package/_mjs/data/DecodeError/instances.mjs.map +0 -1
- package/_mjs/data/DecodeError.mjs +0 -5
- package/_mjs/data/DecodeError.mjs.map +0 -1
- package/_mjs/data/Decoder/api.mjs +0 -542
- package/_mjs/data/Decoder/api.mjs.map +0 -1
- package/_mjs/data/Decoder/definition.mjs +0 -22
- package/_mjs/data/Decoder/definition.mjs.map +0 -1
- package/_mjs/data/Decoder.mjs +0 -5
- package/_mjs/data/Decoder.mjs.map +0 -1
- package/_mjs/data/Encoder/api.mjs +0 -279
- package/_mjs/data/Encoder/api.mjs.map +0 -1
- package/_mjs/data/Encoder/definition.mjs +0 -15
- package/_mjs/data/Encoder/definition.mjs.map +0 -1
- package/_mjs/data/Encoder.mjs +0 -5
- package/_mjs/data/Encoder.mjs.map +0 -1
- package/_src/data/DecodeError/definition.ts +0 -267
- package/_src/data/DecodeError/instances.ts +0 -0
- package/_src/data/DecodeError.ts +0 -5
- package/_src/data/Decoder/api.ts +0 -696
- package/_src/data/Decoder/definition.ts +0 -31
- package/_src/data/Decoder.ts +0 -5
- package/_src/data/Encoder/api.ts +0 -381
- package/_src/data/Encoder/definition.ts +0 -16
- package/_src/data/Encoder.ts +0 -5
- package/data/DecodeError/definition.d.ts +0 -148
- package/data/DecodeError/instances.d.ts +0 -1
- package/data/DecodeError.d.ts +0 -2
- package/data/Decoder/api.d.ts +0 -214
- package/data/Decoder/definition.d.ts +0 -27
- package/data/Decoder.d.ts +0 -2
- package/data/Encoder/api.d.ts +0 -214
- package/data/Encoder/definition.d.ts +0 -16
- package/data/Encoder.d.ts +0 -2
package/_cjs/data/Decoder.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = /*#__PURE__*/require("./Decoder/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _api = /*#__PURE__*/require("./Decoder/api.cjs");
|
|
18
|
-
Object.keys(_api).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _api[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _api[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=Decoder.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Decoder.cjs","names":["_definition","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_api"],"sources":["../../_src/data/Decoder.ts"],"sourcesContent":[null],"mappings":";;;;;AAEA,IAAAA,WAAA,gBAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,gBAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports._undefined = exports._null = void 0;
|
|
7
|
-
exports.array = array;
|
|
8
|
-
exports.boolean = exports.bigint = void 0;
|
|
9
|
-
exports.conc = conc;
|
|
10
|
-
exports.deriveDictionary = exports.deriveConc = exports.deriveArray = exports.date = void 0;
|
|
11
|
-
exports.deriveEmptyRecord = deriveEmptyRecord;
|
|
12
|
-
exports.deriveImmutableNonEmptyArray = exports.deriveImmutableArray = void 0;
|
|
13
|
-
exports.deriveLazy = deriveLazy;
|
|
14
|
-
exports.deriveLiteral = deriveLiteral;
|
|
15
|
-
exports.deriveReadonlyArray = void 0;
|
|
16
|
-
exports.deriveRecord = deriveRecord;
|
|
17
|
-
exports.deriveStruct = deriveStruct;
|
|
18
|
-
exports.deriveTuple = deriveTuple;
|
|
19
|
-
exports.deriveUnion = deriveUnion;
|
|
20
|
-
exports.deriveValidation = deriveValidation;
|
|
21
|
-
exports.immutableArray = immutableArray;
|
|
22
|
-
exports.immutableNonEmptyArray = immutableNonEmptyArray;
|
|
23
|
-
exports.literal = literal;
|
|
24
|
-
exports.makeEncoder = void 0;
|
|
25
|
-
exports.nullable = nullable;
|
|
26
|
-
exports.number = void 0;
|
|
27
|
-
exports.partial = partial;
|
|
28
|
-
exports.readonlyArray = readonlyArray;
|
|
29
|
-
exports.record = record;
|
|
30
|
-
exports.string = void 0;
|
|
31
|
-
exports.struct = struct;
|
|
32
|
-
exports.tuple = tuple;
|
|
33
|
-
exports.unknown = void 0;
|
|
34
|
-
exports.validation = validation;
|
|
35
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/function/api"));
|
|
36
|
-
var _definition = /*#__PURE__*/require("./definition.cjs");
|
|
37
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
38
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
39
|
-
const makeEncoder = exports.makeEncoder = makeEncoder_1;
|
|
40
|
-
const deriveArray = exports.deriveArray = deriveArray_1;
|
|
41
|
-
const deriveReadonlyArray = exports.deriveReadonlyArray = deriveReadonlyArray_1;
|
|
42
|
-
const deriveDictionary = exports.deriveDictionary = deriveDictionary_1;
|
|
43
|
-
const deriveImmutableArray = exports.deriveImmutableArray = deriveImmutableArray_1;
|
|
44
|
-
const deriveImmutableNonEmptyArray = exports.deriveImmutableNonEmptyArray = deriveImmutableNonEmptyArray_1;
|
|
45
|
-
const deriveConc = exports.deriveConc = deriveConc_1;
|
|
46
|
-
/**
|
|
47
|
-
* @tsplus static fncts.EncoderOps __call
|
|
48
|
-
*/
|
|
49
|
-
function makeEncoder_1(encode) {
|
|
50
|
-
return new _definition.Encoder(encode);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @tsplus static fncts.EncoderOps unknown
|
|
54
|
-
*/
|
|
55
|
-
const unknown = exports.unknown = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
56
|
-
/**
|
|
57
|
-
* @tsplus implicit
|
|
58
|
-
* @tsplus static fncts.EncoderOps boolean
|
|
59
|
-
*/
|
|
60
|
-
const boolean = exports.boolean = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
61
|
-
/**
|
|
62
|
-
* @tsplus implicit
|
|
63
|
-
* @tsplus static fncts.EncoderOps number
|
|
64
|
-
*/
|
|
65
|
-
const number = exports.number = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
66
|
-
/**
|
|
67
|
-
* @tsplus implicit
|
|
68
|
-
* @tsplus static fncts.EncoderOps string
|
|
69
|
-
*/
|
|
70
|
-
const string = exports.string = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
71
|
-
/**
|
|
72
|
-
* @tsplus implicit
|
|
73
|
-
* @tsplus static fncts.EncoderOps bigint
|
|
74
|
-
*/
|
|
75
|
-
const bigint = exports.bigint = /*#__PURE__*/makeEncoder_1(n => n.toString(10));
|
|
76
|
-
/**
|
|
77
|
-
* @tsplus implicit
|
|
78
|
-
* @tsplus static fncts.EncoderOps null
|
|
79
|
-
*/
|
|
80
|
-
const _null = exports._null = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
81
|
-
/**
|
|
82
|
-
* @tsplus implicit
|
|
83
|
-
* @tsplus static fncts.EncoderOps undefined
|
|
84
|
-
*/
|
|
85
|
-
const _undefined = exports._undefined = /*#__PURE__*/makeEncoder_1(tsplus_module_1.identity);
|
|
86
|
-
/**
|
|
87
|
-
* @tsplus implicit
|
|
88
|
-
* @tsplus static fncts.EncoderOps date
|
|
89
|
-
*/
|
|
90
|
-
const date = exports.date = /*#__PURE__*/makeEncoder_1(d => d.toISOString());
|
|
91
|
-
/**
|
|
92
|
-
* @tsplus derive fncts.Encoder lazy
|
|
93
|
-
* @tsplus static fncts.EncoderOps lazy
|
|
94
|
-
*/
|
|
95
|
-
function deriveLazy(fn) {
|
|
96
|
-
let cached;
|
|
97
|
-
const encoder = makeEncoder_1(a => {
|
|
98
|
-
if (!cached) {
|
|
99
|
-
cached = fn(encoder);
|
|
100
|
-
}
|
|
101
|
-
return cached.encode(a);
|
|
102
|
-
});
|
|
103
|
-
return encoder;
|
|
104
|
-
}
|
|
105
|
-
function deriveLiteral(...[value]) {
|
|
106
|
-
return makeEncoder_1(tsplus_module_1.identity);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @tsplus static fncts.EncoderOps literal
|
|
110
|
-
*/
|
|
111
|
-
function literal(value) {
|
|
112
|
-
return makeEncoder_1(tsplus_module_1.identity);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @tsplus static fncts.EncoderOps nullable
|
|
116
|
-
*/
|
|
117
|
-
function nullable( /** @tsplus implicit local */base) {
|
|
118
|
-
return makeEncoder_1(inp => inp == null ? inp : base.encode(inp));
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* @tsplus derive fncts.Encoder<_> 20
|
|
122
|
-
*/
|
|
123
|
-
function deriveStruct(...[requiredFields, optionalFields]) {
|
|
124
|
-
return makeEncoder_1(inp => {
|
|
125
|
-
const encoded = {};
|
|
126
|
-
for (const field of Object.keys(requiredFields)) {
|
|
127
|
-
// @ts-expect-error
|
|
128
|
-
encoded[field] = requiredFields[field].encode(inp[field]);
|
|
129
|
-
}
|
|
130
|
-
if (optionalFields) {
|
|
131
|
-
for (const field of Object.keys(optionalFields)) {
|
|
132
|
-
if (field in inp && typeof inp[field] !== undefined) {
|
|
133
|
-
// @ts-expect-error
|
|
134
|
-
encoded[field] = optionalFields[field].encode(inp[field]);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return encoded;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* @tsplus static fncts.EncoderOps struct
|
|
143
|
-
*/
|
|
144
|
-
function struct(fields) {
|
|
145
|
-
return makeEncoder_1(inp => {
|
|
146
|
-
const encoded = {};
|
|
147
|
-
for (const field of Object.keys(fields)) {
|
|
148
|
-
// @ts-expect-error
|
|
149
|
-
encoded[field] = fields[field].encode(inp[field]);
|
|
150
|
-
}
|
|
151
|
-
return encoded;
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* @tsplus static fncts.EncoderOps partial
|
|
156
|
-
*/
|
|
157
|
-
function partial(fields) {
|
|
158
|
-
return makeEncoder_1(inp => {
|
|
159
|
-
const encoded = {};
|
|
160
|
-
for (const field of Object.keys(fields)) {
|
|
161
|
-
if (field in inp && typeof inp[field] !== undefined) {
|
|
162
|
-
// @ts-expect-error
|
|
163
|
-
encoded[field] = fields[field].encode(inp[field]);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return encoded;
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @tsplus derive fncts.Encoder<|> 30
|
|
171
|
-
*/
|
|
172
|
-
function deriveUnion(...elements) {
|
|
173
|
-
return makeEncoder_1(inp => {
|
|
174
|
-
for (const [guard, encoder] of elements) {
|
|
175
|
-
if (guard.is(inp)) {
|
|
176
|
-
return encoder.encode(inp);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* @tsplus derive fncts.Encoder<_> 10
|
|
183
|
-
*/
|
|
184
|
-
function deriveEmptyRecord(..._) {
|
|
185
|
-
return makeEncoder_1(tsplus_module_1.identity);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* @tsplus derive fncts.Encoder[fncts.Array]<_> 10
|
|
189
|
-
*/
|
|
190
|
-
function deriveArray_1(...[element]) {
|
|
191
|
-
return makeEncoder_1(inp => inp.map(a => element.encode(a)));
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* @tsplus static fncts.EncoderOps array
|
|
195
|
-
*/
|
|
196
|
-
function array( /** @tsplus implicit local */base) {
|
|
197
|
-
const base_1 = base;
|
|
198
|
-
return deriveArray_1(base_1);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* @tsplus derive fncts.Encoder[fncts.ReadonlyArray]<_> 10
|
|
202
|
-
*/
|
|
203
|
-
function deriveReadonlyArray_1(...[element]) {
|
|
204
|
-
return makeEncoder_1(inp => inp.map(a => element.encode(a)));
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* @tsplus static fncts.EncoderOps readonlyArray
|
|
208
|
-
*/
|
|
209
|
-
function readonlyArray( /** @tsplus implicit local */base) {
|
|
210
|
-
const base_2 = base;
|
|
211
|
-
return deriveReadonlyArray_1(base_2);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* @tsplus derive fncts.Encoder<_> 15
|
|
215
|
-
*/
|
|
216
|
-
function deriveDictionary_1(...[value]) {
|
|
217
|
-
return makeEncoder_1(inp => {
|
|
218
|
-
const encoded = {};
|
|
219
|
-
for (const k of Object.keys(inp)) {
|
|
220
|
-
// @ts-expect-error
|
|
221
|
-
encoded[k] = value.encode(inp[k]);
|
|
222
|
-
}
|
|
223
|
-
return encoded;
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* @tsplus derive fncts.Encoder<_> 15
|
|
228
|
-
*/
|
|
229
|
-
function deriveRecord(...[value, requiredKeys]) {
|
|
230
|
-
return makeEncoder_1(inp => {
|
|
231
|
-
const encoded = {};
|
|
232
|
-
for (const k of Object.keys(requiredKeys)) {
|
|
233
|
-
// @ts-expect-error
|
|
234
|
-
encoded[k] = value.encode(inp[k]);
|
|
235
|
-
}
|
|
236
|
-
return encoded;
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* @tsplus static fncts.EncoderOps record
|
|
241
|
-
*/
|
|
242
|
-
function record(codomain) {
|
|
243
|
-
const codomain_1 = codomain;
|
|
244
|
-
return deriveDictionary_1(codomain_1);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @tsplus derive fncts.Encoder[fncts.ImmutableArray]<_> 10
|
|
248
|
-
*/
|
|
249
|
-
function deriveImmutableArray_1(...[element]) {
|
|
250
|
-
return makeEncoder_1(inp => inp._array.map(a => element.encode(a)));
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* @tsplus static fncts.EncoderOps immutableArray
|
|
254
|
-
*/
|
|
255
|
-
function immutableArray(base) {
|
|
256
|
-
const base_3 = base;
|
|
257
|
-
return deriveImmutableArray_1(base_3);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* @tsplus derive fncts.Encoder[fncts.ImmutableNonEmptyArray]<_> 10
|
|
261
|
-
*/
|
|
262
|
-
function deriveImmutableNonEmptyArray_1(...[element]) {
|
|
263
|
-
return makeEncoder_1(inp => inp._array.map(a => element.encode(a)));
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* @tsplus static fncts.EncoderOps immutableNonEmptyArray
|
|
267
|
-
*/
|
|
268
|
-
function immutableNonEmptyArray(base) {
|
|
269
|
-
const base_4 = base;
|
|
270
|
-
return deriveImmutableNonEmptyArray_1(base_4);
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* @tsplus derive fncts.Encoder[fncts.Conc]<_> 10
|
|
274
|
-
*/
|
|
275
|
-
function deriveConc_1(...[element]) {
|
|
276
|
-
return makeEncoder_1(inp => Array.from(inp).map(a => element.encode(a)));
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* @tsplus static fncts.EncoderOps conc
|
|
280
|
-
*/
|
|
281
|
-
function conc(base) {
|
|
282
|
-
const base_5 = base;
|
|
283
|
-
return deriveConc_1(base_5);
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* @tsplus derive fncts.Encoder<_> 10
|
|
287
|
-
*/
|
|
288
|
-
function deriveValidation(...[base]) {
|
|
289
|
-
return makeEncoder_1(inp => base.encode(inp.unsafeCoerce()));
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* @tsplus static fncts.EncoderOps validation
|
|
293
|
-
*/
|
|
294
|
-
function validation(..._validations) {
|
|
295
|
-
return base => makeEncoder_1(base.encode.unsafeCoerce());
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* @tsplus derive fncts.Encoder<_> 10
|
|
299
|
-
*/
|
|
300
|
-
function deriveTuple(...[components]) {
|
|
301
|
-
return makeEncoder_1(inp => {
|
|
302
|
-
const out = Array(inp.length);
|
|
303
|
-
for (let i = 0; i < inp.length; i++) {
|
|
304
|
-
out[i] = components[i].encode(inp[i]);
|
|
305
|
-
}
|
|
306
|
-
return out;
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* @tsplus static fncts.EncoderOps tuple
|
|
311
|
-
*/
|
|
312
|
-
function tuple(...components) {
|
|
313
|
-
return deriveTuple(components).unsafeCoerce();
|
|
314
|
-
}
|
|
315
|
-
//# sourceMappingURL=api.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.cjs","names":["_definition","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","makeEncoder","exports","makeEncoder_1","deriveArray","deriveArray_1","deriveReadonlyArray","deriveReadonlyArray_1","deriveDictionary","deriveDictionary_1","deriveImmutableArray","deriveImmutableArray_1","deriveImmutableNonEmptyArray","deriveImmutableNonEmptyArray_1","deriveConc","deriveConc_1","encode","Encoder","unknown","tsplus_module_1","identity","boolean","number","string","bigint","toString","_null","_undefined","date","d","toISOString","deriveLazy","fn","cached","encoder","deriveLiteral","value","literal","nullable","base","inp","deriveStruct","requiredFields","optionalFields","encoded","field","keys","undefined","struct","fields","partial","deriveUnion","elements","guard","is","deriveEmptyRecord","_","element","map","array","base_1","readonlyArray","base_2","k","deriveRecord","requiredKeys","record","codomain","codomain_1","_array","immutableArray","base_3","immutableNonEmptyArray","base_4","Array","from","conc","base_5","deriveValidation","unsafeCoerce","validation","_validations","deriveTuple","components","out","length","tuple"],"sources":["../../../_src/data/Encoder/api.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,WAAA,gBAAAC,OAAA;AAA0C,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAA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ClC,GAAG,CAAC6C,MAAM,CAAC;IAC7B,KAAK,IAAItF,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGyC,GAAG,CAAC6C,MAAM,EAAEtF,CAAC,EAAE,EAAE;MACnCqF,GAAG,CAACrF,CAAC,CAAC,GAAGoF,UAAU,CAACpF,CAAC,CAAE,CAACiB,MAAM,CAACwB,GAAG,CAACzC,CAAC,CAAC,CAAC;IACxC;IACA,OAAOqF,GAAG;EACZ,CAAC,CAAC;AACJ;AAEA;;;AAGM,SAAUE,KAAKA,CAAmC,GAAGH,UAA6C;EACtG,OAAOD,WAAW,CAACC,UAAqB,CAAC,CAACJ,YAAY,EAAE;AAC1D"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EncoderTypeId = exports.Encoder = void 0;
|
|
7
|
-
var _a;
|
|
8
|
-
const EncoderTypeId = exports.EncoderTypeId = /*#__PURE__*/Symbol.for("fncts.Encoder");
|
|
9
|
-
/**
|
|
10
|
-
* @tsplus type fncts.Encoder
|
|
11
|
-
* @tsplus companion fncts.EncoderOps
|
|
12
|
-
* @tsplus derive nominal
|
|
13
|
-
*/
|
|
14
|
-
class Encoder {
|
|
15
|
-
constructor(encode) {
|
|
16
|
-
this.encode = encode;
|
|
17
|
-
this[_a] = EncoderTypeId;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.Encoder = Encoder;
|
|
21
|
-
_a = EncoderTypeId;
|
|
22
|
-
//# sourceMappingURL=definition.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.cjs","names":["EncoderTypeId","exports","Symbol","for","Encoder","constructor","encode","_a"],"sources":["../../../_src/data/Encoder/definition.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAAO,MAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAGE,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAGxD;;;;;AAKM,MAAOC,OAAO;EAElBC,YAAqBC,MAA2B;IAA3B,KAAAA,MAAM,GAANA,MAAM;IADlB,KAAAC,EAAA,CAAe,GAAkBP,aAAa;EACJ;;AACpDC,OAAA,CAAAG,OAAA,GAAAA,OAAA;KAFWJ,aAAa"}
|
package/_cjs/data/Encoder.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = /*#__PURE__*/require("./Encoder/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _api = /*#__PURE__*/require("./Encoder/api.cjs");
|
|
18
|
-
Object.keys(_api).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _api[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _api[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=Encoder.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Encoder.cjs","names":["_definition","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_api"],"sources":["../../_src/data/Encoder.ts"],"sourcesContent":[null],"mappings":";;;;;AAEA,IAAAA,WAAA,gBAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,gBAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import * as tsplus_module_1 from "@fncts/base/collection/immutable/Vector/api";
|
|
3
|
-
import * as tsplus_module_2 from "@fncts/base/collection/immutable/RoseTree/api";
|
|
4
|
-
import * as tsplus_module_3 from "@fncts/base/control/Eval/api";
|
|
5
|
-
import * as tsplus_module_4 from "@fncts/base/control/Eval/constructors";
|
|
6
|
-
import * as tsplus_module_5 from "@fncts/base/control/Eval/instance";
|
|
7
|
-
import { show } from "@fncts/base/data/Showable";
|
|
8
|
-
export const DecodeErrorTypeId = /*#__PURE__*/Symbol.for("fncts.DecodeError");
|
|
9
|
-
export class DecodeError {
|
|
10
|
-
constructor() {
|
|
11
|
-
this[_a] = DecodeErrorTypeId;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
_a = DecodeErrorTypeId;
|
|
15
|
-
export class RequiredKeyError extends DecodeError {
|
|
16
|
-
constructor(key, error) {
|
|
17
|
-
super();
|
|
18
|
-
this.key = key;
|
|
19
|
-
this.error = error;
|
|
20
|
-
this._tag = "RequiredKey";
|
|
21
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make(`on required key ${this.key}`, tsplus_module_1.vector(error)))(this.error.render));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export class OptionalKeyError extends DecodeError {
|
|
25
|
-
constructor(key, error) {
|
|
26
|
-
super();
|
|
27
|
-
this.key = key;
|
|
28
|
-
this.error = error;
|
|
29
|
-
this._tag = "OptionalKey";
|
|
30
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make(`on optional key ${show(this.key)}`, tsplus_module_1.vector(error)))(this.error.render));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export class RequiredIndexError extends DecodeError {
|
|
34
|
-
constructor(index, error) {
|
|
35
|
-
super();
|
|
36
|
-
this.index = index;
|
|
37
|
-
this.error = error;
|
|
38
|
-
this._tag = "RequiredIndex";
|
|
39
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make(`on required index ${this.index}`, tsplus_module_1.vector(error)))(this.error.render));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export class OptionalIndexError extends DecodeError {
|
|
43
|
-
constructor(index, error) {
|
|
44
|
-
super();
|
|
45
|
-
this.index = index;
|
|
46
|
-
this.error = error;
|
|
47
|
-
this._tag = "RequiredIndex";
|
|
48
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make(`on optional index ${this.index}`, tsplus_module_1.vector(error)))(this.error.render));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export class LazyError extends DecodeError {
|
|
52
|
-
constructor(error) {
|
|
53
|
-
super();
|
|
54
|
-
this.error = error;
|
|
55
|
-
this._tag = "Lazy";
|
|
56
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make("while decoding a lazy decoder", tsplus_module_1.vector(error)))(this.error.render));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
export class MemberError extends DecodeError {
|
|
60
|
-
constructor(label, error) {
|
|
61
|
-
super();
|
|
62
|
-
this.label = label;
|
|
63
|
-
this.error = error;
|
|
64
|
-
this._tag = "Member";
|
|
65
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(error => tsplus_module_2.make(`on member ${this.label}`, tsplus_module_1.vector(error)))(this.error.render));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
const vowels = ["a", "e", "i", "o", "u", "y"];
|
|
69
|
-
function startsWithVowel(s) {
|
|
70
|
-
for (let i = 0; i < vowels.length; i++) {
|
|
71
|
-
if (s.startsWith(vowels[i])) return true;
|
|
72
|
-
}
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
export class CompoundError extends DecodeError {
|
|
76
|
-
constructor(name, errors) {
|
|
77
|
-
super();
|
|
78
|
-
this.name = name;
|
|
79
|
-
this.errors = errors;
|
|
80
|
-
this._tag = "Compound";
|
|
81
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(errors => tsplus_module_2.make(`${this.errors.length} error(s) found while decoding ${startsWithVowel(this.name) ? "an" : "a"} ${this.name}`, errors))(tsplus_module_1._traverse(this.errors)(tsplus_module_5.Applicative)(error => error.render)));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
export class CompositionError extends DecodeError {
|
|
85
|
-
constructor(errors) {
|
|
86
|
-
super();
|
|
87
|
-
this.errors = errors;
|
|
88
|
-
this._tag = "Composition";
|
|
89
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(errors => errors.length === 1 ? tsplus_module_1.unsafeGet(1)(errors) : tsplus_module_2.make(`${errors.length} errors found while decoding a composition`, errors))(tsplus_module_1._traverse(this.errors)(tsplus_module_5.Applicative)(error => error.render)));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export class StringError extends DecodeError {
|
|
93
|
-
constructor(actual) {
|
|
94
|
-
super();
|
|
95
|
-
this.actual = actual;
|
|
96
|
-
this._tag = "String";
|
|
97
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, "a string")));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
export class NumberError extends DecodeError {
|
|
101
|
-
constructor(actual) {
|
|
102
|
-
super();
|
|
103
|
-
this.actual = actual;
|
|
104
|
-
this._tag = "Number";
|
|
105
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, "a number")));
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
export class NaNError extends DecodeError {
|
|
109
|
-
constructor() {
|
|
110
|
-
super(...arguments);
|
|
111
|
-
this._tag = "NaN";
|
|
112
|
-
this.render = tsplus_module_4.now(tsplus_module_2.make("value is NaN"));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
export class InfinityError extends DecodeError {
|
|
116
|
-
constructor() {
|
|
117
|
-
super(...arguments);
|
|
118
|
-
this._tag = "Infinity";
|
|
119
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make("value is Infinity"));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
export class BooleanError extends DecodeError {
|
|
123
|
-
constructor(actual) {
|
|
124
|
-
super();
|
|
125
|
-
this.actual = actual;
|
|
126
|
-
this._tag = "Boolean";
|
|
127
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, "a boolean")));
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
export class PrimitiveError extends DecodeError {
|
|
131
|
-
constructor(actual, name) {
|
|
132
|
-
super();
|
|
133
|
-
this.actual = actual;
|
|
134
|
-
this.name = name;
|
|
135
|
-
this._tag = "Primitive";
|
|
136
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, this.name)));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
export class LiteralError extends DecodeError {
|
|
140
|
-
constructor(actual, literals) {
|
|
141
|
-
super();
|
|
142
|
-
this.actual = actual;
|
|
143
|
-
this.literals = literals;
|
|
144
|
-
this._tag = "Literal";
|
|
145
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, `one of ${tsplus_module_1.join(", ")(tsplus_module_1.map(literal => show(literal))(this.literals))}`)));
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
export class UnexpectedKeysError extends DecodeError {
|
|
149
|
-
constructor(keys) {
|
|
150
|
-
super();
|
|
151
|
-
this.keys = keys;
|
|
152
|
-
this._tag = "UnexpectedKeys";
|
|
153
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(`${this.keys.length} error(s) found while checking keys`, tsplus_module_1.map(key => tsplus_module_2.make(`unexpected key ${show(key)}`))(this.keys)));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
export class UnexpectedIndicesError extends DecodeError {
|
|
157
|
-
constructor(indices) {
|
|
158
|
-
super();
|
|
159
|
-
this.indices = indices;
|
|
160
|
-
this._tag = "UnexpectedIndices";
|
|
161
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(`${this.indices.length} error(s) found while checking indices`, tsplus_module_1.map(index => tsplus_module_2.make(`unexpected index ${show(index)}`))(this.indices)));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
export class MissingKeyError extends DecodeError {
|
|
165
|
-
constructor(key) {
|
|
166
|
-
super();
|
|
167
|
-
this.key = key;
|
|
168
|
-
this._tag = "MissingKeys";
|
|
169
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(`missing required key ${show(this.key)}`));
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
export class MissingIndicesError extends DecodeError {
|
|
173
|
-
constructor(keys) {
|
|
174
|
-
super();
|
|
175
|
-
this.keys = keys;
|
|
176
|
-
this._tag = "MissingIndices";
|
|
177
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(`${this.keys.length} error(s) found while checking indices`, tsplus_module_1.map(key => tsplus_module_2.make(`missing required index ${show(key)}`))(this.keys)));
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function cannotDecode(u, expected) {
|
|
181
|
-
return `cannot decode ${show(u)}, expected ${expected}`;
|
|
182
|
-
}
|
|
183
|
-
export class BrandedError extends DecodeError {
|
|
184
|
-
constructor(name, brands) {
|
|
185
|
-
super();
|
|
186
|
-
this.name = name;
|
|
187
|
-
this.brands = brands;
|
|
188
|
-
this._tag = "BrandedError";
|
|
189
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(`${this.brands.length} brand(s) failed to be validated while decoding ${this.name}`, tsplus_module_1.map(brand => tsplus_module_2.make(brand))(this.brands)));
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
export class UnionError extends DecodeError {
|
|
193
|
-
constructor(label, errors) {
|
|
194
|
-
super();
|
|
195
|
-
this.label = label;
|
|
196
|
-
this.errors = errors;
|
|
197
|
-
this._tag = "UnionError";
|
|
198
|
-
this.render = tsplus_module_4.defer(() => tsplus_module_3.map(errors => tsplus_module_2.make(`${this.errors.length} error(s) found while decoding ${this.label}`, errors))(tsplus_module_1._traverse(this.errors)(tsplus_module_5.Applicative)(error => error.render)));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export class EmptyError extends DecodeError {
|
|
202
|
-
constructor(actual) {
|
|
203
|
-
super();
|
|
204
|
-
this.actual = actual;
|
|
205
|
-
this._tag = "EmptyError";
|
|
206
|
-
this.render = tsplus_module_4.always(() => tsplus_module_2.make(cannotDecode(this.actual, "a collection containing at least one element")));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
//# sourceMappingURL=definition.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.mjs","names":["show","DecodeErrorTypeId","Symbol","for","DecodeError","constructor","_a","RequiredKeyError","key","error","_tag","render","tsplus_module_4","defer","tsplus_module_3","map","tsplus_module_2","make","tsplus_module_1","vector","OptionalKeyError","RequiredIndexError","index","OptionalIndexError","LazyError","MemberError","label","vowels","startsWithVowel","s","i","length","startsWith","CompoundError","name","errors","_traverse","tsplus_module_5","Applicative","CompositionError","unsafeGet","StringError","actual","always","cannotDecode","NumberError","NaNError","now","InfinityError","BooleanError","PrimitiveError","LiteralError","literals","join","literal","UnexpectedKeysError","keys","UnexpectedIndicesError","indices","MissingKeyError","MissingIndicesError","u","expected","BrandedError","brands","brand","UnionError","EmptyError"],"sources":["../../../_src/data/DecodeError/definition.ts"],"sourcesContent":[null],"mappings":";;;;;;AAEA,SAASA,IAAI,QAAQ,2BAA2B;AAEhD,OAAO,MAAMC,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,mBAAmB,CAAC;AAGhE,OAAM,MAAgBC,WAAW;EAAjCC,YAAA;IACW,KAAAC,EAAA,CAAmB,GAAsBL,iBAAiB;EAErE;;KAFYA,iBAAiB;AAI7B,OAAM,MAAOM,gBAAiB,SAAQH,WAAW;EAE/CC,YACWG,GAAW,EACXC,KAAkB;IAE3B,KAAK,EAAE;IAHE,KAAAD,GAAG,GAAHA,GAAG;IACH,KAAAC,KAAK,GAALA,KAAK;IAHP,KAAAC,IAAI,GAAG,aAAa;IAO7B,KAAAC,MAAM,GAAGC,eAAA,CAAAC,KAAA,OAAWC,eAAA,CAAAC,GAAA,CAAuBN,KAAK,IAAKO,eAAA,CAAAC,IAAA,CAAS,mBAAmB,IAAI,CAACT,GAAG,EAAE,EAAEU,eAAA,CAAAC,MAAA,CAAOV,KAAK,CAAC,CAAC,EAAvF,IAAI,CAACA,KAAK,CAACE,MAAM,CAAuE,CAAC;EAD7G;;AAIF,OAAM,MAAOS,gBAAiB,SAAQhB,WAAW;EAE/CC,YACWG,GAAgB,EAChBC,KAAkB;IAE3B,KAAK,EAAE;IAHE,KAAAD,GAAG,GAAHA,GAAG;IACH,KAAAC,KAA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AAK,EAAE;IADY,KAAAA,MAAM,GAANA,MAAM;IADlB,KAAAhC,IAAI,GAAG,YAAY;IAI5B,KAAAC,MAAM,GAAGC,eAAA,CAAA+B,MAAA,OAAK3B,eAAA,CAAAC,IAAA,CAAS2B,YAAY,CAAC,IAAI,CAACF,MAAM,EAAE,8CAA8C,CAAC,CAAC,CAAC;EADlG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instances.mjs","names":[],"sources":["../../../_src/data/DecodeError/instances.ts"],"sourcesContent":[null],"mappings":""}
|