@shaclmate/compiler 4.0.57 → 4.0.59
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/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +5 -5
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +3 -3
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +1 -1
- package/dist/ast/AbstractCompoundType.d.ts +3 -3
- package/dist/ast/AbstractCompoundType.js +1 -1
- package/dist/ast/AbstractContainerType.d.ts +2 -2
- package/dist/ast/AbstractContainerType.js +1 -1
- package/dist/ast/AbstractLazyType.d.ts +2 -2
- package/dist/ast/{UnionType.d.ts → DiscriminatedUnionType.d.ts} +7 -7
- package/dist/ast/{UnionType.js → DiscriminatedUnionType.js} +9 -8
- package/dist/ast/ListType.d.ts +2 -2
- package/dist/ast/ListType.js +1 -1
- package/dist/ast/StructCompoundType.d.ts +2 -2
- package/dist/ast/StructCompoundType.js +1 -1
- package/dist/ast/StructDiscriminatedUnionType.d.ts +4 -0
- package/dist/ast/StructDiscriminatedUnionType.js +2 -0
- package/dist/ast/StructType.js +1 -1
- package/dist/ast/Type.d.ts +2 -2
- package/dist/ast/Type.js +1 -1
- package/dist/ast/index.d.ts +2 -2
- package/dist/ast/index.js +2 -2
- package/dist/generators/transformAstToLabeledPropertyGraph.js +2 -2
- package/dist/generators/ts/AbstractCollectionType.d.ts +2 -2
- package/dist/generators/ts/AbstractContainerType.d.ts +5 -5
- package/dist/generators/ts/AbstractContainerType.js +2 -2
- package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
- package/dist/generators/ts/AbstractLazyType.d.ts +8 -8
- package/dist/generators/ts/AbstractLazyType.js +9 -9
- package/dist/generators/ts/AbstractLiteralType.d.ts +2 -2
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -1
- package/dist/generators/ts/AbstractObjectSetType.d.ts +4 -4
- package/dist/generators/ts/AbstractObjectSetType.js +4 -3
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +2 -2
- package/dist/generators/ts/AbstractTermType.d.ts +2 -2
- package/dist/generators/ts/AbstractType.d.ts +15 -75
- package/dist/generators/ts/AbstractType.js +6 -63
- package/dist/generators/ts/AbstractTypedLiteralType.d.ts +2 -2
- package/dist/generators/ts/BigDecimalType.d.ts +1 -1
- package/dist/generators/ts/BigIntType.d.ts +1 -1
- package/dist/generators/ts/BooleanType.d.ts +1 -1
- package/dist/generators/ts/DateTimeType.d.ts +1 -1
- package/dist/generators/ts/DateType.d.ts +1 -1
- package/dist/generators/ts/DefaultValueType.d.ts +4 -4
- package/dist/generators/ts/DefaultValueType.js +2 -2
- package/dist/generators/ts/{UnionType.d.ts → DiscriminatedUnionType.d.ts} +6 -6
- package/dist/generators/ts/{UnionType.js → DiscriminatedUnionType.js} +31 -31
- package/dist/generators/ts/FloatType.d.ts +1 -1
- package/dist/generators/ts/GraphqlSchema.d.ts +4 -4
- package/dist/generators/ts/GraphqlSchema.js +5 -4
- package/dist/generators/ts/IntType.d.ts +1 -1
- package/dist/generators/ts/LazyOptionType.d.ts +3 -3
- package/dist/generators/ts/ListType.d.ts +3 -3
- package/dist/generators/ts/ListType.js +2 -2
- package/dist/generators/ts/{ObjectUnionType.d.ts → ObjectDiscriminatedUnionType.d.ts} +4 -4
- package/dist/generators/ts/{ObjectUnionType.js → ObjectDiscriminatedUnionType.js} +8 -8
- package/dist/generators/ts/ObjectSetType.js +1 -1
- package/dist/generators/ts/ObjectType.d.ts +11 -11
- package/dist/generators/ts/ObjectType.js +6 -6
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +8 -5
- package/dist/generators/ts/SparqlObjectSetType.js +4 -1
- package/dist/generators/ts/StringType.d.ts +1 -1
- package/dist/generators/ts/TsGenerator.d.ts +1 -1
- package/dist/generators/ts/TsGenerator.js +19 -19
- package/dist/generators/ts/Type.d.ts +3 -3
- package/dist/generators/ts/TypeFactory.d.ts +5 -5
- package/dist/generators/ts/TypeFactory.js +16 -16
- package/dist/generators/ts/ZodGenerator.js +5 -5
- package/dist/generators/ts/_AbstractType/AbstractType_ConversionFunction.d.ts +10 -0
- package/dist/generators/ts/_AbstractType/AbstractType_ConversionFunction.js +2 -0
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.d.ts +9 -0
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.js +2 -0
- package/dist/generators/ts/_AbstractType/AbstractType_GraphqlType.d.ts +18 -0
- package/dist/generators/ts/_AbstractType/AbstractType_GraphqlType.js +33 -0
- package/dist/generators/ts/_AbstractType/AbstractType_JsType.d.ts +34 -0
- package/dist/generators/ts/_AbstractType/AbstractType_JsType.js +16 -0
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.d.ts +16 -0
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.js +31 -0
- package/dist/generators/ts/_ObjectType/{AbstractProperty.d.ts → ObjectType_AbstractProperty.d.ts} +2 -2
- package/dist/generators/ts/_ObjectType/{AbstractProperty.js → ObjectType_AbstractProperty.js} +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.d.ts +45 -0
- package/dist/generators/ts/_ObjectType/{DiscriminantProperty.js → ObjectType_DiscriminantProperty.js} +12 -9
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.d.ts +43 -0
- package/dist/generators/ts/_ObjectType/{IdentifierProperty.js → ObjectType_IdentifierProperty.js} +11 -11
- package/dist/generators/ts/_ObjectType/ObjectType_Property.d.ts +6 -0
- package/dist/generators/ts/_ObjectType/ObjectType_Property.js +2 -0
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts +53 -0
- package/dist/generators/ts/_ObjectType/{ShaclProperty.js → ObjectType_ShaclProperty.js} +10 -10
- package/package.json +34 -24
- package/dist/ast/StructUnionType.d.ts +0 -4
- package/dist/ast/StructUnionType.js +0 -2
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +0 -45
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +0 -43
- package/dist/generators/ts/_ObjectType/Property.d.ts +0 -6
- package/dist/generators/ts/_ObjectType/Property.js +0 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +0 -53
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
1
2
|
import type { ObjectType } from "./ObjectType.js";
|
|
2
3
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly kind = "ObjectUnion";
|
|
4
|
+
export declare class ObjectDiscriminatedUnionType extends DiscriminatedUnionType<ObjectType> {
|
|
5
|
+
readonly kind = "ObjectDiscriminatedUnion";
|
|
6
6
|
get identifierTypeAlias(): Code;
|
|
7
7
|
get objectSetMethodNames(): ObjectType.ObjectSetMethodNames;
|
|
8
8
|
get schema(): Code;
|
|
@@ -17,4 +17,4 @@ export declare class ObjectUnionType extends UnionType<ObjectType> {
|
|
|
17
17
|
private get schemaVariableStatement();
|
|
18
18
|
private get toRdfResourceFunctionDeclaration();
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=ObjectDiscriminatedUnionType.d.ts.map
|
|
@@ -10,11 +10,11 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { ObjectType_objectSetMethodNames } from "./_ObjectType/ObjectType_objectSetMethodNames.js";
|
|
11
11
|
import { ObjectType_sparqlConstructQueryFunctionDeclaration } from "./_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js";
|
|
12
12
|
import { ObjectType_sparqlConstructQueryStringFunctionDeclaration } from "./_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js";
|
|
13
|
+
import { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
13
14
|
import { singleEntryRecord } from "./singleEntryRecord.js";
|
|
14
15
|
import { code, joinCode, literalOf } from "./ts-poet-wrapper.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
kind = "ObjectUnion";
|
|
16
|
+
export class ObjectDiscriminatedUnionType extends DiscriminatedUnionType {
|
|
17
|
+
kind = "ObjectDiscriminatedUnion";
|
|
18
18
|
get identifierTypeAlias() {
|
|
19
19
|
return this.name.map((name) => code `${name}.Identifier`).unsafeCoerce();
|
|
20
20
|
}
|
|
@@ -210,14 +210,14 @@ ${joinCode(this.members
|
|
|
210
210
|
}
|
|
211
211
|
__decorate([
|
|
212
212
|
Memoize()
|
|
213
|
-
],
|
|
213
|
+
], ObjectDiscriminatedUnionType.prototype, "identifierTypeAlias", null);
|
|
214
214
|
__decorate([
|
|
215
215
|
Memoize()
|
|
216
|
-
],
|
|
216
|
+
], ObjectDiscriminatedUnionType.prototype, "objectSetMethodNames", null);
|
|
217
217
|
__decorate([
|
|
218
218
|
Memoize()
|
|
219
|
-
],
|
|
219
|
+
], ObjectDiscriminatedUnionType.prototype, "schema", null);
|
|
220
220
|
__decorate([
|
|
221
221
|
Memoize()
|
|
222
|
-
],
|
|
223
|
-
//# sourceMappingURL=
|
|
222
|
+
], ObjectDiscriminatedUnionType.prototype, "schemaType", null);
|
|
223
|
+
//# sourceMappingURL=ObjectDiscriminatedUnionType.js.map
|
|
@@ -14,7 +14,7 @@ export class ObjectSetType extends AbstractObjectSetType {
|
|
|
14
14
|
export interface ${syntheticNamePrefix}ObjectSet {
|
|
15
15
|
${joinCode(this.namedObjectTypes
|
|
16
16
|
.flatMap((namedObjectType) => Object.values(this.methodSignatures(namedObjectType)))
|
|
17
|
-
.concat(this.
|
|
17
|
+
.concat(this.namedObjectDiscriminatedUnionTypes.flatMap((namedObjectDiscriminatedUnionType) => Object.values(this.methodSignatures(namedObjectDiscriminatedUnionType))))
|
|
18
18
|
.map((methodSignature) => code `${methodSignature.name}(${methodSignature.parameters}): ${methodSignature.returnType};`), { on: "\n\n" })}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { NamedNode } from "@rdfjs/types";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
6
|
-
import {
|
|
3
|
+
import { ObjectType_DiscriminantProperty } from "./_ObjectType/ObjectType_DiscriminantProperty.js";
|
|
4
|
+
import { ObjectType_IdentifierProperty } from "./_ObjectType/ObjectType_IdentifierProperty.js";
|
|
5
|
+
import type { ObjectType_Property } from "./_ObjectType/ObjectType_Property.js";
|
|
6
|
+
import { ObjectType_ShaclProperty } from "./_ObjectType/ObjectType_ShaclProperty.js";
|
|
7
7
|
import { AbstractType } from "./AbstractType.js";
|
|
8
8
|
import type { BlankNodeType } from "./BlankNodeType.js";
|
|
9
9
|
import type { IdentifierType } from "./IdentifierType.js";
|
|
@@ -88,18 +88,18 @@ export declare class ObjectType extends AbstractType {
|
|
|
88
88
|
private readonly lazyProperties;
|
|
89
89
|
}
|
|
90
90
|
export declare namespace ObjectType {
|
|
91
|
-
const IdentifierProperty: typeof
|
|
92
|
-
type IdentifierProperty =
|
|
91
|
+
const IdentifierProperty: typeof ObjectType_IdentifierProperty;
|
|
92
|
+
type IdentifierProperty = ObjectType_IdentifierProperty;
|
|
93
93
|
type ObjectSetMethodNames = {
|
|
94
94
|
readonly object: string;
|
|
95
95
|
readonly objectCount: string;
|
|
96
96
|
readonly objectIdentifiers: string;
|
|
97
97
|
readonly objects: string;
|
|
98
98
|
};
|
|
99
|
-
type Property =
|
|
100
|
-
const ShaclProperty: typeof
|
|
101
|
-
type ShaclProperty<TypeT extends Type> =
|
|
102
|
-
const DiscriminantProperty: typeof
|
|
103
|
-
type DiscriminantProperty =
|
|
99
|
+
type Property = ObjectType_Property;
|
|
100
|
+
const ShaclProperty: typeof ObjectType_ShaclProperty;
|
|
101
|
+
type ShaclProperty<TypeT extends Type> = ObjectType_ShaclProperty<TypeT>;
|
|
102
|
+
const DiscriminantProperty: typeof ObjectType_DiscriminantProperty;
|
|
103
|
+
type DiscriminantProperty = ObjectType_DiscriminantProperty;
|
|
104
104
|
}
|
|
105
105
|
//# sourceMappingURL=ObjectType.d.ts.map
|
|
@@ -9,9 +9,8 @@ import { camelCase } from "change-case";
|
|
|
9
9
|
import { Maybe } from "purify-ts";
|
|
10
10
|
import { invariant } from "ts-invariant";
|
|
11
11
|
import { Memoize } from "typescript-memoize";
|
|
12
|
-
import { DiscriminantProperty as _DiscriminantProperty } from "./_ObjectType/DiscriminantProperty.js";
|
|
13
|
-
import { IdentifierProperty as _IdentifierProperty } from "./_ObjectType/IdentifierProperty.js";
|
|
14
12
|
import { ObjectType_createFunctionExpression } from "./_ObjectType/ObjectType_createFunctionExpression.js";
|
|
13
|
+
import { ObjectType_DiscriminantProperty } from "./_ObjectType/ObjectType_DiscriminantProperty.js";
|
|
15
14
|
import { ObjectType_equalsFunctionExpression } from "./_ObjectType/ObjectType_equalsFunctionExpression.js";
|
|
16
15
|
import { ObjectType_filterFunctionExpression } from "./_ObjectType/ObjectType_filterFunctionExpression.js";
|
|
17
16
|
import { ObjectType_filterTypeExpression } from "./_ObjectType/ObjectType_filterTypeExpression.js";
|
|
@@ -21,6 +20,7 @@ import { ObjectType_fromJsonFunctionExpression } from "./_ObjectType/ObjectType_
|
|
|
21
20
|
import { ObjectType_fromRdfResourceFunctionExpression } from "./_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js";
|
|
22
21
|
import { ObjectType_graphqlTypeExpression } from "./_ObjectType/ObjectType_graphqlTypeExpression.js";
|
|
23
22
|
import { ObjectType_hashFunctionExpression } from "./_ObjectType/ObjectType_hashFunctionExpression.js";
|
|
23
|
+
import { ObjectType_IdentifierProperty } from "./_ObjectType/ObjectType_IdentifierProperty.js";
|
|
24
24
|
import { ObjectType_identifierTypeDeclarations } from "./_ObjectType/ObjectType_identifierTypeDeclarations.js";
|
|
25
25
|
import { ObjectType_isTypeFunctionDeclaration } from "./_ObjectType/ObjectType_isTypeFunctionDeclaration.js";
|
|
26
26
|
import { ObjectType_jsonParseFunctionDeclaration } from "./_ObjectType/ObjectType_jsonParseFunctionDeclaration.js";
|
|
@@ -28,6 +28,7 @@ import { ObjectType_jsonSchemaExpression } from "./_ObjectType/ObjectType_jsonSc
|
|
|
28
28
|
import { ObjectType_jsonTypeExpression } from "./_ObjectType/ObjectType_jsonTypeExpression.js";
|
|
29
29
|
import { ObjectType_jsonUiSchemaFunctionExpression } from "./_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js";
|
|
30
30
|
import { ObjectType_objectSetMethodNames } from "./_ObjectType/ObjectType_objectSetMethodNames.js";
|
|
31
|
+
import { ObjectType_ShaclProperty } from "./_ObjectType/ObjectType_ShaclProperty.js";
|
|
31
32
|
import { ObjectType_schemaExpression } from "./_ObjectType/ObjectType_schemaExpression.js";
|
|
32
33
|
import { ObjectType_schemaTypeExpression } from "./_ObjectType/ObjectType_schemaTypeExpression.js";
|
|
33
34
|
import { ObjectType_sparqlConstructQueryFunctionDeclaration } from "./_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js";
|
|
@@ -38,7 +39,6 @@ import { ObjectType_toStringFunctionExpression } from "./_ObjectType/ObjectType_
|
|
|
38
39
|
import { ObjectType_toStringRecordFunctionExpression } from "./_ObjectType/ObjectType_toStringRecordFunctionExpression.js";
|
|
39
40
|
import { ObjectType_valueSparqlConstructTriplesFunctionExpression } from "./_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js";
|
|
40
41
|
import { ObjectType_valueSparqlWherePatternsFunctionExpression } from "./_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js";
|
|
41
|
-
import { ShaclProperty as _ShaclProperty } from "./_ObjectType/ShaclProperty.js";
|
|
42
42
|
import { AbstractType } from "./AbstractType.js";
|
|
43
43
|
import { arrayOf, code, def, joinCode } from "./ts-poet-wrapper.js";
|
|
44
44
|
import { tsComment } from "./tsComment.js";
|
|
@@ -496,8 +496,8 @@ __decorate([
|
|
|
496
496
|
Memoize()
|
|
497
497
|
], ObjectType.prototype, "jsonType", null);
|
|
498
498
|
(function (ObjectType) {
|
|
499
|
-
ObjectType.IdentifierProperty =
|
|
500
|
-
ObjectType.ShaclProperty =
|
|
501
|
-
ObjectType.DiscriminantProperty =
|
|
499
|
+
ObjectType.IdentifierProperty = ObjectType_IdentifierProperty;
|
|
500
|
+
ObjectType.ShaclProperty = ObjectType_ShaclProperty;
|
|
501
|
+
ObjectType.DiscriminantProperty = ObjectType_DiscriminantProperty;
|
|
502
502
|
})(ObjectType || (ObjectType = {}));
|
|
503
503
|
//# sourceMappingURL=ObjectType.js.map
|
|
@@ -46,7 +46,10 @@ export class ${syntheticNamePrefix}RdfjsDatasetObjectSet implements ${syntheticN
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
${joinCode([
|
|
49
|
-
...[
|
|
49
|
+
...[
|
|
50
|
+
...this.namedObjectTypes,
|
|
51
|
+
...this.namedObjectDiscriminatedUnionTypes,
|
|
52
|
+
].flatMap((namedObjectType) => {
|
|
50
53
|
const methodSignatures = this.methodSignatures(namedObjectType);
|
|
51
54
|
const delegatingMethods = [
|
|
52
55
|
// object
|
|
@@ -96,10 +99,10 @@ ${methodSignatures.objects.name}Sync(${methodSignatures.objects.parameters}): ${
|
|
|
96
99
|
return this.#objectsSync<${namedObjectType.expression}, ${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>(${runtimeObjectType(namedObjectType.filterFunction, namedObjectType)}, query);
|
|
97
100
|
}`);
|
|
98
101
|
}
|
|
99
|
-
case "
|
|
102
|
+
case "ObjectDiscriminatedUnion":
|
|
100
103
|
return delegatingMethods.concat(code `\
|
|
101
104
|
${methodSignatures.objects.name}Sync(${methodSignatures.objects.parameters}): ${this.reusables.imports.Either}<Error, readonly ${namedObjectType.expression}[]> {
|
|
102
|
-
return this.#
|
|
105
|
+
return this.#objectDiscriminatedUnionsSync<${namedObjectType.expression}, ${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>([
|
|
103
106
|
${joinCode(namedObjectType.members.map((member) => runtimeObjectType(namedObjectType.filterFunction, member.type)), { on: ", " })}
|
|
104
107
|
], query);
|
|
105
108
|
}`);
|
|
@@ -200,10 +203,10 @@ ${methodSignatures.objects.name}Sync(${methodSignatures.objects.parameters}): ${
|
|
|
200
203
|
}`,
|
|
201
204
|
]
|
|
202
205
|
: []),
|
|
203
|
-
...(this.
|
|
206
|
+
...(this.namedObjectDiscriminatedUnionTypes.length > 0
|
|
204
207
|
? [
|
|
205
208
|
code `\
|
|
206
|
-
#
|
|
209
|
+
#objectDiscriminatedUnionsSync<${typeParameters.ObjectT}, ${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(namedObjectTypes: readonly ${namedObjectTypeType}[], ${parameters.query}): ${this.reusables.imports.Either}<Error, readonly ObjectT[]> {
|
|
207
210
|
const graph = query?.graph ?? this.#graph;
|
|
208
211
|
|
|
209
212
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
@@ -38,7 +38,10 @@ export class ${syntheticNamePrefix}SparqlObjectSet implements ${syntheticNamePre
|
|
|
38
38
|
this.#sparqlClient = sparqlClient;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
${joinCode([
|
|
41
|
+
${joinCode([
|
|
42
|
+
...this.namedObjectTypes,
|
|
43
|
+
...this.namedObjectDiscriminatedUnionTypes,
|
|
44
|
+
].flatMap((namedObjectType) => {
|
|
42
45
|
const methodSignatures = this.methodSignatures(namedObjectType, {
|
|
43
46
|
queryT: `${syntheticNamePrefix}SparqlObjectSet.Query`,
|
|
44
47
|
});
|
|
@@ -5,7 +5,7 @@ export declare class StringType extends AbstractPrimitiveType<string> {
|
|
|
5
5
|
private readonly languageIn;
|
|
6
6
|
readonly filterFunction: Code;
|
|
7
7
|
readonly filterType: Code;
|
|
8
|
-
readonly graphqlType: import("./
|
|
8
|
+
readonly graphqlType: import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
|
|
9
9
|
readonly hashFunction: Code;
|
|
10
10
|
readonly jsTypes: readonly [{
|
|
11
11
|
readonly typeof: "string";
|
|
@@ -14,7 +14,7 @@ export declare class TsGenerator implements Generator {
|
|
|
14
14
|
/**
|
|
15
15
|
* Synthesize the $Object union.
|
|
16
16
|
*/
|
|
17
|
-
private
|
|
17
|
+
private synthesizeUberObjectDiscriminatedUnionType;
|
|
18
18
|
}
|
|
19
19
|
export declare namespace TsGenerator {
|
|
20
20
|
interface Configuration {
|
|
@@ -5,8 +5,8 @@ import { BlankNodeType } from "./BlankNodeType.js";
|
|
|
5
5
|
import { GraphqlSchema } from "./GraphqlSchema.js";
|
|
6
6
|
import { IdentifierType } from "./IdentifierType.js";
|
|
7
7
|
import { IriType } from "./IriType.js";
|
|
8
|
+
import { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
|
|
8
9
|
import { ObjectSetType } from "./ObjectSetType.js";
|
|
9
|
-
import { ObjectUnionType } from "./ObjectUnionType.js";
|
|
10
10
|
import { RdfjsDatasetObjectSetType } from "./RdfjsDatasetObjectSetType.js";
|
|
11
11
|
import { Reusables } from "./Reusables.js";
|
|
12
12
|
import { SparqlObjectSetType } from "./SparqlObjectSetType.js";
|
|
@@ -36,7 +36,7 @@ export class TsGenerator {
|
|
|
36
36
|
let declarations = [];
|
|
37
37
|
const tsNamedTypes = [];
|
|
38
38
|
const tsNamedObjectTypes = [];
|
|
39
|
-
const
|
|
39
|
+
const tsNamedObjectDiscriminatedUnionTypes = [];
|
|
40
40
|
for (const astNamedType of ast_.namedTypes) {
|
|
41
41
|
const tsNamedType = typeFactory.createType(astNamedType);
|
|
42
42
|
tsNamedTypes.push(tsNamedType);
|
|
@@ -49,18 +49,18 @@ export class TsGenerator {
|
|
|
49
49
|
case "Object":
|
|
50
50
|
tsNamedObjectTypes.push(tsNamedType);
|
|
51
51
|
break;
|
|
52
|
-
case "
|
|
53
|
-
|
|
52
|
+
case "ObjectDiscriminatedUnion":
|
|
53
|
+
tsNamedObjectDiscriminatedUnionTypes.push(tsNamedType);
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
tsNamedTypes.sort(compareTsNamedType);
|
|
58
58
|
tsNamedObjectTypes.sort(compareTsNamedType);
|
|
59
|
-
|
|
59
|
+
tsNamedObjectDiscriminatedUnionTypes.sort(compareTsNamedType);
|
|
60
60
|
for (const tsNamedType of tsNamedTypes) {
|
|
61
61
|
switch (tsNamedType.kind) {
|
|
62
|
-
case "
|
|
63
|
-
case "
|
|
62
|
+
case "ObjectDiscriminatedUnion":
|
|
63
|
+
case "DiscriminatedUnion":
|
|
64
64
|
continue; // Declare compound types last.
|
|
65
65
|
}
|
|
66
66
|
tsNamedType.declaration.ifJust((declaration) => {
|
|
@@ -70,8 +70,8 @@ export class TsGenerator {
|
|
|
70
70
|
// Declare compound types last.
|
|
71
71
|
for (const tsNamedType of tsNamedTypes) {
|
|
72
72
|
switch (tsNamedType.kind) {
|
|
73
|
-
case "
|
|
74
|
-
case "
|
|
73
|
+
case "ObjectDiscriminatedUnion":
|
|
74
|
+
case "DiscriminatedUnion":
|
|
75
75
|
break;
|
|
76
76
|
default:
|
|
77
77
|
continue;
|
|
@@ -87,30 +87,30 @@ export class TsGenerator {
|
|
|
87
87
|
declarations.push(code `type ${configuration.syntheticNamePrefix}Object = ${tsNamedObjectTypes[0].expression};`);
|
|
88
88
|
break;
|
|
89
89
|
default: {
|
|
90
|
-
const
|
|
90
|
+
const uberObjectDiscriminatedUnionType = this.synthesizeUberObjectDiscriminatedUnionType({
|
|
91
91
|
configuration,
|
|
92
92
|
namedObjectTypes: tsNamedObjectTypes,
|
|
93
93
|
reusables,
|
|
94
94
|
});
|
|
95
|
-
declarations = declarations.concat(
|
|
96
|
-
|
|
95
|
+
declarations = declarations.concat(uberObjectDiscriminatedUnionType.declaration.toList());
|
|
96
|
+
tsNamedObjectDiscriminatedUnionTypes.push(uberObjectDiscriminatedUnionType);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
declarations.push(...this.objectSetTypeDeclarations({
|
|
100
100
|
configuration,
|
|
101
101
|
namedObjectTypes: tsNamedObjectTypes,
|
|
102
|
-
|
|
102
|
+
namedObjectDiscriminatedUnionTypes: tsNamedObjectDiscriminatedUnionTypes,
|
|
103
103
|
reusables,
|
|
104
104
|
}));
|
|
105
105
|
if (configuration.features.has("GraphQL")) {
|
|
106
106
|
const graphqlNamedObjectTypes = tsNamedObjectTypes.filter((tsNamedObjectType) => !tsNamedObjectType.synthetic);
|
|
107
|
-
const
|
|
107
|
+
const graphqlNamedObjectDiscriminatedUnionTypes = tsNamedObjectDiscriminatedUnionTypes.filter((tsNamedObjectDiscriminatedUnionType) => !tsNamedObjectDiscriminatedUnionType.synthetic);
|
|
108
108
|
if (graphqlNamedObjectTypes.length > 0) {
|
|
109
109
|
declarations.push(new GraphqlSchema({
|
|
110
110
|
configuration,
|
|
111
111
|
logger: this.logger,
|
|
112
112
|
namedObjectTypes: graphqlNamedObjectTypes,
|
|
113
|
-
|
|
113
|
+
namedObjectDiscriminatedUnionTypes: graphqlNamedObjectDiscriminatedUnionTypes,
|
|
114
114
|
reusables,
|
|
115
115
|
}).declaration);
|
|
116
116
|
}
|
|
@@ -118,12 +118,12 @@ export class TsGenerator {
|
|
|
118
118
|
declarations.splice(0, 0, joinCode(reusables.snippets.ifUsed, { on: "\n\n" }));
|
|
119
119
|
return joinCode(declarations).toString({});
|
|
120
120
|
}
|
|
121
|
-
objectSetTypeDeclarations({ configuration, namedObjectTypes,
|
|
121
|
+
objectSetTypeDeclarations({ configuration, namedObjectTypes, namedObjectDiscriminatedUnionTypes, reusables, }) {
|
|
122
122
|
const constructorParameters = {
|
|
123
123
|
configuration,
|
|
124
124
|
logger: this.logger,
|
|
125
125
|
namedObjectTypes: namedObjectTypes.filter((namedObjectType) => !namedObjectType.extern && !namedObjectType.synthetic),
|
|
126
|
-
|
|
126
|
+
namedObjectDiscriminatedUnionTypes,
|
|
127
127
|
reusables,
|
|
128
128
|
};
|
|
129
129
|
const declarations = [];
|
|
@@ -141,7 +141,7 @@ export class TsGenerator {
|
|
|
141
141
|
/**
|
|
142
142
|
* Synthesize the $Object union.
|
|
143
143
|
*/
|
|
144
|
-
|
|
144
|
+
synthesizeUberObjectDiscriminatedUnionType({ configuration, namedObjectTypes, reusables, }) {
|
|
145
145
|
const filteredNamedObjectTypes = namedObjectTypes.filter((namedObjectType) => !namedObjectType.extern && !namedObjectType.synthetic);
|
|
146
146
|
invariant(filteredNamedObjectTypes.length > 0);
|
|
147
147
|
const nodeKinds = filteredNamedObjectTypes.reduce((nodeKinds, namedObjectType) => {
|
|
@@ -190,7 +190,7 @@ export class TsGenerator {
|
|
|
190
190
|
break;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
return new
|
|
193
|
+
return new ObjectDiscriminatedUnionType({
|
|
194
194
|
name: Maybe.of(`${configuration.syntheticNamePrefix}Object`),
|
|
195
195
|
comment: Maybe.empty(),
|
|
196
196
|
configuration,
|
|
@@ -5,6 +5,7 @@ import type { BooleanType } from "./BooleanType.js";
|
|
|
5
5
|
import type { DateTimeType } from "./DateTimeType.js";
|
|
6
6
|
import type { DateType } from "./DateType.js";
|
|
7
7
|
import type { DefaultValueType } from "./DefaultValueType.js";
|
|
8
|
+
import type { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
8
9
|
import type { FloatType } from "./FloatType.js";
|
|
9
10
|
import type { IdentifierType } from "./IdentifierType.js";
|
|
10
11
|
import type { IntType } from "./IntType.js";
|
|
@@ -15,12 +16,11 @@ import type { LazySetType } from "./LazySetType.js";
|
|
|
15
16
|
import type { LazyType } from "./LazyType.js";
|
|
16
17
|
import type { ListType } from "./ListType.js";
|
|
17
18
|
import type { LiteralType } from "./LiteralType.js";
|
|
19
|
+
import type { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
|
|
18
20
|
import type { ObjectType } from "./ObjectType.js";
|
|
19
|
-
import type { ObjectUnionType } from "./ObjectUnionType.js";
|
|
20
21
|
import type { OptionType } from "./OptionType.js";
|
|
21
22
|
import type { SetType } from "./SetType.js";
|
|
22
23
|
import type { StringType } from "./StringType.js";
|
|
23
24
|
import type { TermType } from "./TermType.js";
|
|
24
|
-
|
|
25
|
-
export type Type = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType | LangStringType | LazyOptionType | LazySetType | LazyType | ListType<ListType.ItemType> | LiteralType | ObjectUnionType | ObjectType | OptionType<OptionType.ItemType> | SetType<SetType.ItemType> | StringType | TermType | UnionType<Type>;
|
|
25
|
+
export type Type = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType | LangStringType | LazyOptionType | LazySetType | LazyType | ListType<ListType.ItemType> | LiteralType | ObjectDiscriminatedUnionType | ObjectType | OptionType<OptionType.ItemType> | SetType<SetType.ItemType> | StringType | TermType | DiscriminatedUnionType<Type>;
|
|
26
26
|
//# sourceMappingURL=Type.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { Literal, NamedNode } from "@rdfjs/types";
|
|
2
2
|
import type { Logger } from "ts-log";
|
|
3
3
|
import * as ast from "../../ast/index.js";
|
|
4
|
+
import { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
5
|
+
import { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
|
|
4
6
|
import { ObjectType } from "./ObjectType.js";
|
|
5
|
-
import { ObjectUnionType } from "./ObjectUnionType.js";
|
|
6
7
|
import type { Reusables } from "./Reusables.js";
|
|
7
8
|
import type { TsGenerator } from "./TsGenerator.js";
|
|
8
9
|
import type { Type } from "./Type.js";
|
|
9
|
-
import { UnionType } from "./UnionType.js";
|
|
10
10
|
export declare class TypeFactory {
|
|
11
11
|
private readonly configuration;
|
|
12
12
|
private readonly logger;
|
|
13
13
|
private readonly reusables;
|
|
14
|
-
private
|
|
14
|
+
private cachedObjectDiscriminatedUnionTypesByShapeIdentifier;
|
|
15
15
|
private cachedObjectTypePropertiesByShapeIdentifier;
|
|
16
16
|
private cachedObjectTypesByShapeIdentifier;
|
|
17
17
|
constructor({ configuration, logger, reusables, }: {
|
|
@@ -20,11 +20,11 @@ export declare class TypeFactory {
|
|
|
20
20
|
reusables: Reusables;
|
|
21
21
|
});
|
|
22
22
|
createObjectType(astType: ast.StructType): ObjectType;
|
|
23
|
-
|
|
23
|
+
createObjectDiscriminatedUnionType(astType: ast.StructDiscriminatedUnionType): ObjectDiscriminatedUnionType;
|
|
24
24
|
createType(astType: ast.Type, parameters?: {
|
|
25
25
|
defaultValue?: Literal | NamedNode;
|
|
26
26
|
}): Type;
|
|
27
|
-
|
|
27
|
+
createDiscriminatedUnionType(astType: ast.DiscriminatedUnionType): ObjectDiscriminatedUnionType | DiscriminatedUnionType<Type>;
|
|
28
28
|
private createBlankNodeType;
|
|
29
29
|
private createDefaultValueType;
|
|
30
30
|
private createIdentifierType;
|
|
@@ -14,6 +14,7 @@ import { BooleanType } from "./BooleanType.js";
|
|
|
14
14
|
import { DateTimeType } from "./DateTimeType.js";
|
|
15
15
|
import { DateType } from "./DateType.js";
|
|
16
16
|
import { DefaultValueType } from "./DefaultValueType.js";
|
|
17
|
+
import { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
17
18
|
import { FloatType } from "./FloatType.js";
|
|
18
19
|
import { IdentifierType } from "./IdentifierType.js";
|
|
19
20
|
import { IntType } from "./IntType.js";
|
|
@@ -24,18 +25,17 @@ import { LazySetType } from "./LazySetType.js";
|
|
|
24
25
|
import { LazyType } from "./LazyType.js";
|
|
25
26
|
import { ListType } from "./ListType.js";
|
|
26
27
|
import { LiteralType } from "./LiteralType.js";
|
|
28
|
+
import { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
|
|
27
29
|
import { ObjectType } from "./ObjectType.js";
|
|
28
|
-
import { ObjectUnionType } from "./ObjectUnionType.js";
|
|
29
30
|
import { OptionType } from "./OptionType.js";
|
|
30
31
|
import { SetType } from "./SetType.js";
|
|
31
32
|
import { StringType } from "./StringType.js";
|
|
32
33
|
import { TermType } from "./TermType.js";
|
|
33
|
-
import { UnionType } from "./UnionType.js";
|
|
34
34
|
export class TypeFactory {
|
|
35
35
|
configuration;
|
|
36
36
|
logger;
|
|
37
37
|
reusables;
|
|
38
|
-
|
|
38
|
+
cachedObjectDiscriminatedUnionTypesByShapeIdentifier = new TermMap();
|
|
39
39
|
cachedObjectTypePropertiesByShapeIdentifier = new TermMap();
|
|
40
40
|
cachedObjectTypesByShapeIdentifier = new TermMap();
|
|
41
41
|
constructor({ configuration, logger, reusables, }) {
|
|
@@ -106,14 +106,14 @@ export class TypeFactory {
|
|
|
106
106
|
this.cachedObjectTypesByShapeIdentifier.set(astType.shapeIdentifier, objectType);
|
|
107
107
|
return objectType;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
createObjectDiscriminatedUnionType(astType) {
|
|
110
110
|
{
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return
|
|
111
|
+
const cachedObjectDiscriminatedUnionType = this.cachedObjectDiscriminatedUnionTypesByShapeIdentifier.get(astType.shapeIdentifier);
|
|
112
|
+
if (cachedObjectDiscriminatedUnionType) {
|
|
113
|
+
return cachedObjectDiscriminatedUnionType;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const objectDiscriminatedUnionType = new ObjectDiscriminatedUnionType({
|
|
117
117
|
comment: astType.comment,
|
|
118
118
|
configuration: this.configuration,
|
|
119
119
|
identifierType: Maybe.of(this.createIdentifierType(ast.StructCompoundType.identifierType(astType))),
|
|
@@ -129,8 +129,8 @@ export class TypeFactory {
|
|
|
129
129
|
shapeIdentifier: astType.shapeIdentifier,
|
|
130
130
|
synthetic: astType.synthetic,
|
|
131
131
|
});
|
|
132
|
-
this.
|
|
133
|
-
return
|
|
132
|
+
this.cachedObjectDiscriminatedUnionTypesByShapeIdentifier.set(astType.shapeIdentifier, objectDiscriminatedUnionType);
|
|
133
|
+
return objectDiscriminatedUnionType;
|
|
134
134
|
}
|
|
135
135
|
createType(astType, parameters) {
|
|
136
136
|
switch (astType.kind) {
|
|
@@ -162,15 +162,15 @@ export class TypeFactory {
|
|
|
162
162
|
return this.createObjectType(astType);
|
|
163
163
|
case "Term":
|
|
164
164
|
return this.createTermType(astType);
|
|
165
|
-
case "
|
|
166
|
-
return this.
|
|
165
|
+
case "DiscriminatedUnion":
|
|
166
|
+
return this.createDiscriminatedUnionType(astType);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
|
|
170
|
-
if (astType.
|
|
171
|
-
return this.
|
|
169
|
+
createDiscriminatedUnionType(astType) {
|
|
170
|
+
if (astType.isStructDiscriminatedUnionType()) {
|
|
171
|
+
return this.createObjectDiscriminatedUnionType(astType);
|
|
172
172
|
}
|
|
173
|
-
return new
|
|
173
|
+
return new DiscriminatedUnionType({
|
|
174
174
|
comment: astType.comment,
|
|
175
175
|
configuration: this.configuration,
|
|
176
176
|
identifierType: Maybe.empty(),
|
|
@@ -34,13 +34,13 @@ export namespace ${tsNamedObjectType.name.unsafeCoerce()} {
|
|
|
34
34
|
}`);
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
|
-
case "
|
|
38
|
-
const
|
|
37
|
+
case "DiscriminatedUnion": {
|
|
38
|
+
const tsNamedDiscriminatedUnionType = typeFactory.createDiscriminatedUnionType(astNamedType);
|
|
39
39
|
declarations.push(code `\
|
|
40
|
-
export namespace ${
|
|
41
|
-
${
|
|
40
|
+
export namespace ${tsNamedDiscriminatedUnionType.name.unsafeCoerce()} {
|
|
41
|
+
${tsNamedDiscriminatedUnionType.jsonTypeAliasDeclaration}
|
|
42
42
|
export namespace Json {
|
|
43
|
-
${
|
|
43
|
+
${tsNamedDiscriminatedUnionType.jsonSchemaFunctionDeclaration}
|
|
44
44
|
}
|
|
45
45
|
}`);
|
|
46
46
|
break;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Code } from "../ts-poet-wrapper.js";
|
|
2
|
+
import type { AbstractType_JsType } from "./AbstractType_JsType.js";
|
|
3
|
+
export interface AbstractType_ConversionFunction {
|
|
4
|
+
readonly code: Code;
|
|
5
|
+
readonly sourceTypes: {
|
|
6
|
+
readonly expression: Code;
|
|
7
|
+
readonly jsType: AbstractType_JsType;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AbstractType_ConversionFunction.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface AbstractType_DiscriminantProperty {
|
|
2
|
+
readonly jsonName: string;
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly values: readonly AbstractType_DiscriminantProperty.Value[];
|
|
5
|
+
}
|
|
6
|
+
export declare namespace AbstractType_DiscriminantProperty {
|
|
7
|
+
type Value = number | string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=AbstractType_DiscriminantProperty.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Reusables } from "../Reusables.js";
|
|
2
|
+
import { type Code } from "../ts-poet-wrapper.js";
|
|
3
|
+
export declare class AbstractType_GraphqlType {
|
|
4
|
+
/**
|
|
5
|
+
* Is the type nullable in GraphQL?
|
|
6
|
+
*/
|
|
7
|
+
readonly nullable: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The expression of the type when it's nullable -- so it should never include "new graphql.GraphQLNonNull(...)" around it.
|
|
10
|
+
*/
|
|
11
|
+
readonly nullableExpression: Code;
|
|
12
|
+
private readonly reusables;
|
|
13
|
+
constructor(nullableExpression: Code, reusables: Reusables, options?: {
|
|
14
|
+
nullable: boolean;
|
|
15
|
+
});
|
|
16
|
+
get expression(): Code;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=AbstractType_GraphqlType.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Memoize } from "typescript-memoize";
|
|
8
|
+
import { code } from "../ts-poet-wrapper.js";
|
|
9
|
+
export class AbstractType_GraphqlType {
|
|
10
|
+
/**
|
|
11
|
+
* Is the type nullable in GraphQL?
|
|
12
|
+
*/
|
|
13
|
+
nullable;
|
|
14
|
+
/**
|
|
15
|
+
* The expression of the type when it's nullable -- so it should never include "new graphql.GraphQLNonNull(...)" around it.
|
|
16
|
+
*/
|
|
17
|
+
nullableExpression;
|
|
18
|
+
reusables;
|
|
19
|
+
constructor(nullableExpression, reusables, options) {
|
|
20
|
+
this.nullable = !!options?.nullable;
|
|
21
|
+
this.nullableExpression = nullableExpression;
|
|
22
|
+
this.reusables = reusables;
|
|
23
|
+
}
|
|
24
|
+
get expression() {
|
|
25
|
+
return this.nullable
|
|
26
|
+
? this.nullableExpression
|
|
27
|
+
: code `new ${this.reusables.imports.GraphQLNonNull}(${this.nullableExpression})`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
Memoize()
|
|
32
|
+
], AbstractType_GraphqlType.prototype, "expression", null);
|
|
33
|
+
//# sourceMappingURL=AbstractType_GraphqlType.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Code } from "../ts-poet-wrapper.js";
|
|
2
|
+
export type AbstractType_JsType = {
|
|
3
|
+
typeof: "bigint";
|
|
4
|
+
} | {
|
|
5
|
+
typeof: "boolean";
|
|
6
|
+
} | {
|
|
7
|
+
typeof: "function";
|
|
8
|
+
} | {
|
|
9
|
+
typeof: "number";
|
|
10
|
+
} | {
|
|
11
|
+
instanceof: "Array";
|
|
12
|
+
typeof: "object";
|
|
13
|
+
} | {
|
|
14
|
+
className: Code;
|
|
15
|
+
instanceof: "class";
|
|
16
|
+
typeof: "object";
|
|
17
|
+
} | {
|
|
18
|
+
instanceof: "Date";
|
|
19
|
+
typeof: "object";
|
|
20
|
+
} | {
|
|
21
|
+
instanceof: "Maybe";
|
|
22
|
+
typeof: "object";
|
|
23
|
+
} | {
|
|
24
|
+
instanceof: "Object";
|
|
25
|
+
typeof: "object";
|
|
26
|
+
} | {
|
|
27
|
+
typeof: "string";
|
|
28
|
+
} | {
|
|
29
|
+
typeof: "undefined";
|
|
30
|
+
};
|
|
31
|
+
export declare namespace AbstractType_JsType {
|
|
32
|
+
function equals(left: AbstractType_JsType, right: AbstractType_JsType): boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=AbstractType_JsType.d.ts.map
|