@fncts/schema 0.0.11 → 0.0.13
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/ASTAnnotation.d.ts +9 -9
- package/Parser.d.ts +2 -2
- package/Schema/api.d.ts +2 -2
- package/Schema/derivations.d.ts +6 -2
- package/Schema.d.ts +8 -8
- package/Show.d.ts +8 -0
- package/_cjs/AST.cjs +43 -102
- package/_cjs/AST.cjs.map +1 -1
- package/_cjs/ASTAnnotation.cjs +22 -42
- package/_cjs/ASTAnnotation.cjs.map +1 -1
- package/_cjs/ASTAnnotationMap.cjs +2 -2
- package/_cjs/ASTAnnotationMap.cjs.map +1 -1
- package/_cjs/Gen.cjs +3 -4
- package/_cjs/Gen.cjs.map +1 -1
- package/_cjs/InvalidInterpretationError.cjs +1 -2
- package/_cjs/InvalidInterpretationError.cjs.map +1 -1
- package/_cjs/ParseError.cjs +4 -5
- package/_cjs/ParseError.cjs.map +1 -1
- package/_cjs/ParseResult.cjs +2 -2
- package/_cjs/Parser/api.cjs +2 -2
- package/_cjs/Parser/api.cjs.map +1 -1
- package/_cjs/Parser/definition.cjs +2 -2
- package/_cjs/Parser/interpreter.cjs +2 -2
- package/_cjs/Parser/interpreter.cjs.map +1 -1
- package/_cjs/Parser.cjs +8 -8
- package/_cjs/Parser.cjs.map +1 -1
- package/_cjs/Schema/api/conc.cjs +4 -5
- package/_cjs/Schema/api/conc.cjs.map +1 -1
- package/_cjs/Schema/api/either.cjs +4 -6
- package/_cjs/Schema/api/either.cjs.map +1 -1
- package/_cjs/Schema/api/hashMap.cjs +4 -6
- package/_cjs/Schema/api/hashMap.cjs.map +1 -1
- package/_cjs/Schema/api/hashSet.cjs +7 -7
- package/_cjs/Schema/api/hashSet.cjs.map +1 -1
- package/_cjs/Schema/api/immutableArray.cjs +4 -6
- package/_cjs/Schema/api/immutableArray.cjs.map +1 -1
- package/_cjs/Schema/api/list.cjs +4 -6
- package/_cjs/Schema/api/list.cjs.map +1 -1
- package/_cjs/Schema/api/maybe.cjs +4 -6
- package/_cjs/Schema/api/maybe.cjs.map +1 -1
- package/_cjs/Schema/api.cjs +29 -56
- package/_cjs/Schema/api.cjs.map +1 -1
- package/_cjs/Schema/definition.cjs +5 -8
- package/_cjs/Schema/definition.cjs.map +1 -1
- package/_cjs/Schema/derivations.cjs +22 -8
- package/_cjs/Schema/derivations.cjs.map +1 -1
- package/_cjs/Schema.cjs +32 -32
- package/_cjs/Schema.cjs.map +1 -1
- package/_cjs/Show.cjs +146 -0
- package/_cjs/Show.cjs.map +1 -0
- package/_cjs/utils.cjs +2 -2
- package/_cjs/utils.cjs.map +1 -1
- package/_mjs/AST.mjs +5 -28
- package/_mjs/AST.mjs.map +1 -1
- package/_mjs/ASTAnnotation.mjs.map +1 -1
- package/_mjs/ASTAnnotationMap.mjs +1 -2
- package/_mjs/ASTAnnotationMap.mjs.map +1 -1
- package/_mjs/Gen.mjs +1 -2
- package/_mjs/Gen.mjs.map +1 -1
- package/_mjs/ParseError.mjs +1 -1
- package/_mjs/ParseError.mjs.map +1 -1
- package/_mjs/Parser/interpreter.mjs.map +1 -1
- package/_mjs/Parser.mjs +3 -2
- package/_mjs/Parser.mjs.map +1 -1
- package/_mjs/Schema/api/conc.mjs +1 -1
- package/_mjs/Schema/api/conc.mjs.map +1 -1
- package/_mjs/Schema/api/either.mjs.map +1 -1
- package/_mjs/Schema/api/hashMap.mjs.map +1 -1
- package/_mjs/Schema/api/hashSet.mjs.map +1 -1
- package/_mjs/Schema/api/immutableArray.mjs.map +1 -1
- package/_mjs/Schema/api/list.mjs.map +1 -1
- package/_mjs/Schema/api/maybe.mjs.map +1 -1
- package/_mjs/Schema/api.mjs.map +1 -1
- package/_mjs/Schema/derivations.mjs +19 -6
- package/_mjs/Schema/derivations.mjs.map +1 -1
- package/_mjs/Schema.mjs +10 -8
- package/_mjs/Schema.mjs.map +1 -1
- package/_mjs/Show.mjs +138 -0
- package/_mjs/Show.mjs.map +1 -0
- package/_mjs/utils.mjs.map +1 -1
- package/_src/AST.ts +24 -6
- package/_src/ASTAnnotation.ts +5 -1
- package/_src/Gen.ts +0 -1
- package/_src/ParseError.ts +13 -3
- package/_src/Parser.ts +3 -2
- package/_src/Schema/api/conc.ts +1 -1
- package/_src/Schema/derivations.ts +19 -3
- package/_src/Schema.ts +10 -8
- package/_src/Show.ts +169 -0
- package/_src/global.ts +5 -1
- package/global.d.ts +5 -1
- package/package.json +3 -3
package/ASTAnnotation.d.ts
CHANGED
|
@@ -24,43 +24,43 @@ export declare class ASTAnnotation<V> implements Hashable, Equatable {
|
|
|
24
24
|
[Symbol.equals](that: unknown): boolean;
|
|
25
25
|
}
|
|
26
26
|
export declare function isASTAnnotation(u: unknown): u is ASTAnnotation<unknown>;
|
|
27
|
-
export declare const TitleTag: import("@fncts/base/data/Tag").Tag<string>;
|
|
27
|
+
export declare const TitleTag: import("@fncts/base/data/Tag").Tag<string, string>;
|
|
28
28
|
/**
|
|
29
29
|
* @tsplus static fncts.schema.ASTAnnotationOps Title
|
|
30
30
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
31
31
|
*/
|
|
32
32
|
export declare const Title: ASTAnnotation<string>;
|
|
33
|
-
export declare const IdentifierTag: import("@fncts/base/data/Tag").Tag<string>;
|
|
33
|
+
export declare const IdentifierTag: import("@fncts/base/data/Tag").Tag<string, string>;
|
|
34
34
|
/**
|
|
35
35
|
* @tsplus static fncts.schema.ASTAnnotationOps Identifier
|
|
36
36
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
37
37
|
*/
|
|
38
38
|
export declare const Identifier: ASTAnnotation<string>;
|
|
39
|
-
export declare const DescriptionTag: import("@fncts/base/data/Tag").Tag<string>;
|
|
39
|
+
export declare const DescriptionTag: import("@fncts/base/data/Tag").Tag<string, string>;
|
|
40
40
|
/**
|
|
41
41
|
* @tsplus static fncts.schema.ASTAnnotationOps Description
|
|
42
42
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
43
43
|
*/
|
|
44
44
|
export declare const Description: ASTAnnotation<string>;
|
|
45
|
-
export declare const MessageTag: import("@fncts/base/data/Tag").Tag<(_: unknown) => string>;
|
|
45
|
+
export declare const MessageTag: import("@fncts/base/data/Tag").Tag<(_: unknown) => string, (_: unknown) => string>;
|
|
46
46
|
/**
|
|
47
47
|
* @tsplus static fncts.schema.ASTAnnotationOps Message
|
|
48
48
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
49
49
|
*/
|
|
50
50
|
export declare const Message: ASTAnnotation<(_: unknown) => string>;
|
|
51
|
-
export declare const BrandTag: import("@fncts/base/data/Tag").Tag<import("@fncts/base/collection/immutable/Vector").Vector<Validation<any, any>>>;
|
|
51
|
+
export declare const BrandTag: import("@fncts/base/data/Tag").Tag<import("@fncts/base/collection/immutable/Vector").Vector<Validation<any, any>>, import("@fncts/base/collection/immutable/Vector").Vector<Validation<any, any>>>;
|
|
52
52
|
/**
|
|
53
53
|
* @tsplus static fncts.schema.ASTAnnotationOps Brand
|
|
54
54
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
55
55
|
*/
|
|
56
56
|
export declare const Brand: ASTAnnotation<import("@fncts/base/collection/immutable/Vector").Vector<Validation<any, any>>>;
|
|
57
|
-
export declare const OptionalTag: import("@fncts/base/data/Tag").Tag<boolean>;
|
|
57
|
+
export declare const OptionalTag: import("@fncts/base/data/Tag").Tag<boolean, boolean>;
|
|
58
58
|
/**
|
|
59
59
|
* @tsplus static fncts.schema.ASTAnnotationOps Optional
|
|
60
60
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
61
61
|
*/
|
|
62
62
|
export declare const Optional: ASTAnnotation<boolean>;
|
|
63
|
-
export declare const ParseOptionalTag: import("@fncts/base/data/Tag").Tag<boolean>;
|
|
63
|
+
export declare const ParseOptionalTag: import("@fncts/base/data/Tag").Tag<boolean, boolean>;
|
|
64
64
|
/**
|
|
65
65
|
* @tsplus static fncts.schema.ASTAnnotationOps ParseOptional
|
|
66
66
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
@@ -68,13 +68,13 @@ export declare const ParseOptionalTag: import("@fncts/base/data/Tag").Tag<boolea
|
|
|
68
68
|
export declare const ParseOptional: ASTAnnotation<boolean>;
|
|
69
69
|
export type Hook<A> = (...typeParameters: ReadonlyArray<A>) => A;
|
|
70
70
|
export declare function hook(handler: (...typeParameters: ReadonlyArray<any>) => any): Hook<any>;
|
|
71
|
-
export declare const ParserHookTag: import("@fncts/base/data/Tag").Tag<Hook<any>>;
|
|
71
|
+
export declare const ParserHookTag: import("@fncts/base/data/Tag").Tag<Hook<any>, Hook<any>>;
|
|
72
72
|
/**
|
|
73
73
|
* @tsplus static fncts.schema.ASTAnnotationOps ParserHook
|
|
74
74
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
|
75
75
|
*/
|
|
76
76
|
export declare const ParserHook: ASTAnnotation<Hook<any>>;
|
|
77
|
-
export declare const GenHookTag: import("@fncts/base/data/Tag").Tag<Hook<any>>;
|
|
77
|
+
export declare const GenHookTag: import("@fncts/base/data/Tag").Tag<Hook<any>, Hook<any>>;
|
|
78
78
|
/**
|
|
79
79
|
* @tsplus static fncts.schema.ASTAnnotationOps GenHook
|
|
80
80
|
* @tsplus location "@fncts/schema/ASTAnnotation"
|
package/Parser.d.ts
CHANGED
package/Schema/api.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function make<A>(ast: AST): Schema<A>;
|
|
|
19
19
|
* @tsplus pipeable fncts.schema.Schema annotate
|
|
20
20
|
* @tsplus location "@fncts/schema/Schema/api"
|
|
21
21
|
*/
|
|
22
|
-
export declare function annotate<V>(annotation: ASTAnnotation<V>, value: V): <A>(self:
|
|
22
|
+
export declare function annotate<V>(annotation: ASTAnnotation<V>, value: V): <A>(self: Schema<A>) => Schema<A>;
|
|
23
23
|
/**
|
|
24
24
|
* @tsplus static fncts.schema.SchemaOps declaration
|
|
25
25
|
* @tsplus location "@fncts/schema/Schema/api"
|
|
@@ -235,7 +235,7 @@ export declare function keyof<A>(self: Schema<A>): Schema<keyof A>;
|
|
|
235
235
|
* @tsplus pipeable fncts.schema.Schema extend
|
|
236
236
|
* @tsplus location "@fncts/schema/Schema/api"
|
|
237
237
|
*/
|
|
238
|
-
export declare function extend<B>(that: Schema<B>): <A>(self:
|
|
238
|
+
export declare function extend<B>(that: Schema<B>): <A>(self: Schema<A>) => Schema<Spread<A & B>>;
|
|
239
239
|
/**
|
|
240
240
|
* @tsplus pipeable fncts.schema.Schema instanceOf
|
|
241
241
|
* @tsplus location "@fncts/schema/Schema/api"
|
package/Schema/derivations.d.ts
CHANGED
|
@@ -57,11 +57,15 @@ export declare function deriveTuple<A extends ReadonlyArray<unknown>>(...[compon
|
|
|
57
57
|
*/
|
|
58
58
|
export declare function deriveLazy<A>(f: (_: Schema<A>) => Schema<A>): Schema<A>;
|
|
59
59
|
/**
|
|
60
|
-
* @tsplus derive fncts.schema.Schema[fncts.Array]<_> 10
|
|
61
60
|
* @tsplus derive fncts.schema.Schema[fncts.ReadonlyArray]<_> 10
|
|
62
61
|
* @tsplus location "@fncts/schema/Schema/derivations"
|
|
63
62
|
*/
|
|
64
|
-
export declare function
|
|
63
|
+
export declare function deriveReadonlyArray<A extends ReadonlyArray<any>>(...[element]: [A] extends [ReadonlyArray<infer _A>] ? Check<Check.IsEqual<A, ReadonlyArray<_A>>> extends Check.True ? [element: Schema<_A>] : never : never): Schema<A>;
|
|
64
|
+
/**
|
|
65
|
+
* @tsplus derive fncts.schema.Schema[fncts.Array]<_> 10
|
|
66
|
+
* @tsplus location "@fncts/schema/Schema/derivations"
|
|
67
|
+
*/
|
|
68
|
+
export declare function deriveArray<A extends Array<any>>(...[element]: [A] extends [Array<infer _A>] ? Check<Check.IsEqual<A, Array<_A>>> extends Check.True ? [element: Schema<_A>] : never : never): Schema<A>;
|
|
65
69
|
/**
|
|
66
70
|
* @tsplus derive fncts.schema.Schema<_> 15
|
|
67
71
|
* @tsplus location "@fncts/schema/Schema/derivations"
|
package/Schema.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./Schema/api.js";
|
|
2
|
-
export * from "./Schema/definition.js";
|
|
3
1
|
export * from "./Schema/derivations.js";
|
|
4
|
-
export * from "./Schema/
|
|
5
|
-
export * from "./Schema/api
|
|
6
|
-
export * from "./Schema/api/hashMap.js";
|
|
7
|
-
export * from "./Schema/api/hashSet.js";
|
|
8
|
-
export * from "./Schema/api/immutableArray.js";
|
|
9
|
-
export * from "./Schema/api/list.js";
|
|
2
|
+
export * from "./Schema/definition.js";
|
|
3
|
+
export * from "./Schema/api.js";
|
|
10
4
|
export * from "./Schema/api/maybe.js";
|
|
5
|
+
export * from "./Schema/api/list.js";
|
|
6
|
+
export * from "./Schema/api/immutableArray.js";
|
|
7
|
+
export * from "./Schema/api/hashSet.js";
|
|
8
|
+
export * from "./Schema/api/hashMap.js";
|
|
9
|
+
export * from "./Schema/api/either.js";
|
|
10
|
+
export * from "./Schema/api/conc.js";
|
|
11
11
|
export type {} from "./Parser.js";
|
package/Show.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schema } from "@fncts/schema/Schema/definition";
|
|
2
|
+
import { AST } from "@fncts/schema/AST";
|
|
3
|
+
import { Eval } from "@fncts/base/control/Eval/definition";
|
|
4
|
+
/**
|
|
5
|
+
* @tsplus getter fncts.schema.Schema show
|
|
6
|
+
* @tsplus location "@fncts/schema/Show"
|
|
7
|
+
*/
|
|
8
|
+
export declare function show<A>(self: Schema<A>): string;
|
package/_cjs/AST.cjs
CHANGED
|
@@ -54,60 +54,35 @@ var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require
|
|
|
54
54
|
var _Showable = /*#__PURE__*/require("@fncts/base/data/Showable");
|
|
55
55
|
var _utils = /*#__PURE__*/require("@fncts/schema/utils");
|
|
56
56
|
var _ASTAnnotationMap = /*#__PURE__*/require("./ASTAnnotationMap.cjs");
|
|
57
|
-
function _getRequireWildcardCache(
|
|
58
|
-
function _interopRequireWildcard(
|
|
57
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
58
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
59
59
|
var _a;
|
|
60
60
|
const fileName_1 = "(@fncts/schema) src/AST.ts";
|
|
61
|
-
const createDeclaration = createDeclaration_1;
|
|
62
|
-
exports.
|
|
63
|
-
const
|
|
64
|
-
exports.
|
|
65
|
-
const
|
|
66
|
-
exports.
|
|
67
|
-
const
|
|
68
|
-
exports.
|
|
69
|
-
const
|
|
70
|
-
exports.
|
|
71
|
-
const
|
|
72
|
-
exports.
|
|
73
|
-
const
|
|
74
|
-
exports.
|
|
75
|
-
const
|
|
76
|
-
exports.
|
|
77
|
-
const
|
|
78
|
-
exports.
|
|
79
|
-
const
|
|
80
|
-
exports.
|
|
81
|
-
const
|
|
82
|
-
exports.
|
|
83
|
-
const
|
|
84
|
-
exports.
|
|
85
|
-
const
|
|
86
|
-
exports.createIndexSignature = createIndexSignature;
|
|
87
|
-
const createTypeLiteral = createTypeLiteral_1;
|
|
88
|
-
exports.createTypeLiteral = createTypeLiteral;
|
|
89
|
-
const createUnion = createUnion_1;
|
|
90
|
-
exports.createUnion = createUnion;
|
|
91
|
-
const createLazy = createLazy_1;
|
|
92
|
-
exports.createLazy = createLazy;
|
|
93
|
-
const createRefinement = createRefinement_1;
|
|
94
|
-
exports.createRefinement = createRefinement;
|
|
95
|
-
const createTransform = createTransform_1;
|
|
96
|
-
exports.createTransform = createTransform;
|
|
97
|
-
const getPropertySignatures = getPropertySignatures_1;
|
|
98
|
-
exports.getPropertySignatures = getPropertySignatures;
|
|
99
|
-
const keysOf = keysOf_1;
|
|
100
|
-
exports.keysOf = keysOf;
|
|
101
|
-
const partial = partial_1;
|
|
102
|
-
exports.partial = partial;
|
|
103
|
-
const getFrom = getFrom_1;
|
|
104
|
-
exports.getFrom = getFrom;
|
|
105
|
-
const getTo = getTo_1;
|
|
106
|
-
exports.getTo = getTo;
|
|
107
|
-
const reverse = reverse_1;
|
|
108
|
-
exports.reverse = reverse;
|
|
109
|
-
const ASTTypeId = /*#__PURE__*/Symbol.for("fncts.schema.AST");
|
|
110
|
-
exports.ASTTypeId = ASTTypeId;
|
|
61
|
+
const createDeclaration = exports.createDeclaration = createDeclaration_1;
|
|
62
|
+
const createLiteral = exports.createLiteral = createLiteral_1;
|
|
63
|
+
const isLiteral = exports.isLiteral = isLiteral_1;
|
|
64
|
+
const createUniqueSymbol = exports.createUniqueSymbol = createUniqueSymbol_1;
|
|
65
|
+
const isUniqueSymbol = exports.isUniqueSymbol = isUniqueSymbol_1;
|
|
66
|
+
const isStringKeyword = exports.isStringKeyword = isStringKeyword_1;
|
|
67
|
+
const isNumberKeyword = exports.isNumberKeyword = isNumberKeyword_1;
|
|
68
|
+
const isSymbolKeyword = exports.isSymbolKeyword = isSymbolKeyword_1;
|
|
69
|
+
const createTemplateLiteral = exports.createTemplateLiteral = createTemplateLiteral_1;
|
|
70
|
+
const createElement = exports.createElement = createElement_1;
|
|
71
|
+
const createTuple = exports.createTuple = createTuple_1;
|
|
72
|
+
const createPropertySignature = exports.createPropertySignature = createPropertySignature_1;
|
|
73
|
+
const createIndexSignature = exports.createIndexSignature = createIndexSignature_1;
|
|
74
|
+
const createTypeLiteral = exports.createTypeLiteral = createTypeLiteral_1;
|
|
75
|
+
const createUnion = exports.createUnion = createUnion_1;
|
|
76
|
+
const createLazy = exports.createLazy = createLazy_1;
|
|
77
|
+
const createRefinement = exports.createRefinement = createRefinement_1;
|
|
78
|
+
const createTransform = exports.createTransform = createTransform_1;
|
|
79
|
+
const getPropertySignatures = exports.getPropertySignatures = getPropertySignatures_1;
|
|
80
|
+
const keysOf = exports.keysOf = keysOf_1;
|
|
81
|
+
const partial = exports.partial = partial_1;
|
|
82
|
+
const getFrom = exports.getFrom = getFrom_1;
|
|
83
|
+
const getTo = exports.getTo = getTo_1;
|
|
84
|
+
const reverse = exports.reverse = reverse_1;
|
|
85
|
+
const ASTTypeId = exports.ASTTypeId = /*#__PURE__*/Symbol.for("fncts.schema.AST");
|
|
111
86
|
class Annotated {
|
|
112
87
|
constructor() {
|
|
113
88
|
this.annotations = _ASTAnnotationMap.ASTAnnotationMap.empty;
|
|
@@ -150,7 +125,6 @@ class Declaration extends AST {
|
|
|
150
125
|
this.annotations = annotations;
|
|
151
126
|
this._tag = 0 /* ASTTag.Declaration */;
|
|
152
127
|
}
|
|
153
|
-
|
|
154
128
|
clone(newProperties) {
|
|
155
129
|
return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.type ?? this.type, newProperties.decode ?? this.decode, newProperties.annotations ?? this.annotations);
|
|
156
130
|
}
|
|
@@ -169,7 +143,6 @@ function isDeclaration(self) {
|
|
|
169
143
|
void 0;
|
|
170
144
|
return self._tag === 0 /* ASTTag.Declaration */;
|
|
171
145
|
}
|
|
172
|
-
|
|
173
146
|
class Literal extends AST {
|
|
174
147
|
constructor(literal, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
175
148
|
super();
|
|
@@ -177,7 +150,6 @@ class Literal extends AST {
|
|
|
177
150
|
this.annotations = annotations;
|
|
178
151
|
this._tag = 1 /* ASTTag.Literal */;
|
|
179
152
|
}
|
|
180
|
-
|
|
181
153
|
clone(newProperties) {
|
|
182
154
|
return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
|
|
183
155
|
}
|
|
@@ -206,7 +178,6 @@ class UniqueSymbol extends AST {
|
|
|
206
178
|
this.annotations = annotations;
|
|
207
179
|
this._tag = 2 /* ASTTag.UniqueSymbol */;
|
|
208
180
|
}
|
|
209
|
-
|
|
210
181
|
clone(newProperties) {
|
|
211
182
|
return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
|
|
212
183
|
}
|
|
@@ -234,7 +205,6 @@ class UndefinedKeyword extends AST {
|
|
|
234
205
|
this.annotations = annotations;
|
|
235
206
|
this._tag = 3 /* ASTTag.UndefinedKeyword */;
|
|
236
207
|
}
|
|
237
|
-
|
|
238
208
|
clone(newProperties) {
|
|
239
209
|
return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
|
|
240
210
|
}
|
|
@@ -244,18 +214,16 @@ class UndefinedKeyword extends AST {
|
|
|
244
214
|
*/
|
|
245
215
|
exports.UndefinedKeyword = UndefinedKeyword;
|
|
246
216
|
const undefinedKeyword_1 = /*#__PURE__*/new UndefinedKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "undefined"));
|
|
247
|
-
const undefinedKeyword = undefinedKeyword_1;
|
|
217
|
+
const undefinedKeyword = exports.undefinedKeyword = undefinedKeyword_1;
|
|
248
218
|
/*
|
|
249
219
|
* VoidKeyword
|
|
250
220
|
*/
|
|
251
|
-
exports.undefinedKeyword = undefinedKeyword;
|
|
252
221
|
class VoidKeyword extends AST {
|
|
253
222
|
constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
254
223
|
super();
|
|
255
224
|
this.annotations = annotations;
|
|
256
225
|
this._tag = 4 /* ASTTag.VoidKeyword */;
|
|
257
226
|
}
|
|
258
|
-
|
|
259
227
|
clone(newProperties) {
|
|
260
228
|
return new VoidKeyword(newProperties.annotations ?? this.annotations);
|
|
261
229
|
}
|
|
@@ -264,18 +232,16 @@ class VoidKeyword extends AST {
|
|
|
264
232
|
* @tsplus static fncts.schema.ASTOps voidKeyword
|
|
265
233
|
*/
|
|
266
234
|
exports.VoidKeyword = VoidKeyword;
|
|
267
|
-
const voidKeyword = /*#__PURE__*/new VoidKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "void"));
|
|
235
|
+
const voidKeyword = exports.voidKeyword = /*#__PURE__*/new VoidKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "void"));
|
|
268
236
|
/*
|
|
269
237
|
* NeverKeyword
|
|
270
238
|
*/
|
|
271
|
-
exports.voidKeyword = voidKeyword;
|
|
272
239
|
class NeverKeyword extends AST {
|
|
273
240
|
constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
274
241
|
super();
|
|
275
242
|
this.annotations = annotations;
|
|
276
243
|
this._tag = 5 /* ASTTag.NeverKeyword */;
|
|
277
244
|
}
|
|
278
|
-
|
|
279
245
|
clone(newProperties) {
|
|
280
246
|
return new NeverKeyword(newProperties.annotations ?? this.annotations);
|
|
281
247
|
}
|
|
@@ -285,18 +251,16 @@ class NeverKeyword extends AST {
|
|
|
285
251
|
*/
|
|
286
252
|
exports.NeverKeyword = NeverKeyword;
|
|
287
253
|
const neverKeyword_1 = /*#__PURE__*/new NeverKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "never"));
|
|
288
|
-
const neverKeyword = neverKeyword_1;
|
|
254
|
+
const neverKeyword = exports.neverKeyword = neverKeyword_1;
|
|
289
255
|
/*
|
|
290
256
|
* UnknownKeyword
|
|
291
257
|
*/
|
|
292
|
-
exports.neverKeyword = neverKeyword;
|
|
293
258
|
class UnknownKeyword extends AST {
|
|
294
259
|
constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
295
260
|
super();
|
|
296
261
|
this.annotations = annotations;
|
|
297
262
|
this._tag = 6 /* ASTTag.UnknownKeyword */;
|
|
298
263
|
}
|
|
299
|
-
|
|
300
264
|
clone(newProperties) {
|
|
301
265
|
return new UnknownKeyword(newProperties.annotations ?? this.annotations);
|
|
302
266
|
}
|
|
@@ -305,18 +269,16 @@ class UnknownKeyword extends AST {
|
|
|
305
269
|
* @tsplus static fncts.schema.ASTOps unknownKeyword
|
|
306
270
|
*/
|
|
307
271
|
exports.UnknownKeyword = UnknownKeyword;
|
|
308
|
-
const unknownKeyword = /*#__PURE__*/new UnknownKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "unknown"));
|
|
272
|
+
const unknownKeyword = exports.unknownKeyword = /*#__PURE__*/new UnknownKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "unknown"));
|
|
309
273
|
/*
|
|
310
274
|
* AnyKeyword
|
|
311
275
|
*/
|
|
312
|
-
exports.unknownKeyword = unknownKeyword;
|
|
313
276
|
class AnyKeyword extends AST {
|
|
314
277
|
constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
315
278
|
super();
|
|
316
279
|
this.annotations = annotations;
|
|
317
280
|
this._tag = 7 /* ASTTag.AnyKeyword */;
|
|
318
281
|
}
|
|
319
|
-
|
|
320
282
|
clone(newProperties) {
|
|
321
283
|
return new AnyKeyword(newProperties.annotations ?? this.annotations);
|
|
322
284
|
}
|
|
@@ -325,18 +287,16 @@ class AnyKeyword extends AST {
|
|
|
325
287
|
* @tsplus static fncts.schema.ASTOps anyKeyword
|
|
326
288
|
*/
|
|
327
289
|
exports.AnyKeyword = AnyKeyword;
|
|
328
|
-
const anyKeyword = /*#__PURE__*/new AnyKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "any"));
|
|
290
|
+
const anyKeyword = exports.anyKeyword = /*#__PURE__*/new AnyKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "any"));
|
|
329
291
|
/*
|
|
330
292
|
* StringKeyword
|
|
331
293
|
*/
|
|
332
|
-
exports.anyKeyword = anyKeyword;
|
|
333
294
|
class StringKeyword extends AST {
|
|
334
295
|
constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
335
296
|
super();
|
|
336
297
|
this.annotations = annotations;
|
|
337
298
|
this._tag = 8 /* ASTTag.StringKeyword */;
|
|
338
299
|
}
|
|
339
|
-
|
|
340
300
|
clone(newProperties) {
|
|
341
301
|
return new StringKeyword(newProperties.annotations ?? this.annotations);
|
|
342
302
|
}
|
|
@@ -346,11 +306,10 @@ class StringKeyword extends AST {
|
|
|
346
306
|
*/
|
|
347
307
|
exports.StringKeyword = StringKeyword;
|
|
348
308
|
const stringKeyword_1 = /*#__PURE__*/new StringKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "string"));
|
|
349
|
-
const stringKeyword = stringKeyword_1;
|
|
309
|
+
const stringKeyword = exports.stringKeyword = stringKeyword_1;
|
|
350
310
|
/**
|
|
351
311
|
* @tsplus fluent fncts.schema.AST isStringKeyword
|
|
352
312
|
*/
|
|
353
|
-
exports.stringKeyword = stringKeyword;
|
|
354
313
|
function isStringKeyword_1(self) {
|
|
355
314
|
void 0;
|
|
356
315
|
return self._tag === 8 /* ASTTag.StringKeyword */;
|
|
@@ -364,7 +323,6 @@ class NumberKeyword extends AST {
|
|
|
364
323
|
this.annotations = annotations;
|
|
365
324
|
this._tag = 9 /* ASTTag.NumberKeyword */;
|
|
366
325
|
}
|
|
367
|
-
|
|
368
326
|
clone(newProperties) {
|
|
369
327
|
return new NumberKeyword(newProperties.annotations ?? this.annotations);
|
|
370
328
|
}
|
|
@@ -374,11 +332,10 @@ class NumberKeyword extends AST {
|
|
|
374
332
|
*/
|
|
375
333
|
exports.NumberKeyword = NumberKeyword;
|
|
376
334
|
const numberKeyword_1 = /*#__PURE__*/new NumberKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "number"));
|
|
377
|
-
const numberKeyword = numberKeyword_1;
|
|
335
|
+
const numberKeyword = exports.numberKeyword = numberKeyword_1;
|
|
378
336
|
/**
|
|
379
337
|
* @tsplus fluent fncts.schema.AST isNumberKeyword
|
|
380
338
|
*/
|
|
381
|
-
exports.numberKeyword = numberKeyword;
|
|
382
339
|
function isNumberKeyword_1(self) {
|
|
383
340
|
void 0;
|
|
384
341
|
return self._tag === 9 /* ASTTag.NumberKeyword */;
|
|
@@ -392,7 +349,6 @@ class BooleanKeyword extends AST {
|
|
|
392
349
|
this.annotations = annotations;
|
|
393
350
|
this._tag = 10 /* ASTTag.BooleanKeyword */;
|
|
394
351
|
}
|
|
395
|
-
|
|
396
352
|
clone(newProperties) {
|
|
397
353
|
return new BooleanKeyword(newProperties.annotations ?? this.annotations);
|
|
398
354
|
}
|
|
@@ -401,11 +357,10 @@ class BooleanKeyword extends AST {
|
|
|
401
357
|
* @tsplus static fncts.schema.ASTOps booleanKeyword
|
|
402
358
|
*/
|
|
403
359
|
exports.BooleanKeyword = BooleanKeyword;
|
|
404
|
-
const booleanKeyword = /*#__PURE__*/new BooleanKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "boolean"));
|
|
360
|
+
const booleanKeyword = exports.booleanKeyword = /*#__PURE__*/new BooleanKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "boolean"));
|
|
405
361
|
/**
|
|
406
362
|
* @tsplus fluent fncts.schema.AST isBooleanKeyword
|
|
407
363
|
*/
|
|
408
|
-
exports.booleanKeyword = booleanKeyword;
|
|
409
364
|
function isBooleanKeyword(self) {
|
|
410
365
|
void 0;
|
|
411
366
|
return self._tag === 10 /* ASTTag.BooleanKeyword */;
|
|
@@ -419,7 +374,6 @@ class BigIntKeyword extends AST {
|
|
|
419
374
|
this.annotations = annotations;
|
|
420
375
|
this._tag = 11 /* ASTTag.BigIntKeyword */;
|
|
421
376
|
}
|
|
422
|
-
|
|
423
377
|
clone(newProperties) {
|
|
424
378
|
return new BigIntKeyword(newProperties.annotations ?? this.annotations);
|
|
425
379
|
}
|
|
@@ -428,11 +382,10 @@ class BigIntKeyword extends AST {
|
|
|
428
382
|
* @tsplus static fncts.schema.ASTOps bigIntKeyword
|
|
429
383
|
*/
|
|
430
384
|
exports.BigIntKeyword = BigIntKeyword;
|
|
431
|
-
const bigIntKeyword = /*#__PURE__*/new BigIntKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "bigint"));
|
|
385
|
+
const bigIntKeyword = exports.bigIntKeyword = /*#__PURE__*/new BigIntKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "bigint"));
|
|
432
386
|
/**
|
|
433
387
|
* @tsplus fluent fncts.schema.AST isBigIntKeyword
|
|
434
388
|
*/
|
|
435
|
-
exports.bigIntKeyword = bigIntKeyword;
|
|
436
389
|
function isBigIntKeyword(self) {
|
|
437
390
|
void 0;
|
|
438
391
|
return self._tag === 11 /* ASTTag.BigIntKeyword */;
|
|
@@ -446,7 +399,6 @@ class SymbolKeyword extends AST {
|
|
|
446
399
|
this.annotations = annotations;
|
|
447
400
|
this._tag = 12 /* ASTTag.SymbolKeyword */;
|
|
448
401
|
}
|
|
449
|
-
|
|
450
402
|
clone(newProperties) {
|
|
451
403
|
return new SymbolKeyword(newProperties.annotations ?? this.annotations);
|
|
452
404
|
}
|
|
@@ -456,11 +408,10 @@ class SymbolKeyword extends AST {
|
|
|
456
408
|
*/
|
|
457
409
|
exports.SymbolKeyword = SymbolKeyword;
|
|
458
410
|
const symbolKeyword_1 = /*#__PURE__*/new SymbolKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "symbol"));
|
|
459
|
-
const symbolKeyword = symbolKeyword_1;
|
|
411
|
+
const symbolKeyword = exports.symbolKeyword = symbolKeyword_1;
|
|
460
412
|
/**
|
|
461
413
|
* @tsplus fluent fncts.schema.AST isSymbolKeyword
|
|
462
414
|
*/
|
|
463
|
-
exports.symbolKeyword = symbolKeyword;
|
|
464
415
|
function isSymbolKeyword_1(self) {
|
|
465
416
|
void 0;
|
|
466
417
|
return self._tag === 12 /* ASTTag.SymbolKeyword */;
|
|
@@ -474,7 +425,6 @@ class ObjectKeyword extends AST {
|
|
|
474
425
|
this.annotations = annotations;
|
|
475
426
|
this._tag = 13 /* ASTTag.ObjectKeyword */;
|
|
476
427
|
}
|
|
477
|
-
|
|
478
428
|
clone(newProperties) {
|
|
479
429
|
return new ObjectKeyword(newProperties.annotations ?? this.annotations);
|
|
480
430
|
}
|
|
@@ -483,11 +433,10 @@ class ObjectKeyword extends AST {
|
|
|
483
433
|
* @tsplus static fncts.schema.ASTOps objectKeyword
|
|
484
434
|
*/
|
|
485
435
|
exports.ObjectKeyword = ObjectKeyword;
|
|
486
|
-
const objectKeyword = /*#__PURE__*/new ObjectKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "object"));
|
|
436
|
+
const objectKeyword = exports.objectKeyword = /*#__PURE__*/new ObjectKeyword( /*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_1.Title, "object"));
|
|
487
437
|
/*
|
|
488
438
|
* Enum
|
|
489
439
|
*/
|
|
490
|
-
exports.objectKeyword = objectKeyword;
|
|
491
440
|
class Enum extends AST {
|
|
492
441
|
constructor(enums, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
|
|
493
442
|
super();
|
|
@@ -495,7 +444,6 @@ class Enum extends AST {
|
|
|
495
444
|
this.annotations = annotations;
|
|
496
445
|
this._tag = 14 /* ASTTag.Enum */;
|
|
497
446
|
}
|
|
498
|
-
|
|
499
447
|
clone(newProperties) {
|
|
500
448
|
return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
|
|
501
449
|
}
|
|
@@ -525,7 +473,6 @@ class TemplateLiteral extends AST {
|
|
|
525
473
|
this.annotations = annotations;
|
|
526
474
|
this._tag = 15 /* ASTTag.TemplateLiteral */;
|
|
527
475
|
}
|
|
528
|
-
|
|
529
476
|
clone(newProperties) {
|
|
530
477
|
return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
|
|
531
478
|
}
|
|
@@ -569,7 +516,6 @@ class Tuple extends AST {
|
|
|
569
516
|
this.annotations = annotations;
|
|
570
517
|
this._tag = 16 /* ASTTag.Tuple */;
|
|
571
518
|
}
|
|
572
|
-
|
|
573
519
|
clone(newProperties) {
|
|
574
520
|
return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
|
|
575
521
|
}
|
|
@@ -661,7 +607,6 @@ class Union extends AST {
|
|
|
661
607
|
this.annotations = annotations;
|
|
662
608
|
this._tag = 18 /* ASTTag.Union */;
|
|
663
609
|
}
|
|
664
|
-
|
|
665
610
|
clone(newProperties) {
|
|
666
611
|
return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
|
|
667
612
|
}
|
|
@@ -698,7 +643,6 @@ class Lazy extends AST {
|
|
|
698
643
|
this.annotations = annotations;
|
|
699
644
|
this._tag = 19 /* ASTTag.Lazy */;
|
|
700
645
|
}
|
|
701
|
-
|
|
702
646
|
clone(newProperties) {
|
|
703
647
|
return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
|
|
704
648
|
}
|
|
@@ -729,7 +673,6 @@ class Refinement extends AST {
|
|
|
729
673
|
this.annotations = annotations;
|
|
730
674
|
this._tag = 20 /* ASTTag.Refinement */;
|
|
731
675
|
}
|
|
732
|
-
|
|
733
676
|
clone(newProperties) {
|
|
734
677
|
return new Refinement(newProperties.from ?? this.from, newProperties.decode ?? this.decode, newProperties.isReversed ?? this.isReversed, newProperties.annotations ?? this.annotations);
|
|
735
678
|
}
|
|
@@ -759,7 +702,6 @@ class Transform extends AST {
|
|
|
759
702
|
this.annotations = annotations;
|
|
760
703
|
this._tag = 21 /* ASTTag.Transform */;
|
|
761
704
|
}
|
|
762
|
-
|
|
763
705
|
clone(newProperties) {
|
|
764
706
|
return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.isReversed ?? this.isReversed, newProperties.annotations ?? this.annotations);
|
|
765
707
|
}
|
|
@@ -782,7 +724,6 @@ class Validation extends AST {
|
|
|
782
724
|
this.annotations = annotations;
|
|
783
725
|
this._tag = 22 /* ASTTag.Validation */;
|
|
784
726
|
}
|
|
785
|
-
|
|
786
727
|
clone(newProperties) {
|
|
787
728
|
return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
|
|
788
729
|
}
|
|
@@ -919,7 +860,7 @@ function appendRestElement(restElement) {
|
|
|
919
860
|
if (tsplus_module_5.isJust(self.rest)) {
|
|
920
861
|
throw new Error("A rest element cannot follow another rest element. ts(1265)");
|
|
921
862
|
}
|
|
922
|
-
return createTuple_1(self.elements, tsplus_module_6.just(tsplus_module_2.vector(restElement), fileName_1 + ":
|
|
863
|
+
return createTuple_1(self.elements, tsplus_module_6.just(tsplus_module_2.vector(restElement), fileName_1 + ":1048:43"), self.isReadonly, self.annotations);
|
|
923
864
|
};
|
|
924
865
|
}
|
|
925
866
|
/**
|
|
@@ -930,11 +871,11 @@ function appendElement(element) {
|
|
|
930
871
|
if (tsplus_module_2.some(e => e.isOptional)(self.elements) && !element.isOptional) {
|
|
931
872
|
throw new Error("A required element cannot follow an optional element. ts(1257)");
|
|
932
873
|
}
|
|
933
|
-
return tsplus_module_7.match(() => createTuple_1(tsplus_module_2.append(element)(self.elements), tsplus_module_6.nothing(fileName_1 + ":
|
|
874
|
+
return tsplus_module_7.match(() => createTuple_1(tsplus_module_2.append(element)(self.elements), tsplus_module_6.nothing(fileName_1 + ":1061:63"), self.isReadonly, self.annotations), rest => {
|
|
934
875
|
if (element.isOptional) {
|
|
935
876
|
throw new Error("A required element cannot follow an optional element. ts(1257)");
|
|
936
877
|
}
|
|
937
|
-
return createTuple_1(self.elements, tsplus_module_6.just(tsplus_module_2.append(element.type)(rest), fileName_1 + ":
|
|
878
|
+
return createTuple_1(self.elements, tsplus_module_6.just(tsplus_module_2.append(element.type)(rest), fileName_1 + ":1066:47"), self.isReadonly, self.annotations);
|
|
938
879
|
})(self.rest);
|
|
939
880
|
};
|
|
940
881
|
}
|
|
@@ -959,9 +900,9 @@ function getPropertySignatures_1(self) {
|
|
|
959
900
|
}) => {
|
|
960
901
|
if (tsplus_module_2.every(ps => tsplus_module_2.some(p => p.name === name)(ps))(propertySignatures)) {
|
|
961
902
|
const members = tsplus_module_2.flatMap(ps => tsplus_module_2.filter(p => p.name === name)(ps))(propertySignatures);
|
|
962
|
-
return tsplus_module_6.just(createPropertySignature_1(name, createUnion_1(tsplus_module_2.map(p => p.type)(members)), tsplus_module_2.some(p => p.isOptional)(members), tsplus_module_2.some(p => p.isReadonly)(members)), fileName_1 + ":
|
|
903
|
+
return tsplus_module_6.just(createPropertySignature_1(name, createUnion_1(tsplus_module_2.map(p => p.type)(members)), tsplus_module_2.some(p => p.isOptional)(members), tsplus_module_2.some(p => p.isReadonly)(members)), fileName_1 + ":1093:22");
|
|
963
904
|
}
|
|
964
|
-
return tsplus_module_6.nothing(fileName_1 + ":
|
|
905
|
+
return tsplus_module_6.nothing(fileName_1 + ":1102:23");
|
|
965
906
|
})(tsplus_module_2.unsafeGet(0)(propertySignatures));
|
|
966
907
|
}
|
|
967
908
|
case 19 /* ASTTag.Lazy */:
|