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

    Type Alias NumberConstraints<V>

    NumberConstraints: NumberRangeConstraints<V> & {
        datatype?: Reference;
        integral?: boolean;
    }

    Constraints accepted by the number shape factory.

    Adds the RDF datatype and the integrality flag, which only the general-purpose factory accepts, to the range constraints shared with the specialised factories.

    Type Parameters

    • V extends number = number

      The values the enumeration admits

    Type Declaration

    • Optional Readonlydatatype?: Reference

      RDF datatype IRI for the numeric literal.

      States the RDF datatype of validated JSON values, which carry none of their own.

      Inheritance — must be strictly equal when both parent and child define it; otherwise the single defined value carries through. A mismatch is reported as an error.

      undefined (falls back to xsd:double)

    • Optional Readonlyintegral?: boolean

      Restricts values to integers.

      When true, validated values must be integers (no fractional part); fractional values are rejected. Decouples integrality from datatype, so custom or non-XSD integral types are declarable without relying on a recognised datatype IRI. The integer-family factories (byte, short, int, long, integer) set it; float, double, and decimal leave it unset.

      Inheritance — a child may add the constraint but not drop it: overriding an integral parent with a non-integral child is rejected.

      undefined (fractional values allowed)