Discriminated union of all value and union shapes.
Discriminated union of all concrete value shapes, including those that always describe a set.
Discriminated union of value shapes that may describe either a scalar or a set.
Shape for a cardinality-constrained value set.
Factory function returned by cardinality.
Resolved value range of a Probe.
Extracts the complete template declared by a shape.
Projects a shape to the runtime value type its values satisfy.
Narrows the Eager unwrap of a Lazy shape to the Shape or RangeShape constraint, so downstream indexed access stays sound.
Conditions a shape's model on cardinality bounds to produce the template-side value type.
Boxes a value in a singleton tuple when cardinality admits multiple values.
Resolves a Lazy shape to its eager form, caching the result on repeated calls.
Extracts the deeply typed retrieval template from a Lazy shape.
Resolve the effective RangeShape a Probe yields against a shape.
Creates a SetShape with no cardinality constraints (0..*).
Creates a SetShape requiring at least one value (1..*).
Creates a SetShape for at most one value (0..1).
Creates a SetShape for exactly one value (1..1).
Creates a SetFactory with custom cardinality constraints.
Composite shapes and cardinality factories.
Defines the shape hierarchy for describing the expected structure of linked data values, along with cardinality factories for constraining how many values a property may hold.
Shape Hierarchy
Type Inference
Two companion types project a shape into the relevant TypeScript view:
undefinedor omitted outright (state side).Ancillary helpers Resolved, Bounds, and Boxed factor the internal projections (narrowing the eager unwrap of a Lazy shape to the Shape or RangeShape bound, resolving union branches, conditioning a shape's model on cardinality, and boxing values into singleton tuples for multi-valued ranges) and are exported for tests and downstream shape extensions.
Factories
minCount/maxCountpair that the four named factories specialise.Utilities
eager(shape).model.See
SHACL - Shapes Constraint Language