@shaclmate/compiler 4.0.40 → 4.0.42
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.d.ts +1 -8
- package/dist/ShapesGraphToAstTransformer.js +11 -126
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +128 -160
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +17 -0
- package/dist/_ShapesGraphToAstTransformer/{transformPropertyShapeToAstObjectTypeProperty.js → transformPropertyShapeToAstStructTypeField.js} +71 -48
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +29 -20
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.d.ts → transformShapeToAstStructType.d.ts} +3 -3
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.js → transformShapeToAstStructType.js} +35 -45
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +2 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +3 -3
- package/dist/ast/AbstractCompoundType.d.ts +3 -2
- package/dist/ast/AbstractCompoundType.js +5 -5
- package/dist/ast/AbstractContainerType.d.ts +2 -2
- package/dist/ast/AbstractContainerType.js +4 -4
- package/dist/ast/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +10 -12
- package/dist/ast/{AbstractLazyObjectType.js → AbstractLazyType.js} +3 -3
- package/dist/ast/AbstractType.d.ts +1 -1
- package/dist/ast/AbstractType.js +3 -0
- package/dist/ast/Ast.d.ts +2 -6
- package/dist/ast/DefaultValueType.js +2 -1
- package/dist/ast/IntersectionType.d.ts +2 -2
- package/dist/ast/IntersectionType.js +3 -3
- package/dist/ast/LazyOptionType.d.ts +6 -0
- package/dist/ast/LazyOptionType.js +5 -0
- package/dist/ast/LazySetType.d.ts +6 -0
- package/dist/ast/LazySetType.js +5 -0
- package/dist/ast/LazyType.d.ts +5 -0
- package/dist/ast/LazyType.js +5 -0
- package/dist/ast/ListType.d.ts +2 -2
- package/dist/ast/ListType.js +5 -5
- package/dist/ast/OptionType.js +2 -1
- package/dist/ast/SetType.js +2 -1
- package/dist/ast/StructCompoundType.d.ts +12 -0
- package/dist/ast/{ObjectCompoundType.js → StructCompoundType.js} +18 -18
- package/dist/ast/StructIntersectionType.d.ts +4 -0
- package/dist/ast/StructIntersectionType.js +2 -0
- package/dist/ast/{ObjectType.d.ts → StructType.d.ts} +28 -39
- package/dist/ast/{ObjectType.js → StructType.js} +81 -156
- package/dist/ast/StructUnionType.d.ts +4 -0
- package/dist/ast/StructUnionType.js +2 -0
- package/dist/ast/Type.d.ts +5 -5
- package/dist/ast/Type.js +4 -4
- package/dist/ast/UnionType.d.ts +2 -2
- package/dist/ast/UnionType.js +3 -3
- package/dist/ast/index.d.ts +7 -7
- package/dist/ast/index.js +7 -7
- package/dist/generators/AstJsonGenerator.js +7 -3
- package/dist/generators/transformAstToLabeledPropertyGraph.js +59 -56
- package/dist/generators/ts/AbstractCollectionType.d.ts +4 -11
- package/dist/generators/ts/AbstractCollectionType.js +3 -62
- package/dist/generators/ts/AbstractContainerType.d.ts +1 -2
- package/dist/generators/ts/AbstractContainerType.js +7 -10
- package/dist/generators/ts/AbstractDateType.d.ts +5 -8
- package/dist/generators/ts/AbstractDateType.js +7 -12
- package/dist/generators/ts/AbstractIdentifierType.d.ts +4 -0
- package/dist/generators/ts/AbstractIdentifierType.js +3 -0
- package/dist/generators/ts/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +8 -8
- package/dist/generators/ts/{AbstractLazyObjectType.js → AbstractLazyType.js} +30 -17
- package/dist/generators/ts/AbstractLiteralType.d.ts +3 -5
- package/dist/generators/ts/AbstractLiteralType.js +0 -21
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -7
- package/dist/generators/ts/AbstractNumericType.js +17 -27
- package/dist/generators/ts/AbstractObjectSetType.d.ts +1 -1
- package/dist/generators/ts/AbstractObjectSetType.js +2 -2
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +2 -1
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -1
- package/dist/generators/ts/AbstractTermType.d.ts +7 -23
- package/dist/generators/ts/AbstractTermType.js +27 -58
- package/dist/generators/ts/AbstractType.d.ts +86 -63
- package/dist/generators/ts/AbstractType.js +48 -22
- package/dist/generators/ts/BigDecimalType.d.ts +7 -3
- package/dist/generators/ts/BigDecimalType.js +7 -9
- package/dist/generators/ts/BigIntType.d.ts +5 -3
- package/dist/generators/ts/BigIntType.js +8 -5
- package/dist/generators/ts/BlankNodeType.d.ts +2 -7
- package/dist/generators/ts/BlankNodeType.js +4 -9
- package/dist/generators/ts/BooleanType.d.ts +6 -4
- package/dist/generators/ts/BooleanType.js +13 -15
- package/dist/generators/ts/DateTimeType.d.ts +2 -2
- package/dist/generators/ts/DateTimeType.js +14 -4
- package/dist/generators/ts/DateType.d.ts +2 -2
- package/dist/generators/ts/DateType.js +14 -4
- package/dist/generators/ts/DefaultValueType.d.ts +40 -2
- package/dist/generators/ts/DefaultValueType.js +15 -14
- package/dist/generators/ts/FloatType.d.ts +5 -3
- package/dist/generators/ts/FloatType.js +8 -5
- package/dist/generators/ts/GraphqlSchema.js +2 -2
- package/dist/generators/ts/IdentifierType.d.ts +2 -2
- package/dist/generators/ts/IdentifierType.js +8 -11
- package/dist/generators/ts/IntType.d.ts +5 -3
- package/dist/generators/ts/IntType.js +8 -5
- package/dist/generators/ts/IriType.d.ts +2 -2
- package/dist/generators/ts/IriType.js +16 -16
- package/dist/generators/ts/{LazyObjectOptionType.d.ts → LazyOptionType.d.ts} +13 -11
- package/dist/generators/ts/LazyOptionType.js +75 -0
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/LazySetType.js +76 -0
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/LazyType.js +65 -0
- package/dist/generators/ts/ListType.d.ts +11 -2
- package/dist/generators/ts/ListType.js +53 -26
- package/dist/generators/ts/LiteralType.d.ts +7 -2
- package/dist/generators/ts/LiteralType.js +12 -5
- package/dist/generators/ts/ObjectType.d.ts +24 -25
- package/dist/generators/ts/ObjectType.js +303 -161
- package/dist/generators/ts/ObjectUnionType.js +42 -42
- package/dist/generators/ts/OptionType.d.ts +6 -2
- package/dist/generators/ts/OptionType.js +16 -9
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +1 -4
- package/dist/generators/ts/SetType.d.ts +17 -2
- package/dist/generators/ts/SetType.js +85 -9
- package/dist/generators/ts/Snippets.d.ts +29 -9
- package/dist/generators/ts/Snippets.js +179 -39
- package/dist/generators/ts/StringType.d.ts +7 -4
- package/dist/generators/ts/StringType.js +23 -12
- package/dist/generators/ts/TermType.d.ts +9 -3
- package/dist/generators/ts/TermType.js +29 -7
- package/dist/generators/ts/TsGenerator.d.ts +1 -1
- package/dist/generators/ts/TsGenerator.js +62 -32
- package/dist/generators/ts/Type.d.ts +4 -4
- package/dist/generators/ts/TypeFactory.d.ts +5 -5
- package/dist/generators/ts/TypeFactory.js +90 -82
- package/dist/generators/ts/UnionType.d.ts +25 -23
- package/dist/generators/ts/UnionType.js +254 -261
- package/dist/generators/ts/ZodGenerator.d.ts +1 -1
- package/dist/generators/ts/ZodGenerator.js +29 -14
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +28 -16
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +1 -24
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +15 -17
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +24 -54
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +8 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +48 -20
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +28 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +15 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_filterTypeDeclaration.js → ObjectType_filterTypeExpression.js} +5 -10
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionExpression.js} +5 -13
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.js → ObjectType_focusSparqlWherePatternsFunctionExpression.js} +8 -31
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js +43 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_graphqlTypeVariableStatement.js → ObjectType_graphqlTypeExpression.js} +6 -13
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.js +30 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +13 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +11 -8
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +2 -6
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +17 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.d.ts +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.js +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +5 -9
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +4 -8
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +14 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_toRdfResourceFunctionDeclaration.js → ObjectType_toRdfResourceFunctionExpression.js} +7 -13
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +7 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +8 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +10 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +9 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +70 -38
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +3 -3
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +6 -5
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.js +22 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.js +25 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.js +40 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +6 -8
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +32 -32
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +1 -1
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +5 -3
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +3 -3
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +4 -2
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +33 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.js +10 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +1 -2
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.js +15 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.js +11 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.js +9 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +13 -7
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.js +17 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.js +60 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
- package/dist/input/generated.d.ts +1116 -400
- package/dist/input/generated.js +1879 -1917
- package/package.json +2 -4
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts +0 -9
- package/dist/ast/LazyObjectOptionType.d.ts +0 -6
- package/dist/ast/LazyObjectOptionType.js +0 -5
- package/dist/ast/LazyObjectSetType.d.ts +0 -6
- package/dist/ast/LazyObjectSetType.js +0 -5
- package/dist/ast/LazyObjectType.d.ts +0 -5
- package/dist/ast/LazyObjectType.js +0 -5
- package/dist/ast/ObjectCompoundType.d.ts +0 -12
- package/dist/ast/ObjectIntersectionType.d.ts +0 -4
- package/dist/ast/ObjectIntersectionType.js +0 -2
- package/dist/ast/ObjectUnionType.d.ts +0 -4
- package/dist/ast/ObjectUnionType.js +0 -2
- package/dist/generators/ts/LazyObjectOptionType.js +0 -62
- package/dist/generators/ts/LazyObjectSetType.d.ts +0 -20
- package/dist/generators/ts/LazyObjectSetType.js +0 -61
- package/dist/generators/ts/LazyObjectType.d.ts +0 -19
- package/dist/generators/ts/LazyObjectType.js +0 -53
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +0 -65
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.js +0 -23
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.js +0 -24
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +0 -43
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.js +0 -80
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.js +0 -10
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.js +0 -45
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +0 -16
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.js +0 -31
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +0 -16
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js +0 -17
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +0 -14
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +0 -41
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.js +0 -36
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +0 -11
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +0 -13
- package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +0 -27
- package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +0 -22
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +0 -25
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +0 -40
- package/dist/generators/ts/_snippets/snippets_convertToArray.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToArray.js +0 -8
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.js +0 -15
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.js +0 -31
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.js +0 -25
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +0 -15
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +0 -23
|
@@ -6,16 +6,22 @@ import { type Code } from "./ts-poet-wrapper.js";
|
|
|
6
6
|
export declare class TermType<ConstantTermT extends Literal | NamedNode = Literal | NamedNode, RuntimeTermT extends BlankNode | Literal | NamedNode = BlankNode | Literal | NamedNode> extends AbstractTermType {
|
|
7
7
|
readonly conversionFunction: Maybe<AbstractTermType.ConversionFunction>;
|
|
8
8
|
readonly filterFunction: Code;
|
|
9
|
-
readonly
|
|
9
|
+
readonly jsTypes: readonly [{
|
|
10
|
+
readonly instanceof: "Object";
|
|
11
|
+
readonly typeof: "object";
|
|
12
|
+
}];
|
|
10
13
|
readonly kind = "Term";
|
|
11
14
|
readonly nodeKinds: ReadonlySet<NodeKind>;
|
|
12
|
-
readonly schemaType: Code;
|
|
13
15
|
readonly valueSparqlWherePatternsFunction: Code;
|
|
14
16
|
constructor({ nodeKinds, ...superParameters }: ConstructorParameters<typeof AbstractTermType<ConstantTermT, RuntimeTermT>>[0] & {
|
|
15
17
|
nodeKinds: ReadonlySet<NodeKind>;
|
|
16
18
|
});
|
|
17
|
-
get
|
|
19
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
20
|
+
get filterType(): Code;
|
|
18
21
|
get graphqlType(): AbstractTermType.GraphqlType;
|
|
22
|
+
get schemaType(): Code;
|
|
23
|
+
protected get inlineExpression(): Code;
|
|
24
|
+
protected get schemaInitializers(): Code[];
|
|
19
25
|
fromJsonExpression({ variables, }: Parameters<AbstractTermType["fromJsonExpression"]>[0]): Code;
|
|
20
26
|
graphqlResolveExpression(_parameters: Parameters<AbstractTermType["graphqlResolveExpression"]>[0]): Code;
|
|
21
27
|
jsonSchema(_parameters: Parameters<AbstractTermType["jsonSchema"]>[0]): Code;
|
|
@@ -10,14 +10,15 @@ import { Maybe } from "purify-ts";
|
|
|
10
10
|
import { invariant } from "ts-invariant";
|
|
11
11
|
import { Memoize } from "typescript-memoize";
|
|
12
12
|
import { AbstractTermType } from "./AbstractTermType.js";
|
|
13
|
-
import { code, joinCode } from "./ts-poet-wrapper.js";
|
|
13
|
+
import { arrayOf, code, joinCode } from "./ts-poet-wrapper.js";
|
|
14
14
|
export class TermType extends AbstractTermType {
|
|
15
15
|
conversionFunction = Maybe.empty();
|
|
16
16
|
filterFunction = code `${this.reusables.snippets.filterTerm}`;
|
|
17
|
-
|
|
17
|
+
jsTypes = [
|
|
18
|
+
{ instanceof: "Object", typeof: "object" },
|
|
19
|
+
];
|
|
18
20
|
kind = "Term";
|
|
19
21
|
nodeKinds;
|
|
20
|
-
schemaType = code `${this.reusables.snippets.TermSchema}`;
|
|
21
22
|
valueSparqlWherePatternsFunction = code `${this.reusables.snippets.termSparqlWherePatterns}`;
|
|
22
23
|
constructor({ nodeKinds, ...superParameters }) {
|
|
23
24
|
super(superParameters);
|
|
@@ -25,7 +26,19 @@ export class TermType extends AbstractTermType {
|
|
|
25
26
|
invariant(this.nodeKinds.has("Literal") &&
|
|
26
27
|
(this.nodeKinds.has("BlankNode") || this.nodeKinds.has("IRI")), "should be IdentifierType or LiteralType");
|
|
27
28
|
}
|
|
28
|
-
get
|
|
29
|
+
get fromRdfResourceValuesFunction() {
|
|
30
|
+
return code `${this.reusables.snippets.termFromRdfResourceValues}<${this.expression}>`;
|
|
31
|
+
}
|
|
32
|
+
get filterType() {
|
|
33
|
+
return code `${this.reusables.snippets.TermFilter}<${this.expression}>`;
|
|
34
|
+
}
|
|
35
|
+
get graphqlType() {
|
|
36
|
+
throw new Error("not implemented");
|
|
37
|
+
}
|
|
38
|
+
get schemaType() {
|
|
39
|
+
return code `${this.reusables.snippets.TermSchema}<${this.expression}>`;
|
|
40
|
+
}
|
|
41
|
+
get inlineExpression() {
|
|
29
42
|
return code `(${joinCode([...this.nodeKinds]
|
|
30
43
|
.map((nodeKind) => {
|
|
31
44
|
switch (nodeKind) {
|
|
@@ -42,8 +55,8 @@ export class TermType extends AbstractTermType {
|
|
|
42
55
|
})
|
|
43
56
|
.map((import_) => code `${import_}`), { on: " | " })})`;
|
|
44
57
|
}
|
|
45
|
-
get
|
|
46
|
-
|
|
58
|
+
get schemaInitializers() {
|
|
59
|
+
return super.schemaInitializers.concat(code `types: ${arrayOf(...[...this.nodeKinds].map(NodeKind.toTermType))}`);
|
|
47
60
|
}
|
|
48
61
|
fromJsonExpression({ variables, }) {
|
|
49
62
|
return code `${this.reusables.imports.Either}.of<Error, ${this.expression}>(${[
|
|
@@ -114,7 +127,16 @@ export class TermType extends AbstractTermType {
|
|
|
114
127
|
}
|
|
115
128
|
__decorate([
|
|
116
129
|
Memoize()
|
|
117
|
-
], TermType.prototype, "
|
|
130
|
+
], TermType.prototype, "fromRdfResourceValuesFunction", null);
|
|
131
|
+
__decorate([
|
|
132
|
+
Memoize()
|
|
133
|
+
], TermType.prototype, "filterType", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
Memoize()
|
|
136
|
+
], TermType.prototype, "schemaType", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
Memoize()
|
|
139
|
+
], TermType.prototype, "inlineExpression", null);
|
|
118
140
|
__decorate([
|
|
119
141
|
Memoize()
|
|
120
142
|
], TermType.prototype, "jsonType", null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from "ts-log";
|
|
2
|
-
import * as ast from "../../ast/index.js";
|
|
2
|
+
import type * as ast from "../../ast/index.js";
|
|
3
3
|
import type { Generator } from "../Generator.js";
|
|
4
4
|
import type { TsFeature } from "./TsFeature.js";
|
|
5
5
|
export declare class TsGenerator implements Generator {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import dataFactory from "@rdfx/data-factory";
|
|
1
2
|
import { Maybe } from "purify-ts";
|
|
2
3
|
import { invariant } from "ts-invariant";
|
|
3
|
-
import * as ast from "../../ast/index.js";
|
|
4
4
|
import { BlankNodeType } from "./BlankNodeType.js";
|
|
5
5
|
import { GraphqlSchema } from "./GraphqlSchema.js";
|
|
6
6
|
import { IdentifierType } from "./IdentifierType.js";
|
|
@@ -12,6 +12,9 @@ import { Reusables } from "./Reusables.js";
|
|
|
12
12
|
import { SparqlObjectSetType } from "./SparqlObjectSetType.js";
|
|
13
13
|
import { TypeFactory } from "./TypeFactory.js";
|
|
14
14
|
import { code, joinCode } from "./ts-poet-wrapper.js";
|
|
15
|
+
function compareTsNamedType(left, right) {
|
|
16
|
+
return left.name.unsafeCoerce().localeCompare(right.name.unsafeCoerce());
|
|
17
|
+
}
|
|
15
18
|
export class TsGenerator {
|
|
16
19
|
configuration;
|
|
17
20
|
logger;
|
|
@@ -31,54 +34,77 @@ export class TsGenerator {
|
|
|
31
34
|
reusables,
|
|
32
35
|
});
|
|
33
36
|
let declarations = [];
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
const tsNamedTypes = [];
|
|
38
|
+
const tsNamedObjectTypes = [];
|
|
39
|
+
const tsNamedObjectUnionTypes = [];
|
|
40
|
+
for (const astNamedType of ast_.namedTypes) {
|
|
41
|
+
const tsNamedType = typeFactory.createType(astNamedType);
|
|
42
|
+
tsNamedTypes.push(tsNamedType);
|
|
43
|
+
if (astNamedType.kind === "Struct") {
|
|
44
|
+
for (const tsImport of astNamedType.tsImports) {
|
|
45
|
+
declarations.push(code `${tsImport}`);
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
switch (tsNamedType.kind) {
|
|
49
|
+
case "Object":
|
|
50
|
+
tsNamedObjectTypes.push(tsNamedType);
|
|
51
|
+
break;
|
|
52
|
+
case "ObjectUnion":
|
|
53
|
+
tsNamedObjectUnionTypes.push(tsNamedType);
|
|
54
|
+
break;
|
|
42
55
|
}
|
|
43
|
-
declarations = declarations.concat(typeFactory.createType(astNamedUnionType).declaration.toList());
|
|
44
56
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
tsNamedTypes.sort(compareTsNamedType);
|
|
58
|
+
tsNamedObjectTypes.sort(compareTsNamedType);
|
|
59
|
+
tsNamedObjectUnionTypes.sort(compareTsNamedType);
|
|
60
|
+
for (const tsNamedType of tsNamedTypes) {
|
|
61
|
+
switch (tsNamedType.kind) {
|
|
62
|
+
case "ObjectUnion":
|
|
63
|
+
case "Union":
|
|
64
|
+
continue; // Declare compound types last.
|
|
65
|
+
}
|
|
66
|
+
tsNamedType.declaration.ifJust((declaration) => {
|
|
67
|
+
declarations.push(declaration);
|
|
68
|
+
});
|
|
51
69
|
}
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
// Declare compound types last.
|
|
71
|
+
for (const tsNamedType of tsNamedTypes) {
|
|
72
|
+
switch (tsNamedType.kind) {
|
|
73
|
+
case "ObjectUnion":
|
|
74
|
+
case "Union":
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
tsNamedType.declaration.ifJust((declaration) => {
|
|
80
|
+
declarations.push(declaration);
|
|
81
|
+
});
|
|
54
82
|
}
|
|
55
|
-
|
|
56
|
-
const namedObjectUnionTypesNameSorted = namedObjectUnionTypesToposorted.toSorted((left, right) => left.alias.unsafeCoerce().localeCompare(right.alias.unsafeCoerce()));
|
|
57
|
-
switch (namedObjectTypesNameSorted.length) {
|
|
83
|
+
switch (tsNamedObjectTypes.length) {
|
|
58
84
|
case 0:
|
|
59
85
|
break;
|
|
60
86
|
case 1:
|
|
61
|
-
declarations.push(code `type ${configuration.syntheticNamePrefix}Object = ${
|
|
87
|
+
declarations.push(code `type ${configuration.syntheticNamePrefix}Object = ${tsNamedObjectTypes[0].expression};`);
|
|
62
88
|
break;
|
|
63
89
|
default: {
|
|
64
90
|
const uberObjectUnionType = this.synthesizeUberObjectUnionType({
|
|
65
91
|
configuration,
|
|
66
|
-
namedObjectTypes:
|
|
92
|
+
namedObjectTypes: tsNamedObjectTypes,
|
|
67
93
|
reusables,
|
|
68
94
|
});
|
|
69
95
|
declarations = declarations.concat(uberObjectUnionType.declaration.toList());
|
|
70
|
-
|
|
96
|
+
tsNamedObjectUnionTypes.push(uberObjectUnionType);
|
|
71
97
|
}
|
|
72
98
|
}
|
|
73
99
|
declarations.push(...this.objectSetTypeDeclarations({
|
|
74
100
|
configuration,
|
|
75
|
-
namedObjectTypes:
|
|
76
|
-
namedObjectUnionTypes:
|
|
101
|
+
namedObjectTypes: tsNamedObjectTypes,
|
|
102
|
+
namedObjectUnionTypes: tsNamedObjectUnionTypes,
|
|
77
103
|
reusables,
|
|
78
104
|
}));
|
|
79
105
|
if (configuration.features.has("GraphQL")) {
|
|
80
|
-
const graphqlNamedObjectTypes =
|
|
81
|
-
const graphqlNamedObjectUnionTypes =
|
|
106
|
+
const graphqlNamedObjectTypes = tsNamedObjectTypes.filter((tsNamedObjectType) => !tsNamedObjectType.synthetic);
|
|
107
|
+
const graphqlNamedObjectUnionTypes = tsNamedObjectUnionTypes.filter((tsNamedObjectUnionType) => !tsNamedObjectUnionType.synthetic);
|
|
82
108
|
if (graphqlNamedObjectTypes.length > 0) {
|
|
83
109
|
declarations.push(new GraphqlSchema({
|
|
84
110
|
configuration,
|
|
@@ -116,7 +142,7 @@ export class TsGenerator {
|
|
|
116
142
|
* Synthesize the $Object union.
|
|
117
143
|
*/
|
|
118
144
|
synthesizeUberObjectUnionType({ configuration, namedObjectTypes, reusables, }) {
|
|
119
|
-
const filteredNamedObjectTypes = namedObjectTypes.filter((namedObjectType) => !namedObjectType.extern);
|
|
145
|
+
const filteredNamedObjectTypes = namedObjectTypes.filter((namedObjectType) => !namedObjectType.extern && !namedObjectType.synthetic);
|
|
120
146
|
invariant(filteredNamedObjectTypes.length > 0);
|
|
121
147
|
const nodeKinds = filteredNamedObjectTypes.reduce((nodeKinds, namedObjectType) => {
|
|
122
148
|
for (const nodeKind of namedObjectType.identifierType.nodeKinds) {
|
|
@@ -127,29 +153,31 @@ export class TsGenerator {
|
|
|
127
153
|
let identifierType;
|
|
128
154
|
if (nodeKinds.size === 2) {
|
|
129
155
|
identifierType = new IdentifierType({
|
|
130
|
-
|
|
156
|
+
name: Maybe.empty(),
|
|
131
157
|
comment: Maybe.empty(),
|
|
132
158
|
configuration,
|
|
133
159
|
label: Maybe.empty(),
|
|
134
160
|
logger: this.logger,
|
|
135
161
|
reusables,
|
|
162
|
+
shapeIdentifier: dataFactory.blankNode(),
|
|
136
163
|
});
|
|
137
164
|
}
|
|
138
165
|
else {
|
|
139
166
|
switch ([...nodeKinds][0]) {
|
|
140
167
|
case "BlankNode":
|
|
141
168
|
identifierType = new BlankNodeType({
|
|
142
|
-
|
|
169
|
+
name: Maybe.empty(),
|
|
143
170
|
comment: Maybe.empty(),
|
|
144
171
|
configuration,
|
|
145
172
|
label: Maybe.empty(),
|
|
146
173
|
logger: this.logger,
|
|
147
174
|
reusables,
|
|
175
|
+
shapeIdentifier: dataFactory.blankNode(),
|
|
148
176
|
});
|
|
149
177
|
break;
|
|
150
178
|
case "IRI":
|
|
151
179
|
identifierType = new IriType({
|
|
152
|
-
|
|
180
|
+
name: Maybe.empty(),
|
|
153
181
|
comment: Maybe.empty(),
|
|
154
182
|
configuration,
|
|
155
183
|
hasValues: [],
|
|
@@ -157,12 +185,13 @@ export class TsGenerator {
|
|
|
157
185
|
label: Maybe.empty(),
|
|
158
186
|
logger: this.logger,
|
|
159
187
|
reusables,
|
|
188
|
+
shapeIdentifier: dataFactory.blankNode(),
|
|
160
189
|
});
|
|
161
190
|
break;
|
|
162
191
|
}
|
|
163
192
|
}
|
|
164
193
|
return new ObjectUnionType({
|
|
165
|
-
|
|
194
|
+
name: Maybe.of(`${configuration.syntheticNamePrefix}Object`),
|
|
166
195
|
comment: Maybe.empty(),
|
|
167
196
|
configuration,
|
|
168
197
|
identifierType: Maybe.of(identifierType),
|
|
@@ -174,6 +203,7 @@ export class TsGenerator {
|
|
|
174
203
|
})),
|
|
175
204
|
recursive: false,
|
|
176
205
|
reusables,
|
|
206
|
+
shapeIdentifier: dataFactory.blankNode(),
|
|
177
207
|
synthetic: true,
|
|
178
208
|
});
|
|
179
209
|
}
|
|
@@ -9,9 +9,9 @@ import type { FloatType } from "./FloatType.js";
|
|
|
9
9
|
import type { IdentifierType } from "./IdentifierType.js";
|
|
10
10
|
import type { IntType } from "./IntType.js";
|
|
11
11
|
import type { IriType } from "./IriType.js";
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
12
|
+
import type { LazyOptionType } from "./LazyOptionType.js";
|
|
13
|
+
import type { LazySetType } from "./LazySetType.js";
|
|
14
|
+
import type { LazyType } from "./LazyType.js";
|
|
15
15
|
import type { ListType } from "./ListType.js";
|
|
16
16
|
import type { LiteralType } from "./LiteralType.js";
|
|
17
17
|
import type { ObjectType } from "./ObjectType.js";
|
|
@@ -21,5 +21,5 @@ import type { SetType } from "./SetType.js";
|
|
|
21
21
|
import type { StringType } from "./StringType.js";
|
|
22
22
|
import type { TermType } from "./TermType.js";
|
|
23
23
|
import type { UnionType } from "./UnionType.js";
|
|
24
|
-
export type Type = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType |
|
|
24
|
+
export type Type = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType | LazyOptionType | LazySetType | LazyType | ListType<ListType.ItemType> | LiteralType | ObjectUnionType | ObjectType | OptionType<OptionType.ItemType> | SetType<SetType.ItemType> | StringType | TermType | UnionType<Type>;
|
|
25
25
|
//# sourceMappingURL=Type.d.ts.map
|
|
@@ -19,8 +19,8 @@ export declare class TypeFactory {
|
|
|
19
19
|
logger: Logger;
|
|
20
20
|
reusables: Reusables;
|
|
21
21
|
});
|
|
22
|
-
createObjectType(astType: ast.
|
|
23
|
-
createObjectUnionType(astType: ast.
|
|
22
|
+
createObjectType(astType: ast.StructType): ObjectType;
|
|
23
|
+
createObjectUnionType(astType: ast.StructUnionType): ObjectUnionType;
|
|
24
24
|
createType(astType: ast.Type, parameters?: {
|
|
25
25
|
defaultValue?: Literal | NamedNode;
|
|
26
26
|
}): Type;
|
|
@@ -29,9 +29,9 @@ export declare class TypeFactory {
|
|
|
29
29
|
private createDefaultValueType;
|
|
30
30
|
private createIdentifierType;
|
|
31
31
|
private createIriType;
|
|
32
|
-
private
|
|
33
|
-
private
|
|
34
|
-
private
|
|
32
|
+
private createLazyOptionType;
|
|
33
|
+
private createLazySetType;
|
|
34
|
+
private createLazyType;
|
|
35
35
|
private createListType;
|
|
36
36
|
private createLiteralType;
|
|
37
37
|
private createObjectTypeProperty;
|