@shaclmate/compiler 2.0.22 → 2.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/ShapesGraphToAstTransformer.d.ts +6 -5
  2. package/dist/ShapesGraphToAstTransformer.js +61 -17
  3. package/dist/_ShapesGraphToAstTransformer/InheritableShapeConstraints.d.ts +2 -0
  4. package/dist/_ShapesGraphToAstTransformer/InheritableShapeConstraints.js +2 -0
  5. package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +15 -0
  6. package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +51 -0
  7. package/dist/_ShapesGraphToAstTransformer/flattenAstObjectCompositeTypeMemberTypes.d.ts +13 -0
  8. package/dist/_ShapesGraphToAstTransformer/flattenAstObjectCompositeTypeMemberTypes.js +51 -0
  9. package/dist/_ShapesGraphToAstTransformer/index.d.ts +5 -5
  10. package/dist/_ShapesGraphToAstTransformer/index.js +5 -5
  11. package/dist/_ShapesGraphToAstTransformer/shapeAstName.js +53 -12
  12. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +5 -0
  13. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +130 -54
  14. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +175 -5
  15. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompositeType.d.ts +10 -0
  16. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompositeType.js +185 -0
  17. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstIdentifierType.d.ts +10 -0
  18. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstIdentifierType.js +32 -0
  19. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstLiteralType.d.ts +10 -0
  20. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstLiteralType.js +46 -0
  21. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +12 -0
  22. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +24 -0
  23. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +13 -0
  24. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +14 -0
  25. package/dist/ast/Ast.d.ts +0 -1
  26. package/dist/ast/Curie.d.ts +14 -0
  27. package/dist/ast/Curie.js +21 -0
  28. package/dist/ast/IdentifierType.d.ts +3 -2
  29. package/dist/ast/ListType.d.ts +2 -1
  30. package/dist/ast/LiteralType.d.ts +1 -1
  31. package/dist/ast/Name.d.ts +40 -5
  32. package/dist/ast/ObjectCompositeType.d.ts +11 -0
  33. package/dist/ast/ObjectType.d.ts +18 -13
  34. package/dist/ast/ObjectUnionType.d.ts +0 -11
  35. package/dist/ast/OptionType.d.ts +2 -4
  36. package/dist/ast/SetType.d.ts +2 -7
  37. package/dist/ast/TermType.d.ts +12 -4
  38. package/dist/ast/Type.d.ts +1 -1
  39. package/dist/ast/index.d.ts +1 -0
  40. package/dist/ast/index.js +1 -0
  41. package/dist/enums/TsFeature.d.ts +1 -4
  42. package/dist/enums/TsFeature.js +1 -15
  43. package/dist/generators/json/AstJsonGenerator.js +26 -4
  44. package/dist/generators/ts/BooleanType.d.ts +4 -2
  45. package/dist/generators/ts/BooleanType.js +12 -3
  46. package/dist/generators/ts/DateTimeType.d.ts +9 -8
  47. package/dist/generators/ts/DateTimeType.js +32 -8
  48. package/dist/generators/ts/DateType.d.ts +5 -2
  49. package/dist/generators/ts/DateType.js +15 -1
  50. package/dist/generators/ts/DeclaredType.d.ts +2 -2
  51. package/dist/generators/ts/DeclaredType.js +2 -2
  52. package/dist/generators/ts/FloatType.d.ts +6 -0
  53. package/dist/generators/ts/FloatType.js +18 -0
  54. package/dist/generators/ts/IdentifierType.d.ts +17 -7
  55. package/dist/generators/ts/IdentifierType.js +112 -18
  56. package/dist/generators/ts/Import.d.ts +2 -0
  57. package/dist/generators/ts/Import.js +10 -0
  58. package/dist/generators/ts/IntType.d.ts +6 -0
  59. package/dist/generators/ts/IntType.js +18 -0
  60. package/dist/generators/ts/ListType.d.ts +15 -12
  61. package/dist/generators/ts/ListType.js +113 -61
  62. package/dist/generators/ts/LiteralType.d.ts +17 -9
  63. package/dist/generators/ts/LiteralType.js +92 -17
  64. package/dist/generators/ts/NumberType.d.ts +3 -2
  65. package/dist/generators/ts/NumberType.js +8 -3
  66. package/dist/generators/ts/ObjectType.d.ts +65 -43
  67. package/dist/generators/ts/ObjectType.js +143 -123
  68. package/dist/generators/ts/ObjectUnionType.d.ts +50 -8
  69. package/dist/generators/ts/ObjectUnionType.js +303 -101
  70. package/dist/generators/ts/OptionType.d.ts +14 -10
  71. package/dist/generators/ts/OptionType.js +62 -34
  72. package/dist/generators/ts/PrimitiveType.d.ts +23 -5
  73. package/dist/generators/ts/PrimitiveType.js +34 -6
  74. package/dist/generators/ts/SetType.d.ts +17 -13
  75. package/dist/generators/ts/SetType.js +76 -44
  76. package/dist/generators/ts/SnippetDeclarations.d.ts +13 -8
  77. package/dist/generators/ts/SnippetDeclarations.js +226 -101
  78. package/dist/generators/ts/StringType.d.ts +4 -2
  79. package/dist/generators/ts/StringType.js +20 -8
  80. package/dist/generators/ts/TermType.d.ts +29 -33
  81. package/dist/generators/ts/TermType.js +89 -68
  82. package/dist/generators/ts/TsGenerator.d.ts +2 -1
  83. package/dist/generators/ts/TsGenerator.js +26 -12
  84. package/dist/generators/ts/Type.d.ts +100 -32
  85. package/dist/generators/ts/Type.js +58 -54
  86. package/dist/generators/ts/TypeFactory.d.ts +12 -5
  87. package/dist/generators/ts/TypeFactory.js +380 -226
  88. package/dist/generators/ts/UnionType.d.ts +14 -10
  89. package/dist/generators/ts/UnionType.js +319 -142
  90. package/dist/generators/ts/_ObjectType/EagerShaclProperty.d.ts +12 -0
  91. package/dist/generators/ts/_ObjectType/EagerShaclProperty.js +31 -0
  92. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +13 -12
  93. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +59 -46
  94. package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +20 -13
  95. package/dist/generators/ts/_ObjectType/IdentifierProperty.js +198 -140
  96. package/dist/generators/ts/_ObjectType/LazyShaclProperty.d.ts +100 -0
  97. package/dist/generators/ts/_ObjectType/LazyShaclProperty.js +315 -0
  98. package/dist/generators/ts/_ObjectType/Property.d.ts +47 -46
  99. package/dist/generators/ts/_ObjectType/Property.js +1 -10
  100. package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +25 -30
  101. package/dist/generators/ts/_ObjectType/ShaclProperty.js +120 -85
  102. package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +21 -17
  103. package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +61 -53
  104. package/dist/generators/ts/_ObjectType/classDeclaration.js +22 -17
  105. package/dist/generators/ts/_ObjectType/createFunctionDeclaration.js +26 -13
  106. package/dist/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +8 -5
  107. package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.d.ts +1 -1
  108. package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.js +8 -5
  109. package/dist/generators/ts/_ObjectType/graphqlTypeVariableStatement.d.ts +5 -0
  110. package/dist/generators/ts/_ObjectType/graphqlTypeVariableStatement.js +49 -0
  111. package/dist/generators/ts/_ObjectType/hashFunctionOrMethodDeclarations.js +7 -8
  112. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +7 -0
  113. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +54 -0
  114. package/dist/generators/ts/_ObjectType/index.d.ts +9 -7
  115. package/dist/generators/ts/_ObjectType/index.js +9 -7
  116. package/dist/generators/ts/_ObjectType/interfaceDeclaration.js +1 -1
  117. package/dist/generators/ts/_ObjectType/jsonFunctionDeclarations.d.ts +4 -0
  118. package/dist/generators/ts/_ObjectType/jsonFunctionDeclarations.js +189 -0
  119. package/dist/generators/ts/_ObjectType/jsonTypeAliasDeclaration.d.ts +5 -0
  120. package/dist/generators/ts/_ObjectType/jsonTypeAliasDeclaration.js +28 -0
  121. package/dist/generators/ts/_ObjectType/objectSetMethodNames.d.ts +9 -0
  122. package/dist/generators/ts/_ObjectType/objectSetMethodNames.js +18 -0
  123. package/dist/generators/ts/_ObjectType/propertiesVariableStatement.d.ts +5 -0
  124. package/dist/generators/ts/_ObjectType/propertiesVariableStatement.js +37 -0
  125. package/dist/generators/ts/_ObjectType/rdfFunctionDeclarations.d.ts +4 -0
  126. package/dist/generators/ts/_ObjectType/rdfFunctionDeclarations.js +144 -0
  127. package/dist/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.d.ts +1 -1
  128. package/dist/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.js +6 -5
  129. package/dist/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.d.ts +1 -1
  130. package/dist/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.js +4 -3
  131. package/dist/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +109 -37
  132. package/dist/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +6 -6
  133. package/dist/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +33 -24
  134. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +9 -0
  135. package/dist/generators/ts/graphqlSchemaVariableStatement.js +86 -0
  136. package/dist/generators/ts/objectSetDeclarations.d.ts +8 -0
  137. package/dist/generators/ts/objectSetDeclarations.js +59 -0
  138. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +8 -0
  139. package/dist/generators/ts/objectSetInterfaceDeclaration.js +46 -0
  140. package/dist/generators/ts/objectSetMethodSignatures.d.ts +11 -0
  141. package/dist/generators/ts/objectSetMethodSignatures.js +52 -0
  142. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +8 -0
  143. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +393 -0
  144. package/dist/generators/ts/rdfjsTermExpression.d.ts +3 -0
  145. package/dist/generators/ts/rdfjsTermExpression.js +57 -0
  146. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +8 -0
  147. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +415 -0
  148. package/dist/generators/ts/syntheticNamePrefix.d.ts +2 -0
  149. package/dist/generators/ts/syntheticNamePrefix.js +2 -0
  150. package/dist/generators/ts/tsName.js +27 -13
  151. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +10 -0
  152. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +19 -0
  153. package/dist/input/NodeShape.d.ts +6 -8
  154. package/dist/input/NodeShape.js +20 -44
  155. package/dist/input/Ontology.d.ts +0 -3
  156. package/dist/input/Ontology.js +0 -9
  157. package/dist/input/PropertyPath.d.ts +5 -5
  158. package/dist/input/PropertyPath.js +14 -24
  159. package/dist/input/PropertyShape.d.ts +3 -1
  160. package/dist/input/PropertyShape.js +8 -2
  161. package/dist/input/ShapesGraph.js +4 -8
  162. package/dist/input/generated.d.ts +967 -107
  163. package/dist/input/generated.js +2548 -1046
  164. package/dist/input/tsFeatures.d.ts +3 -2
  165. package/dist/input/tsFeatures.js +44 -27
  166. package/package.json +18 -16
  167. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.d.ts +0 -13
  168. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +0 -200
  169. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.d.ts +0 -12
  170. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.js +0 -29
  171. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.d.ts +0 -12
  172. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.js +0 -43
  173. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.d.ts +0 -14
  174. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.js +0 -21
  175. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.d.ts +0 -16
  176. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.js +0 -60
  177. package/dist/generators/ts/_ObjectType/fromJsonFunctionDeclarations.d.ts +0 -4
  178. package/dist/generators/ts/_ObjectType/fromJsonFunctionDeclarations.js +0 -78
  179. package/dist/generators/ts/_ObjectType/fromRdfFunctionDeclarations.d.ts +0 -4
  180. package/dist/generators/ts/_ObjectType/fromRdfFunctionDeclarations.js +0 -91
  181. package/dist/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.d.ts +0 -5
  182. package/dist/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.js +0 -19
  183. package/dist/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.d.ts +0 -5
  184. package/dist/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.js +0 -31
  185. package/dist/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  186. package/dist/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.js +0 -37
  187. package/dist/generators/ts/_ObjectType/rdfjsTermExpression.d.ts +0 -6
  188. package/dist/generators/ts/_ObjectType/rdfjsTermExpression.js +0 -17
  189. package/dist/generators/ts/_ObjectType/toJsonFunctionDeclaration.d.ts +0 -5
  190. package/dist/generators/ts/_ObjectType/toJsonFunctionDeclaration.js +0 -19
  191. package/dist/generators/ts/_ObjectType/toJsonReturnType.d.ts +0 -3
  192. package/dist/generators/ts/_ObjectType/toJsonReturnType.js +0 -17
  193. package/dist/generators/ts/_ObjectType/toRdfFunctionDeclaration.d.ts +0 -5
  194. package/dist/generators/ts/_ObjectType/toRdfFunctionDeclaration.js +0 -19
@@ -1,6 +1,7 @@
1
1
  import { Maybe } from "purify-ts";
2
2
  import { invariant } from "ts-invariant";
3
3
  import { StructureKind } from "ts-morph";
4
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
5
  export function createFunctionDeclaration() {
5
6
  if (!this.features.has("create")) {
6
7
  return Maybe.empty();
@@ -11,23 +12,34 @@ export function createFunctionDeclaration() {
11
12
  if (this.extern) {
12
13
  return Maybe.empty();
13
14
  }
14
- const parametersPropertySignatures = this.properties.flatMap((property) => property.constructorParametersPropertySignature
15
- .map((propertySignature) => `readonly ${propertySignature.name}${propertySignature.hasQuestionToken ? "?" : ""}: ${propertySignature.type}`)
16
- .toList());
17
- // Should always have at least an identifier
18
- invariant(parametersPropertySignatures.length > 0);
19
- const parametersType = [`{ ${parametersPropertySignatures.join(", ")} }`]
20
- .concat(this.parentObjectTypes.map((parentObjectType) => `Parameters<typeof ${parentObjectType.name}.create>[0]`))
21
- .join(" & ");
15
+ const parametersPropertySignatures = this.properties.flatMap((property) => property.constructorParametersPropertySignature.toList());
16
+ const parametersType = [];
17
+ if (parametersPropertySignatures.length > 0) {
18
+ parametersType.push(`{ ${parametersPropertySignatures
19
+ .map((propertySignature) => `readonly ${propertySignature.name}${propertySignature.hasQuestionToken ? "?" : ""}: ${propertySignature.type}`)
20
+ .join(", ")} }`);
21
+ }
22
+ for (const parentObjectType of this.parentObjectTypes) {
23
+ parametersType.push(`Parameters<typeof ${parentObjectType.staticModuleName}.${syntheticNamePrefix}create>[0]`);
24
+ }
25
+ if (parametersType.length === 0) {
26
+ parametersType.push("object");
27
+ }
22
28
  const propertyInitializers = [];
23
29
  const omitPropertyNames = [];
24
30
  const propertyStatements = [];
25
31
  for (const parentObjectType of this.parentObjectTypes) {
26
- propertyInitializers.push(`...${parentObjectType.name}.create(parameters)`);
32
+ propertyInitializers.push(`...${parentObjectType.staticModuleName}.${syntheticNamePrefix}create(parameters)`);
27
33
  }
34
+ const parametersHasQuestionToken = this.parentObjectTypes.length === 0 &&
35
+ parametersPropertySignatures.every((propertySignature) => !!propertySignature.hasQuestionToken);
36
+ const parametersVariable = `parameters${parametersHasQuestionToken ? "?" : ""}`;
28
37
  for (const property of this.properties) {
29
- const thisPropertyStatements = property.interfaceConstructorStatements({
30
- variables: { parameter: `parameters.${property.name}` },
38
+ const thisPropertyStatements = property.constructorStatements({
39
+ variables: {
40
+ parameter: `${parametersVariable}.${property.name}`,
41
+ parameters: parametersVariable,
42
+ },
31
43
  });
32
44
  if (thisPropertyStatements.length > 0) {
33
45
  propertyInitializers.push(property.name);
@@ -42,11 +54,12 @@ export function createFunctionDeclaration() {
42
54
  return Maybe.of({
43
55
  isExported: true,
44
56
  kind: StructureKind.Function,
45
- name: "create",
57
+ name: `${syntheticNamePrefix}create`,
46
58
  parameters: [
47
59
  {
60
+ hasQuestionToken: parametersHasQuestionToken,
48
61
  name: "parameters",
49
- type: parametersType,
62
+ type: parametersType.join(" & "),
50
63
  },
51
64
  ],
52
65
  returnType: omitPropertyNames.length === 0
@@ -1,4 +1,5 @@
1
1
  import { Maybe } from "purify-ts";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
3
  export function equalsFunctionOrMethodDeclaration() {
3
4
  if (!this.features.has("equals")) {
4
5
  return Maybe.empty();
@@ -23,25 +24,27 @@ export function equalsFunctionOrMethodDeclaration() {
23
24
  if (this.parentObjectTypes.length > 0) {
24
25
  switch (this.declarationType) {
25
26
  case "class": {
26
- chain.push("super.equals(other)");
27
+ chain.push(`super.${syntheticNamePrefix}equals(other)`);
27
28
  hasOverrideKeyword = true;
28
29
  break;
29
30
  }
30
31
  case "interface": {
31
32
  // For every parent, find the nearest equals implementation
32
33
  for (const parentObjectType of this.parentObjectTypes) {
33
- chain.push(`${parentObjectType.name}.equals(left, right)`);
34
+ chain.push(`${parentObjectType.staticModuleName}.${syntheticNamePrefix}equals(left, right)`);
34
35
  }
35
36
  break;
36
37
  }
37
38
  }
38
39
  }
39
40
  for (const property of this.ownProperties) {
40
- chain.push(`(${property.equalsFunction})(${leftVariable}.${property.name}, ${rightVariable}.${property.name}).mapLeft(propertyValuesUnequal => ({ left: ${leftVariable}, right: ${rightVariable}, propertyName: "${property.name}", propertyValuesUnequal, type: "Property" as const }))`);
41
+ property.equalsFunction.ifJust((equalsFunction) => {
42
+ chain.push(`(${equalsFunction})(${leftVariable}.${property.name}, ${rightVariable}.${property.name}).mapLeft(propertyValuesUnequal => ({ left: ${leftVariable}, right: ${rightVariable}, propertyName: "${property.name}", propertyValuesUnequal, type: "Property" as const }))`);
43
+ });
41
44
  }
42
45
  return Maybe.of({
43
46
  hasOverrideKeyword,
44
- name: "equals",
47
+ name: `${syntheticNamePrefix}equals`,
45
48
  parameters: this.declarationType === "interface"
46
49
  ? [
47
50
  {
@@ -59,7 +62,7 @@ export function equalsFunctionOrMethodDeclaration() {
59
62
  type: this.name,
60
63
  },
61
64
  ],
62
- returnType: "EqualsResult",
65
+ returnType: `${syntheticNamePrefix}EqualsResult`,
63
66
  statements: [
64
67
  `return ${chain
65
68
  .map((chainPart, chainPartI) => chainPartI === 0 ? chainPart : `chain(() => ${chainPart})`)
@@ -1,5 +1,5 @@
1
1
  import { Maybe } from "purify-ts";
2
2
  import { type VariableStatementStructure } from "ts-morph";
3
3
  import type { ObjectType } from "../ObjectType.js";
4
- export declare function fromRdfTypeVariableDeclaration(this: ObjectType): Maybe<VariableStatementStructure>;
4
+ export declare function fromRdfTypeVariableStatement(this: ObjectType): Maybe<VariableStatementStructure>;
5
5
  //# sourceMappingURL=fromRdfTypeVariableStatement.d.ts.map
@@ -1,7 +1,9 @@
1
1
  import { Maybe } from "purify-ts";
2
- import { StructureKind } from "ts-morph";
3
- export function fromRdfTypeVariableDeclaration() {
4
- if (!this.features.has("fromRdf")) {
2
+ import { StructureKind, VariableDeclarationKind, } from "ts-morph";
3
+ import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
4
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
5
+ export function fromRdfTypeVariableStatement() {
6
+ if (!this.features.has("rdf")) {
5
7
  return Maybe.empty();
6
8
  }
7
9
  if (this.extern) {
@@ -11,11 +13,12 @@ export function fromRdfTypeVariableDeclaration() {
11
13
  return Maybe.empty();
12
14
  }
13
15
  return Maybe.of({
16
+ declarationKind: VariableDeclarationKind.Const,
14
17
  kind: StructureKind.VariableStatement,
15
18
  declarations: [
16
19
  {
17
- name: "fromRdfType",
18
- initializer: this.rdfjsTermExpression(this.fromRdfType.unsafeCoerce()),
20
+ name: `${syntheticNamePrefix}fromRdfType`,
21
+ initializer: rdfjsTermExpression(this.fromRdfType.unsafeCoerce()),
19
22
  type: "rdfjs.NamedNode<string>",
20
23
  },
21
24
  ],
@@ -0,0 +1,5 @@
1
+ import { type VariableStatementStructure } from "ts-morph";
2
+ import { Maybe } from "purify-ts";
3
+ import type { ObjectType } from "../ObjectType.js";
4
+ export declare function graphqlTypeVariableStatement(this: ObjectType): Maybe<VariableStatementStructure>;
5
+ //# sourceMappingURL=graphqlTypeVariableStatement.d.ts.map
@@ -0,0 +1,49 @@
1
+ import { StructureKind, VariableDeclarationKind, } from "ts-morph";
2
+ import { Maybe } from "purify-ts";
3
+ import { objectInitializer } from "../objectInitializer.js";
4
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
5
+ export function graphqlTypeVariableStatement() {
6
+ if (!this.features.has("graphql")) {
7
+ return Maybe.empty();
8
+ }
9
+ if (this.extern) {
10
+ return Maybe.empty();
11
+ }
12
+ if (this.synthetic) {
13
+ return Maybe.empty();
14
+ }
15
+ return Maybe.of({
16
+ declarationKind: VariableDeclarationKind.Const,
17
+ kind: StructureKind.VariableStatement,
18
+ declarations: [
19
+ {
20
+ name: `${syntheticNamePrefix}GraphQL`,
21
+ initializer: `new graphql.GraphQLObjectType<${this.name}, { objectSet: ${syntheticNamePrefix}ObjectSet }>(${objectInitializer({
22
+ description: this.comment.map(JSON.stringify).extract(),
23
+ fields: `() => (${objectInitializer(this.properties.reduce((fields, property) => {
24
+ property.graphqlField.ifJust((field) => {
25
+ fields[field.name] = objectInitializer({
26
+ args: field.args
27
+ .map((args) => objectInitializer(Object.entries(args).reduce((argObjects, [argName, arg]) => {
28
+ argObjects[argName] = objectInitializer(arg);
29
+ return argObjects;
30
+ }, {})))
31
+ .extract(),
32
+ description: field.description
33
+ .map(JSON.stringify)
34
+ .extract(),
35
+ name: JSON.stringify(field.name),
36
+ resolve: field.resolve,
37
+ type: field.type,
38
+ });
39
+ });
40
+ return fields;
41
+ }, {}))})`,
42
+ name: `"${this.name}"`,
43
+ })})`,
44
+ },
45
+ ],
46
+ isExported: true,
47
+ });
48
+ }
49
+ //# sourceMappingURL=graphqlTypeVariableStatement.js.map
@@ -1,5 +1,6 @@
1
1
  import { Scope, } from "ts-morph";
2
2
  import { ObjectType } from "../ObjectType.js";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
4
  const hasherVariable = "_hasher";
4
5
  export const hasherTypeConstraint = "{ update: (message: string | number[] | ArrayBuffer | Uint8Array) => void; }";
5
6
  export function hashFunctionOrMethodDeclarations() {
@@ -35,13 +36,13 @@ export function hashFunctionOrMethodDeclarations() {
35
36
  if (this.parentObjectTypes.length > 0) {
36
37
  switch (this.declarationType) {
37
38
  case "class": {
38
- hashShaclPropertiesStatements.push(`super.hashShaclProperties(${hasherVariable});`);
39
+ hashShaclPropertiesStatements.push(`super.${syntheticNamePrefix}hashShaclProperties(${hasherVariable});`);
39
40
  hasOverrideKeyword = true;
40
41
  break;
41
42
  }
42
43
  case "interface": {
43
44
  for (const parentObjectType of this.parentObjectTypes) {
44
- hashShaclPropertiesStatements.push(`${parentObjectType.name}.${parentObjectType.hashShaclPropertiesFunctionName}(${this.thisVariable}, ${hasherVariable});`);
45
+ hashShaclPropertiesStatements.push(`${parentObjectType.staticModuleName}.${syntheticNamePrefix}hashShaclProperties(${this.thisVariable}, ${hasherVariable});`);
45
46
  }
46
47
  break;
47
48
  }
@@ -58,7 +59,7 @@ export function hashFunctionOrMethodDeclarations() {
58
59
  return [
59
60
  {
60
61
  hasOverrideKeyword,
61
- name: this.declarationType === "class" ? "hash" : this.hashFunctionName,
62
+ name: `${syntheticNamePrefix}hash`,
62
63
  parameters,
63
64
  returnType,
64
65
  statements: [
@@ -72,17 +73,15 @@ export function hashFunctionOrMethodDeclarations() {
72
73
  },
73
74
  })),
74
75
  this.declarationType === "class"
75
- ? `this.hashShaclProperties(${hasherVariable});`
76
- : `${this.name}.${this.hashShaclPropertiesFunctionName}(${this.thisVariable}, ${hasherVariable});`,
76
+ ? `this.${syntheticNamePrefix}hashShaclProperties(${hasherVariable});`
77
+ : `${this.staticModuleName}.${syntheticNamePrefix}hashShaclProperties(${this.thisVariable}, ${hasherVariable});`,
77
78
  `return ${hasherVariable};`,
78
79
  ],
79
80
  typeParameters,
80
81
  },
81
82
  {
82
83
  hasOverrideKeyword,
83
- name: this.declarationType === "class"
84
- ? "hashShaclProperties"
85
- : this.hashShaclPropertiesFunctionName,
84
+ name: `${syntheticNamePrefix}hashShaclProperties`,
86
85
  parameters,
87
86
  returnType,
88
87
  scope: this.declarationType === "class" ? Scope.Protected : undefined,
@@ -0,0 +1,7 @@
1
+ import { type VariableStatementStructure } from "ts-morph";
2
+ import { type FunctionDeclarationStructure, type ModuleDeclarationStructure, type TypeAliasDeclarationStructure } from "ts-morph";
3
+ import type { ObjectType } from "../ObjectType.js";
4
+ type IdentifierTypeDeclarations = readonly (FunctionDeclarationStructure | ModuleDeclarationStructure | TypeAliasDeclarationStructure | VariableStatementStructure)[];
5
+ export declare function identifierTypeDeclarations(this: ObjectType): IdentifierTypeDeclarations;
6
+ export {};
7
+ //# sourceMappingURL=identifierTypeDeclarations.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { VariableDeclarationKind, } from "ts-morph";
2
+ import { StructureKind, } from "ts-morph";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
+ export function identifierTypeDeclarations() {
5
+ if (this.extern) {
6
+ return [];
7
+ }
8
+ const ancestorObjectTypeWithSameIdentifierType = this.ancestorObjectTypes.find((ancestorObjectType) => ancestorObjectType.identifierType.name === this.identifierType.name);
9
+ if (ancestorObjectTypeWithSameIdentifierType) {
10
+ return reExportAncestorIdentifierTypeDeclarations(ancestorObjectTypeWithSameIdentifierType);
11
+ }
12
+ // Bespoke identifier type and associated functions
13
+ return [
14
+ {
15
+ isExported: true,
16
+ kind: StructureKind.TypeAlias,
17
+ name: `${syntheticNamePrefix}Identifier`,
18
+ type: this.identifierType.name,
19
+ },
20
+ {
21
+ isExported: true,
22
+ kind: StructureKind.Module,
23
+ name: `${syntheticNamePrefix}Identifier`,
24
+ statements: [
25
+ this.identifierType.fromStringFunctionDeclaration,
26
+ this.identifierType.toStringFunctionDeclaration,
27
+ ],
28
+ },
29
+ ];
30
+ }
31
+ function reExportAncestorIdentifierTypeDeclarations(ancestorObjectType) {
32
+ // This object type's identifier type has the same identifier type as an ancestor object type,
33
+ // so just reuse the latter.
34
+ return [
35
+ {
36
+ isExported: true,
37
+ kind: StructureKind.TypeAlias,
38
+ name: `${syntheticNamePrefix}Identifier`,
39
+ type: ancestorObjectType.identifierTypeAlias,
40
+ },
41
+ {
42
+ isExported: true,
43
+ kind: StructureKind.VariableStatement,
44
+ declarationKind: VariableDeclarationKind.Const,
45
+ declarations: [
46
+ {
47
+ initializer: ancestorObjectType.identifierTypeAlias,
48
+ name: `${syntheticNamePrefix}Identifier`,
49
+ },
50
+ ],
51
+ },
52
+ ];
53
+ }
54
+ //# sourceMappingURL=identifierTypeDeclarations.js.map
@@ -1,20 +1,22 @@
1
1
  export * from "./classDeclaration.js";
2
2
  export * from "./createFunctionDeclaration.js";
3
+ export * from "./EagerShaclProperty.js";
3
4
  export * from "./equalsFunctionDeclaration.js";
4
- export * from "./fromJsonFunctionDeclarations.js";
5
- export * from "./fromRdfFunctionDeclarations.js";
6
5
  export * from "./fromRdfTypeVariableStatement.js";
6
+ export * from "./graphqlTypeVariableStatement.js";
7
7
  export * from "./hashFunctionDeclarations.js";
8
+ export * from "./identifierTypeDeclarations.js";
8
9
  export * from "./IdentifierPrefixProperty.js";
9
10
  export * from "./IdentifierProperty.js";
10
11
  export * from "./interfaceDeclaration.js";
11
- export * from "./jsonSchemaFunctionDeclaration.js";
12
- export * from "./jsonUiSchemaFunctionDeclaration.js";
13
- export * from "./jsonZodSchemaFunctionDeclaration.js";
12
+ export * from "./jsonFunctionDeclarations.js";
13
+ export * from "./jsonTypeAliasDeclaration.js";
14
+ export * from "./LazyShaclProperty.js";
15
+ export * from "./objectSetMethodNames.js";
16
+ export * from "./propertiesVariableStatement.js";
14
17
  export * from "./Property.js";
18
+ export * from "./rdfFunctionDeclarations.js";
15
19
  export * from "./ShaclProperty.js";
16
20
  export * from "./sparqlFunctionDeclarations.js";
17
- export * from "./toJsonFunctionDeclaration.js";
18
- export * from "./toRdfFunctionDeclaration.js";
19
21
  export * from "./TypeDiscriminatorProperty.js";
20
22
  //# sourceMappingURL=index.d.ts.map
@@ -1,20 +1,22 @@
1
1
  export * from "./classDeclaration.js";
2
2
  export * from "./createFunctionDeclaration.js";
3
+ export * from "./EagerShaclProperty.js";
3
4
  export * from "./equalsFunctionDeclaration.js";
4
- export * from "./fromJsonFunctionDeclarations.js";
5
- export * from "./fromRdfFunctionDeclarations.js";
6
5
  export * from "./fromRdfTypeVariableStatement.js";
6
+ export * from "./graphqlTypeVariableStatement.js";
7
7
  export * from "./hashFunctionDeclarations.js";
8
+ export * from "./identifierTypeDeclarations.js";
8
9
  export * from "./IdentifierPrefixProperty.js";
9
10
  export * from "./IdentifierProperty.js";
10
11
  export * from "./interfaceDeclaration.js";
11
- export * from "./jsonSchemaFunctionDeclaration.js";
12
- export * from "./jsonUiSchemaFunctionDeclaration.js";
13
- export * from "./jsonZodSchemaFunctionDeclaration.js";
12
+ export * from "./jsonFunctionDeclarations.js";
13
+ export * from "./jsonTypeAliasDeclaration.js";
14
+ export * from "./LazyShaclProperty.js";
15
+ export * from "./objectSetMethodNames.js";
16
+ export * from "./propertiesVariableStatement.js";
14
17
  export * from "./Property.js";
18
+ export * from "./rdfFunctionDeclarations.js";
15
19
  export * from "./ShaclProperty.js";
16
20
  export * from "./sparqlFunctionDeclarations.js";
17
- export * from "./toJsonFunctionDeclaration.js";
18
- export * from "./toRdfFunctionDeclaration.js";
19
21
  export * from "./TypeDiscriminatorProperty.js";
20
22
  //# sourceMappingURL=index.js.map
@@ -8,7 +8,7 @@ export function interfaceDeclaration() {
8
8
  if (this.extern) {
9
9
  return Maybe.empty();
10
10
  }
11
- const properties = this.properties.flatMap((property) => property.interfacePropertySignature.toList());
11
+ const properties = this.properties.flatMap((property) => property.propertySignature.toList());
12
12
  return Maybe.of({
13
13
  extends: this.parentObjectTypes.map((parentObjectType) => parentObjectType.name),
14
14
  isExported: true,
@@ -0,0 +1,4 @@
1
+ import { type FunctionDeclarationStructure } from "ts-morph";
2
+ import type { ObjectType } from "../ObjectType.js";
3
+ export declare function jsonFunctionDeclarations(this: ObjectType): readonly FunctionDeclarationStructure[];
4
+ //# sourceMappingURL=jsonFunctionDeclarations.d.ts.map
@@ -0,0 +1,189 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { StructureKind } from "ts-morph";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
+ import { toJsonFunctionOrMethodDeclaration } from "./toJsonFunctionOrMethodDeclaration.js";
5
+ function fromJsonFunctionDeclarations() {
6
+ const deserializePropertiesReturnType = [];
7
+ const initializers = [];
8
+ const propertyReturnTypeSignatures = [];
9
+ const propertiesFromJsonStatements = [];
10
+ propertiesFromJsonStatements.push(`const ${syntheticNamePrefix}jsonSafeParseResult = ${syntheticNamePrefix}jsonZodSchema().safeParse(_json);`, `if (!${syntheticNamePrefix}jsonSafeParseResult.success) { return purify.Left(${syntheticNamePrefix}jsonSafeParseResult.error); }`, `const ${variables.jsonObject} = ${syntheticNamePrefix}jsonSafeParseResult.data;`);
11
+ this.parentObjectTypes.forEach((parentObjectType, parentObjectTypeI) => {
12
+ propertiesFromJsonStatements.push(`const ${syntheticNamePrefix}super${parentObjectTypeI}Either = ${parentObjectType.staticModuleName}.${syntheticNamePrefix}propertiesFromJson(${variables.jsonObject});`, `if (${syntheticNamePrefix}super${parentObjectTypeI}Either.isLeft()) { return ${syntheticNamePrefix}super${parentObjectTypeI}Either; }`, `const ${syntheticNamePrefix}super${parentObjectTypeI} = ${syntheticNamePrefix}super${parentObjectTypeI}Either.unsafeCoerce()`);
13
+ initializers.push(`...${syntheticNamePrefix}super${parentObjectTypeI}`);
14
+ deserializePropertiesReturnType.push(`${syntheticNamePrefix}UnwrapR<ReturnType<typeof ${parentObjectType.staticModuleName}.${syntheticNamePrefix}propertiesFromJson>>`);
15
+ });
16
+ for (const property of this.properties) {
17
+ const propertyFromJsonStatements = property.fromJsonStatements({
18
+ variables,
19
+ });
20
+ if (propertyFromJsonStatements.length > 0) {
21
+ propertiesFromJsonStatements.push(...propertyFromJsonStatements);
22
+ initializers.push(property.name);
23
+ propertyReturnTypeSignatures.push(`${property.name}: ${property.type.name};`);
24
+ }
25
+ }
26
+ propertiesFromJsonStatements.push(`return purify.Either.of({ ${initializers.join(", ")} })`);
27
+ if (propertyReturnTypeSignatures.length > 0) {
28
+ deserializePropertiesReturnType.splice(0, 0, `{ ${propertyReturnTypeSignatures.join(" ")} }`);
29
+ }
30
+ const functionDeclarations = [];
31
+ functionDeclarations.push({
32
+ isExported: true,
33
+ kind: StructureKind.Function,
34
+ name: `${syntheticNamePrefix}propertiesFromJson`,
35
+ parameters: [
36
+ {
37
+ name: "_json",
38
+ type: "unknown",
39
+ },
40
+ ],
41
+ returnType: `purify.Either<zod.ZodError, ${deserializePropertiesReturnType.join(" & ")}>`,
42
+ statements: propertiesFromJsonStatements,
43
+ });
44
+ let fromJsonStatements;
45
+ if (this.abstract) {
46
+ if (this.childObjectTypes.length > 0) {
47
+ // Similar to an object union type, alt-chain the fromJson of the different concrete subclasses together
48
+ fromJsonStatements = [
49
+ `return ${this.childObjectTypes.reduce((expression, childObjectType) => {
50
+ const childObjectTypeExpression = `(${childObjectType.staticModuleName}.${syntheticNamePrefix}fromJson(json) as purify.Either<zod.ZodError, ${this.name}>)`;
51
+ return expression.length > 0
52
+ ? `${expression}.altLazy(() => ${childObjectTypeExpression})`
53
+ : childObjectTypeExpression;
54
+ }, "")};`,
55
+ ];
56
+ }
57
+ else {
58
+ fromJsonStatements = [];
59
+ }
60
+ }
61
+ else {
62
+ let propertiesFromJsonExpression = `${syntheticNamePrefix}propertiesFromJson(json)`;
63
+ if (this.declarationType === "class") {
64
+ propertiesFromJsonExpression = `${propertiesFromJsonExpression}.map(properties => new ${this.name}(properties))`;
65
+ }
66
+ if (this.childObjectTypes.length > 0) {
67
+ fromJsonStatements = [
68
+ `return ${this.childObjectTypes.reduce((expression, childObjectType) => {
69
+ const childObjectTypeExpression = `(${childObjectType.staticModuleName}.${syntheticNamePrefix}fromJson(json) as purify.Either<zod.ZodError, ${this.name}>)`;
70
+ return expression.length > 0
71
+ ? `${expression}.altLazy(() => ${childObjectTypeExpression})`
72
+ : childObjectTypeExpression;
73
+ }, "")}.altLazy(() => ${propertiesFromJsonExpression});`,
74
+ ];
75
+ }
76
+ else {
77
+ fromJsonStatements = [`return ${propertiesFromJsonExpression};`];
78
+ }
79
+ }
80
+ if (fromJsonStatements.length > 0) {
81
+ functionDeclarations.push({
82
+ isExported: true,
83
+ kind: StructureKind.Function,
84
+ name: `${syntheticNamePrefix}fromJson`,
85
+ parameters: [
86
+ {
87
+ name: "json",
88
+ type: "unknown",
89
+ },
90
+ ],
91
+ returnType: `purify.Either<zod.ZodError, ${this.name}>`,
92
+ statements: fromJsonStatements,
93
+ });
94
+ }
95
+ return functionDeclarations;
96
+ }
97
+ function jsonSchemaFunctionDeclaration() {
98
+ return {
99
+ isExported: true,
100
+ kind: StructureKind.Function,
101
+ name: `${syntheticNamePrefix}jsonSchema`,
102
+ statements: [
103
+ `return zodToJsonSchema(${syntheticNamePrefix}jsonZodSchema());`,
104
+ ],
105
+ };
106
+ }
107
+ function jsonUiSchemaFunctionDeclaration() {
108
+ const variables = { scopePrefix: "scopePrefix" };
109
+ const elements = this.parentObjectTypes
110
+ .map((parentObjectType) => `${parentObjectType.staticModuleName}.${syntheticNamePrefix}jsonUiSchema({ scopePrefix })`)
111
+ .concat(this.ownProperties.flatMap((property) => property.jsonUiSchemaElement({ variables }).toList()));
112
+ return {
113
+ isExported: true,
114
+ kind: StructureKind.Function,
115
+ name: `${syntheticNamePrefix}jsonUiSchema`,
116
+ parameters: [
117
+ {
118
+ hasQuestionToken: true,
119
+ name: "parameters",
120
+ type: "{ scopePrefix?: string }",
121
+ },
122
+ ],
123
+ returnType: "any",
124
+ statements: [
125
+ 'const scopePrefix = parameters?.scopePrefix ?? "#";',
126
+ `return { "elements": [ ${elements.join(", ")} ], label: "${this.label.orDefault(this.name)}", type: "Group" }`,
127
+ ],
128
+ };
129
+ }
130
+ function jsonZodSchemaFunctionDeclaration() {
131
+ const variables = { zod: "zod" };
132
+ const mergeZodObjectSchemas = [];
133
+ for (const parentObjectType of this.parentObjectTypes) {
134
+ mergeZodObjectSchemas.push(`${parentObjectType.jsonZodSchema({ context: "type", variables })}`);
135
+ }
136
+ if (this.properties.length > 0) {
137
+ mergeZodObjectSchemas.push(`${variables.zod}.object({ ${this.properties
138
+ .flatMap((property) => property.jsonZodSchema({ variables }).toList())
139
+ .map(({ key, schema }) => `"${key}": ${schema}`)
140
+ .join(",")} })`);
141
+ }
142
+ return {
143
+ isExported: true,
144
+ kind: StructureKind.Function,
145
+ name: `${syntheticNamePrefix}jsonZodSchema`,
146
+ statements: [
147
+ `return ${mergeZodObjectSchemas.length > 0
148
+ ? mergeZodObjectSchemas.reduce((merged, zodObjectSchema) => {
149
+ if (merged.length === 0) {
150
+ return zodObjectSchema;
151
+ }
152
+ return `${merged}.merge(${zodObjectSchema})`;
153
+ }, "")
154
+ : `${variables.zod}.object()`} satisfies zod.ZodType<${syntheticNamePrefix}Json>;`,
155
+ ],
156
+ };
157
+ }
158
+ function toJsonFunctionDeclaration() {
159
+ if (this.declarationType !== "interface") {
160
+ return Maybe.empty();
161
+ }
162
+ return toJsonFunctionOrMethodDeclaration
163
+ .bind(this)()
164
+ .map((toJsonFunctionOrMethodDeclaration) => ({
165
+ ...toJsonFunctionOrMethodDeclaration,
166
+ isExported: true,
167
+ kind: StructureKind.Function,
168
+ name: `${syntheticNamePrefix}toJson`,
169
+ }));
170
+ }
171
+ export function jsonFunctionDeclarations() {
172
+ if (!this.features.has("json")) {
173
+ return [];
174
+ }
175
+ if (this.extern) {
176
+ return [];
177
+ }
178
+ return [
179
+ ...fromJsonFunctionDeclarations.bind(this)(),
180
+ jsonSchemaFunctionDeclaration.bind(this)(),
181
+ jsonUiSchemaFunctionDeclaration.bind(this)(),
182
+ ...toJsonFunctionDeclaration.bind(this)().toList(),
183
+ jsonZodSchemaFunctionDeclaration.bind(this)(),
184
+ ];
185
+ }
186
+ const variables = {
187
+ jsonObject: `${syntheticNamePrefix}jsonObject`,
188
+ };
189
+ //# sourceMappingURL=jsonFunctionDeclarations.js.map
@@ -0,0 +1,5 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { type TypeAliasDeclarationStructure } from "ts-morph";
3
+ import type { ObjectType } from "../ObjectType.js";
4
+ export declare function jsonTypeAliasDeclaration(this: ObjectType): Maybe<TypeAliasDeclarationStructure>;
5
+ //# sourceMappingURL=jsonTypeAliasDeclaration.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { StructureKind } from "ts-morph";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
+ export function jsonTypeAliasDeclaration() {
5
+ if (!this.features.has("json")) {
6
+ return Maybe.empty();
7
+ }
8
+ if (this.extern) {
9
+ return Maybe.empty();
10
+ }
11
+ const members = [];
12
+ if (this.ownProperties.length > 0) {
13
+ members.push(`{ ${this.ownProperties
14
+ .flatMap((property) => property.jsonPropertySignature.toList())
15
+ .map((propertySignature) => `readonly "${propertySignature.name}"${propertySignature.hasQuestionToken ? "?" : ""}: ${propertySignature.type}`)
16
+ .join("; ")} }`);
17
+ }
18
+ for (const parentObjectType of this.parentObjectTypes) {
19
+ members.push(parentObjectType.jsonName.toString());
20
+ }
21
+ return Maybe.of({
22
+ isExported: true,
23
+ kind: StructureKind.TypeAlias,
24
+ name: `${syntheticNamePrefix}Json`,
25
+ type: members.length > 0 ? members.join(" & ") : "object",
26
+ });
27
+ }
28
+ //# sourceMappingURL=jsonTypeAliasDeclaration.js.map
@@ -0,0 +1,9 @@
1
+ export declare function objectSetMethodNames(this: {
2
+ readonly name: string;
3
+ }): {
4
+ object: string;
5
+ objectIdentifiers: string;
6
+ objects: string;
7
+ objectsCount: string;
8
+ };
9
+ //# sourceMappingURL=objectSetMethodNames.d.ts.map