@fncts/schema 0.0.24 → 0.0.25
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/LICENSE +26 -0
- package/_cjs/AST.cjs +1093 -1226
- package/_cjs/AST.cjs.map +1 -1
- package/_cjs/ASTAnnotation.cjs +114 -85
- package/_cjs/ASTAnnotation.cjs.map +1 -1
- package/_cjs/ASTAnnotationMap.cjs +43 -41
- package/_cjs/ASTAnnotationMap.cjs.map +1 -1
- package/_cjs/Eq.cjs +113 -145
- package/_cjs/Eq.cjs.map +1 -1
- package/_cjs/Gen.cjs +131 -167
- package/_cjs/Gen.cjs.map +1 -1
- package/_cjs/Guard.cjs +167 -267
- package/_cjs/Guard.cjs.map +1 -1
- package/_cjs/InvalidInterpretationError.cjs +9 -10
- package/_cjs/InvalidInterpretationError.cjs.map +1 -1
- package/_cjs/ParseError/ParseError.cjs +283 -284
- package/_cjs/ParseError/ParseError.cjs.map +1 -1
- package/_cjs/ParseError/ParseErrorFormatter.cjs +0 -2
- package/_cjs/ParseError/PathFormatter.cjs +55 -87
- package/_cjs/ParseError/PathFormatter.cjs.map +1 -1
- package/_cjs/ParseError/TreeFormatter.cjs +70 -102
- package/_cjs/ParseError/TreeFormatter.cjs.map +1 -1
- package/_cjs/ParseError.cjs +35 -50
- package/_cjs/ParseResult.cjs +15 -15
- package/_cjs/ParseResult.cjs.map +1 -1
- package/_cjs/Parser/api.cjs +54 -50
- package/_cjs/Parser/api.cjs.map +1 -1
- package/_cjs/Parser/definition.cjs +17 -16
- package/_cjs/Parser/definition.cjs.map +1 -1
- package/_cjs/Parser/interpreter.cjs +276 -358
- package/_cjs/Parser/interpreter.cjs.map +1 -1
- package/_cjs/Parser.cjs +12 -39
- package/_cjs/Schema/api/conc.cjs +64 -59
- package/_cjs/Schema/api/conc.cjs.map +1 -1
- package/_cjs/Schema/api/either.cjs +73 -72
- package/_cjs/Schema/api/either.cjs.map +1 -1
- package/_cjs/Schema/api/hashMap.cjs +85 -85
- package/_cjs/Schema/api/hashMap.cjs.map +1 -1
- package/_cjs/Schema/api/hashSet.cjs +75 -69
- package/_cjs/Schema/api/hashSet.cjs.map +1 -1
- package/_cjs/Schema/api/list.cjs +74 -66
- package/_cjs/Schema/api/list.cjs.map +1 -1
- package/_cjs/Schema/api/map.cjs +81 -83
- package/_cjs/Schema/api/map.cjs.map +1 -1
- package/_cjs/Schema/api/maybe.cjs +56 -49
- package/_cjs/Schema/api/maybe.cjs.map +1 -1
- package/_cjs/Schema/api/set.cjs +68 -61
- package/_cjs/Schema/api/set.cjs.map +1 -1
- package/_cjs/Schema/api.cjs +332 -350
- package/_cjs/Schema/api.cjs.map +1 -1
- package/_cjs/Schema/definition.cjs +28 -26
- package/_cjs/Schema/definition.cjs.map +1 -1
- package/_cjs/Schema/derivations.cjs +85 -100
- package/_cjs/Schema/derivations.cjs.map +1 -1
- package/_cjs/Schema.cjs +95 -127
- package/_cjs/Show.cjs +91 -151
- package/_cjs/Show.cjs.map +1 -1
- package/_cjs/chunk.cjs +28 -0
- package/_cjs/global.cjs +0 -2
- package/_cjs/index.cjs +0 -2
- package/_cjs/utils.cjs +41 -46
- package/_cjs/utils.cjs.map +1 -1
- package/_mjs/AST.mjs +996 -1161
- package/_mjs/AST.mjs.map +1 -1
- package/_mjs/ASTAnnotation.mjs +77 -73
- package/_mjs/ASTAnnotation.mjs.map +1 -1
- package/_mjs/ASTAnnotationMap.mjs +31 -29
- package/_mjs/ASTAnnotationMap.mjs.map +1 -1
- package/_mjs/Eq.mjs +101 -134
- package/_mjs/Eq.mjs.map +1 -1
- package/_mjs/Gen.mjs +117 -157
- package/_mjs/Gen.mjs.map +1 -1
- package/_mjs/Guard.mjs +154 -257
- package/_mjs/Guard.mjs.map +1 -1
- package/_mjs/InvalidInterpretationError.mjs +8 -4
- package/_mjs/InvalidInterpretationError.mjs.map +1 -1
- package/_mjs/ParseError/ParseError.mjs +266 -262
- package/_mjs/ParseError/ParseError.mjs.map +1 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs +0 -2
- package/_mjs/ParseError/PathFormatter.mjs +51 -80
- package/_mjs/ParseError/PathFormatter.mjs.map +1 -1
- package/_mjs/ParseError/TreeFormatter.mjs +62 -94
- package/_mjs/ParseError/TreeFormatter.mjs.map +1 -1
- package/_mjs/ParseError.mjs +5 -6
- package/_mjs/ParseResult.mjs +13 -9
- package/_mjs/ParseResult.mjs.map +1 -1
- package/_mjs/Parser/api.mjs +43 -39
- package/_mjs/Parser/api.mjs.map +1 -1
- package/_mjs/Parser/definition.mjs +12 -8
- package/_mjs/Parser/definition.mjs.map +1 -1
- package/_mjs/Parser/interpreter.mjs +262 -348
- package/_mjs/Parser/interpreter.mjs.map +1 -1
- package/_mjs/Parser.mjs +4 -5
- package/_mjs/Schema/api/conc.mjs +41 -45
- package/_mjs/Schema/api/conc.mjs.map +1 -1
- package/_mjs/Schema/api/either.mjs +55 -61
- package/_mjs/Schema/api/either.mjs.map +1 -1
- package/_mjs/Schema/api/hashMap.mjs +61 -71
- package/_mjs/Schema/api/hashMap.mjs.map +1 -1
- package/_mjs/Schema/api/hashSet.mjs +53 -56
- package/_mjs/Schema/api/hashSet.mjs.map +1 -1
- package/_mjs/Schema/api/list.mjs +50 -53
- package/_mjs/Schema/api/list.mjs.map +1 -1
- package/_mjs/Schema/api/map.mjs +59 -69
- package/_mjs/Schema/api/map.mjs.map +1 -1
- package/_mjs/Schema/api/maybe.mjs +34 -36
- package/_mjs/Schema/api/maybe.mjs.map +1 -1
- package/_mjs/Schema/api/set.mjs +47 -48
- package/_mjs/Schema/api/set.mjs.map +1 -1
- package/_mjs/Schema/api.mjs +304 -346
- package/_mjs/Schema/api.mjs.map +1 -1
- package/_mjs/Schema/definition.mjs +21 -17
- package/_mjs/Schema/definition.mjs.map +1 -1
- package/_mjs/Schema/derivations.mjs +71 -90
- package/_mjs/Schema/derivations.mjs.map +1 -1
- package/_mjs/Schema.mjs +12 -15
- package/_mjs/Show.mjs +79 -139
- package/_mjs/Show.mjs.map +1 -1
- package/_mjs/global.mjs +0 -2
- package/_mjs/index.mjs +0 -2
- package/_mjs/utils.mjs +35 -37
- package/_mjs/utils.mjs.map +1 -1
- package/package.json +7 -3
- package/_cjs/ParseError/ParseErrorFormatter.cjs.map +0 -1
- package/_cjs/ParseError.cjs.map +0 -1
- package/_cjs/Parser.cjs.map +0 -1
- package/_cjs/Schema.cjs.map +0 -1
- package/_cjs/global.cjs.map +0 -1
- package/_cjs/index.cjs.map +0 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs.map +0 -1
- package/_mjs/ParseError.mjs.map +0 -1
- package/_mjs/Parser.mjs.map +0 -1
- package/_mjs/Schema.mjs.map +0 -1
- package/_mjs/global.mjs.map +0 -1
- package/_mjs/index.mjs.map +0 -1
package/_cjs/AST.cjs
CHANGED
|
@@ -1,1371 +1,1238 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.isUnion = isUnion;
|
|
44
|
-
exports.isUniqueSymbol = void 0;
|
|
45
|
-
exports.keyof = keyof;
|
|
46
|
-
exports.objectKeyword = exports.numberKeyword = exports.neverKeyword = exports.keysOf = void 0;
|
|
47
|
-
exports.omit = omit;
|
|
48
|
-
exports.partial = void 0;
|
|
49
|
-
exports.pick = pick;
|
|
50
|
-
exports.setAnnotation = setAnnotation;
|
|
51
|
-
exports.voidKeyword = exports.unknownRecord = exports.unknownKeyword = exports.unknownArray = exports.undefinedKeyword = exports.symbolKeyword = exports.stringKeyword = void 0;
|
|
52
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Equatable/definition"));
|
|
53
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Show"));
|
|
54
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/util/predicates"));
|
|
55
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ASTAnnotation"));
|
|
56
|
-
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/definition"));
|
|
57
|
-
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/api"));
|
|
58
|
-
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
59
|
-
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseResult"));
|
|
60
|
-
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseError/ParseError"));
|
|
61
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/number/instances"));
|
|
62
|
-
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/contramap"));
|
|
63
|
-
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api"));
|
|
64
|
-
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/max"));
|
|
65
|
-
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/Iterable/api"));
|
|
66
|
-
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
|
|
67
|
-
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
|
|
68
|
-
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/internal"));
|
|
69
|
-
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/api"));
|
|
70
|
-
var _Showable = /*#__PURE__*/require("@fncts/base/data/Showable");
|
|
71
|
-
var _utils = /*#__PURE__*/require("@fncts/schema/utils");
|
|
72
|
-
var _ASTAnnotationMap = /*#__PURE__*/require("./ASTAnnotationMap.cjs");
|
|
73
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("./chunk.cjs");
|
|
3
|
+
const require_ASTAnnotationMap = require("./ASTAnnotationMap.cjs");
|
|
4
|
+
let _fncts_base_collection_immutable_Vector_api = require("@fncts/base/collection/immutable/Vector/api");
|
|
5
|
+
_fncts_base_collection_immutable_Vector_api = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_api, 1);
|
|
6
|
+
let _fncts_base_data_Showable = require("@fncts/base/data/Showable");
|
|
7
|
+
let _fncts_base_data_Maybe_api = require("@fncts/base/data/Maybe/api");
|
|
8
|
+
_fncts_base_data_Maybe_api = require_chunk.__toESM(_fncts_base_data_Maybe_api, 1);
|
|
9
|
+
let _fncts_base_data_Maybe_constructors = require("@fncts/base/data/Maybe/constructors");
|
|
10
|
+
_fncts_base_data_Maybe_constructors = require_chunk.__toESM(_fncts_base_data_Maybe_constructors, 1);
|
|
11
|
+
let _fncts_base_data_Maybe_destructors = require("@fncts/base/data/Maybe/destructors");
|
|
12
|
+
_fncts_base_data_Maybe_destructors = require_chunk.__toESM(_fncts_base_data_Maybe_destructors, 1);
|
|
13
|
+
let _fncts_schema_utils = require("@fncts/schema/utils");
|
|
14
|
+
let _fncts_schema_ASTAnnotation = require("@fncts/schema/ASTAnnotation");
|
|
15
|
+
_fncts_schema_ASTAnnotation = require_chunk.__toESM(_fncts_schema_ASTAnnotation, 1);
|
|
16
|
+
let _fncts_schema_ParseResult = require("@fncts/schema/ParseResult");
|
|
17
|
+
_fncts_schema_ParseResult = require_chunk.__toESM(_fncts_schema_ParseResult, 1);
|
|
18
|
+
let _fncts_base_data_Maybe_definition = require("@fncts/base/data/Maybe/definition");
|
|
19
|
+
_fncts_base_data_Maybe_definition = require_chunk.__toESM(_fncts_base_data_Maybe_definition, 1);
|
|
20
|
+
let _fncts_base_data_Equatable_definition = require("@fncts/base/data/Equatable/definition");
|
|
21
|
+
_fncts_base_data_Equatable_definition = require_chunk.__toESM(_fncts_base_data_Equatable_definition, 1);
|
|
22
|
+
let _fncts_schema_Show = require("@fncts/schema/Show");
|
|
23
|
+
_fncts_schema_Show = require_chunk.__toESM(_fncts_schema_Show, 1);
|
|
24
|
+
let _fncts_base_util_predicates = require("@fncts/base/util/predicates");
|
|
25
|
+
_fncts_base_util_predicates = require_chunk.__toESM(_fncts_base_util_predicates, 1);
|
|
26
|
+
let _fncts_base_collection_immutable_Vector_definition = require("@fncts/base/collection/immutable/Vector/definition");
|
|
27
|
+
_fncts_base_collection_immutable_Vector_definition = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_definition, 1);
|
|
28
|
+
let _fncts_schema_ParseError_ParseError = require("@fncts/schema/ParseError/ParseError");
|
|
29
|
+
_fncts_schema_ParseError_ParseError = require_chunk.__toESM(_fncts_schema_ParseError_ParseError, 1);
|
|
30
|
+
let _fncts_base_data_number_instances = require("@fncts/base/data/number/instances");
|
|
31
|
+
_fncts_base_data_number_instances = require_chunk.__toESM(_fncts_base_data_number_instances, 1);
|
|
32
|
+
let _fncts_base_data_Ord_api_contramap = require("@fncts/base/data/Ord/api/contramap");
|
|
33
|
+
_fncts_base_data_Ord_api_contramap = require_chunk.__toESM(_fncts_base_data_Ord_api_contramap, 1);
|
|
34
|
+
let _fncts_base_data_Ord_api = require("@fncts/base/data/Ord/api");
|
|
35
|
+
_fncts_base_data_Ord_api = require_chunk.__toESM(_fncts_base_data_Ord_api, 1);
|
|
36
|
+
let _fncts_base_data_Ord_api_max = require("@fncts/base/data/Ord/api/max");
|
|
37
|
+
_fncts_base_data_Ord_api_max = require_chunk.__toESM(_fncts_base_data_Ord_api_max, 1);
|
|
38
|
+
let _fncts_base_collection_Iterable_api = require("@fncts/base/collection/Iterable/api");
|
|
39
|
+
_fncts_base_collection_Iterable_api = require_chunk.__toESM(_fncts_base_collection_Iterable_api, 1);
|
|
40
|
+
let _fncts_base_collection_immutable_Vector_internal = require("@fncts/base/collection/immutable/Vector/internal");
|
|
41
|
+
_fncts_base_collection_immutable_Vector_internal = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_internal, 1);
|
|
42
|
+
//#region build/esm/AST.js
|
|
74
43
|
const fileName_1 = "(@fncts/schema) src/AST.ts";
|
|
75
|
-
const createLiteral =
|
|
76
|
-
const isLiteral =
|
|
77
|
-
const createUniqueSymbol =
|
|
78
|
-
const isUniqueSymbol =
|
|
79
|
-
const isStringKeyword =
|
|
80
|
-
const isNumberKeyword =
|
|
81
|
-
const isSymbolKeyword =
|
|
82
|
-
const createTemplateLiteral =
|
|
83
|
-
const createElement =
|
|
84
|
-
const createTuple =
|
|
85
|
-
const createPropertySignature =
|
|
86
|
-
const createIndexSignature =
|
|
87
|
-
const createTypeLiteral =
|
|
88
|
-
const createUnion =
|
|
89
|
-
const createLazy =
|
|
90
|
-
const createRefinement =
|
|
91
|
-
const getPropertySignatures =
|
|
92
|
-
const keysOf =
|
|
93
|
-
const partial =
|
|
94
|
-
const getFrom =
|
|
95
|
-
const getTo =
|
|
96
|
-
const ASTTypeId =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
44
|
+
const createLiteral = createLiteral_1;
|
|
45
|
+
const isLiteral = isLiteral_1;
|
|
46
|
+
const createUniqueSymbol = createUniqueSymbol_1;
|
|
47
|
+
const isUniqueSymbol = isUniqueSymbol_1;
|
|
48
|
+
const isStringKeyword = isStringKeyword_1;
|
|
49
|
+
const isNumberKeyword = isNumberKeyword_1;
|
|
50
|
+
const isSymbolKeyword = isSymbolKeyword_1;
|
|
51
|
+
const createTemplateLiteral = createTemplateLiteral_1;
|
|
52
|
+
const createElement = createElement_1;
|
|
53
|
+
const createTuple = createTuple_1;
|
|
54
|
+
const createPropertySignature = createPropertySignature_1;
|
|
55
|
+
const createIndexSignature = createIndexSignature_1;
|
|
56
|
+
const createTypeLiteral = createTypeLiteral_1;
|
|
57
|
+
const createUnion = createUnion_1;
|
|
58
|
+
const createLazy = createLazy_1;
|
|
59
|
+
const createRefinement = createRefinement_1;
|
|
60
|
+
const getPropertySignatures = getPropertySignatures_1;
|
|
61
|
+
const keysOf = keysOf_1;
|
|
62
|
+
const partial = partial_1;
|
|
63
|
+
const getFrom = getFrom_1;
|
|
64
|
+
const getTo = getTo_1;
|
|
65
|
+
const ASTTypeId = Symbol.for("fncts.schema.AST");
|
|
66
|
+
var Annotated = class {
|
|
67
|
+
annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty;
|
|
68
|
+
};
|
|
100
69
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
70
|
+
* @tsplus type fncts.schema.AST
|
|
71
|
+
* @tsplus companion fncts.schema.ASTOps
|
|
72
|
+
*/
|
|
73
|
+
var AST = class extends Annotated {
|
|
74
|
+
[ASTTypeId] = ASTTypeId;
|
|
75
|
+
toString(verbose = false) {
|
|
76
|
+
return _fncts_schema_Show.showAST(verbose)(this);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
111
79
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
function concrete(_) {
|
|
117
|
-
//
|
|
118
|
-
}
|
|
80
|
+
* @tsplus static fncts.schema.ASTOps concrete
|
|
81
|
+
* @tsplus macro remove
|
|
82
|
+
*/
|
|
83
|
+
function concrete(_) {}
|
|
119
84
|
function isAST(u) {
|
|
120
|
-
|
|
85
|
+
return _fncts_base_util_predicates.isObject(u) && ASTTypeId in u;
|
|
121
86
|
}
|
|
122
87
|
function hasTag(u, tag) {
|
|
123
|
-
|
|
88
|
+
return isAST(u) && u._tag === tag;
|
|
124
89
|
}
|
|
125
90
|
function getAnnotations(key) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
91
|
+
return (self) => {
|
|
92
|
+
return self.annotations.get(key);
|
|
93
|
+
};
|
|
129
94
|
}
|
|
130
|
-
/*
|
|
131
|
-
* Declaration
|
|
132
|
-
*/
|
|
133
95
|
/**
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
class Declaration extends AST {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
96
|
+
* @tsplus type fncts.schema.AST.Declaration
|
|
97
|
+
*/
|
|
98
|
+
var Declaration = class Declaration extends AST {
|
|
99
|
+
typeParameters;
|
|
100
|
+
decode;
|
|
101
|
+
encode;
|
|
102
|
+
annotations;
|
|
103
|
+
_tag = 0;
|
|
104
|
+
constructor(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
105
|
+
super();
|
|
106
|
+
this.typeParameters = typeParameters;
|
|
107
|
+
this.decode = decode;
|
|
108
|
+
this.encode = encode;
|
|
109
|
+
this.annotations = annotations;
|
|
110
|
+
}
|
|
111
|
+
clone(newProperties) {
|
|
112
|
+
return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
|
|
113
|
+
}
|
|
114
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
115
|
+
return hasTag(that, 0) && context.comparator(this.typeParameters, that.typeParameters) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
156
118
|
/**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return new Declaration(typeParameters, decode, encode, annotations);
|
|
119
|
+
* @tsplus static fncts.schema.ASTOps createDeclaration
|
|
120
|
+
*/
|
|
121
|
+
function createDeclaration(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
122
|
+
return new Declaration(typeParameters, decode, encode, annotations);
|
|
162
123
|
}
|
|
163
124
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
125
|
+
* @tsplus fluent fncts.schema.AST isDeclaration
|
|
126
|
+
*/
|
|
166
127
|
function isDeclaration(self) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
128
|
+
return self._tag === 0;
|
|
129
|
+
}
|
|
130
|
+
var Literal = class Literal extends AST {
|
|
131
|
+
literal;
|
|
132
|
+
annotations;
|
|
133
|
+
_tag = 1;
|
|
134
|
+
constructor(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
135
|
+
super();
|
|
136
|
+
this.literal = literal;
|
|
137
|
+
this.annotations = annotations;
|
|
138
|
+
}
|
|
139
|
+
clone(newProperties) {
|
|
140
|
+
return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
|
|
141
|
+
}
|
|
142
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
143
|
+
return hasTag(that, 1) && context.comparator(this.literal, that.literal) && context.comparator(this.annotations, that.annotations);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
186
146
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return new Literal(literal, annotations);
|
|
147
|
+
* @tsplus static fncts.schema.ASTOps createLiteral
|
|
148
|
+
*/
|
|
149
|
+
function createLiteral_1(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
150
|
+
return new Literal(literal, annotations);
|
|
192
151
|
}
|
|
193
152
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
153
|
+
* @tsplus fluent fncts.schema.AST isLiteral
|
|
154
|
+
*/
|
|
196
155
|
function isLiteral_1(self) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
216
|
-
return hasTag(that, 2 /* ASTTag.UniqueSymbol */) && context.comparator(this.symbol, that.symbol) && context.comparator(this.annotations, that.annotations);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
156
|
+
return self._tag === 1;
|
|
157
|
+
}
|
|
158
|
+
var UniqueSymbol = class UniqueSymbol extends AST {
|
|
159
|
+
symbol;
|
|
160
|
+
annotations;
|
|
161
|
+
_tag = 2;
|
|
162
|
+
constructor(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
163
|
+
super();
|
|
164
|
+
this.symbol = symbol;
|
|
165
|
+
this.annotations = annotations;
|
|
166
|
+
}
|
|
167
|
+
clone(newProperties) {
|
|
168
|
+
return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
|
|
169
|
+
}
|
|
170
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
171
|
+
return hasTag(that, 2) && context.comparator(this.symbol, that.symbol) && context.comparator(this.annotations, that.annotations);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
219
174
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
return new UniqueSymbol(symbol, annotations);
|
|
175
|
+
* @tsplus static fncts.schema.ASTOps createUniqueSymbol
|
|
176
|
+
*/
|
|
177
|
+
function createUniqueSymbol_1(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
178
|
+
return new UniqueSymbol(symbol, annotations);
|
|
225
179
|
}
|
|
226
180
|
/**
|
|
227
|
-
|
|
228
|
-
|
|
181
|
+
* @tsplus fluent fncts.schema.AST isUniqueSymbol
|
|
182
|
+
*/
|
|
229
183
|
function isUniqueSymbol_1(self) {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
247
|
-
return hasTag(that, 3 /* ASTTag.UndefinedKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
184
|
+
return self._tag === 2;
|
|
185
|
+
}
|
|
186
|
+
var UndefinedKeyword = class UndefinedKeyword extends AST {
|
|
187
|
+
annotations;
|
|
188
|
+
_tag = 3;
|
|
189
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
190
|
+
super();
|
|
191
|
+
this.annotations = annotations;
|
|
192
|
+
}
|
|
193
|
+
clone(newProperties) {
|
|
194
|
+
return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
|
|
195
|
+
}
|
|
196
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
197
|
+
return hasTag(that, 3) && context.comparator(this.annotations, that.annotations);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
250
200
|
/**
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
270
|
-
return hasTag(that, 4 /* ASTTag.VoidKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
201
|
+
* @tsplus static fncts.schema.ASTOps undefinedKeyword
|
|
202
|
+
*/
|
|
203
|
+
const undefinedKeyword_1 = new UndefinedKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "undefined"));
|
|
204
|
+
const undefinedKeyword = undefinedKeyword_1;
|
|
205
|
+
var VoidKeyword = class VoidKeyword extends AST {
|
|
206
|
+
annotations;
|
|
207
|
+
_tag = 4;
|
|
208
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
209
|
+
super();
|
|
210
|
+
this.annotations = annotations;
|
|
211
|
+
}
|
|
212
|
+
clone(newProperties) {
|
|
213
|
+
return new VoidKeyword(newProperties.annotations ?? this.annotations);
|
|
214
|
+
}
|
|
215
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
216
|
+
return hasTag(that, 4) && context.comparator(this.annotations, that.annotations);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
273
219
|
/**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
292
|
-
return hasTag(that, 5 /* ASTTag.NeverKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
220
|
+
* @tsplus static fncts.schema.ASTOps voidKeyword
|
|
221
|
+
*/
|
|
222
|
+
const voidKeyword = new VoidKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "void"));
|
|
223
|
+
var NeverKeyword = class NeverKeyword extends AST {
|
|
224
|
+
annotations;
|
|
225
|
+
_tag = 5;
|
|
226
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
227
|
+
super();
|
|
228
|
+
this.annotations = annotations;
|
|
229
|
+
}
|
|
230
|
+
clone(newProperties) {
|
|
231
|
+
return new NeverKeyword(newProperties.annotations ?? this.annotations);
|
|
232
|
+
}
|
|
233
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
234
|
+
return hasTag(that, 5) && context.comparator(this.annotations, that.annotations);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
295
237
|
/**
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
315
|
-
return hasTag(that, 6 /* ASTTag.UnknownKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
238
|
+
* @tsplus static fncts.schema.ASTOps neverKeyword
|
|
239
|
+
*/
|
|
240
|
+
const neverKeyword_1 = new NeverKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "never"));
|
|
241
|
+
const neverKeyword = neverKeyword_1;
|
|
242
|
+
var UnknownKeyword = class UnknownKeyword extends AST {
|
|
243
|
+
annotations;
|
|
244
|
+
_tag = 6;
|
|
245
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
246
|
+
super();
|
|
247
|
+
this.annotations = annotations;
|
|
248
|
+
}
|
|
249
|
+
clone(newProperties) {
|
|
250
|
+
return new UnknownKeyword(newProperties.annotations ?? this.annotations);
|
|
251
|
+
}
|
|
252
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
253
|
+
return hasTag(that, 6) && context.comparator(this.annotations, that.annotations);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
318
256
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
338
|
-
return hasTag(that, 7 /* ASTTag.AnyKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
257
|
+
* @tsplus static fncts.schema.ASTOps unknownKeyword
|
|
258
|
+
*/
|
|
259
|
+
const unknownKeyword_1 = new UnknownKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "unknown"));
|
|
260
|
+
const unknownKeyword = unknownKeyword_1;
|
|
261
|
+
var AnyKeyword = class AnyKeyword extends AST {
|
|
262
|
+
annotations;
|
|
263
|
+
_tag = 7;
|
|
264
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
265
|
+
super();
|
|
266
|
+
this.annotations = annotations;
|
|
267
|
+
}
|
|
268
|
+
clone(newProperties) {
|
|
269
|
+
return new AnyKeyword(newProperties.annotations ?? this.annotations);
|
|
270
|
+
}
|
|
271
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
272
|
+
return hasTag(that, 7) && context.comparator(this.annotations, that.annotations);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
341
275
|
/**
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
360
|
-
return hasTag(that, 8 /* ASTTag.StringKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
276
|
+
* @tsplus static fncts.schema.ASTOps anyKeyword
|
|
277
|
+
*/
|
|
278
|
+
const anyKeyword = new AnyKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "any"));
|
|
279
|
+
var StringKeyword = class StringKeyword extends AST {
|
|
280
|
+
annotations;
|
|
281
|
+
_tag = 8;
|
|
282
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
283
|
+
super();
|
|
284
|
+
this.annotations = annotations;
|
|
285
|
+
}
|
|
286
|
+
clone(newProperties) {
|
|
287
|
+
return new StringKeyword(newProperties.annotations ?? this.annotations);
|
|
288
|
+
}
|
|
289
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
290
|
+
return hasTag(that, 8) && context.comparator(this.annotations, that.annotations);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
363
293
|
/**
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
const stringKeyword = exports.stringKeyword = stringKeyword_1;
|
|
294
|
+
* @tsplus static fncts.schema.ASTOps stringKeyword
|
|
295
|
+
*/
|
|
296
|
+
const stringKeyword_1 = new StringKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "string"));
|
|
297
|
+
const stringKeyword = stringKeyword_1;
|
|
369
298
|
/**
|
|
370
|
-
|
|
371
|
-
|
|
299
|
+
* @tsplus fluent fncts.schema.AST isStringKeyword
|
|
300
|
+
*/
|
|
372
301
|
function isStringKeyword_1(self) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
390
|
-
return hasTag(that, 9 /* ASTTag.NumberKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
302
|
+
return self._tag === 8;
|
|
303
|
+
}
|
|
304
|
+
var NumberKeyword = class NumberKeyword extends AST {
|
|
305
|
+
annotations;
|
|
306
|
+
_tag = 9;
|
|
307
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
308
|
+
super();
|
|
309
|
+
this.annotations = annotations;
|
|
310
|
+
}
|
|
311
|
+
clone(newProperties) {
|
|
312
|
+
return new NumberKeyword(newProperties.annotations ?? this.annotations);
|
|
313
|
+
}
|
|
314
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
315
|
+
return hasTag(that, 9) && context.comparator(this.annotations, that.annotations);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
393
318
|
/**
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
const numberKeyword = exports.numberKeyword = numberKeyword_1;
|
|
319
|
+
* @tsplus static fncts.schema.ASTOps numberKeyword
|
|
320
|
+
*/
|
|
321
|
+
const numberKeyword_1 = new NumberKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "number"));
|
|
322
|
+
const numberKeyword = numberKeyword_1;
|
|
399
323
|
/**
|
|
400
|
-
|
|
401
|
-
|
|
324
|
+
* @tsplus fluent fncts.schema.AST isNumberKeyword
|
|
325
|
+
*/
|
|
402
326
|
function isNumberKeyword_1(self) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
420
|
-
return hasTag(that, 10 /* ASTTag.BooleanKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
327
|
+
return self._tag === 9;
|
|
328
|
+
}
|
|
329
|
+
var BooleanKeyword = class BooleanKeyword extends AST {
|
|
330
|
+
annotations;
|
|
331
|
+
_tag = 10;
|
|
332
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
333
|
+
super();
|
|
334
|
+
this.annotations = annotations;
|
|
335
|
+
}
|
|
336
|
+
clone(newProperties) {
|
|
337
|
+
return new BooleanKeyword(newProperties.annotations ?? this.annotations);
|
|
338
|
+
}
|
|
339
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
340
|
+
return hasTag(that, 10) && context.comparator(this.annotations, that.annotations);
|
|
341
|
+
}
|
|
342
|
+
};
|
|
423
343
|
/**
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
const booleanKeyword = exports.booleanKeyword = /*#__PURE__*/new BooleanKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "boolean"));
|
|
344
|
+
* @tsplus static fncts.schema.ASTOps booleanKeyword
|
|
345
|
+
*/
|
|
346
|
+
const booleanKeyword = new BooleanKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "boolean"));
|
|
428
347
|
/**
|
|
429
|
-
|
|
430
|
-
|
|
348
|
+
* @tsplus fluent fncts.schema.AST isBooleanKeyword
|
|
349
|
+
*/
|
|
431
350
|
function isBooleanKeyword(self) {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
449
|
-
return hasTag(that, 11 /* ASTTag.BigIntKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
351
|
+
return self._tag === 10;
|
|
352
|
+
}
|
|
353
|
+
var BigIntKeyword = class BigIntKeyword extends AST {
|
|
354
|
+
annotations;
|
|
355
|
+
_tag = 11;
|
|
356
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
357
|
+
super();
|
|
358
|
+
this.annotations = annotations;
|
|
359
|
+
}
|
|
360
|
+
clone(newProperties) {
|
|
361
|
+
return new BigIntKeyword(newProperties.annotations ?? this.annotations);
|
|
362
|
+
}
|
|
363
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
364
|
+
return hasTag(that, 11) && context.comparator(this.annotations, that.annotations);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
452
367
|
/**
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const bigIntKeyword = exports.bigIntKeyword = /*#__PURE__*/new BigIntKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "bigint"));
|
|
368
|
+
* @tsplus static fncts.schema.ASTOps bigIntKeyword
|
|
369
|
+
*/
|
|
370
|
+
const bigIntKeyword = new BigIntKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "bigint"));
|
|
457
371
|
/**
|
|
458
|
-
|
|
459
|
-
|
|
372
|
+
* @tsplus fluent fncts.schema.AST isBigIntKeyword
|
|
373
|
+
*/
|
|
460
374
|
function isBigIntKeyword(self) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
478
|
-
return hasTag(that, 12 /* ASTTag.SymbolKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
375
|
+
return self._tag === 11;
|
|
376
|
+
}
|
|
377
|
+
var SymbolKeyword = class SymbolKeyword extends AST {
|
|
378
|
+
annotations;
|
|
379
|
+
_tag = 12;
|
|
380
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
381
|
+
super();
|
|
382
|
+
this.annotations = annotations;
|
|
383
|
+
}
|
|
384
|
+
clone(newProperties) {
|
|
385
|
+
return new SymbolKeyword(newProperties.annotations ?? this.annotations);
|
|
386
|
+
}
|
|
387
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
388
|
+
return hasTag(that, 12) && context.comparator(this.annotations, that.annotations);
|
|
389
|
+
}
|
|
390
|
+
};
|
|
481
391
|
/**
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
const symbolKeyword = exports.symbolKeyword = symbolKeyword_1;
|
|
392
|
+
* @tsplus static fncts.schema.ASTOps symbolKeyword
|
|
393
|
+
*/
|
|
394
|
+
const symbolKeyword_1 = new SymbolKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "symbol"));
|
|
395
|
+
const symbolKeyword = symbolKeyword_1;
|
|
487
396
|
/**
|
|
488
|
-
|
|
489
|
-
|
|
397
|
+
* @tsplus fluent fncts.schema.AST isSymbolKeyword
|
|
398
|
+
*/
|
|
490
399
|
function isSymbolKeyword_1(self) {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
508
|
-
return hasTag(that, 13 /* ASTTag.ObjectKeyword */) && context.comparator(this.annotations, that.annotations);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
400
|
+
return self._tag === 12;
|
|
401
|
+
}
|
|
402
|
+
var ObjectKeyword = class ObjectKeyword extends AST {
|
|
403
|
+
annotations;
|
|
404
|
+
_tag = 13;
|
|
405
|
+
constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
406
|
+
super();
|
|
407
|
+
this.annotations = annotations;
|
|
408
|
+
}
|
|
409
|
+
clone(newProperties) {
|
|
410
|
+
return new ObjectKeyword(newProperties.annotations ?? this.annotations);
|
|
411
|
+
}
|
|
412
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
413
|
+
return hasTag(that, 13) && context.comparator(this.annotations, that.annotations);
|
|
414
|
+
}
|
|
415
|
+
};
|
|
511
416
|
/**
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
532
|
-
return hasTag(that, 14 /* ASTTag.Enum */) && tsplus_module_5.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) && context.comparator(this.annotations, that.annotations);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
417
|
+
* @tsplus static fncts.schema.ASTOps objectKeyword
|
|
418
|
+
*/
|
|
419
|
+
const objectKeyword = new ObjectKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "object"));
|
|
420
|
+
var Enum = class Enum extends AST {
|
|
421
|
+
enums;
|
|
422
|
+
annotations;
|
|
423
|
+
_tag = 14;
|
|
424
|
+
constructor(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
425
|
+
super();
|
|
426
|
+
this.enums = enums;
|
|
427
|
+
this.annotations = annotations;
|
|
428
|
+
}
|
|
429
|
+
clone(newProperties) {
|
|
430
|
+
return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
|
|
431
|
+
}
|
|
432
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
433
|
+
return hasTag(that, 14) && _fncts_base_collection_immutable_Vector_definition.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) && context.comparator(this.annotations, that.annotations);
|
|
434
|
+
}
|
|
435
|
+
};
|
|
535
436
|
/**
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
clone(newProperties) {
|
|
577
|
-
return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
|
|
578
|
-
}
|
|
579
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
580
|
-
return hasTag(that, 15 /* ASTTag.TemplateLiteral */) && context.comparator(this.head, that.head) && context.comparator(this.spans, that.spans) && context.comparator(this.annotations, that.annotations);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
437
|
+
* @tsplus static fncts.schema.ASTOps createEnum
|
|
438
|
+
*/
|
|
439
|
+
function createEnum(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
440
|
+
return new Enum(enums, annotations);
|
|
441
|
+
}
|
|
442
|
+
var TemplateLiteralSpan = class TemplateLiteralSpan {
|
|
443
|
+
type;
|
|
444
|
+
literal;
|
|
445
|
+
constructor(type, literal) {
|
|
446
|
+
this.type = type;
|
|
447
|
+
this.literal = literal;
|
|
448
|
+
}
|
|
449
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
450
|
+
return that instanceof TemplateLiteralSpan && context.comparator(this.type, that.type) && context.comparator(this.literal, that.literal);
|
|
451
|
+
}
|
|
452
|
+
toString() {
|
|
453
|
+
switch (this.type._tag) {
|
|
454
|
+
case 8: return "${string}";
|
|
455
|
+
case 9: return "${number}";
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
var TemplateLiteral = class extends AST {
|
|
460
|
+
head;
|
|
461
|
+
spans;
|
|
462
|
+
annotations;
|
|
463
|
+
_tag = 15;
|
|
464
|
+
constructor(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
465
|
+
super();
|
|
466
|
+
this.head = head;
|
|
467
|
+
this.spans = spans;
|
|
468
|
+
this.annotations = annotations;
|
|
469
|
+
}
|
|
470
|
+
clone(newProperties) {
|
|
471
|
+
return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
|
|
472
|
+
}
|
|
473
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
474
|
+
return hasTag(that, 15) && context.comparator(this.head, that.head) && context.comparator(this.spans, that.spans) && context.comparator(this.annotations, that.annotations);
|
|
475
|
+
}
|
|
476
|
+
};
|
|
583
477
|
/**
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
605
|
-
return that instanceof Element && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional);
|
|
606
|
-
}
|
|
607
|
-
toString() {
|
|
608
|
-
return String(this.type) + (this.isOptional ? "?" : "");
|
|
609
|
-
}
|
|
610
|
-
}
|
|
478
|
+
* @tsplus static fncts.schema.ASTOps createTemplateLiteral
|
|
479
|
+
*/
|
|
480
|
+
function createTemplateLiteral_1(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
481
|
+
if (_fncts_base_collection_immutable_Vector_api.isNonEmpty(spans)) return new TemplateLiteral(head, spans, annotations);
|
|
482
|
+
else return createLiteral_1(head, annotations);
|
|
483
|
+
}
|
|
484
|
+
var Element = class Element {
|
|
485
|
+
type;
|
|
486
|
+
isOptional;
|
|
487
|
+
constructor(type, isOptional) {
|
|
488
|
+
this.type = type;
|
|
489
|
+
this.isOptional = isOptional;
|
|
490
|
+
}
|
|
491
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
492
|
+
return that instanceof Element && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional);
|
|
493
|
+
}
|
|
494
|
+
toString() {
|
|
495
|
+
return String(this.type) + (this.isOptional ? "?" : "");
|
|
496
|
+
}
|
|
497
|
+
};
|
|
611
498
|
/**
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
exports.Element = Element;
|
|
499
|
+
* @tsplus static fncts.schema.ASTOps createElement
|
|
500
|
+
*/
|
|
615
501
|
function createElement_1(type, isOptional) {
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
return hasTag(that, 16 /* ASTTag.Tuple */) && context.comparator(this.elements, that.elements) && context.comparator(this.rest, that.rest) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
502
|
+
return new Element(type, isOptional);
|
|
503
|
+
}
|
|
504
|
+
var Tuple = class Tuple extends AST {
|
|
505
|
+
elements;
|
|
506
|
+
rest;
|
|
507
|
+
isReadonly;
|
|
508
|
+
annotations;
|
|
509
|
+
_tag = 16;
|
|
510
|
+
constructor(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
511
|
+
super();
|
|
512
|
+
this.elements = elements;
|
|
513
|
+
this.rest = rest;
|
|
514
|
+
this.isReadonly = isReadonly;
|
|
515
|
+
this.annotations = annotations;
|
|
516
|
+
}
|
|
517
|
+
clone(newProperties) {
|
|
518
|
+
return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
|
|
519
|
+
}
|
|
520
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
521
|
+
return hasTag(that, 16) && context.comparator(this.elements, that.elements) && context.comparator(this.rest, that.rest) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
|
|
522
|
+
}
|
|
523
|
+
};
|
|
641
524
|
/**
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
return new Tuple(elements, rest, isReadonly, annotations);
|
|
525
|
+
* @tsplus static fncts.schema.ASTOps createTuple
|
|
526
|
+
*/
|
|
527
|
+
function createTuple_1(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
528
|
+
return new Tuple(elements, rest, isReadonly, annotations);
|
|
647
529
|
}
|
|
648
530
|
/**
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
const unknownArray =
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
return that instanceof PropertySignature && context.comparator(this.name, that.name) && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
531
|
+
* @tsplus static fncts.schema.ASTOps unknownArray
|
|
532
|
+
*/
|
|
533
|
+
const unknownArray = createTuple_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(unknownKeyword_1), fileName_1 + ":779:65"), true);
|
|
534
|
+
var PropertySignature = class PropertySignature {
|
|
535
|
+
name;
|
|
536
|
+
type;
|
|
537
|
+
isOptional;
|
|
538
|
+
isReadonly;
|
|
539
|
+
annotations;
|
|
540
|
+
constructor(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
541
|
+
this.name = name;
|
|
542
|
+
this.type = type;
|
|
543
|
+
this.isOptional = isOptional;
|
|
544
|
+
this.isReadonly = isReadonly;
|
|
545
|
+
this.annotations = annotations;
|
|
546
|
+
}
|
|
547
|
+
clone(newProperties) {
|
|
548
|
+
return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
|
|
549
|
+
}
|
|
550
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
551
|
+
return that instanceof PropertySignature && context.comparator(this.name, that.name) && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
675
554
|
/**
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
695
|
-
return that instanceof IndexSignature && context.comparator(this.parameter, that.parameter) && context.comparator(this.type, that.type) && context.comparator(this.isReadonly, that.isReadonly);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
555
|
+
* @tsplus static fncts.schema.ASTOps createPropertySignature
|
|
556
|
+
*/
|
|
557
|
+
function createPropertySignature_1(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
558
|
+
return new PropertySignature(name, type, isOptional, isReadonly, annotations);
|
|
559
|
+
}
|
|
560
|
+
var IndexSignature = class IndexSignature {
|
|
561
|
+
parameter;
|
|
562
|
+
type;
|
|
563
|
+
isReadonly;
|
|
564
|
+
constructor(parameter, type, isReadonly) {
|
|
565
|
+
this.parameter = parameter;
|
|
566
|
+
this.type = type;
|
|
567
|
+
this.isReadonly = isReadonly;
|
|
568
|
+
}
|
|
569
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
570
|
+
return that instanceof IndexSignature && context.comparator(this.parameter, that.parameter) && context.comparator(this.type, that.type) && context.comparator(this.isReadonly, that.isReadonly);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
698
573
|
/**
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
exports.IndexSignature = IndexSignature;
|
|
574
|
+
* @tsplus static fncts.schema.ASTOps createIndexSignature
|
|
575
|
+
*/
|
|
702
576
|
function createIndexSignature_1(parameter, type, isReadonly) {
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
return hasTag(that, 17 /* ASTTag.TypeLiteral */) && context.comparator(this.propertySignatures, that.propertySignatures) && context.comparator(this.indexSignatures, that.indexSignatures) && context.comparator(this.annotations, that.annotations);
|
|
724
|
-
}
|
|
725
|
-
}
|
|
577
|
+
return new IndexSignature(parameter, type, isReadonly);
|
|
578
|
+
}
|
|
579
|
+
var TypeLiteral = class TypeLiteral extends AST {
|
|
580
|
+
annotations;
|
|
581
|
+
_tag = 17;
|
|
582
|
+
propertySignatures;
|
|
583
|
+
indexSignatures;
|
|
584
|
+
constructor(propertySignatures, indexSignatures, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
585
|
+
super();
|
|
586
|
+
this.annotations = annotations;
|
|
587
|
+
this.propertySignatures = sortByAscendingCardinality(propertySignatures);
|
|
588
|
+
this.indexSignatures = sortByAscendingCardinality(indexSignatures);
|
|
589
|
+
}
|
|
590
|
+
clone(newProperties) {
|
|
591
|
+
return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);
|
|
592
|
+
}
|
|
593
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
594
|
+
return hasTag(that, 17) && context.comparator(this.propertySignatures, that.propertySignatures) && context.comparator(this.indexSignatures, that.indexSignatures) && context.comparator(this.annotations, that.annotations);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
726
597
|
/**
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
exports.TypeLiteral = TypeLiteral;
|
|
598
|
+
* @tsplus static fncts.schema.ASTOps isTypeLiteral
|
|
599
|
+
* @tsplus fluent fncts.schema.AST isTypeLiteral
|
|
600
|
+
*/
|
|
731
601
|
function isTypeLiteral(self) {
|
|
732
|
-
|
|
733
|
-
return self._tag === 17 /* ASTTag.TypeLiteral */;
|
|
602
|
+
return self._tag === 17;
|
|
734
603
|
}
|
|
735
604
|
/**
|
|
736
|
-
|
|
737
|
-
|
|
605
|
+
* @tsplus static fncts.schema.ASTOps createTypeLiteral
|
|
606
|
+
*/
|
|
738
607
|
function createTypeLiteral_1(propertySignatures, indexSignatures, annotations) {
|
|
739
|
-
|
|
608
|
+
return new TypeLiteral(propertySignatures, indexSignatures, annotations);
|
|
740
609
|
}
|
|
741
610
|
/**
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
const unknownRecord =
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
return hasTag(that, 18 /* ASTTag.Union */) && context.comparator(this.types, that.types) && context.comparator(this.annotations, that.annotations);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
611
|
+
* @tsplus static fncts.schema.ASTOps unknownRecord
|
|
612
|
+
*/
|
|
613
|
+
const unknownRecord = createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_collection_immutable_Vector_api.vector(createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));
|
|
614
|
+
var Union = class extends AST {
|
|
615
|
+
types;
|
|
616
|
+
annotations;
|
|
617
|
+
_tag = 18;
|
|
618
|
+
constructor(types, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
619
|
+
super();
|
|
620
|
+
this.types = types;
|
|
621
|
+
this.annotations = annotations;
|
|
622
|
+
}
|
|
623
|
+
clone(newProperties) {
|
|
624
|
+
return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
|
|
625
|
+
}
|
|
626
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
627
|
+
return hasTag(that, 18) && context.comparator(this.types, that.types) && context.comparator(this.annotations, that.annotations);
|
|
628
|
+
}
|
|
629
|
+
};
|
|
764
630
|
/**
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
exports.Union = Union;
|
|
631
|
+
* @tsplus fluent fncts.schema.AST isUnion
|
|
632
|
+
*/
|
|
768
633
|
function isUnion(self) {
|
|
769
|
-
|
|
770
|
-
return self._tag === 18 /* ASTTag.Union */;
|
|
634
|
+
return self._tag === 18;
|
|
771
635
|
}
|
|
772
636
|
/**
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
function createUnion_1(candidates, annotations =
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
|
|
800
|
-
}
|
|
801
|
-
[tsplus_module_1.equalsSymbol](that) {
|
|
802
|
-
return this === that;
|
|
803
|
-
}
|
|
804
|
-
}
|
|
637
|
+
* @tsplus static fncts.schema.ASTOps createUnion
|
|
638
|
+
*/
|
|
639
|
+
function createUnion_1(candidates, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
640
|
+
const types = unify(candidates);
|
|
641
|
+
switch (types.length) {
|
|
642
|
+
case 0: return neverKeyword_1;
|
|
643
|
+
case 1: return _fncts_base_collection_immutable_Vector_api.unsafeGet(0)(types);
|
|
644
|
+
default: return new Union(sortByDescendingWeight(types), annotations);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
var Lazy = class Lazy extends AST {
|
|
648
|
+
getAST;
|
|
649
|
+
annotations;
|
|
650
|
+
_tag = 19;
|
|
651
|
+
constructor(getAST, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
652
|
+
super();
|
|
653
|
+
this.getAST = getAST;
|
|
654
|
+
this.annotations = annotations;
|
|
655
|
+
}
|
|
656
|
+
clone(newProperties) {
|
|
657
|
+
return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
|
|
658
|
+
}
|
|
659
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that) {
|
|
660
|
+
return this === that;
|
|
661
|
+
}
|
|
662
|
+
};
|
|
805
663
|
/**
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
exports.Lazy = Lazy;
|
|
664
|
+
* @tsplus static fncts.schema.ASTOps createLazy
|
|
665
|
+
*/
|
|
809
666
|
function createLazy_1(getAST, annotations) {
|
|
810
|
-
|
|
667
|
+
return new Lazy(getAST, annotations);
|
|
811
668
|
}
|
|
812
669
|
/**
|
|
813
|
-
|
|
814
|
-
|
|
670
|
+
* @tsplus fluent fncts.schema.AST isLazy
|
|
671
|
+
*/
|
|
815
672
|
function isLazy(self) {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
840
|
-
return hasTag(that, 20 /* ASTTag.Refinement */) && context.comparator(this.from, that.from) && context.comparator(this.predicate, that.predicate) && context.comparator(this.annotations, that.annotations);
|
|
841
|
-
}
|
|
842
|
-
}
|
|
673
|
+
return self._tag === 19;
|
|
674
|
+
}
|
|
675
|
+
var Refinement = class Refinement extends AST {
|
|
676
|
+
from;
|
|
677
|
+
predicate;
|
|
678
|
+
annotations;
|
|
679
|
+
_tag = 20;
|
|
680
|
+
constructor(from, predicate, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
681
|
+
super();
|
|
682
|
+
this.from = from;
|
|
683
|
+
this.predicate = predicate;
|
|
684
|
+
this.annotations = annotations;
|
|
685
|
+
}
|
|
686
|
+
decode(input, options) {
|
|
687
|
+
return this.predicate(input) ? _fncts_schema_ParseResult.succeed(input) : _fncts_schema_ParseResult.fail(_fncts_schema_ParseError_ParseError.typeError(this, input));
|
|
688
|
+
}
|
|
689
|
+
clone(newProperties) {
|
|
690
|
+
return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);
|
|
691
|
+
}
|
|
692
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
693
|
+
return hasTag(that, 20) && context.comparator(this.from, that.from) && context.comparator(this.predicate, that.predicate) && context.comparator(this.annotations, that.annotations);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
843
696
|
/**
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
exports.Refinement = Refinement;
|
|
697
|
+
* @tsplus static fncts.schema.ASTOps createRefinement
|
|
698
|
+
*/
|
|
847
699
|
function createRefinement_1(from, predicate, annotations) {
|
|
848
|
-
|
|
700
|
+
return new Refinement(from, predicate, annotations);
|
|
849
701
|
}
|
|
850
702
|
function isRefinement(self) {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
[tsplus_module_1.equalsSymbol](that, context) {
|
|
876
|
-
return hasTag(that, 21 /* ASTTag.Transform */) && context.comparator(this.from, that.from) && context.comparator(this.to, that.to) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
703
|
+
return self._tag === 20;
|
|
704
|
+
}
|
|
705
|
+
var Transform = class Transform extends AST {
|
|
706
|
+
from;
|
|
707
|
+
to;
|
|
708
|
+
decode;
|
|
709
|
+
encode;
|
|
710
|
+
annotations;
|
|
711
|
+
_tag = 21;
|
|
712
|
+
constructor(from, to, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
713
|
+
super();
|
|
714
|
+
this.from = from;
|
|
715
|
+
this.to = to;
|
|
716
|
+
this.decode = decode;
|
|
717
|
+
this.encode = encode;
|
|
718
|
+
this.annotations = annotations;
|
|
719
|
+
}
|
|
720
|
+
clone(newProperties) {
|
|
721
|
+
return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
|
|
722
|
+
}
|
|
723
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
724
|
+
return hasTag(that, 21) && context.comparator(this.from, that.from) && context.comparator(this.to, that.to) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
|
|
725
|
+
}
|
|
726
|
+
};
|
|
879
727
|
/**
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
exports.Transform = Transform;
|
|
728
|
+
* @tsplus static fncts.schema.ASTOps createTransform
|
|
729
|
+
*/
|
|
883
730
|
function createTransform(from, to, decode, encode, annotations) {
|
|
884
|
-
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
return hasTag(that, 22 /* ASTTag.Validation */) && context.comparator(this.from, that.from) && context.comparator(this.validation, that.validation) && context.comparator(this.annotations, that.annotations);
|
|
905
|
-
}
|
|
906
|
-
}
|
|
731
|
+
return new Transform(from, getTo_1(to), decode, encode, annotations);
|
|
732
|
+
}
|
|
733
|
+
var Validation = class Validation extends AST {
|
|
734
|
+
from;
|
|
735
|
+
validation;
|
|
736
|
+
annotations;
|
|
737
|
+
_tag = 22;
|
|
738
|
+
constructor(from, validation, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
739
|
+
super();
|
|
740
|
+
this.from = from;
|
|
741
|
+
this.validation = validation;
|
|
742
|
+
this.annotations = annotations;
|
|
743
|
+
}
|
|
744
|
+
clone(newProperties) {
|
|
745
|
+
return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
|
|
746
|
+
}
|
|
747
|
+
[_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
|
|
748
|
+
return hasTag(that, 22) && context.comparator(this.from, that.from) && context.comparator(this.validation, that.validation) && context.comparator(this.annotations, that.annotations);
|
|
749
|
+
}
|
|
750
|
+
};
|
|
907
751
|
/**
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
exports.Validation = Validation;
|
|
752
|
+
* @tsplus static fncts.schema.ASTOps createValidation
|
|
753
|
+
*/
|
|
911
754
|
function createValidation(from, validation, annotations) {
|
|
912
|
-
|
|
755
|
+
return new Validation(from, validation, annotations);
|
|
913
756
|
}
|
|
914
757
|
/**
|
|
915
|
-
|
|
916
|
-
|
|
758
|
+
* @tsplus tailRec
|
|
759
|
+
*/
|
|
917
760
|
function getCardinality(ast) {
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
ast_1 = ast_2;
|
|
945
|
-
continue;
|
|
946
|
-
case 21 /* ASTTag.Transform */:
|
|
947
|
-
ast_2 = ast_1.to;
|
|
948
|
-
ast_1 = ast_2;
|
|
949
|
-
continue;
|
|
950
|
-
default:
|
|
951
|
-
return 4;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
761
|
+
var ast_1 = ast;
|
|
762
|
+
var ast_2 = ast;
|
|
763
|
+
while (1) switch (ast_1._tag) {
|
|
764
|
+
case 5: return 0;
|
|
765
|
+
case 1:
|
|
766
|
+
case 3:
|
|
767
|
+
case 4:
|
|
768
|
+
case 2: return 1;
|
|
769
|
+
case 10: return 2;
|
|
770
|
+
case 8:
|
|
771
|
+
case 9:
|
|
772
|
+
case 11:
|
|
773
|
+
case 12: return 3;
|
|
774
|
+
case 13: return 5;
|
|
775
|
+
case 6:
|
|
776
|
+
case 7: return 6;
|
|
777
|
+
case 20:
|
|
778
|
+
ast_2 = ast_1.from;
|
|
779
|
+
ast_1 = ast_2;
|
|
780
|
+
continue;
|
|
781
|
+
case 21:
|
|
782
|
+
ast_2 = ast_1.to;
|
|
783
|
+
ast_1 = ast_2;
|
|
784
|
+
continue;
|
|
785
|
+
default: return 4;
|
|
786
|
+
}
|
|
954
787
|
}
|
|
955
788
|
function sortByAscendingCardinality(types) {
|
|
956
|
-
|
|
957
|
-
type
|
|
958
|
-
}) => getCardinality(type))(tsplus_module_10.Ord))(types);
|
|
789
|
+
return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(({ type }) => getCardinality(type))(_fncts_base_data_number_instances.Ord))(types);
|
|
959
790
|
}
|
|
960
|
-
const OrdWeight =
|
|
961
|
-
const maxWeight =
|
|
791
|
+
const OrdWeight = _fncts_base_data_Ord_api.tuple(_fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord);
|
|
792
|
+
const maxWeight = _fncts_base_data_Ord_api_max.max(OrdWeight);
|
|
962
793
|
function maxWeightAll(weights) {
|
|
963
|
-
|
|
794
|
+
return _fncts_base_collection_Iterable_api.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);
|
|
964
795
|
}
|
|
965
|
-
const emptyWeight = [
|
|
796
|
+
const emptyWeight = [
|
|
797
|
+
0,
|
|
798
|
+
0,
|
|
799
|
+
0
|
|
800
|
+
];
|
|
966
801
|
function getWeight(ast) {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
802
|
+
switch (ast._tag) {
|
|
803
|
+
case 0: return _fncts_base_data_Maybe_destructors.match(() => [
|
|
804
|
+
6,
|
|
805
|
+
0,
|
|
806
|
+
0
|
|
807
|
+
], (ast) => {
|
|
808
|
+
const [_, y, z] = getWeight(ast);
|
|
809
|
+
return [
|
|
810
|
+
6,
|
|
811
|
+
y,
|
|
812
|
+
z
|
|
813
|
+
];
|
|
814
|
+
})(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
|
|
815
|
+
case 16: return [
|
|
816
|
+
2,
|
|
817
|
+
ast.elements.length,
|
|
818
|
+
_fncts_base_data_Maybe_destructors.match(() => 0, (rest) => rest.length)(ast.rest)
|
|
819
|
+
];
|
|
820
|
+
case 17: {
|
|
821
|
+
const y = ast.propertySignatures.length;
|
|
822
|
+
const z = ast.indexSignatures.length;
|
|
823
|
+
return y + z === 0 ? [
|
|
824
|
+
-4,
|
|
825
|
+
0,
|
|
826
|
+
0
|
|
827
|
+
] : [
|
|
828
|
+
4,
|
|
829
|
+
y,
|
|
830
|
+
z
|
|
831
|
+
];
|
|
832
|
+
}
|
|
833
|
+
case 18: return maxWeightAll(_fncts_base_collection_immutable_Vector_api.map(getWeight)(ast.types));
|
|
834
|
+
case 19: return [
|
|
835
|
+
8,
|
|
836
|
+
0,
|
|
837
|
+
0
|
|
838
|
+
];
|
|
839
|
+
case 20:
|
|
840
|
+
const [x, y, z] = getWeight(ast.from);
|
|
841
|
+
return [
|
|
842
|
+
x + 1,
|
|
843
|
+
y,
|
|
844
|
+
z
|
|
845
|
+
];
|
|
846
|
+
case 21: return getWeight(ast.from);
|
|
847
|
+
case 13: return [
|
|
848
|
+
-2,
|
|
849
|
+
0,
|
|
850
|
+
0
|
|
851
|
+
];
|
|
852
|
+
case 6:
|
|
853
|
+
case 7: return [
|
|
854
|
+
-4,
|
|
855
|
+
0,
|
|
856
|
+
0
|
|
857
|
+
];
|
|
858
|
+
default: return emptyWeight;
|
|
859
|
+
}
|
|
999
860
|
}
|
|
1000
861
|
function sortByDescendingWeight(types) {
|
|
1001
|
-
|
|
862
|
+
return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(getWeight)(OrdWeight))(types);
|
|
1002
863
|
}
|
|
1003
864
|
function unify(candidates) {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
if (tsplus_module_6.some(isStringKeyword_1)(out)) {
|
|
1016
|
-
out = tsplus_module_6.filter(m => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
|
|
1017
|
-
}
|
|
1018
|
-
if (tsplus_module_6.some(isNumberKeyword_1)(out)) {
|
|
1019
|
-
out = tsplus_module_6.filter(m => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
|
|
1020
|
-
}
|
|
1021
|
-
if (tsplus_module_6.some(isSymbolKeyword_1)(out)) {
|
|
1022
|
-
out = tsplus_module_6.filter(m => !isUniqueSymbol_1(m))(out);
|
|
1023
|
-
}
|
|
1024
|
-
return out;
|
|
865
|
+
let out = _fncts_base_collection_immutable_Vector_api.flatMap((ast) => {
|
|
866
|
+
switch (ast._tag) {
|
|
867
|
+
case 5: return _fncts_base_collection_immutable_Vector_api.empty();
|
|
868
|
+
case 18: return ast.types;
|
|
869
|
+
default: return _fncts_base_collection_immutable_Vector_api.vector(ast);
|
|
870
|
+
}
|
|
871
|
+
})(candidates);
|
|
872
|
+
if (_fncts_base_collection_immutable_Vector_api.some(isStringKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
|
|
873
|
+
if (_fncts_base_collection_immutable_Vector_api.some(isNumberKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
|
|
874
|
+
if (_fncts_base_collection_immutable_Vector_api.some(isSymbolKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !isUniqueSymbol_1(m))(out);
|
|
875
|
+
return out;
|
|
1025
876
|
}
|
|
1026
877
|
/**
|
|
1027
|
-
|
|
1028
|
-
|
|
878
|
+
* @tsplus pipeable fncts.schema.AST combineAnnotations
|
|
879
|
+
*/
|
|
1029
880
|
function combineAnnotations(annotations) {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
});
|
|
1034
|
-
};
|
|
881
|
+
return (self) => {
|
|
882
|
+
return self.clone({ annotations: self.annotations.combine(annotations) });
|
|
883
|
+
};
|
|
1035
884
|
}
|
|
1036
885
|
/**
|
|
1037
|
-
|
|
1038
|
-
|
|
886
|
+
* @tsplus pipeable fncts.schema.AST setAnnotation
|
|
887
|
+
*/
|
|
1039
888
|
function setAnnotation(annotation, value) {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
});
|
|
1044
|
-
};
|
|
889
|
+
return (self) => {
|
|
890
|
+
return self.clone({ annotations: self.annotations.annotate(annotation, value) });
|
|
891
|
+
};
|
|
1045
892
|
}
|
|
1046
893
|
/**
|
|
1047
|
-
|
|
1048
|
-
|
|
894
|
+
* @tsplus pipeable fncts.schema.AST appendRestElement
|
|
895
|
+
*/
|
|
1049
896
|
function appendRestElement(restElement) {
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.vector(restElement), fileName_1 + ":1313:43"), self.isReadonly, self.annotations);
|
|
1055
|
-
};
|
|
897
|
+
return (self) => {
|
|
898
|
+
if (_fncts_base_data_Maybe_definition.isJust(self.rest)) throw new Error("A rest element cannot follow another rest element. ts(1265)");
|
|
899
|
+
return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(restElement), fileName_1 + ":1313:43"), self.isReadonly, self.annotations);
|
|
900
|
+
};
|
|
1056
901
|
}
|
|
1057
902
|
/**
|
|
1058
|
-
|
|
1059
|
-
|
|
903
|
+
* @tsplus pipeable fncts.schema.AST appendElement
|
|
904
|
+
*/
|
|
1060
905
|
function appendElement(element) {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
}
|
|
1069
|
-
return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.append(element.type)(rest), fileName_1 + ":1331:47"), self.isReadonly, self.annotations);
|
|
1070
|
-
})(self.rest);
|
|
1071
|
-
};
|
|
906
|
+
return (self) => {
|
|
907
|
+
if (_fncts_base_collection_immutable_Vector_api.some((e) => e.isOptional)(self.elements) && !element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
|
|
908
|
+
return _fncts_base_data_Maybe_destructors.match(() => createTuple_1(_fncts_base_collection_immutable_Vector_api.append(element)(self.elements), _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1326:63"), self.isReadonly, self.annotations), (rest) => {
|
|
909
|
+
if (element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
|
|
910
|
+
return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.append(element.type)(rest), fileName_1 + ":1331:47"), self.isReadonly, self.annotations);
|
|
911
|
+
})(self.rest);
|
|
912
|
+
};
|
|
1072
913
|
}
|
|
1073
914
|
function getParameter(x) {
|
|
1074
|
-
|
|
915
|
+
return isRefinement(x) ? getParameter(x.from) : x;
|
|
1075
916
|
}
|
|
1076
917
|
/**
|
|
1077
|
-
|
|
1078
|
-
|
|
918
|
+
* @tsplus getter fncts.schema.AST getPropertySignatures
|
|
919
|
+
*/
|
|
1079
920
|
function getPropertySignatures_1(self) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
case 17 /* ASTTag.TypeLiteral */:
|
|
1100
|
-
return self.propertySignatures;
|
|
1101
|
-
case 19 /* ASTTag.Lazy */:
|
|
1102
|
-
return getPropertySignatures_1(self.getAST());
|
|
1103
|
-
case 20 /* ASTTag.Refinement */:
|
|
1104
|
-
return getPropertySignatures_1(self.from);
|
|
1105
|
-
case 21 /* ASTTag.Transform */:
|
|
1106
|
-
return getPropertySignatures_1(self.to);
|
|
1107
|
-
default:
|
|
1108
|
-
return tsplus_module_6.empty();
|
|
1109
|
-
}
|
|
921
|
+
switch (self._tag) {
|
|
922
|
+
case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => getPropertySignatures_1(surrogate))(self.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
|
|
923
|
+
case 16: return _fncts_base_collection_immutable_Vector_api.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);
|
|
924
|
+
case 18: {
|
|
925
|
+
const propertySignatures = _fncts_base_collection_immutable_Vector_api.map(getPropertySignatures_1)(self.types);
|
|
926
|
+
return _fncts_base_collection_immutable_Vector_api.filterMap(({ name }) => {
|
|
927
|
+
if (_fncts_base_collection_immutable_Vector_api.every((ps) => _fncts_base_collection_immutable_Vector_api.some((p) => p.name === name)(ps))(propertySignatures)) {
|
|
928
|
+
const members = _fncts_base_collection_immutable_Vector_api.flatMap((ps) => _fncts_base_collection_immutable_Vector_api.filter((p) => p.name === name)(ps))(propertySignatures);
|
|
929
|
+
return _fncts_base_data_Maybe_constructors.just(createPropertySignature_1(name, createUnion_1(_fncts_base_collection_immutable_Vector_api.map((p) => p.type)(members)), _fncts_base_collection_immutable_Vector_api.some((p) => p.isOptional)(members), _fncts_base_collection_immutable_Vector_api.some((p) => p.isReadonly)(members)), fileName_1 + ":1363:22");
|
|
930
|
+
}
|
|
931
|
+
return _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1372:23");
|
|
932
|
+
})(_fncts_base_collection_immutable_Vector_api.unsafeGet(0)(propertySignatures));
|
|
933
|
+
}
|
|
934
|
+
case 17: return self.propertySignatures;
|
|
935
|
+
case 19: return getPropertySignatures_1(self.getAST());
|
|
936
|
+
case 20: return getPropertySignatures_1(self.from);
|
|
937
|
+
case 21: return getPropertySignatures_1(self.to);
|
|
938
|
+
default: return _fncts_base_collection_immutable_Vector_api.empty();
|
|
939
|
+
}
|
|
1110
940
|
}
|
|
1111
941
|
/**
|
|
1112
|
-
|
|
1113
|
-
|
|
942
|
+
* @tsplus getter fncts.schema.AST keysof
|
|
943
|
+
*/
|
|
1114
944
|
function keysOf_1(ast) {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
return tsplus_module_6.map(p => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
|
|
1128
|
-
case 19 /* ASTTag.Lazy */:
|
|
1129
|
-
return keysOf_1(ast.getAST());
|
|
1130
|
-
case 20 /* ASTTag.Refinement */:
|
|
1131
|
-
return keysOf_1(ast.from);
|
|
1132
|
-
case 21 /* ASTTag.Transform */:
|
|
1133
|
-
return keysOf_1(ast.to);
|
|
1134
|
-
default:
|
|
1135
|
-
return tsplus_module_6.empty();
|
|
1136
|
-
}
|
|
945
|
+
switch (ast._tag) {
|
|
946
|
+
case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => keysOf_1(surrogate))(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
|
|
947
|
+
case 5:
|
|
948
|
+
case 7: return _fncts_base_collection_immutable_Vector_api.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);
|
|
949
|
+
case 8: return _fncts_base_collection_immutable_Vector_api.vector(createLiteral_1("length"));
|
|
950
|
+
case 17: return _fncts_base_collection_immutable_Vector_api.concat(_fncts_base_collection_immutable_Vector_api.map((is) => getParameter(is.parameter))(ast.indexSignatures))(_fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(ast.propertySignatures));
|
|
951
|
+
case 18: return _fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
|
|
952
|
+
case 19: return keysOf_1(ast.getAST());
|
|
953
|
+
case 20: return keysOf_1(ast.from);
|
|
954
|
+
case 21: return keysOf_1(ast.to);
|
|
955
|
+
default: return _fncts_base_collection_immutable_Vector_api.empty();
|
|
956
|
+
}
|
|
1137
957
|
}
|
|
1138
958
|
/**
|
|
1139
|
-
|
|
1140
|
-
|
|
959
|
+
* @tsplus getter fncts.schema.AST keyof
|
|
960
|
+
*/
|
|
1141
961
|
function keyof(self) {
|
|
1142
|
-
|
|
962
|
+
return createUnion_1(keysOf_1(self));
|
|
1143
963
|
}
|
|
1144
964
|
/**
|
|
1145
|
-
|
|
1146
|
-
|
|
965
|
+
* @tsplus static fncts.schema.ASTOps createRecord
|
|
966
|
+
*/
|
|
1147
967
|
function createRecord(key, value, isReadonly) {
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
throw new Error(`createRecord: Unsupported key\n${(0, _Showable.show)(key)}`);
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
go(key);
|
|
1177
|
-
return createTypeLiteral_1(propertySignatures, indexSignatures);
|
|
968
|
+
const propertySignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
|
|
969
|
+
const indexSignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
|
|
970
|
+
function go(key) {
|
|
971
|
+
switch (key._tag) {
|
|
972
|
+
case 5: break;
|
|
973
|
+
case 8:
|
|
974
|
+
case 12:
|
|
975
|
+
case 15:
|
|
976
|
+
case 20:
|
|
977
|
+
_fncts_base_collection_immutable_Vector_internal.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);
|
|
978
|
+
break;
|
|
979
|
+
case 1:
|
|
980
|
+
if (typeof key.literal === "string" || typeof key.literal === "number") _fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);
|
|
981
|
+
break;
|
|
982
|
+
case 2:
|
|
983
|
+
_fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);
|
|
984
|
+
break;
|
|
985
|
+
case 18:
|
|
986
|
+
_fncts_base_collection_immutable_Vector_api.forEach(go)(key.types);
|
|
987
|
+
break;
|
|
988
|
+
default: throw new Error(`createRecord: Unsupported key\n${(0, _fncts_base_data_Showable.show)(key)}`);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
go(key);
|
|
992
|
+
return createTypeLiteral_1(propertySignatures, indexSignatures);
|
|
1178
993
|
}
|
|
1179
994
|
/**
|
|
1180
|
-
|
|
1181
|
-
|
|
995
|
+
* @tsplus pipeable fncts.schema.AST pick
|
|
996
|
+
*/
|
|
1182
997
|
function pick(keys) {
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
998
|
+
return (self) => {
|
|
999
|
+
return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => _fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
|
|
1000
|
+
};
|
|
1186
1001
|
}
|
|
1187
1002
|
/**
|
|
1188
|
-
|
|
1189
|
-
|
|
1003
|
+
* @tsplus pipeable fncts.schema.AST omit
|
|
1004
|
+
*/
|
|
1190
1005
|
function omit(keys) {
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1006
|
+
return (self) => {
|
|
1007
|
+
return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => !_fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
|
|
1008
|
+
};
|
|
1194
1009
|
}
|
|
1195
1010
|
/**
|
|
1196
|
-
|
|
1197
|
-
|
|
1011
|
+
* @tsplus getter fncts.schema.AST partial
|
|
1012
|
+
*/
|
|
1198
1013
|
function partial_1(self) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
return createLazy_1(() => partial_1(self.getAST()));
|
|
1209
|
-
case 20 /* ASTTag.Refinement */:
|
|
1210
|
-
return partial_1(self.from);
|
|
1211
|
-
case 21 /* ASTTag.Transform */:
|
|
1212
|
-
return partial_1(self.to);
|
|
1213
|
-
default:
|
|
1214
|
-
return self;
|
|
1215
|
-
}
|
|
1014
|
+
switch (self._tag) {
|
|
1015
|
+
case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((e) => createElement_1(e.type, true))(self.elements), _fncts_base_data_Maybe_api.map((rest) => _fncts_base_collection_immutable_Vector_api.vector(createUnion_1(_fncts_base_collection_immutable_Vector_api.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);
|
|
1016
|
+
case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((f) => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);
|
|
1017
|
+
case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(partial_1)(self.types));
|
|
1018
|
+
case 19: return createLazy_1(() => partial_1(self.getAST()));
|
|
1019
|
+
case 20: return partial_1(self.from);
|
|
1020
|
+
case 21: return partial_1(self.to);
|
|
1021
|
+
default: return self;
|
|
1022
|
+
}
|
|
1216
1023
|
}
|
|
1217
1024
|
/**
|
|
1218
|
-
|
|
1219
|
-
|
|
1025
|
+
* @tsplus static fncts.schema.AST createKey
|
|
1026
|
+
*/
|
|
1220
1027
|
function createKey(key) {
|
|
1221
|
-
|
|
1028
|
+
return typeof key === "symbol" ? createUniqueSymbol_1(key) : createLiteral_1(key);
|
|
1222
1029
|
}
|
|
1223
1030
|
/**
|
|
1224
|
-
|
|
1225
|
-
|
|
1031
|
+
* @tsplus getter fncts.schema.AST getFrom
|
|
1032
|
+
*/
|
|
1226
1033
|
function getFrom_1(ast) {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
case 18 /* ASTTag.Union */:
|
|
1242
|
-
return createUnion_1(tsplus_module_6.map(getFrom_1)(ast.types), ast.annotations);
|
|
1243
|
-
case 19 /* ASTTag.Lazy */:
|
|
1244
|
-
return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
|
|
1245
|
-
case 20 /* ASTTag.Refinement */:
|
|
1246
|
-
case 21 /* ASTTag.Transform */:
|
|
1247
|
-
return getFrom_1(ast.from);
|
|
1248
|
-
}
|
|
1249
|
-
return ast;
|
|
1034
|
+
switch (ast._tag) {
|
|
1035
|
+
case 0: {
|
|
1036
|
+
const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
|
|
1037
|
+
if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getFrom_1(surrogate.value);
|
|
1038
|
+
break;
|
|
1039
|
+
}
|
|
1040
|
+
case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
|
|
1041
|
+
case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
|
|
1042
|
+
case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getFrom_1)(ast.types), ast.annotations);
|
|
1043
|
+
case 19: return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
|
|
1044
|
+
case 20:
|
|
1045
|
+
case 21: return getFrom_1(ast.from);
|
|
1046
|
+
}
|
|
1047
|
+
return ast;
|
|
1250
1048
|
}
|
|
1251
1049
|
/**
|
|
1252
|
-
|
|
1253
|
-
|
|
1050
|
+
* @tsplus getter fncts.schema.AST getTo
|
|
1051
|
+
*/
|
|
1254
1052
|
function getTo_1(ast) {
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
case 18 /* ASTTag.Union */:
|
|
1270
|
-
return createUnion_1(tsplus_module_6.map(getTo_1)(ast.types), ast.annotations);
|
|
1271
|
-
case 19 /* ASTTag.Lazy */:
|
|
1272
|
-
return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
|
|
1273
|
-
case 20 /* ASTTag.Refinement */:
|
|
1274
|
-
return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
|
|
1275
|
-
case 21 /* ASTTag.Transform */:
|
|
1276
|
-
return getTo_1(ast.to);
|
|
1277
|
-
}
|
|
1278
|
-
return ast;
|
|
1053
|
+
switch (ast._tag) {
|
|
1054
|
+
case 0: {
|
|
1055
|
+
const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
|
|
1056
|
+
if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getTo_1(surrogate.value);
|
|
1057
|
+
break;
|
|
1058
|
+
}
|
|
1059
|
+
case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
|
|
1060
|
+
case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
|
|
1061
|
+
case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getTo_1)(ast.types), ast.annotations);
|
|
1062
|
+
case 19: return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
|
|
1063
|
+
case 20: return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
|
|
1064
|
+
case 21: return getTo_1(ast.to);
|
|
1065
|
+
}
|
|
1066
|
+
return ast;
|
|
1279
1067
|
}
|
|
1280
1068
|
/**
|
|
1281
|
-
|
|
1282
|
-
|
|
1069
|
+
* @tsplus static fncts.schema.AST getCompiler
|
|
1070
|
+
*/
|
|
1283
1071
|
function getCompiler(match) {
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
return compile;
|
|
1072
|
+
const compile = (0, _fncts_schema_utils.memoize)((ast) => {
|
|
1073
|
+
return match[ast._tag](ast, compile);
|
|
1074
|
+
});
|
|
1075
|
+
return compile;
|
|
1289
1076
|
}
|
|
1290
1077
|
function getLiterals(ast, isDecoding) {
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}
|
|
1310
|
-
return out;
|
|
1311
|
-
}
|
|
1312
|
-
case 20 /* ASTTag.Refinement */:
|
|
1313
|
-
return getLiterals(ast.from, isDecoding);
|
|
1314
|
-
case 21 /* ASTTag.Transform */:
|
|
1315
|
-
return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
|
|
1316
|
-
}
|
|
1317
|
-
return [];
|
|
1078
|
+
switch (ast._tag) {
|
|
1079
|
+
case 0: {
|
|
1080
|
+
const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
|
|
1081
|
+
if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getLiterals(surrogate.value, isDecoding);
|
|
1082
|
+
break;
|
|
1083
|
+
}
|
|
1084
|
+
case 17: {
|
|
1085
|
+
const out = [];
|
|
1086
|
+
for (let i = 0; i < ast.propertySignatures.length; i++) {
|
|
1087
|
+
const propertySignature = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(ast.propertySignatures);
|
|
1088
|
+
if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) out.push([propertySignature.name, propertySignature.type]);
|
|
1089
|
+
}
|
|
1090
|
+
return out;
|
|
1091
|
+
}
|
|
1092
|
+
case 20: return getLiterals(ast.from, isDecoding);
|
|
1093
|
+
case 21: return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
|
|
1094
|
+
}
|
|
1095
|
+
return [];
|
|
1318
1096
|
}
|
|
1319
1097
|
function getSearchTree(members, isDecoding) {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
}
|
|
1353
|
-
return {
|
|
1354
|
-
keys,
|
|
1355
|
-
otherwise
|
|
1356
|
-
};
|
|
1098
|
+
const keys = {};
|
|
1099
|
+
const otherwise = [];
|
|
1100
|
+
for (let i = 0; i < members.length; i++) {
|
|
1101
|
+
const member = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(members);
|
|
1102
|
+
const tags = getLiterals(member, isDecoding);
|
|
1103
|
+
if (tags.length > 0) for (let j = 0; j < tags.length; j++) {
|
|
1104
|
+
const [key, literal] = tags[j];
|
|
1105
|
+
const hash = String(literal.literal);
|
|
1106
|
+
keys[key] ||= {
|
|
1107
|
+
buckets: {},
|
|
1108
|
+
ast: neverKeyword_1,
|
|
1109
|
+
literals: []
|
|
1110
|
+
};
|
|
1111
|
+
const buckets = keys[key].buckets;
|
|
1112
|
+
if (Object.prototype.hasOwnProperty.call(buckets, hash)) {
|
|
1113
|
+
if (j < tags.length - 1) continue;
|
|
1114
|
+
buckets[hash].push(member);
|
|
1115
|
+
keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
|
|
1116
|
+
keys[key].literals.push(literal);
|
|
1117
|
+
} else {
|
|
1118
|
+
buckets[hash] = [member];
|
|
1119
|
+
keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
|
|
1120
|
+
keys[key].literals.push(literal);
|
|
1121
|
+
break;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
else otherwise.push(member);
|
|
1125
|
+
}
|
|
1126
|
+
return {
|
|
1127
|
+
keys,
|
|
1128
|
+
otherwise
|
|
1129
|
+
};
|
|
1357
1130
|
}
|
|
1358
1131
|
/**
|
|
1359
|
-
|
|
1360
|
-
|
|
1132
|
+
* @tsplus pipeable fncts.schema.AST getFormattedExpected
|
|
1133
|
+
*/
|
|
1361
1134
|
function getFormattedExpected(verbose = false) {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1135
|
+
return (self) => {
|
|
1136
|
+
if (verbose) {
|
|
1137
|
+
const description = _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Description));
|
|
1138
|
+
return _fncts_base_data_Maybe_destructors.match(() => description, (identifier) => _fncts_base_data_Maybe_destructors.match(() => _fncts_base_data_Maybe_constructors.just(identifier, fileName_1 + ":1710:23"), (description) => _fncts_base_data_Maybe_constructors.just(`${identifier} (${description})`, fileName_1 + ":1711:34"))(description))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier));
|
|
1139
|
+
} else return _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Description))(_fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier)));
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
//#endregion
|
|
1143
|
+
exports.AST = AST;
|
|
1144
|
+
exports.ASTTypeId = ASTTypeId;
|
|
1145
|
+
exports.Annotated = Annotated;
|
|
1146
|
+
exports.AnyKeyword = AnyKeyword;
|
|
1147
|
+
exports.BigIntKeyword = BigIntKeyword;
|
|
1148
|
+
exports.BooleanKeyword = BooleanKeyword;
|
|
1149
|
+
exports.Declaration = Declaration;
|
|
1150
|
+
exports.Element = Element;
|
|
1151
|
+
exports.Enum = Enum;
|
|
1152
|
+
exports.IndexSignature = IndexSignature;
|
|
1153
|
+
exports.Lazy = Lazy;
|
|
1154
|
+
exports.Literal = Literal;
|
|
1155
|
+
exports.NeverKeyword = NeverKeyword;
|
|
1156
|
+
exports.NumberKeyword = NumberKeyword;
|
|
1157
|
+
exports.ObjectKeyword = ObjectKeyword;
|
|
1158
|
+
exports.PropertySignature = PropertySignature;
|
|
1159
|
+
exports.Refinement = Refinement;
|
|
1160
|
+
exports.StringKeyword = StringKeyword;
|
|
1161
|
+
exports.SymbolKeyword = SymbolKeyword;
|
|
1162
|
+
exports.TemplateLiteral = TemplateLiteral;
|
|
1163
|
+
exports.TemplateLiteralSpan = TemplateLiteralSpan;
|
|
1164
|
+
exports.Transform = Transform;
|
|
1165
|
+
exports.Tuple = Tuple;
|
|
1166
|
+
exports.TypeLiteral = TypeLiteral;
|
|
1167
|
+
exports.UndefinedKeyword = UndefinedKeyword;
|
|
1168
|
+
exports.Union = Union;
|
|
1169
|
+
exports.UniqueSymbol = UniqueSymbol;
|
|
1170
|
+
exports.UnknownKeyword = UnknownKeyword;
|
|
1171
|
+
exports.Validation = Validation;
|
|
1172
|
+
exports.VoidKeyword = VoidKeyword;
|
|
1173
|
+
exports.anyKeyword = anyKeyword;
|
|
1174
|
+
exports.appendElement = appendElement;
|
|
1175
|
+
exports.appendRestElement = appendRestElement;
|
|
1176
|
+
exports.bigIntKeyword = bigIntKeyword;
|
|
1177
|
+
exports.booleanKeyword = booleanKeyword;
|
|
1178
|
+
exports.combineAnnotations = combineAnnotations;
|
|
1179
|
+
exports.concrete = concrete;
|
|
1180
|
+
exports.createDeclaration = createDeclaration;
|
|
1181
|
+
exports.createElement = createElement;
|
|
1182
|
+
exports.createEnum = createEnum;
|
|
1183
|
+
exports.createIndexSignature = createIndexSignature;
|
|
1184
|
+
exports.createKey = createKey;
|
|
1185
|
+
exports.createLazy = createLazy;
|
|
1186
|
+
exports.createLiteral = createLiteral;
|
|
1187
|
+
exports.createPropertySignature = createPropertySignature;
|
|
1188
|
+
exports.createRecord = createRecord;
|
|
1189
|
+
exports.createRefinement = createRefinement;
|
|
1190
|
+
exports.createTemplateLiteral = createTemplateLiteral;
|
|
1191
|
+
exports.createTransform = createTransform;
|
|
1192
|
+
exports.createTuple = createTuple;
|
|
1193
|
+
exports.createTypeLiteral = createTypeLiteral;
|
|
1194
|
+
exports.createUnion = createUnion;
|
|
1195
|
+
exports.createUniqueSymbol = createUniqueSymbol;
|
|
1196
|
+
exports.createValidation = createValidation;
|
|
1197
|
+
exports.getAnnotations = getAnnotations;
|
|
1198
|
+
exports.getCardinality = getCardinality;
|
|
1199
|
+
exports.getCompiler = getCompiler;
|
|
1200
|
+
exports.getFormattedExpected = getFormattedExpected;
|
|
1201
|
+
exports.getFrom = getFrom;
|
|
1202
|
+
exports.getLiterals = getLiterals;
|
|
1203
|
+
exports.getParameter = getParameter;
|
|
1204
|
+
exports.getPropertySignatures = getPropertySignatures;
|
|
1205
|
+
exports.getSearchTree = getSearchTree;
|
|
1206
|
+
exports.getTo = getTo;
|
|
1207
|
+
exports.getWeight = getWeight;
|
|
1208
|
+
exports.isAST = isAST;
|
|
1209
|
+
exports.isBigIntKeyword = isBigIntKeyword;
|
|
1210
|
+
exports.isBooleanKeyword = isBooleanKeyword;
|
|
1211
|
+
exports.isDeclaration = isDeclaration;
|
|
1212
|
+
exports.isLazy = isLazy;
|
|
1213
|
+
exports.isLiteral = isLiteral;
|
|
1214
|
+
exports.isNumberKeyword = isNumberKeyword;
|
|
1215
|
+
exports.isRefinement = isRefinement;
|
|
1216
|
+
exports.isStringKeyword = isStringKeyword;
|
|
1217
|
+
exports.isSymbolKeyword = isSymbolKeyword;
|
|
1218
|
+
exports.isTypeLiteral = isTypeLiteral;
|
|
1219
|
+
exports.isUnion = isUnion;
|
|
1220
|
+
exports.isUniqueSymbol = isUniqueSymbol;
|
|
1221
|
+
exports.keyof = keyof;
|
|
1222
|
+
exports.keysOf = keysOf;
|
|
1223
|
+
exports.neverKeyword = neverKeyword;
|
|
1224
|
+
exports.numberKeyword = numberKeyword;
|
|
1225
|
+
exports.objectKeyword = objectKeyword;
|
|
1226
|
+
exports.omit = omit;
|
|
1227
|
+
exports.partial = partial;
|
|
1228
|
+
exports.pick = pick;
|
|
1229
|
+
exports.setAnnotation = setAnnotation;
|
|
1230
|
+
exports.stringKeyword = stringKeyword;
|
|
1231
|
+
exports.symbolKeyword = symbolKeyword;
|
|
1232
|
+
exports.undefinedKeyword = undefinedKeyword;
|
|
1233
|
+
exports.unknownArray = unknownArray;
|
|
1234
|
+
exports.unknownKeyword = unknownKeyword;
|
|
1235
|
+
exports.unknownRecord = unknownRecord;
|
|
1236
|
+
exports.voidKeyword = voidKeyword;
|
|
1237
|
+
|
|
1371
1238
|
//# sourceMappingURL=AST.cjs.map
|