@shaclmate/compiler 4.0.98 → 4.0.100
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/dist/generators/ts/AbstractBuiltinType.d.ts +23 -0
- package/dist/generators/ts/AbstractBuiltinType.js +18 -0
- package/dist/generators/ts/AbstractCollectionType.d.ts +2 -1
- package/dist/generators/ts/AbstractCollectionType.js +10 -5
- package/dist/generators/ts/AbstractCompoundType.d.ts +11 -8
- package/dist/generators/ts/AbstractCompoundType.js +5 -2
- package/dist/generators/ts/AbstractContainerType.d.ts +11 -11
- package/dist/generators/ts/AbstractContainerType.js +21 -15
- package/dist/generators/ts/AbstractDateType.d.ts +7 -6
- package/dist/generators/ts/AbstractDateType.js +16 -6
- package/dist/generators/ts/AbstractDiscriminatedUnionType.d.ts +2 -3
- package/dist/generators/ts/AbstractDiscriminatedUnionType.js +25 -7
- package/dist/generators/ts/AbstractIntersectionType.d.ts +2 -2
- package/dist/generators/ts/AbstractIntersectionType.js +19 -8
- package/dist/generators/ts/AbstractLazyType.d.ts +23 -23
- package/dist/generators/ts/AbstractLazyType.js +21 -19
- package/dist/generators/ts/AbstractNumericType.d.ts +4 -3
- package/dist/generators/ts/AbstractNumericType.js +12 -7
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +2 -2
- package/dist/generators/ts/AbstractPrimitiveType.js +4 -4
- package/dist/generators/ts/AbstractTermType.d.ts +17 -16
- package/dist/generators/ts/AbstractTermType.js +21 -11
- package/dist/generators/ts/AbstractType.d.ts +6 -15
- package/dist/generators/ts/AbstractType.js +14 -33
- package/dist/generators/ts/AbstractTypedLiteralType.d.ts +2 -1
- package/dist/generators/ts/AbstractTypedLiteralType.js +20 -2
- package/dist/generators/ts/{AbstractStructuredType.d.ts → AbstractUserDefinedType.d.ts} +6 -6
- package/dist/generators/ts/{AbstractStructuredType.js → AbstractUserDefinedType.js} +38 -26
- package/dist/generators/ts/BigDecimalType.d.ts +12 -11
- package/dist/generators/ts/BigDecimalType.js +28 -11
- package/dist/generators/ts/BigIntType.js +6 -6
- package/dist/generators/ts/BlankNodeType.d.ts +11 -10
- package/dist/generators/ts/BlankNodeType.js +27 -10
- package/dist/generators/ts/BooleanType.d.ts +6 -5
- package/dist/generators/ts/BooleanType.js +18 -8
- package/dist/generators/ts/{ReferenceCallable.d.ts → BuiltinCallable.d.ts} +3 -3
- package/dist/generators/ts/{ReferenceCallable.js → BuiltinCallable.js} +3 -3
- package/dist/generators/ts/Callable.d.ts +2 -2
- package/dist/generators/ts/DateTimeType.d.ts +6 -6
- package/dist/generators/ts/DateTimeType.js +6 -6
- package/dist/generators/ts/DateType.d.ts +6 -6
- package/dist/generators/ts/DateType.js +6 -6
- package/dist/generators/ts/DefaultValueType.d.ts +2 -2
- package/dist/generators/ts/DefaultValueType.js +18 -8
- package/dist/generators/ts/FloatType.js +4 -4
- package/dist/generators/ts/IdentifierType.d.ts +11 -10
- package/dist/generators/ts/IdentifierType.js +27 -10
- package/dist/generators/ts/IntType.js +4 -4
- package/dist/generators/ts/IriType.d.ts +5 -5
- package/dist/generators/ts/IriType.js +27 -22
- package/dist/generators/ts/LangStringType.d.ts +10 -10
- package/dist/generators/ts/LangStringType.js +21 -13
- package/dist/generators/ts/ListType.js +7 -7
- package/dist/generators/ts/LiteralType.d.ts +10 -10
- package/dist/generators/ts/LiteralType.js +21 -13
- package/dist/generators/ts/ObjectType.d.ts +13 -15
- package/dist/generators/ts/ObjectType.js +32 -9
- package/dist/generators/ts/OptionType.d.ts +2 -1
- package/dist/generators/ts/OptionType.js +16 -11
- package/dist/generators/ts/SchemaObject.d.ts +98 -0
- package/dist/generators/ts/SchemaObject.js +143 -0
- package/dist/generators/ts/SetType.d.ts +2 -1
- package/dist/generators/ts/SetType.js +22 -10
- package/dist/generators/ts/Snippets.d.ts +1 -0
- package/dist/generators/ts/Snippets.js +7 -0
- package/dist/generators/ts/StringType.d.ts +6 -6
- package/dist/generators/ts/StringType.js +20 -17
- package/dist/generators/ts/TermType.d.ts +7 -7
- package/dist/generators/ts/TermType.js +18 -13
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonObjectFunction.js +1 -1
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.d.ts +39 -16
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.js +49 -33
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunction.js +1 -1
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceValuesFunction.js +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.d.ts +4 -7
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.js +1 -3
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.d.ts +0 -1
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.js +0 -1
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.d.ts +3 -2
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js +30 -10
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.d.ts +3 -2
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.js +26 -10
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts +3 -2
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js +46 -22
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunction.js +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_jsonObjectType.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonObjectType.js +26 -0
- package/dist/generators/ts/_snippets/snippets_LazySchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazySchema.js +7 -0
- package/package.json +14 -12
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_schemaTypeExpression.d.ts +0 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_schemaTypeExpression.js +0 -11
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +0 -15
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import type { Literal } from "@rdfjs/types";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
3
|
import { AbstractPrimitiveType } from "./AbstractPrimitiveType.js";
|
|
4
|
+
import { BuiltinCallable } from "./BuiltinCallable.js";
|
|
4
5
|
import type { Callable } from "./Callable.js";
|
|
5
|
-
import {
|
|
6
|
+
import { SchemaObject } from "./SchemaObject.js";
|
|
6
7
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
7
8
|
export declare class StringType extends AbstractPrimitiveType<string> {
|
|
8
9
|
private readonly languageIn;
|
|
9
10
|
protected readonly decodedIn: string[];
|
|
10
11
|
readonly conversionFunction: Maybe<AbstractPrimitiveType.ConversionFunction>;
|
|
11
|
-
readonly filterFunction:
|
|
12
|
+
readonly filterFunction: BuiltinCallable;
|
|
12
13
|
readonly filterType: Code;
|
|
13
14
|
readonly graphqlType: import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
|
|
14
|
-
readonly hashFunction:
|
|
15
|
+
readonly hashFunction: BuiltinCallable;
|
|
15
16
|
readonly jsTypes: readonly [{
|
|
16
17
|
readonly typeof: "string";
|
|
17
18
|
}];
|
|
18
19
|
readonly jsonValueType: AbstractPrimitiveType.JsonType;
|
|
19
20
|
readonly kind = "String";
|
|
20
|
-
readonly valueSparqlWherePatternsFunction:
|
|
21
|
+
readonly valueSparqlWherePatternsFunction: BuiltinCallable;
|
|
21
22
|
constructor({ languageIn, ...superParameters }: {
|
|
22
23
|
languageIn: readonly string[];
|
|
23
24
|
} & ConstructorParameters<typeof AbstractPrimitiveType<string>>[0]);
|
|
24
25
|
get fromJsonObjectFunction(): Callable;
|
|
25
26
|
get fromJsonValueFunction(): Callable;
|
|
26
27
|
get fromRdfResourceValuesFunction(): Callable;
|
|
27
|
-
get
|
|
28
|
-
protected get schemaInitializers(): readonly Code[];
|
|
28
|
+
get schema(): SchemaObject<SchemaObject.BuiltinType>;
|
|
29
29
|
toRdfResourceValuesExpression({ variables, }: Parameters<AbstractPrimitiveType<string>["toRdfResourceValuesExpression"]>[0]): Code;
|
|
30
30
|
valueExpression(literal: Literal | string): Code;
|
|
31
31
|
}
|
|
@@ -9,16 +9,17 @@ import { xsd } from "@tpluscode/rdf-ns-builders";
|
|
|
9
9
|
import { Maybe } from "purify-ts";
|
|
10
10
|
import { Memoize } from "typescript-memoize";
|
|
11
11
|
import { AbstractPrimitiveType } from "./AbstractPrimitiveType.js";
|
|
12
|
-
import {
|
|
12
|
+
import { BuiltinCallable } from "./BuiltinCallable.js";
|
|
13
|
+
import { SchemaObject } from "./SchemaObject.js";
|
|
13
14
|
import { arrayOf, code, literalOf } from "./ts-poet-wrapper.js";
|
|
14
15
|
export class StringType extends AbstractPrimitiveType {
|
|
15
16
|
languageIn;
|
|
16
17
|
decodedIn = this.in_.map((in_) => LiteralDecoder.decodeStringLiteral(in_).unsafeCoerce());
|
|
17
18
|
conversionFunction = Maybe.empty();
|
|
18
|
-
filterFunction = new
|
|
19
|
+
filterFunction = new BuiltinCallable(this.reusables.snippets.filterString);
|
|
19
20
|
filterType = code `${this.reusables.snippets.StringFilter}`;
|
|
20
21
|
graphqlType = new AbstractPrimitiveType.GraphqlType(code `${this.reusables.imports.GraphQLString}`, this.reusables);
|
|
21
|
-
hashFunction = new
|
|
22
|
+
hashFunction = new BuiltinCallable(this.reusables.snippets.hashString);
|
|
22
23
|
jsTypes = [
|
|
23
24
|
{
|
|
24
25
|
typeof: "string",
|
|
@@ -31,29 +32,31 @@ export class StringType extends AbstractPrimitiveType {
|
|
|
31
32
|
: undefined,
|
|
32
33
|
});
|
|
33
34
|
kind = "String";
|
|
34
|
-
valueSparqlWherePatternsFunction = new
|
|
35
|
+
valueSparqlWherePatternsFunction = new BuiltinCallable(this.reusables.snippets.stringSparqlWherePatterns);
|
|
35
36
|
constructor({ languageIn, ...superParameters }) {
|
|
36
37
|
super(superParameters);
|
|
37
38
|
this.languageIn = languageIn;
|
|
38
39
|
}
|
|
39
40
|
get fromJsonObjectFunction() {
|
|
40
|
-
return new
|
|
41
|
+
return new BuiltinCallable(code `${this.reusables.snippets.stringFromJsonObject}<${this.expression}>`);
|
|
41
42
|
}
|
|
42
43
|
get fromJsonValueFunction() {
|
|
43
|
-
return new
|
|
44
|
+
return new BuiltinCallable(code `${this.reusables.snippets.stringFromJsonString}<${this.expression}>`);
|
|
44
45
|
}
|
|
45
46
|
get fromRdfResourceValuesFunction() {
|
|
46
|
-
return new
|
|
47
|
+
return new BuiltinCallable(code `${this.reusables.snippets.stringFromRdfResourceValues}<${this.expression}>`);
|
|
47
48
|
}
|
|
48
|
-
get
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
get schema() {
|
|
50
|
+
return new SchemaObject({
|
|
51
|
+
properties: this.languageIn.length > 0
|
|
52
|
+
? {
|
|
53
|
+
...super.schema.properties,
|
|
54
|
+
languageIn: code `languageIn: ${arrayOf(...this.languageIn)}`,
|
|
55
|
+
}
|
|
56
|
+
: super.schema.properties,
|
|
57
|
+
type: new SchemaObject.BuiltinType(code `${this.reusables.snippets.StringSchema}<${this.expression}>`),
|
|
58
|
+
variable: super.schema.variable,
|
|
59
|
+
});
|
|
57
60
|
}
|
|
58
61
|
toRdfResourceValuesExpression({ variables, }) {
|
|
59
62
|
return code `[${this.reusables.snippets.literalFactory}.string(${variables.value}${!this.datatype.equals(xsd.string) ? `, ${this.rdfjsTermExpression(this.datatype)}` : ""})]`;
|
|
@@ -73,5 +76,5 @@ __decorate([
|
|
|
73
76
|
], StringType.prototype, "fromRdfResourceValuesFunction", null);
|
|
74
77
|
__decorate([
|
|
75
78
|
Memoize()
|
|
76
|
-
], StringType.prototype, "
|
|
79
|
+
], StringType.prototype, "schema", null);
|
|
77
80
|
//# sourceMappingURL=StringType.js.map
|
|
@@ -2,21 +2,22 @@ import type { BlankNode, Literal, NamedNode } from "@rdfjs/types";
|
|
|
2
2
|
import { NodeKind } from "@shaclmate/shacl-ast";
|
|
3
3
|
import { Maybe } from "purify-ts";
|
|
4
4
|
import { AbstractTermType } from "./AbstractTermType.js";
|
|
5
|
+
import { BuiltinCallable } from "./BuiltinCallable.js";
|
|
5
6
|
import type { Callable } from "./Callable.js";
|
|
6
|
-
import {
|
|
7
|
+
import { SchemaObject } from "./SchemaObject.js";
|
|
7
8
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
8
9
|
export declare class TermType<ConstantTermT extends Literal | NamedNode = Literal | NamedNode, RuntimeTermT extends BlankNode | Literal | NamedNode = BlankNode | Literal | NamedNode> extends AbstractTermType {
|
|
9
10
|
readonly conversionFunction: Maybe<AbstractTermType.ConversionFunction>;
|
|
10
|
-
readonly filterFunction:
|
|
11
|
+
readonly filterFunction: BuiltinCallable;
|
|
11
12
|
readonly jsTypes: readonly [{
|
|
12
13
|
readonly instanceof: "Object";
|
|
13
14
|
readonly typeof: "object";
|
|
14
15
|
}];
|
|
15
16
|
readonly kind = "Term";
|
|
16
17
|
readonly nodeKinds: ReadonlySet<NodeKind>;
|
|
17
|
-
readonly toJsonObjectFunction:
|
|
18
|
-
readonly toJsonValueFunction:
|
|
19
|
-
readonly valueSparqlWherePatternsFunction:
|
|
18
|
+
readonly toJsonObjectFunction: BuiltinCallable;
|
|
19
|
+
readonly toJsonValueFunction: BuiltinCallable;
|
|
20
|
+
readonly valueSparqlWherePatternsFunction: BuiltinCallable;
|
|
20
21
|
constructor({ nodeKinds, ...superParameters }: ConstructorParameters<typeof AbstractTermType<ConstantTermT, RuntimeTermT>>[0] & {
|
|
21
22
|
nodeKinds: ReadonlySet<NodeKind>;
|
|
22
23
|
});
|
|
@@ -28,9 +29,8 @@ export declare class TermType<ConstantTermT extends Literal | NamedNode = Litera
|
|
|
28
29
|
get graphqlType(): AbstractTermType.GraphqlType;
|
|
29
30
|
get jsonObjectType(): AbstractTermType["jsonObjectType"];
|
|
30
31
|
get jsonValueType(): AbstractTermType["jsonValueType"];
|
|
31
|
-
get schemaType(): Code;
|
|
32
32
|
protected get inlineExpression(): Code;
|
|
33
|
-
|
|
33
|
+
get schema(): SchemaObject<SchemaObject.BuiltinType>;
|
|
34
34
|
graphqlResolveExpression(_parameters: Parameters<AbstractTermType["graphqlResolveExpression"]>[0]): Code;
|
|
35
35
|
toLoggableExpression({ variables, }: Parameters<AbstractTermType["toLoggableExpression"]>[0]): Code;
|
|
36
36
|
}
|
|
@@ -9,19 +9,20 @@ import { Maybe } from "purify-ts";
|
|
|
9
9
|
import { invariant } from "ts-invariant";
|
|
10
10
|
import { Memoize } from "typescript-memoize";
|
|
11
11
|
import { AbstractTermType } from "./AbstractTermType.js";
|
|
12
|
-
import {
|
|
12
|
+
import { BuiltinCallable } from "./BuiltinCallable.js";
|
|
13
|
+
import { SchemaObject } from "./SchemaObject.js";
|
|
13
14
|
import { arrayOf, code, joinCode } from "./ts-poet-wrapper.js";
|
|
14
15
|
export class TermType extends AbstractTermType {
|
|
15
16
|
conversionFunction = Maybe.empty();
|
|
16
|
-
filterFunction = new
|
|
17
|
+
filterFunction = new BuiltinCallable(this.reusables.snippets.filterTerm);
|
|
17
18
|
jsTypes = [
|
|
18
19
|
{ instanceof: "Object", typeof: "object" },
|
|
19
20
|
];
|
|
20
21
|
kind = "Term";
|
|
21
22
|
nodeKinds;
|
|
22
|
-
toJsonObjectFunction = new
|
|
23
|
+
toJsonObjectFunction = new BuiltinCallable(this.reusables.snippets.termToJsonObject);
|
|
23
24
|
toJsonValueFunction = this.toJsonObjectFunction;
|
|
24
|
-
valueSparqlWherePatternsFunction = new
|
|
25
|
+
valueSparqlWherePatternsFunction = new BuiltinCallable(this.reusables.snippets.termSparqlWherePatterns);
|
|
25
26
|
constructor({ nodeKinds, ...superParameters }) {
|
|
26
27
|
super(superParameters);
|
|
27
28
|
this.nodeKinds = nodeKinds;
|
|
@@ -42,13 +43,13 @@ export class TermType extends AbstractTermType {
|
|
|
42
43
|
return code `${this.reusables.snippets.TermFilter}<${this.expression}>`;
|
|
43
44
|
}
|
|
44
45
|
get fromJsonObjectFunction() {
|
|
45
|
-
return new
|
|
46
|
+
return new BuiltinCallable(code `${this.reusables.snippets.termFromJsonObject}<${this.expression}>`);
|
|
46
47
|
}
|
|
47
48
|
get fromJsonValueFunction() {
|
|
48
49
|
return this.fromJsonObjectFunction;
|
|
49
50
|
}
|
|
50
51
|
get fromRdfResourceValuesFunction() {
|
|
51
|
-
return new
|
|
52
|
+
return new BuiltinCallable(code `${this.reusables.snippets.termFromRdfResourceValues}<${this.expression}>`);
|
|
52
53
|
}
|
|
53
54
|
get graphqlType() {
|
|
54
55
|
throw new Error("not implemented");
|
|
@@ -79,9 +80,6 @@ export class TermType extends AbstractTermType {
|
|
|
79
80
|
get jsonValueType() {
|
|
80
81
|
return this.jsonObjectType;
|
|
81
82
|
}
|
|
82
|
-
get schemaType() {
|
|
83
|
-
return code `${this.reusables.snippets.TermSchema}<${this.expression}>`;
|
|
84
|
-
}
|
|
85
83
|
get inlineExpression() {
|
|
86
84
|
return code `(${joinCode([...this.nodeKinds]
|
|
87
85
|
.map((nodeKind) => {
|
|
@@ -99,8 +97,15 @@ export class TermType extends AbstractTermType {
|
|
|
99
97
|
})
|
|
100
98
|
.map((import_) => code `${import_}`), { on: " | " })})`;
|
|
101
99
|
}
|
|
102
|
-
get
|
|
103
|
-
return
|
|
100
|
+
get schema() {
|
|
101
|
+
return new SchemaObject({
|
|
102
|
+
properties: {
|
|
103
|
+
...super.schema.properties,
|
|
104
|
+
types: code `types: ${arrayOf(...[...this.nodeKinds].map(NodeKind.toTermType))}`,
|
|
105
|
+
},
|
|
106
|
+
type: new SchemaObject.BuiltinType(code `${this.reusables.snippets.TermSchema}<${this.expression}>`),
|
|
107
|
+
variable: super.schema.variable,
|
|
108
|
+
});
|
|
104
109
|
}
|
|
105
110
|
graphqlResolveExpression(_parameters) {
|
|
106
111
|
throw new Error("not implemented");
|
|
@@ -126,8 +131,8 @@ __decorate([
|
|
|
126
131
|
], TermType.prototype, "jsonObjectType", null);
|
|
127
132
|
__decorate([
|
|
128
133
|
Memoize()
|
|
129
|
-
], TermType.prototype, "
|
|
134
|
+
], TermType.prototype, "inlineExpression", null);
|
|
130
135
|
__decorate([
|
|
131
136
|
Memoize()
|
|
132
|
-
], TermType.prototype, "
|
|
137
|
+
], TermType.prototype, "schema", null);
|
|
133
138
|
//# sourceMappingURL=TermType.js.map
|
|
@@ -9,7 +9,7 @@ ${joinCode(this.members.map(({ primaryDiscriminantValue, type, wrap }) => {
|
|
|
9
9
|
const mapAndWrapValue = codeEquals(wrappedValue, valueVariable)
|
|
10
10
|
? ""
|
|
11
11
|
: code `.map(${valueVariable} => (${wrappedValue}))`;
|
|
12
|
-
return code `if (value.${this.configuration.objectDiscriminantProperty.jsonName} === ${literalOf(primaryDiscriminantValue)}) { return ${type.fromJsonObjectFunction.unannotatedUsage}(value, { ...options, schema: ${this.schema}.members[${literalOf(primaryDiscriminantValue)}].type })${mapAndWrapValue} as ${this.reusables.imports.Either}<Error, ${this.expression}>; }`;
|
|
12
|
+
return code `if (value.${this.configuration.objectDiscriminantProperty.jsonName} === ${literalOf(primaryDiscriminantValue)}) { return ${type.fromJsonObjectFunction.unannotatedUsage}(value, { ...options, schema: ${this.schema.variable.map((variable) => code `${variable}.members[${literalOf(primaryDiscriminantValue)}].type`).orDefault(type.schema.expression)} })${mapAndWrapValue} as ${this.reusables.imports.Either}<Error, ${this.expression}>; }`;
|
|
13
13
|
}))}
|
|
14
14
|
|
|
15
15
|
throw new Error("unable to deserialize JSON");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
+
import type { Callable } from "../Callable.js";
|
|
2
3
|
import type { Reusables } from "../Reusables.js";
|
|
3
4
|
import type { Snippet } from "../Snippet.js";
|
|
4
5
|
import type { TsGenerator } from "../TsGenerator.js";
|
|
@@ -17,9 +18,6 @@ declare abstract class AbstractJsonType {
|
|
|
17
18
|
snippet: Maybe<Snippet>;
|
|
18
19
|
reusables: Reusables;
|
|
19
20
|
});
|
|
20
|
-
protected moduleDeclarations({ unqualifiedName, }: {
|
|
21
|
-
unqualifiedName: string;
|
|
22
|
-
}): Code[];
|
|
23
21
|
get declaration(): Maybe<Code>;
|
|
24
22
|
get expression(): Code;
|
|
25
23
|
get schema(): Code;
|
|
@@ -28,11 +26,17 @@ declare abstract class AbstractJsonType {
|
|
|
28
26
|
scopePrefix: Code;
|
|
29
27
|
};
|
|
30
28
|
}): Maybe<Code>;
|
|
29
|
+
protected moduleDeclarations({ unqualifiedName, }: {
|
|
30
|
+
unqualifiedName: string;
|
|
31
|
+
}): Code[];
|
|
32
|
+
protected schemaTypeExpression({ unqualifiedName, }: {
|
|
33
|
+
unqualifiedName: string;
|
|
34
|
+
}): Code;
|
|
31
35
|
}
|
|
32
36
|
declare abstract class AbstractJsonPrimitiveType<PrimitiveT extends boolean | number | string> extends AbstractJsonType {
|
|
37
|
+
protected abstract readonly typeof: "boolean" | "number" | "string";
|
|
33
38
|
readonly inReference: Maybe<Code>;
|
|
34
39
|
readonly in_: readonly PrimitiveT[];
|
|
35
|
-
protected abstract readonly typeof: "boolean" | "number" | "string";
|
|
36
40
|
constructor({ in_, inReference, ...superParameters }: {
|
|
37
41
|
in_: readonly PrimitiveT[];
|
|
38
42
|
inReference: Maybe<Code>;
|
|
@@ -52,8 +56,8 @@ declare class JsonArrayType extends AbstractJsonType {
|
|
|
52
56
|
protected get schemaExpression(): Code;
|
|
53
57
|
}
|
|
54
58
|
declare class JsonBooleanType extends AbstractJsonPrimitiveType<boolean> {
|
|
55
|
-
readonly kind = "JsonBoolean";
|
|
56
59
|
protected readonly typeof = "boolean";
|
|
60
|
+
readonly kind = "JsonBoolean";
|
|
57
61
|
}
|
|
58
62
|
declare class JsonDiscriminatedUnionType extends AbstractJsonType {
|
|
59
63
|
readonly kind = "JsonDiscriminatedUnion";
|
|
@@ -65,12 +69,6 @@ declare class JsonDiscriminatedUnionType extends AbstractJsonType {
|
|
|
65
69
|
protected get inlineExpression(): Code;
|
|
66
70
|
protected get schemaExpression(): Code;
|
|
67
71
|
}
|
|
68
|
-
declare namespace JsonDiscriminatedUnionType {
|
|
69
|
-
interface Member {
|
|
70
|
-
readonly discriminantValue: number | string;
|
|
71
|
-
readonly type: JsonIntersectionType | JsonObjectType;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
72
|
declare class JsonIntersectionType extends AbstractJsonType {
|
|
75
73
|
readonly kind = "JsonIntersection";
|
|
76
74
|
readonly memberTypes: readonly JsonType[];
|
|
@@ -82,24 +80,29 @@ declare class JsonIntersectionType extends AbstractJsonType {
|
|
|
82
80
|
protected get schemaExpression(): Code;
|
|
83
81
|
}
|
|
84
82
|
declare class JsonNumberType extends AbstractJsonPrimitiveType<number> {
|
|
85
|
-
readonly kind = "JsonNumber";
|
|
86
83
|
protected readonly typeof = "number";
|
|
84
|
+
readonly kind = "JsonNumber";
|
|
87
85
|
}
|
|
88
86
|
declare class JsonObjectType extends AbstractJsonType {
|
|
87
|
+
private readonly cachedMemberTypes;
|
|
88
|
+
private readonly shorthand;
|
|
89
89
|
readonly kind = "JsonObject";
|
|
90
90
|
readonly members: readonly JsonObjectType.Member[];
|
|
91
|
-
|
|
92
|
-
constructor({ members, ...superParameters }: {
|
|
91
|
+
constructor({ members, shorthand, ...superParameters }: {
|
|
93
92
|
members: readonly JsonObjectType.Member[];
|
|
93
|
+
shorthand: Maybe<JsonObjectType.Shorthand>;
|
|
94
94
|
} & ConstructorParameters<typeof AbstractJsonType>[0]);
|
|
95
95
|
protected get inlineExpression(): Code;
|
|
96
96
|
protected get schemaExpression(): Code;
|
|
97
|
+
protected schemaTypeExpression({ unqualifiedName, }: {
|
|
98
|
+
unqualifiedName: string;
|
|
99
|
+
}): Code;
|
|
97
100
|
private get uiSchemaFunctionExpression();
|
|
98
|
-
|
|
101
|
+
uiSchemaElement({ variables, }: Parameters<AbstractJsonType["uiSchemaElement"]>[0]): Maybe<Code>;
|
|
99
102
|
protected moduleDeclarations(parameters: {
|
|
100
103
|
unqualifiedName: string;
|
|
101
104
|
}): Code[];
|
|
102
|
-
|
|
105
|
+
private memberType;
|
|
103
106
|
}
|
|
104
107
|
declare class JsonStringType extends AbstractJsonPrimitiveType<string> {
|
|
105
108
|
private readonly format;
|
|
@@ -149,6 +152,7 @@ declare class JsonTypeFactory {
|
|
|
149
152
|
}): JsonNumberType;
|
|
150
153
|
createJsonObjectType(partialMembers: readonly JsonObjectType.PartialMember[] | Record<string, Omit<JsonObjectType.PartialMember, "name">>, options?: {
|
|
151
154
|
name?: AbstractJsonType.Name;
|
|
155
|
+
shorthand?: JsonObjectType.Shorthand;
|
|
152
156
|
snippet?: Snippet;
|
|
153
157
|
}): JsonObjectType;
|
|
154
158
|
createJsonStringType(options?: {
|
|
@@ -163,6 +167,12 @@ declare class JsonTypeFactory {
|
|
|
163
167
|
type JsonType = JsonArrayType | JsonBooleanType | JsonDiscriminatedUnionType | JsonIntersectionType | JsonNumberType | JsonObjectType | JsonStringType;
|
|
164
168
|
export type AbstractType_JsonType = JsonType;
|
|
165
169
|
export type AbstractType_JsonTypeFactory = JsonTypeFactory;
|
|
170
|
+
declare namespace JsonDiscriminatedUnionType {
|
|
171
|
+
interface Member {
|
|
172
|
+
readonly discriminantValue: number | string;
|
|
173
|
+
readonly type: JsonIntersectionType | JsonObjectType;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
166
176
|
export declare namespace AbstractJsonType {
|
|
167
177
|
type Name = readonly string[];
|
|
168
178
|
}
|
|
@@ -192,6 +202,19 @@ declare namespace JsonObjectType {
|
|
|
192
202
|
recursive?: boolean;
|
|
193
203
|
uiSchemaElement?: Maybe<MemberUiSchemaElementFunction> | MemberUiSchemaElementFunction;
|
|
194
204
|
};
|
|
205
|
+
/**
|
|
206
|
+
* Shorthand for the object type, such as a string that can be transformed into the object.
|
|
207
|
+
*/
|
|
208
|
+
export interface Shorthand {
|
|
209
|
+
/**
|
|
210
|
+
* Zod-compatible transformer that takes an instance of the shorthand type and transforms it to an instance of the object type.
|
|
211
|
+
*/
|
|
212
|
+
readonly transformer: Callable;
|
|
213
|
+
/**
|
|
214
|
+
* Shorthand type, such as a JSON string.
|
|
215
|
+
*/
|
|
216
|
+
readonly type: JsonType;
|
|
217
|
+
}
|
|
195
218
|
export {};
|
|
196
219
|
}
|
|
197
220
|
declare namespace JsonStringType {
|
|
@@ -19,21 +19,6 @@ class AbstractJsonType {
|
|
|
19
19
|
this.reusables = reusables;
|
|
20
20
|
this.snippet = snippet;
|
|
21
21
|
}
|
|
22
|
-
moduleDeclarations({ unqualifiedName, }) {
|
|
23
|
-
const moduleDeclarations = [];
|
|
24
|
-
if (this.configuration.features.has("Object.JSON.parse")) {
|
|
25
|
-
moduleDeclarations.push(code `\
|
|
26
|
-
export function parse(json: unknown): ${this.reusables.imports.Either}<Error, ${unqualifiedName}> {
|
|
27
|
-
const jsonSafeParseResult = schema().safeParse(json);
|
|
28
|
-
if (!jsonSafeParseResult.success) { return ${this.reusables.imports.Left}(jsonSafeParseResult.error); }
|
|
29
|
-
return ${this.reusables.imports.Right}(jsonSafeParseResult.data);
|
|
30
|
-
}`);
|
|
31
|
-
}
|
|
32
|
-
if (this.configuration.features.has("Object.JSON.schema")) {
|
|
33
|
-
moduleDeclarations.push(code `export function schema() { return ${this.schemaExpression} satisfies ${this.reusables.imports.z}.ZodType<Json>; }`);
|
|
34
|
-
}
|
|
35
|
-
return moduleDeclarations;
|
|
36
|
-
}
|
|
37
22
|
get declaration() {
|
|
38
23
|
if (this.name.isNothing() || this.snippet.isJust()) {
|
|
39
24
|
return Maybe.empty();
|
|
@@ -67,6 +52,24 @@ export function parse(json: unknown): ${this.reusables.imports.Either}<Error, ${
|
|
|
67
52
|
uiSchemaElement(_parameters) {
|
|
68
53
|
return Maybe.empty();
|
|
69
54
|
}
|
|
55
|
+
moduleDeclarations({ unqualifiedName, }) {
|
|
56
|
+
const moduleDeclarations = [];
|
|
57
|
+
if (this.configuration.features.has("Object.JSON.parse")) {
|
|
58
|
+
moduleDeclarations.push(code `\
|
|
59
|
+
export function parse(json: unknown): ${this.reusables.imports.Either}<Error, ${unqualifiedName}> {
|
|
60
|
+
const jsonSafeParseResult = schema().safeParse(json);
|
|
61
|
+
if (!jsonSafeParseResult.success) { return ${this.reusables.imports.Left}(jsonSafeParseResult.error); }
|
|
62
|
+
return ${this.reusables.imports.Right}(jsonSafeParseResult.data);
|
|
63
|
+
}`);
|
|
64
|
+
}
|
|
65
|
+
if (this.configuration.features.has("Object.JSON.schema")) {
|
|
66
|
+
moduleDeclarations.push(code `export function schema() { return ${this.schemaExpression} satisfies ${this.schemaTypeExpression({ unqualifiedName })}; }`);
|
|
67
|
+
}
|
|
68
|
+
return moduleDeclarations;
|
|
69
|
+
}
|
|
70
|
+
schemaTypeExpression({ unqualifiedName, }) {
|
|
71
|
+
return code `${this.reusables.imports.z}.ZodType<${unqualifiedName}>`;
|
|
72
|
+
}
|
|
70
73
|
}
|
|
71
74
|
__decorate([
|
|
72
75
|
Memoize()
|
|
@@ -136,8 +139,8 @@ __decorate([
|
|
|
136
139
|
Memoize()
|
|
137
140
|
], JsonArrayType.prototype, "schemaExpression", null);
|
|
138
141
|
class JsonBooleanType extends AbstractJsonPrimitiveType {
|
|
139
|
-
kind = "JsonBoolean";
|
|
140
142
|
typeof = "boolean";
|
|
143
|
+
kind = "JsonBoolean";
|
|
141
144
|
}
|
|
142
145
|
class JsonDiscriminatedUnionType extends AbstractJsonType {
|
|
143
146
|
kind = "JsonDiscriminatedUnion";
|
|
@@ -200,17 +203,19 @@ __decorate([
|
|
|
200
203
|
Memoize()
|
|
201
204
|
], JsonIntersectionType.prototype, "schemaExpression", null);
|
|
202
205
|
class JsonNumberType extends AbstractJsonPrimitiveType {
|
|
203
|
-
kind = "JsonNumber";
|
|
204
206
|
typeof = "number";
|
|
207
|
+
kind = "JsonNumber";
|
|
205
208
|
}
|
|
206
209
|
class JsonObjectType extends AbstractJsonType {
|
|
210
|
+
cachedMemberTypes;
|
|
211
|
+
shorthand;
|
|
207
212
|
kind = "JsonObject";
|
|
208
213
|
members;
|
|
209
|
-
|
|
210
|
-
constructor({ members, ...superParameters }) {
|
|
214
|
+
constructor({ members, shorthand, ...superParameters }) {
|
|
211
215
|
super(superParameters);
|
|
216
|
+
this.cachedMemberTypes = Array.from({ length: members.length }).map(() => null);
|
|
212
217
|
this.members = members;
|
|
213
|
-
this.
|
|
218
|
+
this.shorthand = shorthand;
|
|
214
219
|
}
|
|
215
220
|
get inlineExpression() {
|
|
216
221
|
return code `{ ${joinCode(this.members.map((member, memberI) => {
|
|
@@ -218,7 +223,7 @@ class JsonObjectType extends AbstractJsonType {
|
|
|
218
223
|
}), { on: ", " })} }`;
|
|
219
224
|
}
|
|
220
225
|
get schemaExpression() {
|
|
221
|
-
|
|
226
|
+
const objectSchema = code `${this.reusables.imports.z}.object({ ${joinCode(this.members.map((member, memberI) => {
|
|
222
227
|
const memberType = this.memberType(memberI);
|
|
223
228
|
let schema = memberType.schema;
|
|
224
229
|
if (member.recursive) {
|
|
@@ -241,6 +246,16 @@ class JsonObjectType extends AbstractJsonType {
|
|
|
241
246
|
}
|
|
242
247
|
return code `${literalOf(member.name)}: ${schema}`;
|
|
243
248
|
}), { on: ", " })} })`;
|
|
249
|
+
return this.shorthand
|
|
250
|
+
.map((shorthand) => {
|
|
251
|
+
return code `${this.reusables.imports.z}.union([${objectSchema}, ${shorthand.type.schema}.transform(${shorthand.transformer.unannotatedUsage})])`;
|
|
252
|
+
})
|
|
253
|
+
.orDefault(objectSchema);
|
|
254
|
+
}
|
|
255
|
+
schemaTypeExpression({ unqualifiedName, }) {
|
|
256
|
+
return this.shorthand
|
|
257
|
+
.map((shorthand) => code `${this.reusables.imports.z}.ZodType<${unqualifiedName}, ${unqualifiedName} | ${shorthand.type.expression}>`)
|
|
258
|
+
.orDefault(super.schemaTypeExpression({ unqualifiedName }));
|
|
244
259
|
}
|
|
245
260
|
get uiSchemaFunctionExpression() {
|
|
246
261
|
const variables = { scopePrefix: code `(_options?.scopePrefix ?? "#")` };
|
|
@@ -256,14 +271,10 @@ class JsonObjectType extends AbstractJsonType {
|
|
|
256
271
|
return ${uiSchema};
|
|
257
272
|
})`;
|
|
258
273
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
? this.members[memberI].type()
|
|
264
|
-
: this.members[memberI].type;
|
|
265
|
-
}
|
|
266
|
-
return this.memberTypes[memberI];
|
|
274
|
+
uiSchemaElement({ variables, }) {
|
|
275
|
+
return Maybe.of(code `${this.name
|
|
276
|
+
.map((name) => code `${name.join(".")}.uiSchema`)
|
|
277
|
+
.orDefaultLazy(() => this.uiSchemaFunctionExpression)}({ scopePrefix: ${variables.scopePrefix} })`);
|
|
267
278
|
}
|
|
268
279
|
moduleDeclarations(parameters) {
|
|
269
280
|
const moduleDeclarations = super.moduleDeclarations(parameters);
|
|
@@ -272,10 +283,14 @@ class JsonObjectType extends AbstractJsonType {
|
|
|
272
283
|
}
|
|
273
284
|
return moduleDeclarations;
|
|
274
285
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
.
|
|
278
|
-
|
|
286
|
+
memberType(memberI) {
|
|
287
|
+
if (this.cachedMemberTypes[memberI] === null) {
|
|
288
|
+
this.cachedMemberTypes[memberI] =
|
|
289
|
+
typeof this.members[memberI].type === "function"
|
|
290
|
+
? this.members[memberI].type()
|
|
291
|
+
: this.members[memberI].type;
|
|
292
|
+
}
|
|
293
|
+
return this.cachedMemberTypes[memberI];
|
|
279
294
|
}
|
|
280
295
|
}
|
|
281
296
|
__decorate([
|
|
@@ -406,6 +421,7 @@ class JsonTypeFactory {
|
|
|
406
421
|
: Maybe.fromNullable(member.uiSchemaElement),
|
|
407
422
|
})),
|
|
408
423
|
name: Maybe.fromNullable(options?.name),
|
|
424
|
+
shorthand: Maybe.fromNullable(options?.shorthand),
|
|
409
425
|
snippet: Maybe.fromNullable(options?.snippet),
|
|
410
426
|
});
|
|
411
427
|
}
|
|
@@ -14,7 +14,7 @@ if (focusIdentifier.termType === "Variable") {
|
|
|
14
14
|
ignoreRdfType: false,
|
|
15
15
|
preferredLanguages,
|
|
16
16
|
propertyPatterns: [],
|
|
17
|
-
schema: ${this.identifierType.schema},
|
|
17
|
+
schema: ${this.identifierType.schema.expression},
|
|
18
18
|
valueVariable: focusIdentifier,
|
|
19
19
|
variablePrefix,
|
|
20
20
|
}));
|
|
@@ -3,6 +3,6 @@ export function ObjectIntersectionType_fromRdfResourceValuesFunctionExpression()
|
|
|
3
3
|
return code `(values, options) => values.chainMap(value => value.toResource().chain(resource => ${this.fromRdfResourceFunction.annotatedUsage}(resource, options)))`;
|
|
4
4
|
}
|
|
5
5
|
export function ObjectIntersectionType_fromRdfResourceValuesFunctionType() {
|
|
6
|
-
return code `${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.discriminatedType.map((discriminatedType) => discriminatedType.expression).orDefault(this.expression)}, ${this.
|
|
6
|
+
return code `${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.discriminatedType.map((discriminatedType) => discriminatedType.expression).orDefault(this.expression)}, ${this.schema.type.expression}>`;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=ObjectIntersectionType_fromRdfResourceValuesFunction.js.map
|
|
@@ -3,6 +3,7 @@ import type { Maybe } from "purify-ts";
|
|
|
3
3
|
import type { AbstractType } from "../AbstractType.js";
|
|
4
4
|
import type { Reusables } from "../Reusables.js";
|
|
5
5
|
import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
|
|
6
|
+
import type { SchemaObject } from "../SchemaObject.js";
|
|
6
7
|
import type { TsGenerator } from "../TsGenerator.js";
|
|
7
8
|
import type { Type } from "../Type.js";
|
|
8
9
|
import { type Code } from "../ts-poet-wrapper.js";
|
|
@@ -83,13 +84,9 @@ export declare abstract class ObjectType_AbstractProperty {
|
|
|
83
84
|
*/
|
|
84
85
|
abstract readonly recursive: boolean;
|
|
85
86
|
/**
|
|
86
|
-
* TypeScript object describing this
|
|
87
|
+
* TypeScript object describing this property, for runtime use.
|
|
87
88
|
*/
|
|
88
|
-
abstract readonly schema: Maybe<
|
|
89
|
-
/**
|
|
90
|
-
* TypeScript type describing .schema.
|
|
91
|
-
*/
|
|
92
|
-
abstract readonly schemaType: Maybe<Code>;
|
|
89
|
+
abstract readonly schema: Maybe<SchemaObject<SchemaObject.UserDefinedType>>;
|
|
93
90
|
constructor({ configuration, jsonTypeFactory, logger, name, objectType, reusables, }: {
|
|
94
91
|
configuration: TsGenerator.Configuration;
|
|
95
92
|
jsonTypeFactory: AbstractType.JsonTypeFactory;
|
|
@@ -244,6 +241,6 @@ export declare abstract class ObjectType_AbstractProperty {
|
|
|
244
241
|
};
|
|
245
242
|
}): Maybe<Code>;
|
|
246
243
|
protected readonly rdfjsTermExpression: (parameters: Parameters<typeof rdfjsTermExpression>[0]) => Code;
|
|
247
|
-
protected get schemaVariable(): Code
|
|
244
|
+
protected get schemaVariable(): Maybe<Code>;
|
|
248
245
|
}
|
|
249
246
|
//# sourceMappingURL=ObjectType_AbstractProperty.d.ts.map
|
|
@@ -32,9 +32,7 @@ export class ObjectType_AbstractProperty {
|
|
|
32
32
|
}
|
|
33
33
|
rdfjsTermExpression;
|
|
34
34
|
get schemaVariable() {
|
|
35
|
-
return this.objectType.name
|
|
36
|
-
.map((name) => code `${name}.schema.properties.${this.name}`)
|
|
37
|
-
.orDefaultLazy(() => this.schema.unsafeCoerce());
|
|
35
|
+
return this.objectType.name.map((name) => code `${name}.schema.properties.${this.name}`);
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
__decorate([
|
|
@@ -15,7 +15,6 @@ export declare class ObjectType_DiscriminantProperty extends ObjectType_Abstract
|
|
|
15
15
|
readonly mutable = false;
|
|
16
16
|
readonly recursive = false;
|
|
17
17
|
readonly schema: ObjectType_AbstractProperty["schema"];
|
|
18
|
-
readonly schemaType: ObjectType_AbstractProperty["schemaType"];
|
|
19
18
|
readonly value: string;
|
|
20
19
|
constructor({ configuration, value, ...superParameters }: {
|
|
21
20
|
value: string;
|
|
@@ -22,7 +22,6 @@ export class ObjectType_DiscriminantProperty extends ObjectType_AbstractProperty
|
|
|
22
22
|
mutable = false;
|
|
23
23
|
recursive = false;
|
|
24
24
|
schema = Maybe.empty();
|
|
25
|
-
schemaType = Maybe.empty();
|
|
26
25
|
value;
|
|
27
26
|
constructor({ configuration, value, ...superParameters }) {
|
|
28
27
|
super({
|
|
@@ -2,6 +2,7 @@ import { Maybe } from "purify-ts";
|
|
|
2
2
|
import type { BlankNodeType } from "../BlankNodeType.js";
|
|
3
3
|
import type { IdentifierType } from "../IdentifierType.js";
|
|
4
4
|
import type { IriType } from "../IriType.js";
|
|
5
|
+
import { SchemaObject } from "../SchemaObject.js";
|
|
5
6
|
import { type Code } from "../ts-poet-wrapper.js";
|
|
6
7
|
import { ObjectType_AbstractProperty } from "./ObjectType_AbstractProperty.js";
|
|
7
8
|
export declare class ObjectType_IdentifierProperty extends ObjectType_AbstractProperty {
|
|
@@ -24,8 +25,8 @@ export declare class ObjectType_IdentifierProperty extends ObjectType_AbstractPr
|
|
|
24
25
|
get graphqlField(): ObjectType_AbstractProperty["graphqlField"];
|
|
25
26
|
get hashFunctionParameter(): Maybe<Code>;
|
|
26
27
|
get jsonObjectMember(): ObjectType_AbstractProperty["jsonObjectMember"];
|
|
27
|
-
get schema(): Maybe<
|
|
28
|
-
get
|
|
28
|
+
get schema(): Maybe<SchemaObject<SchemaObject.UserDefinedType>>;
|
|
29
|
+
private get _schema();
|
|
29
30
|
private get typeExpression();
|
|
30
31
|
private get typeSchemaVariable();
|
|
31
32
|
createInitializer({ variables, }: Parameters<ObjectType_AbstractProperty["createInitializer"]>[0]): Maybe<Code>;
|