@metreeca/blue - v0.12.0
    Preparing search index...

    Type Alias State<S>

    State: { inferred from <S> }

    Resolves the value type of a shape.

    Scalar, localised and reference shapes resolve to their plain value. Resource shapes resolve to a record of their declared members merged over the inherited ones. Union shapes resolve to the value of any branch. A reference shape resolves to a Reference to its target, never to the target resource itself. A bare Shape, standing for any kind of value, resolves to never; the bare ResourceShape, standing for any resource, resolves to Resource, so the state of any resource shape is accepted where only a generic resource shape is known.

    In a resource, the identifier is the IRI of the resource and the type is the IRI of its class, undefined for untyped resources. A property holds a single value if it admits at most one, a read-only array otherwise, and a non-empty array if at least one value is required. Localised text is always a single language-tag-keyed map, never wrapped in an array, so a range admitting both localised text and other values holds either the map or the other values, never both.

    Optional members may be omitted. A member voided by an incompatible override in an extension accepts no value, so the conflict shows up as a member nothing can satisfy instead of the member silently disappearing.

    Type Parameters

    • S extends Lazy<Shape>

      The shape, possibly deferred to break definition cycles