@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/Schema/api.cjs
CHANGED
|
@@ -1,435 +1,417 @@
|
|
|
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
|
-
exports.pick = pick;
|
|
28
|
-
exports.record = record;
|
|
29
|
-
exports.string = void 0;
|
|
30
|
-
exports.struct = struct;
|
|
31
|
-
exports.symbol = void 0;
|
|
32
|
-
exports.templateLiteral = templateLiteral;
|
|
33
|
-
exports.transformOrFail = exports.transform = void 0;
|
|
34
|
-
exports.tuple = tuple;
|
|
35
|
-
exports.union = exports.undefined = void 0;
|
|
36
|
-
exports.uniqueSymbol = uniqueSymbol;
|
|
37
|
-
exports.void = exports.unknown = void 0;
|
|
38
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Schema/definition"));
|
|
39
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/api"));
|
|
40
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/AST"));
|
|
41
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ASTAnnotation"));
|
|
42
|
-
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseResult"));
|
|
43
|
-
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Parser/api"));
|
|
44
|
-
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/api"));
|
|
45
|
-
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Schema/api/maybe"));
|
|
46
|
-
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
47
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
|
|
48
|
-
var _Showable = /*#__PURE__*/require("@fncts/base/data/Showable");
|
|
49
|
-
var _AST2 = /*#__PURE__*/require("../AST.cjs");
|
|
50
|
-
var _utils = /*#__PURE__*/require("../utils.cjs");
|
|
51
|
-
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_utils = require("../utils.cjs");
|
|
4
|
+
const require_AST = require("../AST.cjs");
|
|
5
|
+
let _fncts_base_collection_immutable_Vector_api = require("@fncts/base/collection/immutable/Vector/api");
|
|
6
|
+
_fncts_base_collection_immutable_Vector_api = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_api, 1);
|
|
7
|
+
let _fncts_schema_AST = require("@fncts/schema/AST");
|
|
8
|
+
_fncts_schema_AST = require_chunk.__toESM(_fncts_schema_AST, 1);
|
|
9
|
+
let _fncts_base_data_Showable = require("@fncts/base/data/Showable");
|
|
10
|
+
let _fncts_base_data_Maybe_api = require("@fncts/base/data/Maybe/api");
|
|
11
|
+
_fncts_base_data_Maybe_api = require_chunk.__toESM(_fncts_base_data_Maybe_api, 1);
|
|
12
|
+
let _fncts_base_data_Maybe_constructors = require("@fncts/base/data/Maybe/constructors");
|
|
13
|
+
_fncts_base_data_Maybe_constructors = require_chunk.__toESM(_fncts_base_data_Maybe_constructors, 1);
|
|
14
|
+
let _fncts_schema_Schema_definition = require("@fncts/schema/Schema/definition");
|
|
15
|
+
_fncts_schema_Schema_definition = require_chunk.__toESM(_fncts_schema_Schema_definition, 1);
|
|
16
|
+
let _fncts_schema_ASTAnnotation = require("@fncts/schema/ASTAnnotation");
|
|
17
|
+
_fncts_schema_ASTAnnotation = require_chunk.__toESM(_fncts_schema_ASTAnnotation, 1);
|
|
18
|
+
let _fncts_schema_ParseResult = require("@fncts/schema/ParseResult");
|
|
19
|
+
_fncts_schema_ParseResult = require_chunk.__toESM(_fncts_schema_ParseResult, 1);
|
|
20
|
+
let _fncts_schema_Parser_api = require("@fncts/schema/Parser/api");
|
|
21
|
+
_fncts_schema_Parser_api = require_chunk.__toESM(_fncts_schema_Parser_api, 1);
|
|
22
|
+
let _fncts_schema_Schema_api_maybe = require("@fncts/schema/Schema/api/maybe");
|
|
23
|
+
_fncts_schema_Schema_api_maybe = require_chunk.__toESM(_fncts_schema_Schema_api_maybe, 1);
|
|
24
|
+
let _fncts_base_data_Maybe_definition = require("@fncts/base/data/Maybe/definition");
|
|
25
|
+
_fncts_base_data_Maybe_definition = require_chunk.__toESM(_fncts_base_data_Maybe_definition, 1);
|
|
26
|
+
//#region build/esm/Schema/api.js
|
|
52
27
|
const fileName_1 = "(@fncts/schema) src/Schema/api.ts";
|
|
53
|
-
const make =
|
|
54
|
-
const annotate =
|
|
55
|
-
const filter =
|
|
56
|
-
const union =
|
|
57
|
-
const isOptional =
|
|
58
|
-
const isParseOptional =
|
|
59
|
-
const enum_ =
|
|
60
|
-
const instanceOf =
|
|
61
|
-
const transformOrFail =
|
|
62
|
-
const transform =
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
28
|
+
const make = make_1;
|
|
29
|
+
const annotate = annotate_1;
|
|
30
|
+
const filter = filter_1;
|
|
31
|
+
const union = union_1;
|
|
32
|
+
const isOptional = isOptional_1;
|
|
33
|
+
const isParseOptional = isParseOptional_1;
|
|
34
|
+
const enum_ = enum_1;
|
|
35
|
+
const instanceOf = instanceOf_1;
|
|
36
|
+
const transformOrFail = transformOrFail_1;
|
|
37
|
+
const transform = transform_1;
|
|
38
|
+
/**
|
|
39
|
+
* @tsplus static fncts.schema.SchemaOps fromAST
|
|
40
|
+
*/
|
|
66
41
|
function make_1(ast) {
|
|
67
|
-
|
|
42
|
+
return new _fncts_schema_Schema_definition.Schema(ast);
|
|
68
43
|
}
|
|
69
44
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
45
|
+
* @tsplus pipeable fncts.schema.Schema annotate
|
|
46
|
+
*/
|
|
72
47
|
function annotate_1(annotation, value) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
48
|
+
return (self) => {
|
|
49
|
+
return make_1(self.ast.clone({ annotations: self.ast.annotations.annotate(annotation, value) }));
|
|
50
|
+
};
|
|
78
51
|
}
|
|
79
52
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
53
|
+
* @tsplus static fncts.schema.SchemaOps declaration
|
|
54
|
+
*/
|
|
82
55
|
function declaration(typeParameters, decode, encode, annotations) {
|
|
83
|
-
|
|
56
|
+
return make_1(_fncts_schema_AST.createDeclaration(_fncts_base_collection_immutable_Vector_api.map((tp) => tp.ast)(typeParameters), (...typeParameters) => decode(...typeParameters.map(make_1)), (...typeParameters) => encode(...typeParameters.map(make_1)), annotations));
|
|
84
57
|
}
|
|
85
58
|
function filter_1(predicate) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
59
|
+
return (self) => {
|
|
60
|
+
return make_1(_fncts_schema_AST.createRefinement(self.ast, predicate));
|
|
61
|
+
};
|
|
90
62
|
}
|
|
91
63
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
64
|
+
* @tsplus pipeable fncts.schema.Schema brand
|
|
65
|
+
*/
|
|
94
66
|
function brand(validation) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
67
|
+
return (self) => {
|
|
68
|
+
return make_1(_fncts_schema_AST.createRefinement(self.ast, validation.validate, self.ast.annotations.annotate(_fncts_schema_ASTAnnotation.Brand, _fncts_base_collection_immutable_Vector_api.vector(validation))));
|
|
69
|
+
};
|
|
99
70
|
}
|
|
100
71
|
function makeLiteral(value) {
|
|
101
|
-
|
|
72
|
+
return make_1(_fncts_schema_AST.createLiteral(value));
|
|
102
73
|
}
|
|
103
74
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
75
|
+
* @tsplus static fncts.schema.SchemaOps literal
|
|
76
|
+
*/
|
|
106
77
|
function literal(...literals) {
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const never =
|
|
114
|
-
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const unknown_1 =
|
|
119
|
-
const unknown =
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const any =
|
|
124
|
-
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const _undefined_1 =
|
|
129
|
-
const _undefined =
|
|
130
|
-
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const _null_1 =
|
|
135
|
-
const _null =
|
|
136
|
-
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const _void_1 =
|
|
141
|
-
const _void =
|
|
142
|
-
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const string =
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const number =
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const boolean =
|
|
157
|
-
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const bigint =
|
|
162
|
-
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const symbol =
|
|
167
|
-
/**
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
const object_1 =
|
|
172
|
-
const object =
|
|
173
|
-
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const date_1 =
|
|
177
|
-
const date =
|
|
178
|
-
/**
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const implicitDate =
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
* @tsplus derive fncts.schema.Schema<|> 30
|
|
190
|
-
* @tsplus static fncts.schema.SchemaOps union
|
|
191
|
-
*/
|
|
78
|
+
return union_1(...literals.map(makeLiteral));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @tsplus static fncts.schema.SchemaOps never
|
|
82
|
+
* @tsplus implicit
|
|
83
|
+
*/
|
|
84
|
+
const never = make_1(_fncts_schema_AST.neverKeyword);
|
|
85
|
+
/**
|
|
86
|
+
* @tsplus static fncts.schema.SchemaOps unknown
|
|
87
|
+
* @tsplus implicit
|
|
88
|
+
*/
|
|
89
|
+
const unknown_1 = make_1(_fncts_schema_AST.unknownKeyword);
|
|
90
|
+
const unknown = unknown_1;
|
|
91
|
+
/**
|
|
92
|
+
* @tsplus static fncts.schema.SchemaOps any
|
|
93
|
+
*/
|
|
94
|
+
const any = make_1(_fncts_schema_AST.anyKeyword);
|
|
95
|
+
/**
|
|
96
|
+
* @tsplus static fncts.schema.SchemaOps undefined
|
|
97
|
+
* @tsplus implicit
|
|
98
|
+
*/
|
|
99
|
+
const _undefined_1 = make_1(_fncts_schema_AST.undefinedKeyword);
|
|
100
|
+
const _undefined = _undefined_1;
|
|
101
|
+
/**
|
|
102
|
+
* @tsplus static fncts.schema.SchemaOps null
|
|
103
|
+
* @tsplus implicit
|
|
104
|
+
*/
|
|
105
|
+
const _null_1 = make_1(_fncts_schema_AST.createLiteral(null));
|
|
106
|
+
const _null = _null_1;
|
|
107
|
+
/**
|
|
108
|
+
* @tsplus static fncts.schema.SchemaOps void
|
|
109
|
+
* @tsplus implicit
|
|
110
|
+
*/
|
|
111
|
+
const _void_1 = make_1(_fncts_schema_AST.voidKeyword);
|
|
112
|
+
const _void = _void_1;
|
|
113
|
+
/**
|
|
114
|
+
* @tsplus static fncts.schema.SchemaOps string
|
|
115
|
+
* @tsplus implicit
|
|
116
|
+
*/
|
|
117
|
+
const string = make_1(_fncts_schema_AST.stringKeyword);
|
|
118
|
+
/**
|
|
119
|
+
* @tsplus static fncts.schema.SchemaOps number
|
|
120
|
+
* @tsplus implicit
|
|
121
|
+
*/
|
|
122
|
+
const number = make_1(_fncts_schema_AST.numberKeyword);
|
|
123
|
+
/**
|
|
124
|
+
* @tsplus static fncts.schema.SchemaOps boolean
|
|
125
|
+
* @tsplus implicit
|
|
126
|
+
*/
|
|
127
|
+
const boolean = make_1(_fncts_schema_AST.booleanKeyword);
|
|
128
|
+
/**
|
|
129
|
+
* @tsplus static fncts.schema.SchemaOps bigint
|
|
130
|
+
* @tsplus implicit
|
|
131
|
+
*/
|
|
132
|
+
const bigint = make_1(_fncts_schema_AST.bigIntKeyword);
|
|
133
|
+
/**
|
|
134
|
+
* @tsplus static fncts.schema.SchemaOps symbol
|
|
135
|
+
* @tsplus implicit
|
|
136
|
+
*/
|
|
137
|
+
const symbol = make_1(_fncts_schema_AST.symbolKeyword);
|
|
138
|
+
/**
|
|
139
|
+
* @tsplus static fncts.schema.SchemaOps object
|
|
140
|
+
* @tsplus implicit
|
|
141
|
+
*/
|
|
142
|
+
const object_1 = make_1(_fncts_schema_AST.objectKeyword);
|
|
143
|
+
const object = object_1;
|
|
144
|
+
/**
|
|
145
|
+
* @tsplus static fncts.schema.SchemaOps date
|
|
146
|
+
*/
|
|
147
|
+
const date_1 = instanceOf_1(Date)(object_1);
|
|
148
|
+
const date = date_1;
|
|
149
|
+
/**
|
|
150
|
+
* @tsplus implicit
|
|
151
|
+
*/
|
|
152
|
+
const implicitDate = transformOrFail_1(date_1, (input, options) => {
|
|
153
|
+
if (typeof input === "string" || typeof input === "number") return _fncts_schema_ParseResult.succeed(new Date(input));
|
|
154
|
+
else return _fncts_schema_Parser_api.decode(date_1)(input, options);
|
|
155
|
+
}, (input) => _fncts_schema_ParseResult.succeed(input))(unknown_1);
|
|
156
|
+
/**
|
|
157
|
+
* @tsplus derive fncts.schema.Schema<|> 30
|
|
158
|
+
* @tsplus static fncts.schema.SchemaOps union
|
|
159
|
+
*/
|
|
192
160
|
function union_1(...members) {
|
|
193
|
-
|
|
161
|
+
return make_1(_fncts_schema_AST.createUnion(_fncts_base_collection_immutable_Vector_api.from(members.map((m) => m.ast))));
|
|
194
162
|
}
|
|
195
163
|
/**
|
|
196
|
-
|
|
197
|
-
|
|
164
|
+
* @tsplus getter fncts.schema.Schema nullable
|
|
165
|
+
*/
|
|
198
166
|
function nullable(self) {
|
|
199
|
-
|
|
167
|
+
return union_1(_null_1, self);
|
|
200
168
|
}
|
|
201
169
|
/**
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
* @tsplus static fncts.schema.SchemaOps uniqueSymbol
|
|
171
|
+
*/
|
|
204
172
|
function uniqueSymbol(symbol, annotations) {
|
|
205
|
-
|
|
173
|
+
return make_1(_fncts_schema_AST.createUniqueSymbol(symbol, annotations));
|
|
206
174
|
}
|
|
207
175
|
/**
|
|
208
|
-
|
|
209
|
-
|
|
176
|
+
* @tsplus getter fncts.schema.Schema optional
|
|
177
|
+
*/
|
|
210
178
|
function optional(self) {
|
|
211
|
-
|
|
212
|
-
annotations: self.ast.annotations.annotate(tsplus_module_4.Optional, true)
|
|
213
|
-
}));
|
|
179
|
+
return make_1(self.ast.clone({ annotations: self.ast.annotations.annotate(_fncts_schema_ASTAnnotation.Optional, true) }));
|
|
214
180
|
}
|
|
215
181
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
182
|
+
* @tsplus fluent fncts.schema.Schema isOptional
|
|
183
|
+
*/
|
|
218
184
|
function isOptional_1(self) {
|
|
219
|
-
|
|
185
|
+
return _fncts_base_data_Maybe_api.getOrElse(() => false)(self.ast.annotations.get(_fncts_schema_ASTAnnotation.Optional));
|
|
220
186
|
}
|
|
221
187
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
188
|
+
* @tsplus getter fncts.schema.Schema parseOptional
|
|
189
|
+
*/
|
|
224
190
|
function parseOptional(self) {
|
|
225
|
-
|
|
226
|
-
annotations: self.ast.annotations.annotate(tsplus_module_4.ParseOptional, true)
|
|
227
|
-
}));
|
|
191
|
+
return make_1(self.ast.clone({ annotations: self.ast.annotations.annotate(_fncts_schema_ASTAnnotation.ParseOptional, true) }));
|
|
228
192
|
}
|
|
229
193
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
194
|
+
* @tsplus fluent fncts.schema.Schema isParseOptional
|
|
195
|
+
*/
|
|
232
196
|
function isParseOptional_1(self) {
|
|
233
|
-
|
|
197
|
+
return _fncts_base_data_Maybe_api.getOrElse(() => false)(self.ast.annotations.get(_fncts_schema_ASTAnnotation.ParseOptional));
|
|
234
198
|
}
|
|
235
199
|
/**
|
|
236
|
-
|
|
237
|
-
|
|
200
|
+
* @tsplus static fncts.schema.SchemaOps struct
|
|
201
|
+
*/
|
|
238
202
|
function struct(fields) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
delete output[key];
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
output[key] = tsplus_module_7.toUndefined(value);
|
|
274
|
-
}
|
|
275
|
-
return output;
|
|
276
|
-
})(from);
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* @tsplus static fncts.schema.SchemaOps tuple
|
|
280
|
-
*/
|
|
203
|
+
const parseOptionalKeys = _fncts_base_collection_immutable_Vector_api.filter((key) => isParseOptional_1(fields[key]))(require_utils.ownKeys(fields));
|
|
204
|
+
const struct = make_1(_fncts_schema_AST.createTypeLiteral(_fncts_base_collection_immutable_Vector_api.map((key) => _fncts_schema_AST.createPropertySignature(key, fields[key].ast, isOptional_1(fields[key]), true))(require_utils.ownKeys(fields)), _fncts_base_collection_immutable_Vector_api.empty()));
|
|
205
|
+
if (_fncts_base_collection_immutable_Vector_api.isEmpty(parseOptionalKeys)) return struct;
|
|
206
|
+
const propertySignatures = struct.ast.propertySignatures;
|
|
207
|
+
const from = make_1(_fncts_schema_AST.createTypeLiteral(_fncts_base_collection_immutable_Vector_api.map((p) => _fncts_base_collection_immutable_Vector_api.includes(p.name)(parseOptionalKeys) ? _fncts_schema_AST.createPropertySignature(p.name, _fncts_schema_AST.createUnion(_fncts_base_collection_immutable_Vector_api.vector(_fncts_schema_AST.undefinedKeyword, _fncts_schema_AST.createLiteral(null), p.type)), true, p.isReadonly) : p)(propertySignatures), _fncts_base_collection_immutable_Vector_api.empty()));
|
|
208
|
+
return transform_1(make_1(_fncts_schema_AST.createTypeLiteral(_fncts_base_collection_immutable_Vector_api.map((p) => {
|
|
209
|
+
if (_fncts_base_collection_immutable_Vector_api.includes(p.name)(parseOptionalKeys)) {
|
|
210
|
+
if (_fncts_schema_AST.isLazy(fields[p.name].ast)) return _fncts_schema_AST.createPropertySignature(p.name, _fncts_schema_AST.createLazy(() => _fncts_schema_Schema_api_maybe.maybe(fields[p.name]).ast), true, p.isReadonly);
|
|
211
|
+
return _fncts_schema_AST.createPropertySignature(p.name, _fncts_schema_Schema_api_maybe.maybe(fields[p.name]).ast, true, p.isReadonly);
|
|
212
|
+
}
|
|
213
|
+
return p;
|
|
214
|
+
})(propertySignatures), _fncts_base_collection_immutable_Vector_api.empty())), (input) => {
|
|
215
|
+
const output = { ...input };
|
|
216
|
+
for (const key of parseOptionalKeys) output[key] = _fncts_base_data_Maybe_constructors.fromNullable(input[key]);
|
|
217
|
+
return output;
|
|
218
|
+
}, (input) => {
|
|
219
|
+
const output = { ...input };
|
|
220
|
+
for (const key of parseOptionalKeys) {
|
|
221
|
+
const value = input[key];
|
|
222
|
+
if (_fncts_base_data_Maybe_definition.isNothing(value)) {
|
|
223
|
+
delete output[key];
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
output[key] = _fncts_base_data_Maybe_api.toUndefined(value);
|
|
227
|
+
}
|
|
228
|
+
return output;
|
|
229
|
+
})(from);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @tsplus static fncts.schema.SchemaOps tuple
|
|
233
|
+
*/
|
|
281
234
|
function tuple(...elements) {
|
|
282
|
-
|
|
235
|
+
return make_1(_fncts_schema_AST.createTuple(_fncts_base_collection_immutable_Vector_api.from(elements.map((schema) => _fncts_schema_AST.createElement(schema.ast, false))), _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":333:105"), true));
|
|
283
236
|
}
|
|
284
237
|
/**
|
|
285
|
-
|
|
286
|
-
|
|
238
|
+
* @tsplus static fncts.schema.SchemaOps lazy
|
|
239
|
+
*/
|
|
287
240
|
function lazy(f, annotations) {
|
|
288
|
-
|
|
241
|
+
return make_1(_fncts_schema_AST.createLazy(() => f().ast, annotations));
|
|
289
242
|
}
|
|
290
243
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
244
|
+
* @tsplus static fncts.schema.SchemaOps array
|
|
245
|
+
* @tsplus getter fncts.schema.Schema array
|
|
246
|
+
*/
|
|
294
247
|
function array(item) {
|
|
295
|
-
|
|
248
|
+
return make_1(_fncts_schema_AST.createTuple(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(item.ast), fileName_1 + ":349:61"), true));
|
|
296
249
|
}
|
|
297
250
|
/**
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
251
|
+
* @tsplus static fncts.schema.SchemaOps mutableArray
|
|
252
|
+
* @tsplus getter fncts.schema.Schema mutableArray
|
|
253
|
+
*/
|
|
301
254
|
function mutableArray(item) {
|
|
302
|
-
|
|
255
|
+
return make_1(_fncts_schema_AST.createTuple(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(item.ast), fileName_1 + ":357:61"), false));
|
|
303
256
|
}
|
|
304
257
|
/**
|
|
305
|
-
|
|
306
|
-
|
|
258
|
+
* @tsplus static fncts.schema.SchemaOps record
|
|
259
|
+
*/
|
|
307
260
|
function record(key, value) {
|
|
308
|
-
|
|
261
|
+
return make_1(_fncts_schema_AST.createRecord(key.ast, value.ast, true));
|
|
309
262
|
}
|
|
310
263
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
264
|
+
* @tsplus static fncts.schema.SchemaOps enum
|
|
265
|
+
*/
|
|
313
266
|
function enum_1(enums) {
|
|
314
|
-
|
|
267
|
+
return make_1(_fncts_schema_AST.createEnum(_fncts_base_collection_immutable_Vector_api.from(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]]))));
|
|
315
268
|
}
|
|
316
269
|
function getTemplateLiterals(ast) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
case 18 /* ASTTag.Union */:
|
|
325
|
-
return tsplus_module_2.flatMap(getTemplateLiterals)(ast.types);
|
|
326
|
-
default:
|
|
327
|
-
throw new Error(`Unsupported template literal span ${(0, _Showable.show)(ast)}`);
|
|
328
|
-
}
|
|
270
|
+
switch (ast._tag) {
|
|
271
|
+
case 1: return _fncts_base_collection_immutable_Vector_api.vector(ast);
|
|
272
|
+
case 9:
|
|
273
|
+
case 8: return _fncts_base_collection_immutable_Vector_api.vector(_fncts_schema_AST.createTemplateLiteral("", _fncts_base_collection_immutable_Vector_api.vector(new require_AST.TemplateLiteralSpan(ast, ""))));
|
|
274
|
+
case 18: return _fncts_base_collection_immutable_Vector_api.flatMap(getTemplateLiterals)(ast.types);
|
|
275
|
+
default: throw new Error(`Unsupported template literal span ${(0, _fncts_base_data_Showable.show)(ast)}`);
|
|
276
|
+
}
|
|
329
277
|
}
|
|
330
278
|
function combineTemplateLiterals(a, b) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const last = tsplus_module_2.unsafeLast(a.spans);
|
|
345
|
-
return tsplus_module_3.createTemplateLiteral(a.head, tsplus_module_2.concat(b.spans)(tsplus_module_2.append(new _AST2.TemplateLiteralSpan(last.type, last.literal + String(b.head)))(tsplus_module_2.slice(0, -1)(a.spans))));
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* @tsplus static fncts.schema.SchemaOps templateLiteral
|
|
349
|
-
*/
|
|
279
|
+
if (_fncts_schema_AST.isLiteral(a)) return _fncts_schema_AST.isLiteral(b) ? _fncts_schema_AST.createLiteral(String(a.literal) + String(b.literal)) : _fncts_schema_AST.createTemplateLiteral(String(a.literal) + b.head, b.spans);
|
|
280
|
+
if (_fncts_schema_AST.isLiteral(b)) {
|
|
281
|
+
if (!_fncts_base_collection_immutable_Vector_api.isNonEmpty(a.spans)) throw new Error("Invalid template literal");
|
|
282
|
+
const last = _fncts_base_collection_immutable_Vector_api.unsafeLast(a.spans);
|
|
283
|
+
return _fncts_schema_AST.createTemplateLiteral(a.head, _fncts_base_collection_immutable_Vector_api.append(new require_AST.TemplateLiteralSpan(last.type, last.literal + String(b.literal)))(_fncts_base_collection_immutable_Vector_api.slice(0, -1)(a.spans)));
|
|
284
|
+
}
|
|
285
|
+
if (!_fncts_base_collection_immutable_Vector_api.isNonEmpty(a.spans)) throw new Error("Invalid template literal");
|
|
286
|
+
const last = _fncts_base_collection_immutable_Vector_api.unsafeLast(a.spans);
|
|
287
|
+
return _fncts_schema_AST.createTemplateLiteral(a.head, _fncts_base_collection_immutable_Vector_api.concat(b.spans)(_fncts_base_collection_immutable_Vector_api.append(new require_AST.TemplateLiteralSpan(last.type, last.literal + String(b.head)))(_fncts_base_collection_immutable_Vector_api.slice(0, -1)(a.spans))));
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @tsplus static fncts.schema.SchemaOps templateLiteral
|
|
291
|
+
*/
|
|
350
292
|
function templateLiteral(...[head, ...tail]) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
return make_1(tsplus_module_3.createUnion(types));
|
|
293
|
+
let types = getTemplateLiterals(head.ast);
|
|
294
|
+
for (const span of tail) types = _fncts_base_collection_immutable_Vector_api.flatMap((a) => _fncts_base_collection_immutable_Vector_api.map((b) => combineTemplateLiterals(a, b))(getTemplateLiterals(span.ast)))(types);
|
|
295
|
+
return make_1(_fncts_schema_AST.createUnion(types));
|
|
356
296
|
}
|
|
357
297
|
/**
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
298
|
+
* @tsplus static fncts.schema.SchemaOps keyof
|
|
299
|
+
* @tsplus getter fncts.schema.Schema keyof
|
|
300
|
+
*/
|
|
361
301
|
function keyof(self) {
|
|
362
|
-
|
|
302
|
+
return make_1(_fncts_schema_AST.keyof(self.ast));
|
|
363
303
|
}
|
|
364
304
|
function isOverlappingPropertySignatures(x, y) {
|
|
365
|
-
|
|
305
|
+
return _fncts_base_collection_immutable_Vector_api.some((px) => _fncts_base_collection_immutable_Vector_api.some((py) => px.name === py.name)(y.propertySignatures))(x.propertySignatures);
|
|
366
306
|
}
|
|
367
307
|
function isOverlappingIndexSignatures(x, y) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
308
|
+
return _fncts_base_collection_immutable_Vector_api.some((ix) => _fncts_base_collection_immutable_Vector_api.some((iy) => {
|
|
309
|
+
const bx = require_AST.getParameter(ix.parameter);
|
|
310
|
+
const by = require_AST.getParameter(iy.parameter);
|
|
311
|
+
return _fncts_schema_AST.isStringKeyword(bx) && _fncts_schema_AST.isStringKeyword(by) || _fncts_schema_AST.isSymbolKeyword(bx) && _fncts_schema_AST.isSymbolKeyword(by);
|
|
312
|
+
})(y.indexSignatures))(x.indexSignatures);
|
|
373
313
|
}
|
|
374
314
|
/**
|
|
375
|
-
|
|
376
|
-
|
|
315
|
+
* @tsplus pipeable fncts.schema.Schema extend
|
|
316
|
+
*/
|
|
377
317
|
function extend(that) {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
throw new Error("`extend can only handle type literals or unions of type literals`");
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* @tsplus pipeable fncts.schema.Schema instanceOf
|
|
397
|
-
*/
|
|
318
|
+
return (self) => {
|
|
319
|
+
const selfTypes = _fncts_schema_AST.isUnion(self.ast) ? self.ast.types : _fncts_base_collection_immutable_Vector_api.vector(self.ast);
|
|
320
|
+
const thatTypes = _fncts_schema_AST.isUnion(that.ast) ? that.ast.types : _fncts_base_collection_immutable_Vector_api.vector(that.ast);
|
|
321
|
+
if (_fncts_base_collection_immutable_Vector_api.every(_fncts_schema_AST.isTypeLiteral)(selfTypes) && _fncts_base_collection_immutable_Vector_api.every(_fncts_schema_AST.isTypeLiteral)(thatTypes)) return make_1(_fncts_schema_AST.createUnion(_fncts_base_collection_immutable_Vector_api.flatMap((x) => _fncts_base_collection_immutable_Vector_api.map((y) => {
|
|
322
|
+
if (isOverlappingPropertySignatures(x, y)) throw new Error("`extend` cannot handle overlapping property signatures");
|
|
323
|
+
if (isOverlappingIndexSignatures(x, y)) throw new Error("`extend` cannot handle overlapping index signatures");
|
|
324
|
+
return _fncts_schema_AST.createTypeLiteral(_fncts_base_collection_immutable_Vector_api.concat(y.propertySignatures)(x.propertySignatures), _fncts_base_collection_immutable_Vector_api.concat(y.indexSignatures)(x.indexSignatures));
|
|
325
|
+
})(thatTypes))(selfTypes)));
|
|
326
|
+
throw new Error("`extend can only handle type literals or unions of type literals`");
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* @tsplus pipeable fncts.schema.Schema instanceOf
|
|
331
|
+
*/
|
|
398
332
|
function instanceOf_1(constructor) {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
333
|
+
return (self) => {
|
|
334
|
+
return annotate_1(_fncts_schema_ASTAnnotation.Description, `an instance of ${constructor.name}`)(filter_1((value) => value instanceof constructor)(self));
|
|
335
|
+
};
|
|
402
336
|
}
|
|
403
337
|
/**
|
|
404
|
-
|
|
405
|
-
|
|
338
|
+
* @tsplus pipeable fncts.schema.Schema transformOrFail
|
|
339
|
+
*/
|
|
406
340
|
function transformOrFail_1(to, decode, encode) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
341
|
+
return (from) => {
|
|
342
|
+
return make_1(_fncts_schema_AST.createTransform(from.ast, to.ast, decode, encode));
|
|
343
|
+
};
|
|
410
344
|
}
|
|
411
345
|
/**
|
|
412
|
-
|
|
413
|
-
|
|
346
|
+
* @tsplus pipeable fncts.schema.Schema transform
|
|
347
|
+
*/
|
|
414
348
|
function transform_1(to, decode, encode) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
349
|
+
return (from) => {
|
|
350
|
+
return transformOrFail_1(to, (input, options) => _fncts_schema_ParseResult.succeed(decode(input, options)), (input, options) => _fncts_schema_ParseResult.succeed(encode(input, options)))(from);
|
|
351
|
+
};
|
|
418
352
|
}
|
|
419
353
|
/**
|
|
420
|
-
|
|
421
|
-
|
|
354
|
+
* @tsplus pipeable fncts.schema.Schema pick
|
|
355
|
+
*/
|
|
422
356
|
function pick(...keys) {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
357
|
+
return (self) => {
|
|
358
|
+
return make_1(_fncts_schema_AST.pick(_fncts_base_collection_immutable_Vector_api.from(keys))(self.ast));
|
|
359
|
+
};
|
|
426
360
|
}
|
|
427
361
|
/**
|
|
428
|
-
|
|
429
|
-
|
|
362
|
+
* @tsplus pipeable fncts.schema.Schema omit
|
|
363
|
+
*/
|
|
430
364
|
function omit(...keys) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
365
|
+
return (self) => {
|
|
366
|
+
return make_1(_fncts_schema_AST.omit(_fncts_base_collection_immutable_Vector_api.from(keys))(self.ast));
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
exports._null = _null;
|
|
371
|
+
exports._undefined = _undefined;
|
|
372
|
+
exports._void = _void;
|
|
373
|
+
exports.annotate = annotate;
|
|
374
|
+
exports.any = any;
|
|
375
|
+
exports.array = array;
|
|
376
|
+
exports.bigint = bigint;
|
|
377
|
+
exports.boolean = boolean;
|
|
378
|
+
exports.brand = brand;
|
|
379
|
+
exports.date = date;
|
|
380
|
+
exports.declaration = declaration;
|
|
381
|
+
exports.enum = enum_1;
|
|
382
|
+
exports.enum_ = enum_;
|
|
383
|
+
exports.extend = extend;
|
|
384
|
+
exports.filter = filter;
|
|
385
|
+
exports.implicitDate = implicitDate;
|
|
386
|
+
exports.instanceOf = instanceOf;
|
|
387
|
+
exports.isOptional = isOptional;
|
|
388
|
+
exports.isParseOptional = isParseOptional;
|
|
389
|
+
exports.keyof = keyof;
|
|
390
|
+
exports.lazy = lazy;
|
|
391
|
+
exports.literal = literal;
|
|
392
|
+
exports.make = make;
|
|
393
|
+
exports.mutableArray = mutableArray;
|
|
394
|
+
exports.never = never;
|
|
395
|
+
exports.null = _null_1;
|
|
396
|
+
exports.nullable = nullable;
|
|
397
|
+
exports.number = number;
|
|
398
|
+
exports.object = object;
|
|
399
|
+
exports.omit = omit;
|
|
400
|
+
exports.optional = optional;
|
|
401
|
+
exports.parseOptional = parseOptional;
|
|
402
|
+
exports.pick = pick;
|
|
403
|
+
exports.record = record;
|
|
404
|
+
exports.string = string;
|
|
405
|
+
exports.struct = struct;
|
|
406
|
+
exports.symbol = symbol;
|
|
407
|
+
exports.templateLiteral = templateLiteral;
|
|
408
|
+
exports.transform = transform;
|
|
409
|
+
exports.transformOrFail = transformOrFail;
|
|
410
|
+
exports.tuple = tuple;
|
|
411
|
+
exports.undefined = _undefined_1;
|
|
412
|
+
exports.union = union;
|
|
413
|
+
exports.uniqueSymbol = uniqueSymbol;
|
|
414
|
+
exports.unknown = unknown;
|
|
415
|
+
exports.void = _void_1;
|
|
416
|
+
|
|
435
417
|
//# sourceMappingURL=api.cjs.map
|