The Inferal Type System Ontology defines RDF terms for scalar, structured, literal, union, enum, callable, template, value, scalar initializer, and type-relation facts.

This is an unofficial 0.1 Editor's Draft maintained in the Inferal ontology repository.

Feedback should be sent to contact@inferal.com.

This specification defines three conformance classes: type-system data graph, type-system processor, and type-system validator.

A type-system data graph is an RDF graph that uses this vocabulary for types, type-bearing slots, type expressions, values, scalar initializers, and type relations. A conforming graph MUST use the class and property ranges described by ontology.ttl.

A type-system processor is software that consumes a type-system data graph. A conforming processor MUST preserve preferred labels, slot ordering, value bounds, template argument order, and relation evidence when those facts are present.

A type-system validator checks a graph against the SHACL constraints in shapes.ttl. A conforming validator MUST load ontology.ttl together with the data graph so built-in individuals and subclass relationships are visible during validation.

Namespace

Prefix IRI
ts https://ontology.inferal.com/modules/type-system/
skos http://www.w3.org/2004/02/skos/core#

This specification defines the normative vocabulary for the namespace above. The Turtle source is the machine-readable authority for the complete class hierarchy, property domains and ranges, built-in individuals, and labels.

Use the namespace as the stable RDF identity for type-system concepts. Language adapters can mint their own application IRIs for concrete types, fields, and values, then connect those resources back to ts: classes and properties.

Model Overview

The module is intentionally limited to type-system facts. It describes declarations, type categories, scalar value spaces, structured containers, callable signatures, templates, literal and runtime values, scalar initializer calls, and first-class type relations. Concerns about generated artifacts, transport contracts, naming for external targets, presentation-specific views, and statement history are separate vocabularies.

Resources that participate in this model are normally ts:Entity instances. Types are ts:Type instances. Type-bearing children such as fields, tuple elements, parameters, result slots, and union alternatives are ts:TypedSlot instances.

This module is distinct from json-values. Use this module for type expressions, type-bearing slots, declarations, assignability evidence, and values that are part of a type-system graph. Use json-values for loss-preserving RDF representations of actual JSON payload trees. JSON Schema and RML vocabulary imports are available to profiles and mapping modules, but they are not core dependencies of this vocabulary.

Core Identity

Term Kind Normative role
ts:EntityClassBase class for resources in a type-system graph.
ts:VocabularyClassA named collection of type-system declarations.
ts:NamespaceClassA semantic grouping scope for declarations.
ts:DeclarationClassA named binding for a type-system resource.
ts:TypeDeclarationClassA declaration whose resource is a type.
ts:ValueDeclarationClassA declaration whose resource is a value.
ts:AliasDeclarationClassA declaration whose resource is an alias.
ts:AliasClassA shorthand resource that points at another type-system resource.

A graph SHOULD use ts:hasDeclaration and ts:declares to connect vocabularies or namespaces to declarations. A graph SHOULD use skos:prefLabel for the preferred name associated with a type-system resource.

In common languages this corresponds to the difference between a module export and the thing exported. A TypeScript export name, a Python module attribute, or a GraphQL schema field can all be modeled as declarations whose preferred label is the name people use and whose declared resource is the actual type, value, or alias.

Type Taxonomy

Family Classes Notes
Root ts:Type, ts:DataType, ts:AnonymousTypeExpression Every type resource is a ts:Type; inline expressions additionally use the anonymous expression class.
Intrinsic ts:IntrinsicType, ts:UnknownType, ts:AnyType, ts:VoidType, ts:NeverType, ts:NullType, ts:ErrorType Built-in top, permissive, bottom, absence, null, and error value spaces.
Scalar ts:Scalar, ts:StringType, ts:UrlType, ts:BytesType, ts:BooleanType, ts:NumericType, ts:IntegerType, ts:FloatType, ts:DecimalType Atomic primitive or user-defined value spaces.
Temporal ts:TemporalType, ts:DateType, ts:TimeType, ts:DateTimeType, ts:DurationType, ts:TemporalKind, ts:TemporalZoneSemantics Calendar, clock, date-time, duration, and zone semantics.

Scalar refinement MUST use ts:baseScalar for the direct base and ts:standardBaseScalar for the nearest standard value space. Numeric widening MAY be asserted with ts:numericRangeAssignableTo. Numeric scalar facets use ts:minValue, ts:maxValue, ts:numericBitWidth, ts:numericRadix, ts:numericPrecisionDigits, ts:minExponent, and ts:maxExponent.

The taxonomy is deliberately broader than any one language. TypeScript has unknown, any, void, and never; Python has Any, None, and NoReturn; Rust has (), !, and numeric width distinctions. The ontology keeps these as type-system facts so language adapters can map them without losing intent.

Structured Types

Term Kind Normative role
ts:StructuredTypeClassA data type with child slots, positions, keys, or alternatives.
ts:CollectionTypeClassA structured type whose values contain ordered or keyed child values.
ts:RecordTypeClassA structured type with named fields.
ts:RecordExpressionClassAn anonymous record type expression.
ts:RecordMapTypeClassA record-compatible keyed value space.
ts:OptionRecordTypeClassA record used as typed options or parameter bags.
ts:ArrayTypeClassAn ordered collection with a common element type.
ts:ArrayExpressionClassAn anonymous array type expression.
ts:TupleTypeClassAn ordered collection with position-specific element types.
ts:TupleExpressionClassAn anonymous tuple type expression.
ts:StreamTypeClassA collection type whose values are delivered over time.
ts:IntersectionTypeClassA type that combines constituent type requirements.
ts:IntersectionExpressionClassAn anonymous intersection type expression.
ts:TypedSlotClassA named, keyed, ordered, or otherwise addressable type-bearing slot.
ts:FieldClassA typed named slot in a record type.
ts:FieldKeyClassThe key by which a field is addressed.
ts:FieldKeyKindClassA controlled category for field key spelling.
ts:TupleElementClassOne ordered element of a tuple type.
ts:IndexerSlotClassA typed lookup slot on an array or map-like type.

Structured slots MUST carry their value space through ts:valueType or one of its subproperties: ts:fieldType, ts:tupleElementType, ts:indexerValueType, ts:parameterType, ts:resultType, or ts:alternativeType. Slot cardinality uses ts:minCount, ts:maxCount, ts:isOptional, and ts:isVariadic.

Structured types map to records, objects, structs, dataclasses, tuples, arrays, and maps. The ontology does not assume that every field name is a programming-language identifier: field keys, key kind, cardinality, and value type are modeled separately so JSON Schema, GraphQL, Rust, Python, and TypeScript shapes can share the same graph.

Choice Types

Term Kind Normative role
ts:UnionClassA type that admits values from one or more alternatives.
ts:UnionExpressionClassAn anonymous union type expression.
ts:NullableTypeClassA union whose alternatives include null and one non-null base type.
ts:UnionAlternativeClassOne ordered alternative of a union type.
ts:UnionVariantClassA named union alternative that can be referenced as a type.
ts:DiscriminatorClassA type-level selector that distinguishes alternatives.
ts:DiscriminatorEnvelopeClassA controlled discriminator placement strategy.
ts:EnumClassA type with a finite set of named members.
ts:EnumMemberClassOne named member of an enum type.

Union alternatives are linked with ts:hasUnionAlternative and ts:alternativeType. Nullable unions SHOULD also use ts:nullableBaseType. Discriminated unions MAY attach ts:hasDiscriminator, ts:discriminatorField, ts:discriminatorValue, and ts:discriminatorEnvelope. Enum members use ts:hasEnumMember, ts:enumMemberOf, ts:enumMemberType, and ts:enumMemberValue.

Choice types cover language unions, nullable types, enums, and discriminated variants. The discriminator model is useful when a TypeScript tagged union, GraphQL union, JSON Schema oneOf, or Rust enum needs to be compared structurally rather than treated as an opaque string.

Callables And Templates

Family Terms Normative role
Callables ts:CallableType, ts:CallableSetType, ts:InterfaceType, ts:CallableSetMembership, ts:ParameterSlot, ts:ResultSlot Callable signatures, callable groups, and typed input/output slots.
Templates ts:TemplateParameter, ts:TypeParameter, ts:ValueParameter, ts:TypeOrValueParameter, ts:TemplateInstantiation, ts:TemplateArgument, ts:TypeArgument, ts:ValueArgument Generic type-system resources, supplied arguments, and instantiation results.
Type-level expressions ts:ValueOfType, ts:TypeOfValue Value-space constraints and type expressions derived from values.

Callable signatures MUST use ts:hasParameterSlot and ts:hasResultSlot when their slots are materialized. Template instantiations MUST identify the generic resource with ts:instantiates and SHOULD expose supplied arguments with ts:templateArgument. Structural argument ordering uses ts:ordinal; evaluation ordering uses ts:argumentEvaluationOrdinal.

Callables and templates map to functions, methods, overload sets, interfaces, generics, and parameterized types. The ontology separates callable membership, parameter slots, result slots, template parameters, supplied arguments, and resulting types so adapters can represent overloads and generic instantiations without flattening them into a string.

Literals And Values

Family Terms Normative role
Literal types ts:LiteralType, ts:LiteralKind, ts:StringLiteralType, ts:StringTemplateLiteralType, ts:StringTemplatePart, ts:NumericLiteralType, ts:BooleanLiteralType, ts:NullLiteralType, ts:EnumMemberReferenceLiteralType, ts:UnionVariantReferenceLiteralType Exact literal value spaces and member-reference literal types.
Values ts:Value, ts:ConstValue, ts:ScalarValue, ts:StringValue, ts:NumericValue, ts:BooleanValue, ts:NullValue, ts:EnumValue, ts:ObjectValue, ts:ObjectValueMember, ts:ArrayValue, ts:ArrayValueItem Concrete values and exact inferred object or array shapes.

Literal types SHOULD use ts:literalKind, ts:literalBaseType, and ts:literalValue. Concrete values SHOULD carry ts:declaredType and MAY carry ts:inferredType. Scalar value content uses ts:stringValue, ts:numericValue, or ts:booleanValue.

Literal types describe value spaces containing exactly one value, while value resources describe actual values in the graph. This distinction matches TypeScript literal types, Python Literal, JSON Schema const, and enum member references.

Scalar Initializers

Scalar initialization is part of the type system when it describes the value space of a scalar and the callable shape used to construct or parse values for that scalar. Initializers use ts:ScalarInitializer, ts:ScalarConstructorInitializer, ts:ScalarInitializerSemanticKind, ts:ScalarInitializerCall, and ts:InitializerArgument.

A scalar type MAY use ts:hasInitializer. The initializer SHOULD state ts:initializerResult and MAY use ts:initializerParameter and ts:initializerSemanticKind. Calls use ts:invokesInitializer, ts:hasInitializerArgument, ts:initializerArgumentFor, and ts:initializerArgumentValue.

Scalar initializers are for type-level construction or parsing semantics, not arbitrary runtime code. They cover patterns such as branded identifiers, string-to-date parsing, decimal construction, and current-time constructors when those calls are part of the scalar type contract.

Type Relations

Term Kind Normative role
ts:TypeRelationClassA first-class assertion about two types.
ts:AssignableTypeRelationClassThe source can be assigned to the target.
ts:SubtypeRelationClassThe source is a subtype of the target.
ts:ExactTypeRelationClassThe source and target have the same inhabited shape or value space.
ts:NonAssignableTypeRelationClassThe source cannot be assigned to the target.
ts:TypeRelationEvidenceClassEvidence attached to a first-class relation.
ts:FieldMatchClassEvidence comparing one source field to one target field.
ts:AlternativeMatchClassEvidence comparing source and target union alternatives.
ts:TupleElementMatchClassEvidence comparing source and target tuple elements.
ts:CollectionElementTypeMatchClassEvidence comparing collection element value spaces.

Materialized type relations MUST use ts:relationSourceType and ts:relationTargetType. Evidence SHOULD use ts:hasEvidence, ts:evidenceSourceType, ts:evidenceTargetType, and ts:evidenceRule. Structural evidence uses the match properties for fields, alternatives, tuple elements, and collection element types.

Type relations make assignability and failure explainable. A compiler or schema adapter can say that one record is assignable to another because fields match, that one union alternative is covered by another, or that assignment fails because a required field or element type is incompatible.

Class Model

This section documents each class in the type-system ontology in its own section. Classes are grouped by modeling role rather than listed alphabetically, so nearby sections show the relationships that matter when reading or authoring a graph. Examples use the same prefixes as examples.ttl: ex: for illustrative resources, ts: for this ontology, and skos: for preferred labels.

Core Identity And Declarations

These classes describe resources, declaration scopes, preferred names, aliases, and the binding between a name and the entity it denotes. They are how the ontology represents the naming layer that languages usually hide in modules, packages, imports, exports, schema registries, or namespaces.

ts:Entity

A resource that participates in a type-system graph.

ts:Entity is the common resource class for anything that needs identity inside a type-system graph. Use it for shared metadata such as skos:prefLabel and for generic containment links before a resource is narrowed to a type, value, declaration, slot, or evidence class.

Modeling Notes

ts:Vocabulary

A named collection of type-system declarations.

Use ts:Vocabulary for a named package of declarations that should travel together as a vocabulary unit. Its main job is ownership: it gathers ts:Declaration resources with ts:hasDeclaration without saying that the vocabulary itself is a type.

Modeling Notes

ts:Namespace

A semantic grouping scope for declarations.

Use ts:Namespace when declarations need a semantic grouping scope inside or across vocabularies. It is lighter than ts:Vocabulary: it organizes bindings with ts:hasDeclaration but does not imply a publication package.

Modeling Notes

ts:Declaration

A named binding for a type, value, alias, or namespace-local resource.

Use ts:Declaration for the binding between a preferred name and the resource that name denotes. The declaration carries the name with skos:prefLabel and points at the bound resource with ts:declares.

Modeling Notes

ts:TypeDeclaration

A named declaration whose declared resource is a type.

Use ts:TypeDeclaration when the declared resource is a ts:Type. This separates the named binding from the type node, which lets the same type resource participate in aliases, namespaces, and relation evidence.

Modeling Notes

ts:ValueDeclaration

A named declaration whose declared resource is a value.

Use ts:ValueDeclaration when the declared resource is a ts:Value. This is the declaration form for constants, defaults, enum values, or other graph values that need a preferred referential name.

Modeling Notes

ts:AliasDeclaration

A named declaration whose declared resource is an alias.

Use ts:AliasDeclaration when the declared resource is an ts:Alias. The declaration names the alias itself, while ts:aliasTarget on the alias identifies the resource being abbreviated.

Modeling Notes

ts:Alias

A type-system shorthand that points at another type-system resource.

Use ts:Alias for a first-class shorthand that points to another type-system resource. Model the shortcut as an entity so it can have its own preferred label, declaration, and target through ts:aliasTarget.

Modeling Notes

Type Roots And Intrinsics

These classes form the top of the type hierarchy and the built-in value-space markers used by downstream type facts. They let a graph preserve distinctions such as unknown versus permissive any, void versus null, and bottom types such as never.

ts:Type

A value type assignable to fields, parameters, results, collection elements, alternatives, enum members, template parameters, or values.

ts:Type is the root for resources that can stand in type position: fields, parameters, results, alternatives, enum members, values, and template constraints can all refer to it. Use direct subclasses to say what kind of value space the type represents.

Modeling Notes

ts:DataType

A type that describes data values.

Use ts:DataType for types that describe data values rather than callables, template projections, or error/result markers. Scalars, records, unions, enums, streams, and structured collections specialize this class.

Modeling Notes

ts:AnonymousTypeExpression

An inline type expression that has no declaration name of its own.

Use ts:AnonymousTypeExpression for inline type expressions that are not declaration-named. Combine it with a concrete expression class such as ts:RecordExpression or ts:UnionExpression and mark the node with ts:isAnonymous when useful.

Modeling Notes

ts:IntrinsicType

A built-in type supplied by the type system.

Use ts:IntrinsicType for built-in type-system resources supplied by the ontology or processor. It distinguishes built-ins such as ts:UnknownType and ts:AnyType from user-defined declarations without relying on spelling conventions.

Modeling Notes

ts:UnknownType

An intrinsic placeholder for values whose specific type is unknown or unresolved.

Use ts:UnknownType when a value has a type position but the specific value space is not known. It is useful as a conservative marker for template parameters, incomplete schemas, and relation targets without asserting that every built-in type is its subtype.

Modeling Notes

ts:AnyType

An intrinsic type that suppresses normal assignability precision.

Use ts:AnyType when the graph intentionally suppresses normal precision. Unlike ts:UnknownType, it represents a permissive escape hatch where assignability checks should not preserve detailed type information.

Modeling Notes

ts:VoidType

The absence of a result value.

Use ts:VoidType for callable results that intentionally return no value. It keeps “no result” in type position without modeling that absence as ts:NullType or as an omitted result slot.

Modeling Notes

ts:NeverType

The bottom type that no value can inhabit.

Use ts:NeverType for an uninhabited value space. It is the right marker for impossible alternatives, unreachable result positions, and relation evidence that needs a bottom type.

Modeling Notes

ts:NullType

The type inhabited by null.

Use ts:NullType for the type whose only inhabitant is null. Nullable shapes should usually use ts:NullableType to pair this null alternative with a non-null base type.

Modeling Notes

ts:ErrorType

A type that denotes an error case in a typed result space.

Use ts:ErrorType when an error case itself must appear in type position, for example in a typed result space. It is a ts:Type rather than a runtime exception model.

Modeling Notes

Scalar And Temporal Types

These classes describe atomic value spaces, numeric refinement, temporal kinds, and zone or offset semantics. They keep language scalar names, numeric widths, decimal precision, and temporal semantics as explicit facts instead of relying on a lossy primitive string.

ts:Scalar

An atomic primitive or user-defined value type.

ts:Scalar is the base for atomic value spaces. Use ts:baseScalar and ts:standardBaseScalar to describe refinements, and attach ts:ScalarInitializer resources when construction or parsing is part of the scalar contract.

Modeling Notes

ts:StringType

A scalar textual string type.

Use ts:StringType for textual scalar value spaces. Refined string-like domains can point back to ts:string with ts:baseScalar and use length facets when the allowed lexical space is constrained.

Language analogs: TypeScript string, Python str, Rust String or &str, GraphQL String, JSON Schema { "type": "string" }.

Modeling Notes

ts:UrlType

A string-like scalar constrained to URL values.

Use ts:UrlType for URL-constrained textual scalars. It remains a ts:StringType, so string facets and string assignability still apply while URL-specific meaning is explicit.

Modeling Notes

ts:BytesType

A scalar byte-sequence type.

Use ts:BytesType for byte-sequence scalars. Length facets such as ts:minLength and ts:maxLength describe fixed-size hashes, keys, or binary payload identifiers.

Modeling Notes

ts:BooleanType

A scalar boolean type.

Use ts:BooleanType for true-or-false scalar value spaces. Boolean values should refer to a boolean type through ts:declaredType or ts:inferredType, not through string or enum encodings.

Language analogs: TypeScript boolean, Python bool, Rust bool, GraphQL Boolean, JSON Schema { "type": "boolean" }.

Modeling Notes

ts:NumericType

A scalar numeric type.

ts:NumericType is the common parent for integer, floating, and decimal scalar spaces. Use it for shared numeric facets such as bounds, radix, precision, and widening relationships.

Modeling Notes

ts:IntegerType

A whole-number scalar type.

Use ts:IntegerType for whole-number numeric spaces. Built-ins such as ts:int32 and ts:uint64 combine this class with range and bit-width facets.

Language analogs: TypeScript number with integer constraints, Python int, Rust i64 or u64, GraphQL Int, JSON Schema { "type": "integer" }.

Modeling Notes

ts:FloatType

A floating-point scalar type.

Use ts:FloatType for approximate floating-point spaces. Precision, radix, exponent, and finite-magnitude facets describe the representation when the graph needs more detail than “number”.

Language analogs: TypeScript number, Python float, Rust f64, GraphQL Float, JSON Schema { "type": "number" }.

Modeling Notes

ts:DecimalType

A decimal scalar type.

Use ts:DecimalType for base-10 numeric spaces where decimal precision matters. This class is appropriate for money, measurements, and fixed or arbitrary precision decimal values.

Language analogs: Python decimal.Decimal, Rust Decimal from decimal crates, database DECIMAL or NUMERIC, and JSON Schema numeric strings or numbers with precision constraints.

Modeling Notes

ts:TemporalType

A scalar date, time, date-time, or duration type.

ts:TemporalType groups scalar date, time, date-time, and duration spaces. Use ts:temporalKind and ts:temporalZoneSemantics to make calendar and zone semantics explicit.

Modeling Notes

ts:DateType

A scalar calendar date type.

Use ts:DateType for calendar-date values without clock-time semantics. Pair it with ts:calendarDateTemporalKind and, where needed, a zone-semantics individual such as ts:noZoneTemporalSemantics.

Language analogs: Python datetime.date, JavaScript date-only strings, Rust chrono::NaiveDate, SQL DATE, JSON Schema format: date.

Modeling Notes

ts:TimeType

A scalar clock time type.

Use ts:TimeType for clock-time values. It should describe a time-of-day value space rather than a timestamp or duration.

Modeling Notes

ts:DateTimeType

A scalar instant or date-time type.

Use ts:DateTimeType for instant or date-time value spaces. Zone semantics distinguish UTC-normalized date-times from values that preserve an explicit offset.

Language analogs: Python datetime.datetime, JavaScript ISO timestamp strings or Date, Rust DateTime, SQL TIMESTAMP, JSON Schema format: date-time.

Modeling Notes

ts:DurationType

A scalar duration or time-period type.

Use ts:DurationType for duration or period value spaces. It represents elapsed or relative time rather than calendar dates or clock instants.

Language analogs: Python datetime.timedelta, JavaScript duration strings or millisecond counts, Rust std::time::Duration, and ISO 8601 duration literals.

Modeling Notes

ts:TemporalKind

A controlled value-space category for temporal scalars.

Use ts:TemporalKind individuals as controlled categories for temporal scalars. They let validators and processors distinguish date, time, date-time, and duration behavior without parsing a label.

Modeling Notes

ts:TemporalZoneSemantics

A controlled description of whether a temporal scalar carries zone or offset semantics.

Use ts:TemporalZoneSemantics individuals to state whether a temporal scalar has no zone, UTC semantics, explicit offset semantics, or no applicable zone concept.

Modeling Notes

Structured And Collection Types

These classes describe records, arrays, tuples, intersections, and the type-bearing slots that give those structures shape. They model child positions and keys separately from the container so field matching, tuple matching, and additional-property behavior can be explained.

ts:StructuredType

A data type with child slots, positions, keys, or alternatives.

ts:StructuredType is the parent for value spaces with internal shape: fields, positions, keys, constituents, or alternatives. Use its concrete subclasses to say which structural mechanism defines the values.

Modeling Notes

ts:CollectionType

A structured type whose values contain ordered or keyed child values.

Use ts:CollectionType for structured values that contain child values by order or key. Arrays and related collection forms specialize it with element, item-count, and lookup properties.

Modeling Notes

ts:RecordType

A structured type with named fields.

Use ts:RecordType for object-like values with named fields. Attach each ts:Field with ts:hasField, and describe closed or open shape behavior with exactness and additional-property properties.

Language analogs: TypeScript interface or object type, Python dataclass or TypedDict, Rust struct, GraphQL type, JSON Schema object.

Modeling Notes

ts:RecordExpression

An anonymous record type expression.

Use ts:RecordExpression for inline record shapes that do not have their own declaration name. It carries the same field structure as ts:RecordType while also being an ts:AnonymousTypeExpression.

Language analogs: inline TypeScript object types, Python TypedDict used locally, Rust anonymous struct-like values in macros, and JSON Schema object fragments.

Modeling Notes

ts:RecordMapType

A record-compatible type with arbitrary keyed fields of a common value type.

Use ts:RecordMapType for record-compatible maps where arbitrary keys share a common value type. ts:recordKeyType and ts:recordValueType describe the key and value spaces.

Language analogs: TypeScript Record<K, V>, Python dict[K, V], Rust HashMap<K, V>, GraphQL custom map scalars, JSON Schema additionalProperties.

Modeling Notes

ts:OptionRecordType

A record type used as typed options or parameter bags.

Use ts:OptionRecordType for typed option bags or parameter objects. It is still a ts:RecordType, but signals that optional named fields act as configuration inputs.

Language analogs: option bags in TypeScript and Python keyword-argument objects, Rust builder option structs, GraphQL input objects with optional fields, and JSON Schema partial objects.

Modeling Notes

ts:ArrayType

An ordered collection with a common element type.

Use ts:ArrayType for ordered collections with a common element type. Model the element value space with ts:arrayValueType and count constraints with item facets.

Language analogs: TypeScript T[] or Array<T>, Python list[T], Rust Vec<T>, GraphQL list types, JSON Schema arrays.

Modeling Notes

ts:ArrayExpression

An anonymous array type expression.

Use ts:ArrayExpression for inline array value spaces. It is the anonymous counterpart of ts:ArrayType and should carry the same element-type facts.

Modeling Notes

ts:TupleType

A fixed-position ordered collection with per-position element types.

Use ts:TupleType for ordered collections whose positions have distinct types or meanings. Attach ts:TupleElement resources with ts:tupleElement and preserve position using ts:ordinal.

Language analogs: TypeScript tuple types, Python tuple[T1, T2], Rust tuples, fixed-length JSON arrays, and database composite values.

Modeling Notes

ts:TupleExpression

An anonymous tuple type expression.

Use ts:TupleExpression for inline tuple shapes. It combines tuple position semantics with ts:AnonymousTypeExpression so it can appear directly inside another type expression.

Modeling Notes

ts:StreamType

A type whose values are delivered incrementally as elements of another type.

Use ts:StreamType for values delivered incrementally as elements over time. Its ts:streamElementType describes each emitted value, not a stored array.

Language analogs: TypeScript AsyncIterable<T>, Python AsyncIterator[T], Rust Stream<Item = T>, and reactive stream abstractions.

Modeling Notes

ts:IntersectionType

A type whose values satisfy all constituent types.

Use ts:IntersectionType when values must satisfy all listed constituent types. Attach each required value space with ts:intersectionConstituent.

Language analogs: TypeScript A & B, Python protocols composed through multiple inheritance, Rust trait bounds such as A + B, and JSON Schema allOf.

Modeling Notes

ts:IntersectionExpression

An anonymous intersection type expression.

Use ts:IntersectionExpression for inline intersections. It is useful when a composite constraint appears locally and does not merit a declaration of its own.

Modeling Notes

ts:TypedSlot

A field, tuple element, parameter, result, alternative, or lookup slot that carries values of a type.

ts:TypedSlot is the shared class for addressable positions that carry values of a type. Fields, parameters, results, alternatives, tuple elements, and indexers inherit cardinality and default-value behavior from this role.

Language analogs: typed positions such as TypeScript properties or parameters, Python annotated fields or parameters, Rust fields or function parameters, and GraphQL field or argument definitions.

Modeling Notes

ts:Field

A named slot on a record type.

Use ts:Field for a named slot on a ts:RecordType. The field points to its key with ts:fieldKey, to its value space with ts:fieldType, and to ordering or optionality facts when those matter.

Language analogs: TypeScript object properties, Python dataclass attributes or TypedDict keys, Rust struct fields, GraphQL fields, SQL columns, and JSON object properties.

Modeling Notes

ts:FieldKey

The declared key for a record field.

Use ts:FieldKey to model the declared key separately from the field. This keeps key text, escaping category, and field identity distinct.

Language analogs: property keys in TypeScript, dictionary keys in Python, field identifiers in Rust structs, GraphQL field names, and JSON object member names.

Modeling Notes

ts:FieldKeyKind

A controlled category for field keys.

Use ts:FieldKeyKind individuals to classify how a field key is written or interpreted, such as identifier keys versus string-literal keys.

Modeling Notes

ts:TupleElement

A typed position in a tuple type.

Use ts:TupleElement for a typed position in a ts:TupleType. The element type and ts:ordinal together define the meaning of the tuple position.

Language analogs: tuple positions in TypeScript, Python, and Rust, positional array schemas in JSON Schema, and ordered result columns in SQL row values.

Modeling Notes

ts:IndexerSlot

A typed lookup slot on an array or map-like type.

Use ts:IndexerSlot for lookup behavior on array-like or map-like types. The indexer key type and value type describe what can be addressed dynamically.

Language analogs: TypeScript index signatures, Python mapping key/value annotations, Rust map lookup types, and JSON Schema property-name plus additional-property constraints.

Modeling Notes

Choice Types

These classes describe value spaces selected from alternatives: unions, nullable types, discriminators, variants, enums, and enum members. They are meant to preserve both closed sets of named choices and structural alternatives with selector fields.

ts:Union

A type that admits values from one or more alternative types.

Use ts:Union for value spaces admitted by one or more alternatives. Alternatives should be materialized with ts:hasUnionAlternative when ordering, discriminator values, or evidence needs to point at them.

Language analogs: TypeScript unions and discriminated unions, Python typing.Union or |, Rust enum, GraphQL union, JSON Schema oneOf.

Modeling Notes

ts:UnionExpression

An anonymous union type expression.

Use ts:UnionExpression for inline unions. It is useful for local alternatives such as a parameter accepting a few literal types or a nullable expression embedded in a larger shape.

Modeling Notes

ts:NullableType

A union whose alternatives include null and one non-null base type.

Use ts:NullableType for the common union pattern of null plus one non-null base type. ts:nullableBaseType identifies the non-null value space directly.

Language analogs: TypeScript T | null, Python T | None, Rust Option<T>, nullable GraphQL fields, and JSON Schema unions with null.

Modeling Notes

ts:UnionAlternative

One ordered alternative of a union type.

Use ts:UnionAlternative for one branch of a union. It carries the admitted type, position, and optional discriminator value so relations can compare alternatives directly.

Language analogs: a member of a TypeScript union, a Python union arm, a Rust enum variant type, a GraphQL union member, or a JSON Schema oneOf branch.

Modeling Notes

ts:UnionVariant

A named union alternative that can also be referenced as a type.

Use ts:UnionVariant when a union alternative also needs to be referenced as a type. It is both an alternative slot and a ts:Type.

Language analogs: discriminated union cases in TypeScript, tagged dataclasses in Python, Rust enum variants, GraphQL object types admitted by a union, and tagged JSON objects.

Modeling Notes

ts:Discriminator

A type-level selector that distinguishes alternatives in a union.

Use ts:Discriminator for the selector that distinguishes union alternatives. It links to the selector field and to an envelope strategy so processors can find the discriminator in values.

Language analogs: TypeScript discriminant fields, Python tag fields, Rust serde tag attributes, GraphQL __typename-like selectors, and OpenAPI discriminator mappings.

Modeling Notes

ts:DiscriminatorEnvelope

A controlled discriminator placement strategy.

Use ts:DiscriminatorEnvelope individuals as controlled placement strategies for discriminated unions. They tell consumers whether the selector is embedded in an object envelope or absent.

Modeling Notes

ts:Enum

A type with a finite set of named members.

Use ts:Enum for finite named member sets. Attach each ts:EnumMember with ts:hasEnumMember and model member values explicitly when the enum has concrete values.

Language analogs: TypeScript enums or string-literal unions, Python Enum, Rust enum, GraphQL enum, JSON Schema enum.

Modeling Notes

ts:EnumMember

One named member of an enum type. A member can be referenced in type position and can denote a value.

Use ts:EnumMember for a named member of an enum that can also appear in type position. Link it back to the enum with ts:enumMemberOf and to its denoted value with ts:enumMemberValue .

Language analogs: TypeScript enum members or string-literal alternatives, Python enum members, Rust unit variants, GraphQL enum values, and JSON Schema enum values.

Modeling Notes

Callables, Templates, And Type Expressions

These classes describe callable signatures, generic resources, supplied arguments, and type-level expressions derived from values or constraints. They make overloads, generic bounds, type arguments, value arguments, defaults, and resulting types inspectable.

ts:CallableType

A function-like type with typed parameters and results.

Use ts:CallableType for function-like signatures. Materialize inputs with ts:ParameterSlot and outputs with ts:ResultSlot when callers, validators, or documentation need slot-level facts.

Language analogs: TypeScript function types, Python Callable or annotated def, Rust fn signatures or callable traits, GraphQL resolver signatures.

Modeling Notes

ts:CallableSetType

A type-level grouping of callable signatures.

Use ts:CallableSetType for a type-level grouping of callable signatures. It is the right class for overload sets, protocol surfaces, and callable collections.

Language analogs: overloaded TypeScript call signatures, Python overload sets, Rust trait implementations with multiple callable forms, and APIs with several resolver signatures.

Modeling Notes

ts:InterfaceType

A named callable set type.

Use ts:InterfaceType for a named callable set. It specializes ts:CallableSetType when the set acts as an interface rather than an anonymous group.

Language analogs: TypeScript interfaces, Python protocols or abstract base classes, Rust traits, GraphQL interfaces, and structural object contracts.

Modeling Notes

ts:CallableSetMembership

A relation between a callable set type and one callable type.

Use ts:CallableSetMembership when membership between a callable set and callable needs its own identity or metadata. Otherwise ts:hasCallable can link the set directly.

Modeling Notes

ts:ParameterSlot

A typed input slot of a callable type.

Use ts:ParameterSlot for a callable input. Its ts:parameterType, cardinality, default, and preferred label describe how the callable accepts arguments.

Language analogs: function parameters in TypeScript, Python, and Rust, GraphQL arguments, and RPC input positions.

Modeling Notes

ts:ResultSlot

A typed output slot of a callable type.

Use ts:ResultSlot for a callable output. Its ts:resultType and cardinality describe what the callable returns, including multi-result or optional-result shapes.

Language analogs: TypeScript return types, Python return annotations, Rust return types, GraphQL field return types, and RPC response value positions.

Modeling Notes

ts:TemplateParameter

A type-system parameter used to instantiate a generic type or callable.

ts:TemplateParameter is the shared class for parameters used to instantiate generic resources. Use its subclasses to distinguish type arguments, value arguments, or arguments that may be either.

Language analogs: generic parameters in TypeScript, type variables in Python, generic parameters in Rust, GraphQL schema-generator parameters, and template placeholders in IDLs.

Modeling Notes

ts:TypeParameter

A template parameter whose arguments are types.

Use ts:TypeParameter when a generic parameter accepts a type expression. Bounds and defaults belong on the parameter through ts:typeParameterConstraint and ts:typeParameterDefaultType.

Language analogs: TypeScript <T> parameters, Python TypeVar, Rust generic type parameters, and parameterized schema types.

Modeling Notes

ts:ValueParameter

A template parameter whose arguments are values.

Use ts:ValueParameter when a generic parameter accepts a value. Defaults and value-space constraints remain explicit type-system facts rather than prose on the declaration.

Language analogs: const generic parameters in Rust, literal-constrained TypeScript generics, Python value parameters in factory types, and schema templates parameterized by values.

Modeling Notes

ts:TypeOrValueParameter

A template parameter that can accept either a type argument or a value argument.

Use ts:TypeOrValueParameter when the same generic parameter can accept either a type or a value expression. Supplied arguments should state which form they take.

Modeling Notes

ts:TemplateInstantiation

The result of applying template arguments to a generic type-system entity.

Use ts:TemplateInstantiation for the result of applying arguments to a generic type-system entity. It records the generic with ts:instantiates, supplied arguments with ts:templateArgument, and the produced type with ts:resultingType.

Language analogs: TypeScript Page<Customer>, Python list[Customer], Rust Vec<Customer>, and generated schema aliases with concrete arguments.

Modeling Notes

ts:TemplateArgument

One supplied argument for a template instantiation.

Use ts:TemplateArgument for one supplied argument in an instantiation. It connects back to the parameter it satisfies and can carry ordering, named-argument, expression, and conformance facts.

Language analogs: the Customer in TypeScript Page<Customer>, Python list[Customer], and Rust Vec<Customer>.

Modeling Notes

ts:TypeArgument

A template argument whose supplied expression is a type.

Use ts:TypeArgument when the supplied template argument is a type. Put the type expression in ts:argumentType and keep evaluation order separate with ts:argumentEvaluationOrdinal.

Language analogs: concrete generic type arguments such as TypeScript Customer, Python Customer, or Rust Customer inside a parameterized type.

Modeling Notes

ts:ValueArgument

A template argument whose supplied expression is a value.

Use ts:ValueArgument when the supplied template argument is a value. Put the value in ts:argumentValue and use conformance evidence when the value must satisfy a parameter constraint.

Language analogs: Rust const-generic values such as array lengths, literal template parameters in schema generators, and value-level options passed to generated types.

Modeling Notes

ts:ValueOfType

A type-level constraint whose accepted values have a declared or inferred type assignable to a base type.

Use ts:ValueOfType for a type-level constraint over values assignable to a base type. It is useful for value parameters that must be values of some type rather than arbitrary literals.

Language analogs: type annotation edges such as TypeScript const x: T, Python x: T, Rust let x: T, and JSON values validated against a schema.

Modeling Notes

ts:TypeOfValue

A type expression produced from the declared or inferred type of a value.

Use ts:TypeOfValue for a type expression projected from a value. The expression names the value with ts:typeOfValue and can record the resolved result type with ts:typeOfResultType.

Language analogs: inferred type queries such as TypeScript typeof value, Python runtime class inspection, Rust inferred binding types, and schema inference over example values.

Modeling Notes

Literals And Values

These classes distinguish exact literal value spaces from concrete values represented inside a type-system graph. Literal types answer “which values are allowed”; value resources answer “which value is present here.”

ts:LiteralType

A type-level literal expression, including exact singleton literal value spaces, template literal value spaces, and enum or union member references used in literal position.

Use ts:LiteralType when a type expression is literal-like. Exact singleton literals should state the literal category, base type, and concrete literal value when those facts are known.

Language analogs: TypeScript literal types, Python typing.Literal, Rust unit variants or const values, JSON Schema const, and singleton value spaces.

Modeling Notes

ts:LiteralKind

A controlled category for literal type resources.

Use ts:LiteralKind individuals as controlled categories for literal types. They let processors distinguish string, numeric, boolean, null, enum-member, and union-variant references.

Modeling Notes

ts:StringLiteralType

A literal type whose only inhabitant is a specific string value.

Use ts:StringLiteralType for a type inhabited by one specific string. Store the concrete string with ts:literalValue or ts:stringValue as appropriate.

Language analogs: TypeScript string literal types, Python Literal["value"], Rust string constants used as tags, and JSON Schema string const values.

Modeling Notes

ts:StringTemplateLiteralType

A literal type assembled from string literal and interpolation parts.

Use ts:StringTemplateLiteralType for literal types assembled from string literal and interpolated parts. Attach ordered ts:StringTemplatePart resources with ts:hasTemplatePart.

Modeling Notes

ts:StringTemplatePart

A literal text or interpolation part of a string template literal.

Use ts:StringTemplatePart for each literal or interpolated component of a template literal. It can carry a literal value, an interpolated value expression, and conformance evidence for string compatibility.

Modeling Notes

ts:NumericLiteralType

A literal type whose only inhabitant is a specific numeric value.

Use ts:NumericLiteralType for a type inhabited by one numeric value. Numeric facts such as ts:numericValue and ts:isIntegralNumericValue preserve the literal semantics.

Language analogs: TypeScript numeric literal types, Python numeric Literal values, Rust const numeric values, and JSON Schema numeric const values.

Modeling Notes

ts:BooleanLiteralType

A literal type whose only inhabitant is true or false.

Use ts:BooleanLiteralType for a type inhabited only by true or false. It keeps boolean literal types distinct from the broader ts:BooleanType value space.

Language analogs: TypeScript true or false literal types, Python Literal[True], Rust boolean constants, and JSON Schema boolean const values.

Modeling Notes

ts:NullLiteralType

A literal type whose only inhabitant is null.

Use ts:NullLiteralType for a literal type whose only inhabitant is null. This is the literal-type counterpart to the built-in ts:NullType.

Language analogs: TypeScript null, Python None, Rust None when paired with an option type, GraphQL nullable absence, and JSON null.

Modeling Notes

ts:EnumMemberReferenceLiteralType

A literal-like type expression produced by referring to an enum member in type position.

Use ts:EnumMemberReferenceLiteralType when type syntax refers to an enum member as a literal-like type. It preserves that reference without collapsing it to the member's concrete value.

Modeling Notes

ts:UnionVariantReferenceLiteralType

A literal-like type expression produced by referring to a union variant in type position.

Use ts:UnionVariantReferenceLiteralType when type syntax refers to a union variant as a literal-like type. It preserves the variant reference as a type-level expression.

Modeling Notes

ts:Value

A value in the type-system graph.

ts:Value is the root for concrete or graph-level values. Values can carry declared and inferred type facts and can be used as defaults, discriminator values, enum values, or template arguments.

Language analogs: TypeScript constants, Python assigned values, Rust constants or literals, JSON values, and RDF individuals that represent concrete values.

Modeling Notes

ts:ConstValue

A named value binding with a declared or inferred type.

Use ts:ConstValue for a named value binding with a stable preferred name. It is the value-side counterpart to declarations for constants and named defaults.

Language analogs: TypeScript as const values, Python module constants, Rust const items, GraphQL enum values, and JSON Schema const examples.

Modeling Notes

ts:ScalarValue

A scalar value.

Use ts:ScalarValue for concrete scalar values before narrowing to string, numeric, or boolean value classes. It gives shared typing behavior to atomic values.

Modeling Notes

ts:StringValue

A scalar value whose concrete value is a string.

Use ts:StringValue for concrete string values. Store the value with ts:stringValue and point at its value space with ts:declaredType or ts:inferredType.

Language analogs: JavaScript or TypeScript string values, Python str values, Rust String or &str values, GraphQL string values, and JSON strings.

Modeling Notes

ts:NumericValue

A scalar value whose concrete value is numeric.

Use ts:NumericValue for concrete numeric values. Store the numeric content with ts:numericValue and use the declared or inferred type to distinguish integer, float, or decimal meaning.

Language analogs: TypeScript number values, Python int, float, or Decimal values, Rust numeric values, GraphQL numeric values, and JSON numbers.

Modeling Notes

ts:BooleanValue

A scalar value whose concrete value is boolean.

Use ts:BooleanValue for concrete boolean values. Store the boolean content with ts:booleanValue instead of encoding booleans as strings or enum members.

Language analogs: TypeScript boolean values, Python bool values, Rust bool values, GraphQL boolean values, and JSON booleans.

Modeling Notes

ts:NullValue

The null value.

Use ts:NullValue for the concrete null value. It can be attached as a default, discriminator value, or argument while retaining explicit value identity.

Modeling Notes

ts:EnumValue

A value that denotes a specific enum member.

Use ts:EnumValue for a value that denotes a specific enum member. It is the value-level resource that can be referenced by defaults, literals, or member facts.

Modeling Notes

ts:ObjectValue

An object value with named members.

Use ts:ObjectValue for concrete object-shaped values. Attach ts:ObjectValueMember resources so each member value can have its own name, ordering, or type facts.

Language analogs: JavaScript object literals, Python dictionaries or dataclass instances, Rust struct values, GraphQL input objects, and JSON objects.

Modeling Notes

ts:ObjectValueMember

A named member of an object value.

Use ts:ObjectValueMember for a named member inside an ts:ObjectValue. The member name and member value are separate so object values can preserve structure and value identity.

Modeling Notes

ts:ArrayValue

An array value with ordered items.

Use ts:ArrayValue for concrete ordered arrays. Attach ts:ArrayValueItem resources with ts:arrayItem so item values and positions remain explicit.

Language analogs: JavaScript arrays, Python lists, Rust vectors or arrays, GraphQL lists, and JSON arrays.

Modeling Notes

ts:ArrayValueItem

An ordered item of an array value.

Use ts:ArrayValueItem for one ordered item in an ts:ArrayValue. The item carries both its value and ordinal position.

Modeling Notes

Scalar Initializers

These classes model scalar constructors and parser-like calls when the callable form is part of the scalar type contract. They describe construction semantics without turning the type ontology into a general runtime execution model.

ts:ScalarInitializer

A callable type-level resource that constructs or parses values for a scalar type.

Use ts:ScalarInitializer when constructing or parsing scalar values is part of the type contract. Because it is a callable type, it can expose parameters, results, and semantic kind.

Language analogs: TypeScript factory functions, Python class methods or constructors, Rust FromStr or TryFrom, and scalar coercion hooks in schema systems.

Modeling Notes

ts:ScalarConstructorInitializer

A scalar initializer that constructs a scalar value directly from an input value.

Use ts:ScalarConstructorInitializer for initializers that directly construct scalar values from input values. It specializes scalar initialization for constructor-like conversion behavior.

Language analogs: constructors such as TypeScript new CustomerId(value), Python CustomerId(value), and Rust tuple struct constructors.

Modeling Notes

ts:ScalarInitializerSemanticKind

A controlled category for scalar initializer behavior.

Use ts:ScalarInitializerSemanticKind individuals to classify initializer behavior, such as value conversion, ISO lexical parsing, or current temporal value creation.

Modeling Notes

ts:ScalarInitializerCall

A value produced by invoking a scalar initializer.

Use ts:ScalarInitializerCall for a value produced by invoking a scalar initializer. It records which initializer was invoked and which arguments were supplied.

Language analogs: a concrete call to a parser, constructor, or coercion function, such as TypeScript CustomerId.fromString(input) or Rust input.parse().

Modeling Notes

ts:InitializerArgument

One supplied argument in a scalar initializer call.

Use ts:InitializerArgument for one supplied argument in a scalar initializer call. It points to the parameter slot it satisfies and to the value supplied.

Modeling Notes

Type Relations And Evidence

These classes materialize assignability, subtype, exactness, failure, and structural evidence between two type positions. They are the explanation layer for type checking, schema compatibility, migration checks, and generated diagnostics.

ts:TypeRelation

A first-class assertion about the relationship between two types.

Use ts:TypeRelation when a relationship between two types must be first-class in the graph. The relation records its two endpoint types and can carry evidence resources.

Language analogs: assignability checks in TypeScript, protocol or structural compatibility checks in Python, trait-bound satisfaction in Rust, and schema compatibility results.

Modeling Notes

ts:AssignableTypeRelation

A type relation whose source type can be assigned to the target type.

Use ts:AssignableTypeRelation when values of one type can be assigned to another type. It is the positive assignability relation that evidence and structural matches can justify.

Language analogs: TypeScript successful assignment, Python value accepted by an annotation or protocol, Rust type satisfying a required trait bound, and schema validation accepted as compatible.

Modeling Notes

ts:SubtypeRelation

A type relation whose source type is a subtype of the target type.

Use ts:SubtypeRelation when the relation is specifically subtype-to-supertype. It specializes assignability for hierarchy-style reasoning.

Language analogs: class or interface subtyping, TypeScript structural subtyping, Python protocol satisfaction, Rust trait implementation relationships, and schema narrowing.

Modeling Notes

ts:ExactTypeRelation

A type relation whose source and target have the same inhabited shape or value space.

Use ts:ExactTypeRelation when two types have the same inhabited shape or value space. It is stricter than ordinary assignability because both endpoints describe equivalent values.

Language analogs: exact type equality checks, invariant generic matches, closed-schema equality, and cases where two aliases denote the same value space.

Modeling Notes

ts:NonAssignableTypeRelation

A type relation whose source type cannot be assigned to the target type.

Use ts:NonAssignableTypeRelation when a failed assignability check is itself useful evidence. It lets validators explain why a source endpoint cannot be used at a target endpoint.

Language analogs: TypeScript assignment errors, Python type-checker incompatibilities, Rust trait-bound failures, and schema compatibility failures.

Modeling Notes

ts:TypeRelationEvidence

Evidence attached to a first-class type relation.

Use ts:TypeRelationEvidence for explanation attached to a ts:TypeRelation. Evidence can record endpoint types, a rule label, and structural match resources.

Language analogs: compiler diagnostics or proof traces that explain an assignment result, such as matched fields, matched alternatives, or the first incompatible slot.

Modeling Notes

ts:FieldMatch

Evidence that compares one source field with one target field.

Use ts:FieldMatch when relation evidence compares a field on one side to a field on the other side. It can point to the field-level relation that proves compatibility.

Language analogs: property-by-property comparison in TypeScript structural typing, Python protocol matching, Rust struct-field mapping, and JSON object schema property matching.

Modeling Notes

ts:AlternativeMatch

Evidence that compares one source union alternative with one target alternative or covering type.

Use ts:AlternativeMatch when relation evidence compares union alternatives. It preserves which alternatives were matched and which relation justified the comparison.

Language analogs: selecting the accepted arm of a TypeScript union, Python union, Rust enum-like decoding path, GraphQL union member, or JSON Schema oneOf branch.

Modeling Notes

ts:TupleElementMatch

Evidence that compares one source tuple element with one target tuple element.

Use ts:TupleElementMatch when relation evidence compares tuple positions. It keeps positional compatibility distinct from field or collection-element compatibility.

Language analogs: comparing tuple positions in TypeScript, Python, or Rust, and validating positional array items in JSON Schema.

Modeling Notes

ts:CollectionElementTypeMatch

Evidence that compares collection element value spaces.

Use ts:CollectionElementTypeMatch when relation evidence compares collection element value spaces. It is appropriate for arrays, streams, and other collection-like types.

Language analogs: checking array element types in TypeScript, list element types in Python, vector item types in Rust, GraphQL list item types, and JSON Schema item schemas.

Modeling Notes

Vocabulary Reference

This section defines every Inferal-owned term in the type-system namespace. The definitions below are derived from ontology.ttl and are the targets used by cross-references throughout this specification. Links to ts: terms use explicit fragment references because ReSpec normalizes definition labels case-insensitively, while RDF IRIs remain case-sensitive.

Read this section as the compact dictionary for the ontology. The class model explains how to use terms together; this reference gives the exact term, definition, domain, range, and built-in individual target needed by implementers and validators.

Class Definitions

Class rows define the RDF type that a resource can assert with rdf:type. When a row says that a class is a subclass of another class, processors can use that relationship during validation and during higher-level language mapping.

Term Definition Class relation
ts:EntityA resource that participates in a type-system graph.Root class in this module.
ts:VocabularyA named collection of type-system declarations.Subclass of ts:Entity.
ts:NamespaceA semantic grouping scope for declarations.Subclass of ts:Entity.
ts:DeclarationA named binding for a type, value, alias, or namespace-local resource.Subclass of ts:Entity.
ts:TypeDeclarationA named declaration whose declared resource is a type.Subclass of ts:Declaration.
ts:ValueDeclarationA named declaration whose declared resource is a value.Subclass of ts:Declaration.
ts:AliasDeclarationA named declaration whose declared resource is an alias.Subclass of ts:Declaration.
ts:AliasA type-system shorthand that points at another type-system resource.Subclass of ts:Entity.
ts:TypeA value type assignable to fields, parameters, results, collection elements, alternatives, enum members, template parameters, or values.Subclass of ts:Entity.
ts:AnonymousTypeExpressionAn inline type expression that has no declaration name of its own.Subclass of ts:Type.
ts:IntrinsicTypeA built-in type supplied by the type system.Subclass of ts:Type.
ts:DataTypeA type that describes data values.Subclass of ts:Type.
ts:ScalarAn atomic primitive or user-defined value type.Subclass of ts:DataType.
ts:StringTypeA scalar textual string type.Subclass of ts:Scalar.
ts:UrlTypeA string-like scalar constrained to URL values.Subclass of ts:StringType.
ts:BytesTypeA scalar byte-sequence type.Subclass of ts:Scalar.
ts:BooleanTypeA scalar boolean type.Subclass of ts:Scalar.
ts:NumericTypeA scalar numeric type.Subclass of ts:Scalar.
ts:IntegerTypeA whole-number scalar type.Subclass of ts:NumericType.
ts:FloatTypeA floating-point scalar type.Subclass of ts:NumericType.
ts:DecimalTypeA decimal scalar type.Subclass of ts:NumericType.
ts:TemporalTypeA scalar date, time, date-time, or duration type.Subclass of ts:Scalar.
ts:DateTypeA scalar calendar date type.Subclass of ts:TemporalType.
ts:TimeTypeA scalar clock time type.Subclass of ts:TemporalType.
ts:DateTimeTypeA scalar instant or date-time type.Subclass of ts:TemporalType.
ts:DurationTypeA scalar duration or time-period type.Subclass of ts:TemporalType.
ts:TemporalKindA controlled value-space category for temporal scalars.Subclass of ts:Entity.
ts:TemporalZoneSemanticsA controlled description of whether a temporal scalar carries zone or offset semantics.Subclass of ts:Entity.
ts:NullTypeThe type inhabited by null.Subclass of ts:IntrinsicType.
ts:UnknownTypeAn intrinsic placeholder for values whose specific type is unknown or unresolved.Subclass of ts:IntrinsicType.
ts:AnyTypeAn intrinsic type that suppresses normal assignability precision.Subclass of ts:IntrinsicType.
ts:VoidTypeThe absence of a result value.Subclass of ts:IntrinsicType.
ts:NeverTypeThe bottom type that no value can inhabit.Subclass of ts:IntrinsicType.
ts:ErrorTypeA type that denotes an error case in a typed result space.Subclass of ts:Type.
ts:StructuredTypeA data type with child slots, positions, keys, or alternatives.Subclass of ts:DataType.
ts:CollectionTypeA structured type whose values contain ordered or keyed child values.Subclass of ts:StructuredType.
ts:RecordTypeA structured type with named fields.Subclass of ts:StructuredType.
ts:RecordExpressionAn anonymous record type expression.Subclass of ts:RecordType, ts:AnonymousTypeExpression.
ts:RecordMapTypeA record-compatible type with arbitrary keyed fields of a common value type.Subclass of ts:RecordType.
ts:OptionRecordTypeA record type used as typed options or parameter bags.Subclass of ts:RecordType.
ts:ArrayTypeAn ordered collection with a common element type.Subclass of ts:CollectionType.
ts:ArrayExpressionAn anonymous array type expression.Subclass of ts:ArrayType, ts:AnonymousTypeExpression.
ts:TupleTypeA fixed-position ordered collection with per-position element types.Subclass of ts:ArrayType.
ts:TupleExpressionAn anonymous tuple type expression.Subclass of ts:TupleType, ts:AnonymousTypeExpression.
ts:StreamTypeA type whose values are delivered incrementally as elements of another type.Subclass of ts:DataType.
ts:IntersectionTypeA type whose values satisfy all constituent types.Subclass of ts:StructuredType.
ts:IntersectionExpressionAn anonymous intersection type expression.Subclass of ts:IntersectionType, ts:AnonymousTypeExpression.
ts:TypedSlotA field, tuple element, parameter, result, alternative, or lookup slot that carries values of a type.Subclass of ts:Entity.
ts:FieldA named slot on a record type.Subclass of ts:TypedSlot.
ts:FieldKeyThe declared key for a record field.Subclass of ts:Entity.
ts:FieldKeyKindA controlled category for field keys.Subclass of ts:Entity.
ts:TupleElementA typed position in a tuple type.Subclass of ts:TypedSlot.
ts:IndexerSlotA typed lookup slot on an array or map-like type.Subclass of ts:TypedSlot.
ts:UnionA type that admits values from one or more alternative types.Subclass of ts:DataType.
ts:UnionExpressionAn anonymous union type expression.Subclass of ts:Union, ts:AnonymousTypeExpression.
ts:NullableTypeA union whose alternatives include null and one non-null base type.Subclass of ts:Union.
ts:UnionAlternativeOne ordered alternative of a union type.Subclass of ts:TypedSlot.
ts:UnionVariantA named union alternative that can also be referenced as a type.Subclass of ts:UnionAlternative, ts:Type.
ts:DiscriminatorA type-level selector that distinguishes alternatives in a union.Subclass of ts:Entity.
ts:DiscriminatorEnvelopeA controlled discriminator placement strategy.Subclass of ts:Entity.
ts:EnumA type with a finite set of named members.Subclass of ts:DataType.
ts:EnumMemberOne named member of an enum type. A member can be referenced in type position and can denote a value.Subclass of ts:Type.
ts:CallableTypeA function-like type with typed parameters and results.Subclass of ts:Type.
ts:CallableSetTypeA type-level grouping of callable signatures.Subclass of ts:Type.
ts:InterfaceTypeA named callable set type.Subclass of ts:CallableSetType.
ts:CallableSetMembershipA relation between a callable set type and one callable type.Subclass of ts:Entity.
ts:ParameterSlotA typed input slot of a callable type.Subclass of ts:TypedSlot.
ts:ResultSlotA typed output slot of a callable type.Subclass of ts:TypedSlot.
ts:TemplateParameterA type-system parameter used to instantiate a generic type or callable.Subclass of ts:TypedSlot.
ts:TypeParameterA template parameter whose arguments are types.Subclass of ts:TemplateParameter and ts:Type.
ts:ValueParameterA template parameter whose arguments are values.Subclass of ts:TemplateParameter.
ts:TypeOrValueParameterA template parameter that can accept either a type argument or a value argument.Subclass of ts:TemplateParameter.
ts:TemplateInstantiationThe result of applying template arguments to a generic type-system entity.Subclass of ts:Type.
ts:TemplateArgumentOne supplied argument for a template instantiation.Subclass of ts:Entity.
ts:TypeArgumentA template argument whose supplied expression is a type.Subclass of ts:TemplateArgument.
ts:ValueArgumentA template argument whose supplied expression is a value.Subclass of ts:TemplateArgument.
ts:ValueOfTypeA type-level constraint whose accepted values have a declared or inferred type assignable to a base type.Subclass of ts:Type.
ts:TypeOfValueA type expression produced from the declared or inferred type of a value.Subclass of ts:Type.
ts:LiteralTypeA type-level literal expression, including exact singleton literal value spaces, template literal value spaces, and enum or union member references used in literal position.Subclass of ts:Type.
ts:LiteralKindA controlled category for literal type resources.Subclass of ts:Entity.
ts:StringLiteralTypeA literal type whose only inhabitant is a specific string value.Subclass of ts:LiteralType.
ts:StringTemplateLiteralTypeA literal type assembled from string literal and interpolation parts.Subclass of ts:LiteralType.
ts:StringTemplatePartA literal text or interpolation part of a string template literal.Subclass of ts:Entity.
ts:NumericLiteralTypeA literal type whose only inhabitant is a specific numeric value.Subclass of ts:LiteralType.
ts:BooleanLiteralTypeA literal type whose only inhabitant is true or false.Subclass of ts:LiteralType.
ts:NullLiteralTypeA literal type whose only inhabitant is null.Subclass of ts:LiteralType.
ts:EnumMemberReferenceLiteralTypeA literal-like type expression produced by referring to an enum member in type position.Subclass of ts:LiteralType.
ts:UnionVariantReferenceLiteralTypeA literal-like type expression produced by referring to a union variant in type position.Subclass of ts:LiteralType.
ts:ValueA value in the type-system graph.Subclass of ts:Entity.
ts:ConstValueA named value binding with a declared or inferred type.Subclass of ts:Value.
ts:ScalarValueA scalar value.Subclass of ts:Value.
ts:StringValueA scalar value whose concrete value is a string.Subclass of ts:ScalarValue.
ts:NumericValueA scalar value whose concrete value is numeric.Subclass of ts:ScalarValue.
ts:BooleanValueA scalar value whose concrete value is boolean.Subclass of ts:ScalarValue.
ts:NullValueThe null value.Subclass of ts:Value.
ts:EnumValueA value that denotes a specific enum member.Subclass of ts:Value.
ts:ObjectValueAn object value with named members.Subclass of ts:Value.
ts:ObjectValueMemberA named member of an object value.Subclass of ts:Entity.
ts:ArrayValueAn array value with ordered items.Subclass of ts:Value.
ts:ArrayValueItemAn ordered item of an array value.Subclass of ts:Entity.
ts:ScalarInitializerA callable type-level resource that constructs or parses values for a scalar type.Subclass of ts:CallableType.
ts:ScalarConstructorInitializerA scalar initializer that constructs a scalar value directly from an input value.Subclass of ts:ScalarInitializer.
ts:ScalarInitializerSemanticKindA controlled category for scalar initializer behavior.Subclass of ts:Entity.
ts:ScalarInitializerCallA value produced by invoking a scalar initializer.Subclass of ts:Value.
ts:InitializerArgumentOne supplied argument in a scalar initializer call.Subclass of ts:Entity.
ts:TypeRelationA first-class assertion about the relationship between two types.Subclass of ts:Entity.
ts:AssignableTypeRelationA type relation whose source type can be assigned to the target type.Subclass of ts:TypeRelation.
ts:SubtypeRelationA type relation whose source type is a subtype of the target type.Subclass of ts:AssignableTypeRelation.
ts:ExactTypeRelationA type relation whose source and target have the same inhabited shape or value space.Subclass of ts:AssignableTypeRelation.
ts:NonAssignableTypeRelationA type relation whose source type cannot be assigned to the target type.Subclass of ts:TypeRelation.
ts:TypeRelationEvidenceEvidence attached to a first-class type relation.Subclass of ts:Entity.
ts:FieldMatchEvidence that compares one source field with one target field.Subclass of ts:Entity.
ts:AlternativeMatchEvidence that compares one source union alternative with one target alternative or covering type.Subclass of ts:Entity.
ts:TupleElementMatchEvidence that compares one source tuple element with one target tuple element.Subclass of ts:Entity.
ts:CollectionElementTypeMatchEvidence that compares collection element value spaces.Subclass of ts:Entity.

Object Property Definitions

Object properties connect one type-system resource to another. Domains and ranges are not syntax restrictions on one programming language; they describe the graph shape a conforming data graph should use.

Term Definition Domain Range
ts:hasDeclarationConnects a vocabulary or namespace to a declaration it owns.ts:Entityts:Declaration
ts:declaresConnects a declaration to the type-system resource it binds.ts:Declarationts:Entity
ts:aliasTargetConnects an alias to its target type-system resource.ts:Aliasts:Entity
ts:declaredTypeConnects a value to its explicitly declared type.ts:Valuets:Type
ts:inferredTypeConnects a value to its inferred type.ts:Valuets:Type
ts:defaultValueConnects a typed slot or parameter to its default value.ts:Entityts:Value
ts:subtypeOfConnects a source type to a supertype.ts:Typets:Type
ts:assignableToConnects a source type to a target type to which values of the source can be assigned.ts:Typets:Type
ts:baseScalarConnects a scalar to the scalar it directly refines.ts:Scalarts:Scalar
ts:standardBaseScalarConnects a scalar to its nearest standard scalar value space.ts:Scalarts:Scalar
ts:numericRangeAssignableToConnects numeric scalar types whose value ranges make assignment valid.ts:NumericTypets:NumericType
ts:temporalKindConnects a temporal scalar to its value-space category.ts:TemporalTypets:TemporalKind
ts:temporalZoneSemanticsConnects a temporal scalar to its zone or offset semantics.ts:TemporalTypets:TemporalZoneSemantics
ts:relationSourceTypeThe source type of a type relation.ts:TypeRelationts:Type
ts:relationTargetTypeThe target type of a type relation.ts:TypeRelationts:Type
ts:hasEvidenceConnects a type relation to evidence supporting it.ts:TypeRelationts:TypeRelationEvidence
ts:evidenceRelationConnects evidence to the type relation it supports.ts:TypeRelationEvidencets:TypeRelation
ts:evidenceSourceTypeThe source type described by type relation evidence.ts:TypeRelationEvidencets:Type
ts:evidenceTargetTypeThe target type described by type relation evidence.ts:TypeRelationEvidencets:Type
ts:hasFieldMatchConnects type relation evidence to field-level match evidence.ts:TypeRelationEvidencets:FieldMatch
ts:hasAlternativeMatchConnects type relation evidence to union-alternative match evidence.ts:TypeRelationEvidencets:AlternativeMatch
ts:hasTupleElementMatchConnects type relation evidence to tuple-element match evidence.ts:TypeRelationEvidencets:TupleElementMatch
ts:hasCollectionElementTypeMatchConnects type relation evidence to collection element-type match evidence.ts:TypeRelationEvidencets:CollectionElementTypeMatch
ts:valueTypeThe type of values accepted by a typed slot.ts:TypedSlotts:Type
ts:hasFieldConnects a record type to one of its fields.ts:RecordTypets:Field
ts:fieldTypeThe value type of a field.ts:Fieldts:Type
ts:fieldKeyConnects a field to its declared key.ts:Fieldts:FieldKey
ts:fieldKeyKindConnects a field key to its key kind.ts:FieldKeyts:FieldKeyKind
ts:elementTypeThe common element type of a collection type.ts:CollectionTypets:Type
ts:arrayValueTypeThe element type accepted by an array type.ts:ArrayTypets:Type
ts:streamElementTypeThe element type delivered by a stream type.ts:StreamTypets:Type
ts:tupleElementConnects a tuple type to one of its ordered elements.ts:TupleTypets:TupleElement
ts:tupleElementTypeThe value type of a tuple element.ts:TupleElementts:Type
ts:hasIndexerSlotConnects a collection type to a lookup slot.ts:CollectionTypets:IndexerSlot
ts:indexerKeyTypeThe key type accepted by an indexer slot.ts:IndexerSlotts:Type
ts:indexerValueTypeThe value type returned by an indexer slot.ts:IndexerSlotts:Type
ts:recordKeyTypeThe key type accepted by a record map.ts:RecordMapTypets:Type
ts:recordValueTypeThe value type accepted by a record map.ts:RecordMapTypets:Type
ts:additionalPropertyTypeThe type accepted by additional properties on a record-like type.ts:RecordTypets:Type
ts:additionalPropertiesRecordConnects a record type to the record-map type that describes its additional fields.ts:RecordTypets:RecordMapType
ts:intersectionConstituentConnects an intersection type to one of its constituent types.ts:IntersectionTypets:Type
ts:hasUnionAlternativeConnects a union to one of its alternatives.ts:Unionts:UnionAlternative
ts:alternativeTypeThe type admitted by a union alternative.ts:UnionAlternativets:Type
ts:nullableBaseTypeThe non-null base type admitted by a nullable type.ts:NullableTypets:Type
ts:admittedByUnionConnects a type to a union that admits values of that type.ts:Typets:Union
ts:unionVariantOfConnects a union variant to its owning union.ts:UnionVariantts:Union
ts:hasDiscriminatorConnects a union to a discriminator used to distinguish its alternatives.ts:Unionts:Discriminator
ts:discriminatorFieldConnects a discriminator to the field that carries the selector value.ts:Discriminatorts:Field
ts:discriminatorValueConnects a union alternative or variant to its selector value.ts:UnionAlternativets:Value
ts:discriminatorEnvelopeConnects a discriminator to its placement strategy.ts:Discriminatorts:DiscriminatorEnvelope
ts:hasEnumMemberConnects an enum to one of its members.ts:Enumts:EnumMember
ts:enumMemberTypeThe value type used by an enum member.ts:EnumMemberts:Type
ts:enumMemberValueThe value denoted by an enum member.ts:EnumMemberts:Value
ts:enumMemberOfConnects an enum member to its owning enum.ts:EnumMemberts:Enum
ts:hasParameterSlotConnects a callable type to one of its parameter slots.ts:CallableTypets:ParameterSlot
ts:hasResultSlotConnects a callable type to one of its result slots.ts:CallableTypets:ResultSlot
ts:parameterTypeThe value type accepted by a parameter slot.ts:ParameterSlotts:Type
ts:resultTypeThe value type returned by a result slot.ts:ResultSlotts:Type
ts:hasCallableConnects a callable set type to a callable type.ts:CallableSetTypets:CallableType
ts:membershipSetThe callable set participating in a callable set membership.ts:CallableSetMembershipts:CallableSetType
ts:membershipCallableThe callable participating in a callable set membership.ts:CallableSetMembershipts:CallableType
ts:literalBaseTypeThe base type inhabited by a literal type.ts:LiteralTypets:Type
ts:literalKindConnects a literal type to its controlled literal category.ts:LiteralTypets:LiteralKind
ts:hasTemplatePartConnects a string template literal type to one of its ordered parts.ts:StringTemplateLiteralTypets:StringTemplatePart
ts:templatePartValueThe literal value carried by a string template part.ts:StringTemplatePartts:Value
ts:templatePartExpressionThe value expression interpolated by a string template part.ts:StringTemplatePartts:Value
ts:templatePartConformanceA type relation proving that an interpolated value is string-compatible.ts:StringTemplatePartts:TypeRelation
ts:hasTemplateParameterConnects a generic type-system entity to one of its template parameters.ts:Entityts:TemplateParameter
ts:hasTypeParameterConnects a generic type-system entity to one of its type parameters.ts:Entityts:TypeParameter
ts:hasValueParameterConnects a generic type-system entity to one of its value parameters.ts:Entityts:ValueParameter
ts:hasTypeOrValueParameterConnects a generic type-system entity to one of its type-or-value parameters.ts:Entityts:TypeOrValueParameter
ts:typeParameterConstraintThe type bound that a type parameter argument must satisfy.ts:TypeParameterts:Type
ts:typeParameterValueConstraintA value-space bound that a template parameter argument must satisfy.ts:TemplateParameterts:ValueOfType
ts:typeParameterDefaultTypeThe default type used when a type parameter argument is omitted.ts:TypeParameterts:Type
ts:typeParameterDefaultValueThe default value used when a value parameter argument is omitted.ts:TemplateParameterts:Value
ts:templateArgumentConnects a template instantiation to one of its supplied arguments.ts:TemplateInstantiationts:TemplateArgument
ts:argumentParameterConnects a template argument to the parameter it satisfies.ts:TemplateArgumentts:TemplateParameter
ts:argumentTypeThe type supplied by a template argument.ts:TemplateArgumentts:Type
ts:argumentValueThe value supplied by a template argument.ts:TemplateArgumentts:Value
ts:argumentExpressionThe raw type-system entity supplied as a template argument.ts:TemplateArgumentts:Entity
ts:argumentConformanceA type relation proving that a supplied template argument satisfies its parameter.ts:TemplateArgumentts:TypeRelation
ts:parameterDefaultConformanceA type relation proving that a template parameter default satisfies its constraint.ts:TemplateParameterts:TypeRelation
ts:instantiatesConnects a template instantiation to the generic entity being instantiated.ts:TemplateInstantiationts:Entity
ts:resultingTypeThe type produced by a template instantiation.ts:TemplateInstantiationts:Type
ts:valueOfBaseTypeThe base type whose values satisfy a value-of type expression.ts:ValueOfTypets:Type
ts:typeOfValueThe value whose declared or inferred type is projected by a type-of expression.ts:TypeOfValuets:Value
ts:typeOfResultTypeThe resolved result type of a type-of expression.ts:TypeOfValuets:Type
ts:hasInitializerConnects a scalar type to an initializer that can produce values for it.ts:Scalarts:ScalarInitializer
ts:initializerParameterConnects a scalar initializer to one of its parameter slots.ts:ScalarInitializerts:ParameterSlot
ts:initializerResultConnects a scalar initializer to the scalar type it produces.ts:ScalarInitializerts:Scalar
ts:initializerSemanticKindConnects a scalar initializer to its semantic category.ts:ScalarInitializerts:ScalarInitializerSemanticKind
ts:invokesInitializerConnects an initializer-call value to the scalar initializer it invokes.ts:ScalarInitializerCallts:ScalarInitializer
ts:hasInitializerArgumentConnects an initializer-call value to one of its supplied arguments.ts:ScalarInitializerCallts:InitializerArgument
ts:initializerArgumentForConnects an initializer argument to the parameter slot it satisfies.ts:InitializerArgumentts:ParameterSlot
ts:initializerArgumentValueThe value supplied for an initializer argument.ts:InitializerArgumentts:Value
ts:objectMemberConnects an object value to one of its members.ts:ObjectValuets:ObjectValueMember
ts:memberValueThe value carried by an object member.ts:ObjectValueMemberts:Value
ts:arrayItemConnects an array value to one of its ordered items.ts:ArrayValuets:ArrayValueItem
ts:itemValueThe value carried by an array item.ts:ArrayValueItemts:Value
ts:matchSourceFieldThe source field in a field match.ts:FieldMatchts:Field
ts:matchTargetFieldThe target field in a field match.ts:FieldMatchts:Field
ts:fieldMatchRelationThe field-level type relation proven by a field match.ts:FieldMatchts:TypeRelation
ts:matchSourceAlternativeThe source union alternative in an alternative match.ts:AlternativeMatchts:UnionAlternative
ts:matchTargetAlternativeThe target union alternative in an alternative match.ts:AlternativeMatchts:UnionAlternative
ts:alternativeMatchRelationThe type relation proven by an alternative match.ts:AlternativeMatchts:TypeRelation
ts:matchSourceTupleElementThe source tuple element in a tuple element match.ts:TupleElementMatchts:TupleElement
ts:matchTargetTupleElementThe target tuple element in a tuple element match.ts:TupleElementMatchts:TupleElement
ts:tupleElementMatchRelationThe element-level type relation proven by a tuple element match.ts:TupleElementMatchts:TypeRelation
ts:matchSourceElementTypeThe source collection element type in a collection match.ts:CollectionElementTypeMatchts:Type
ts:matchTargetElementTypeThe target collection element type in a collection match.ts:CollectionElementTypeMatchts:Type
ts:collectionElementMatchRelationThe element-level type relation proven by a collection element type match.ts:CollectionElementTypeMatchts:TypeRelation

Datatype Property Definitions

Datatype properties attach literal values such as key text, member names, numeric bounds, boolean flags, and ordering. Use them when a fact is scalar data rather than a link to another modeled resource.

Term Definition Domain Range
ts:keyTextThe textual key of a field key.ts:FieldKeyxsd:string
ts:lexicalValueThe normalized lexical value represented by a literal or scalar value.ts:Entityxsd:string
ts:memberNameThe local name of an enum member or union variant.ts:Entityxsd:string
ts:literalValueThe literal value represented by a literal type. This property intentionally has no fixed datatype range because literal types can represent string, numeric, boolean, null, or domain-specific literal values.ts:LiteralTypeNot constrained by this ontology
ts:stringValueA concrete string value.ts:Entityxsd:string
ts:numericValueA concrete numeric value.ts:Entityxsd:decimal
ts:booleanValueA concrete boolean value.ts:Entityxsd:boolean
ts:isIntegralNumericValueWhether a numeric literal value is integral.ts:NumericLiteralTypexsd:boolean
ts:ordinalA zero-based structural ordering number for a slot, alternative, member, or argument.ts:Entityxsd:integer
ts:minCountThe minimum number of values accepted by a typed slot.ts:TypedSlotxsd:integer
ts:maxCountThe maximum number of values accepted by a typed slot.ts:TypedSlotxsd:integer
ts:isOptionalWhether a typed slot can be omitted.ts:TypedSlotxsd:boolean
ts:isVariadicWhether a typed slot accepts a variable number of values.ts:TypedSlotxsd:boolean
ts:minValueA numeric lower bound for a type.ts:Typexsd:decimal
ts:maxValueA numeric upper bound for a type.ts:Typexsd:decimal
ts:numericBitWidthThe bit width of a numeric scalar type.ts:NumericTypexsd:integer
ts:numericRadixThe radix used to describe a numeric scalar representation.ts:NumericTypexsd:integer
ts:numericPrecisionDigitsThe number of significant digits represented by a numeric scalar type.ts:NumericTypexsd:integer
ts:numericMinFiniteMagnitudeThe smallest finite magnitude represented by an approximate numeric type.ts:NumericTypexsd:decimal
ts:numericMaxFiniteMagnitudeThe largest finite magnitude represented by an approximate numeric type.ts:NumericTypexsd:decimal
ts:minExponentThe minimum exponent accepted by a decimal or floating numeric type.ts:NumericTypexsd:integer
ts:maxExponentThe maximum exponent accepted by a decimal or floating numeric type.ts:NumericTypexsd:integer
ts:minLengthA string length lower bound for a type.ts:Typexsd:integer
ts:maxLengthA string length upper bound for a type.ts:Typexsd:integer
ts:minItemsA collection item-count lower bound for a type.ts:Typexsd:integer
ts:maxItemsA collection item-count upper bound for a type.ts:Typexsd:integer
ts:isExactTypeWhether a type has an exact closed shape or value space.ts:Typexsd:boolean
ts:isAnonymousWhether a type is anonymous rather than declaration-named.ts:Typexsd:boolean
ts:isBuiltInTypeWhether a type is supplied by the type system.ts:Typexsd:boolean
ts:isUserDefinedTypeWhether a type is authored outside the built-in type set.ts:Typexsd:boolean
ts:argumentNameThe supplied name of a named template argument.ts:TemplateArgumentxsd:string
ts:isNamedArgumentWhether a template argument was supplied by name.ts:TemplateArgumentxsd:boolean
ts:argumentEvaluationOrdinalThe parameter-order position used to evaluate a template argument.ts:TemplateArgumentxsd:integer
ts:evidenceRuleA short rule label for type relation evidence.ts:TypeRelationEvidencexsd:string

Built-In Individual Definitions

Built-in individuals are reusable named resources for intrinsic types, controlled categories, and standard scalar value spaces. They should be referenced directly instead of recreated in an application namespace.

Term Preferred label Definition Type
ts:unknownunknownBuilt-in placeholder for values whose specific type is unknown or unresolved.ts:UnknownType, ts:IntrinsicType
ts:anyanyBuilt-in permissive type that suppresses normal assignability precision.ts:AnyType, ts:IntrinsicType
ts:voidvoidBuilt-in absence-of-result type for callables that do not return a value.ts:VoidType, ts:IntrinsicType
ts:neverneverBuilt-in bottom type that no value can inhabit.ts:NeverType, ts:IntrinsicType
ts:nullnullBuilt-in singleton null type.ts:NullType, ts:IntrinsicType
ts:stringLiteralstringLiteralLiteral-kind individual for exact string literal value spaces.ts:LiteralKind
ts:numericLiteralnumericLiteralLiteral-kind individual for exact numeric literal value spaces.ts:LiteralKind
ts:booleanLiteralbooleanLiteralLiteral-kind individual for exact boolean literal value spaces.ts:LiteralKind
ts:nullLiteralnullLiteralLiteral-kind individual for the exact null literal value space.ts:LiteralKind
ts:enumMemberReferenceLiteralenumMemberReferenceLiteralLiteral-kind individual for a literal type that references an enum member.ts:LiteralKind
ts:unionVariantReferenceLiteralunionVariantReferenceLiteralLiteral-kind individual for a literal type that references a union variant.ts:LiteralKind
ts:identifierFieldKeyidentifierField-key-kind individual for keys represented as ordinary identifiers.ts:FieldKeyKind
ts:escapedIdentifierFieldKeyescapedIdentifierField-key-kind individual for identifier keys that require escaping.ts:FieldKeyKind
ts:stringLiteralFieldKeystringLiteralField-key-kind individual for keys represented as string literals.ts:FieldKeyKind
ts:calendarDateTemporalKindcalendarDateTemporal-kind individual for calendar-date value spaces.ts:TemporalKind
ts:clockTimeTemporalKindclockTimeTemporal-kind individual for clock-time value spaces.ts:TemporalKind
ts:dateTimeTemporalKinddateTimeTemporal-kind individual for date-time or instant value spaces.ts:TemporalKind
ts:durationTemporalKinddurationTemporal-kind individual for duration value spaces.ts:TemporalKind
ts:noZoneTemporalSemanticsnoZoneTemporal-zone-semantics individual for temporal values with no zone or offset.ts:TemporalZoneSemantics
ts:utcTemporalSemanticsutcTemporal-zone-semantics individual for temporal values normalized to UTC.ts:TemporalZoneSemantics
ts:offsetTemporalSemanticsoffsetTemporal-zone-semantics individual for temporal values carrying an explicit offset.ts:TemporalZoneSemantics
ts:notApplicableTemporalSemanticsnotApplicableTemporal-zone-semantics individual used when zone semantics do not apply.ts:TemporalZoneSemantics
ts:envelopeObjectobjectDiscriminator-envelope individual for object-shaped discriminated unions.ts:DiscriminatorEnvelope
ts:envelopeNonenoneDiscriminator-envelope individual for unions with no discriminator envelope.ts:DiscriminatorEnvelope
ts:scalarValueConversionInitializervalueConversionScalar-initializer semantic kind for value-conversion constructors.ts:ScalarInitializerSemanticKind
ts:isoLexicalParseInitializerisoLexicalParseScalar-initializer semantic kind for ISO lexical parsing.ts:ScalarInitializerSemanticKind
ts:currentTemporalInitializercurrentTemporalScalar-initializer semantic kind for constructors that produce the current temporal value.ts:ScalarInitializerSemanticKind
ts:stringstringBuilt-in textual scalar value space and the standard base scalar for string-like refinements.ts:StringType, ts:IntrinsicType
ts:urlurlBuilt-in URL scalar refined from the string value space.ts:UrlType, ts:IntrinsicType
ts:bytesbytesBuilt-in byte-sequence scalar value space.ts:BytesType, ts:IntrinsicType
ts:booleanbooleanBuilt-in true-or-false scalar value space.ts:BooleanType, ts:IntrinsicType
ts:numericnumericBuilt-in abstract numeric scalar value space.ts:NumericType, ts:IntrinsicType
ts:integerintegerBuilt-in whole-number numeric scalar value space.ts:IntegerType, ts:IntrinsicType
ts:int8int8Built-in 8-bit signed integer scalar with range -128 through 127.ts:IntegerType, ts:IntrinsicType
ts:int16int16Built-in 16-bit signed integer scalar with range -32768 through 32767.ts:IntegerType, ts:IntrinsicType
ts:int32int32Built-in 32-bit signed integer scalar with range -2147483648 through 2147483647.ts:IntegerType, ts:IntrinsicType
ts:int64int64Built-in 64-bit signed integer scalar with range -9223372036854775808 through 9223372036854775807.ts:IntegerType, ts:IntrinsicType
ts:safeintsafeintBuilt-in integer scalar for exactly representable JavaScript-safe integers, with range -9007199254740991 through 9007199254740991.ts:IntegerType, ts:IntrinsicType
ts:uint8uint8Built-in 8-bit unsigned integer scalar with range 0 through 255.ts:IntegerType, ts:IntrinsicType
ts:uint16uint16Built-in 16-bit unsigned integer scalar with range 0 through 65535.ts:IntegerType, ts:IntrinsicType
ts:uint32uint32Built-in 32-bit unsigned integer scalar with range 0 through 4294967295.ts:IntegerType, ts:IntrinsicType
ts:uint64uint64Built-in 64-bit unsigned integer scalar with range 0 through 18446744073709551615.ts:IntegerType, ts:IntrinsicType
ts:floatfloatBuilt-in abstract floating-point scalar value space.ts:FloatType, ts:IntrinsicType
ts:float32float32Built-in binary32 floating-point scalar with radix 2 and 24 significant binary digits.ts:FloatType, ts:IntrinsicType
ts:float64float64Built-in binary64 floating-point scalar with radix 2 and 53 significant binary digits.ts:FloatType, ts:IntrinsicType
ts:decimaldecimalBuilt-in abstract decimal scalar value space.ts:DecimalType, ts:IntrinsicType
ts:decimal128decimal128Built-in decimal128 scalar with radix 10, 34 significant digits, and exponent range -6143 through 6144.ts:DecimalType, ts:IntrinsicType
ts:plainDateplainDateBuilt-in calendar-date scalar with no zone semantics.ts:DateType, ts:IntrinsicType
ts:plainTimeplainTimeBuilt-in clock-time scalar with no zone semantics.ts:TimeType, ts:IntrinsicType
ts:utcDateTimeutcDateTimeBuilt-in date-time scalar whose instants use UTC zone semantics.ts:DateTimeType, ts:IntrinsicType
ts:offsetDateTimeoffsetDateTimeBuilt-in date-time scalar that preserves an explicit offset.ts:DateTimeType, ts:IntrinsicType
ts:durationdurationBuilt-in temporal duration scalar.ts:DurationType, ts:IntrinsicType
ts:unixTimestamp32unixTimestamp32Built-in UTC date-time represented as a signed 32-bit Unix timestamp over -2147483648 through 2147483647.ts:IntegerType, ts:DateTimeType, ts:IntrinsicType

Property Index

This section lists every object and datatype property defined by ontology.ttl. The grouped descriptions are normative; the Turtle source gives each property domain, range, label, and comment.

Use this index when deciding which property carries a fact. The examples below show the same property groups in familiar type-system surfaces; the RDF property names stay stable even when the language syntax changes.

Identity And Declaration Properties

Terms Use
ts:hasDeclaration, ts:declares, ts:aliasTarget Vocabulary, namespace, declaration, and alias links.
skos:prefLabel, ts:keyText, ts:lexicalValue, ts:memberName Preferred labels, field key text, normalized lexical values, and member name text.
ts:isExactType, ts:isAnonymous, ts:isBuiltInType, ts:isUserDefinedType Boolean flags for exact, anonymous, built-in, and user-defined type identity.

These properties answer naming questions: which vocabulary or namespace owns a declaration, which resource the declaration binds, and which target an alias points to.

Type And Scalar Properties

Terms Use
ts:declaredType, ts:inferredType, ts:defaultValue Value typing and typed defaults.
ts:subtypeOf, ts:assignableTo, ts:baseScalar, ts:standardBaseScalar, ts:numericRangeAssignableTo Type hierarchy, assignability, scalar refinement, and numeric widening.
ts:temporalKind, ts:temporalZoneSemantics Temporal scalar value-space and zone semantics.
ts:minValue, ts:maxValue, ts:numericBitWidth, ts:numericRadix, ts:numericPrecisionDigits, ts:numericMinFiniteMagnitude, ts:numericMaxFiniteMagnitude, ts:minExponent, ts:maxExponent Numeric scalar facets and bounds.
ts:minLength, ts:maxLength, ts:minItems, ts:maxItems, ts:isIntegralNumericValue String length facets, collection item-count facets, and integral numeric literal flags.

These properties describe type identity, scalar refinement, assignability, temporal semantics, numeric facets, and general type facets such as length and item bounds.

Structured Slot Properties

Terms Use
ts:valueType, ts:fieldType, ts:tupleElementType, ts:indexerValueType, ts:parameterType, ts:resultType, ts:alternativeType Concrete subproperties that attach value spaces to typed slots.
ts:hasField, ts:fieldKey, ts:fieldKeyKind, ts:tupleElement, ts:hasIndexerSlot, ts:indexerKeyType Record fields, field key kinds, tuple elements, and indexer keys.
ts:elementType, ts:arrayValueType, ts:streamElementType, ts:recordKeyType, ts:recordValueType, ts:additionalPropertyType, ts:additionalPropertiesRecord Collection, array, stream, record-map, and additional-property value spaces.
ts:intersectionConstituent Constituent type membership for intersection types.
ts:ordinal, ts:minCount, ts:maxCount, ts:isOptional, ts:isVariadic Ordering and cardinality for fields, tuple elements, alternatives, parameters, results, and arguments.

These properties describe fields, tuple positions, indexers, element types, cardinality, and open-record behavior. They are the property group used most often for object, array, tuple, map, and record-like language constructs.

Choice Type Properties

Terms Use
ts:hasUnionAlternative, ts:nullableBaseType, ts:admittedByUnion, ts:unionVariantOf Union alternatives, nullable base type, union admission, and variant ownership.
ts:hasDiscriminator, ts:discriminatorField, ts:discriminatorValue, ts:discriminatorEnvelope Discriminator facts for union alternatives.
ts:hasEnumMember, ts:enumMemberType, ts:enumMemberValue, ts:enumMemberOf Enum membership, member value spaces, concrete member values, and enum ownership.

These properties describe alternatives, nullable bases, discriminators, discriminator placement, enum membership, and enum values. They preserve both the branch type and the selector or member value used by a language or schema.

Callable And Template Properties

Terms Use
ts:hasParameterSlot, ts:hasResultSlot, ts:hasCallable, ts:membershipSet, ts:membershipCallable Callable signatures, callable-set members, and explicit membership facts.
ts:hasTemplateParameter, ts:hasTypeParameter, ts:hasValueParameter, ts:hasTypeOrValueParameter Generic type-system parameter ownership.
ts:typeParameterConstraint, ts:typeParameterValueConstraint, ts:typeParameterDefaultType, ts:typeParameterDefaultValue Template parameter constraints and defaults.
ts:templateArgument, ts:argumentParameter, ts:argumentType, ts:argumentValue, ts:argumentExpression, ts:argumentConformance, ts:parameterDefaultConformance Supplied template arguments, raw argument expressions, and conformance evidence.
ts:argumentName, ts:isNamedArgument, ts:argumentEvaluationOrdinal Named argument and argument ordering facts.
ts:instantiates, ts:resultingType, ts:valueOfBaseType, ts:typeOfValue, ts:typeOfResultType Instantiation input/result and type-level value expressions.

These properties describe callable inputs and outputs, callable set membership, template parameters, supplied arguments, default conformance, and the type produced by instantiation.

Literal And Value Properties

Terms Use
ts:literalBaseType, ts:literalKind, ts:literalValue, ts:stringValue, ts:numericValue, ts:booleanValue Literal value spaces and scalar value content.
ts:hasTemplatePart, ts:templatePartValue, ts:templatePartExpression, ts:templatePartConformance String template literal parts, interpolated expressions, and conformance checks.
ts:objectMember, ts:memberValue, ts:arrayItem, ts:itemValue Object and array value structure.

These properties describe exact literal value spaces, concrete scalar values, object members, and array items. Use them when a graph needs to preserve the value, not just the value's type.

Scalar Initializer Properties

Terms Use
ts:hasInitializer, ts:initializerParameter, ts:initializerResult, ts:initializerSemanticKind Scalar initializer availability, parameters, result scalar, and semantic kind.
ts:invokesInitializer, ts:hasInitializerArgument, ts:initializerArgumentFor, ts:initializerArgumentValue Initializer calls and supplied argument values.

These properties describe which initializer belongs to a scalar, which result scalar it produces, what semantic category it has, and how a specific initializer call supplies arguments.

Type Relation Evidence Properties

Terms Use
ts:relationSourceType, ts:relationTargetType, ts:hasEvidence, ts:evidenceRelation, ts:evidenceSourceType, ts:evidenceTargetType, ts:evidenceRule Type relation endpoints, attached evidence, and rule labels.
ts:hasFieldMatch, ts:matchSourceField, ts:matchTargetField, ts:fieldMatchRelation Field-level structural relation evidence.
ts:hasAlternativeMatch, ts:matchSourceAlternative, ts:matchTargetAlternative, ts:alternativeMatchRelation Union alternative coverage evidence.
ts:hasTupleElementMatch, ts:matchSourceTupleElement, ts:matchTargetTupleElement, ts:tupleElementMatchRelation Tuple element structural relation evidence.
ts:hasCollectionElementTypeMatch, ts:matchSourceElementType, ts:matchTargetElementType, ts:collectionElementMatchRelation Collection element type relation evidence.

These properties explain relation checks. They link a relation to evidence, then break the evidence down into field, alternative, tuple element, or collection element matches.

Built-In Individuals

The ontology defines built-in individuals for intrinsic types, scalar value spaces, controlled literal kinds, field key kinds, temporal categories, discriminator envelopes, and scalar initializer semantic kinds.

Built-ins are the bridge between common language primitives and stable RDF identifiers. For example, a TypeScript string, a Python str, a GraphQL String, and a JSON Schema { "type": "string" } can all map to ts:string when the intended value space is the standard string scalar.

Family Individuals
Intrinsic ts:unknown, ts:any, ts:void, ts:never, ts:null
Scalars ts:string, ts:url, ts:bytes, ts:boolean, ts:numeric, ts:integer, ts:int8, ts:int16, ts:int32, ts:int64, ts:safeint, ts:uint8, ts:uint16, ts:uint32, ts:uint64, ts:float, ts:float32, ts:float64, ts:decimal, ts:decimal128, ts:plainDate, ts:plainTime, ts:utcDateTime, ts:offsetDateTime, ts:duration, ts:unixTimestamp32
Literal kinds ts:stringLiteral, ts:numericLiteral, ts:booleanLiteral, ts:nullLiteral, ts:enumMemberReferenceLiteral, ts:unionVariantReferenceLiteral
Field key kinds ts:identifierFieldKey, ts:escapedIdentifierFieldKey, ts:stringLiteralFieldKey
Temporal categories ts:calendarDateTemporalKind, ts:clockTimeTemporalKind, ts:dateTimeTemporalKind, ts:durationTemporalKind, ts:noZoneTemporalSemantics, ts:utcTemporalSemantics, ts:offsetTemporalSemantics, ts:notApplicableTemporalSemantics
Discriminator envelopes ts:envelopeObject, ts:envelopeNone
Initializer kinds ts:scalarValueConversionInitializer, ts:isoLexicalParseInitializer, ts:currentTemporalInitializer

Validation

The SHACL file defines focused checks for declarations, fields, record types, array types, scalar bases, unions, discriminators, enums, callable types, template instantiations, template arguments, literal types, scalar initializers, type relations, and type-relation evidence. It does not target every class in the ontology. Untargeted classes are taxonomy nodes, marker classes, profile extension points, or type-expression families whose full validity depends on a language or project profile.

The SHACL file also includes ts:CoreCoverageWaiverShape as machine-readable documentation for classes that are covered by an explicit waiver instead of by a core conformance rule. A profile can add concrete constraints for those classes when it defines language-specific or project-specific semantics.

Validation should be layered. The core SHACL shapes check graph structure; a TypeScript, GraphQL, JSON Schema, Python, Rust, or SQL profile can add language-specific rules such as naming style, allowed primitive mappings, or profile-specific assignability. The core profile does not define global uniqueness constraints because names, keys, positions, template parameters, and relation evidence are scoped by the containing namespace, declaration, type, language profile, or project policy.

The reference validation command is:

scripts/jena shacl validate \
  --shapes src/modules/type-system/shapes.ttl \
  --data src/modules/type-system/ontology.ttl \
  --data src/modules/type-system/examples.ttl

Examples

The example below is the RDF form of several familiar type-system ideas: a record type, a string array, a discriminated union, a callable signature, a scalar initializer, a template instantiation, a literal type, and a materialized type relation. It is intentionally broader than a single language example so adapters can compare how their language maps into the same graph.