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