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

    Type Alias NumberRangeConstraints<V>

    Value range bounds accepted by the number shape factories.

    Bounds the magnitudes admitted by a shape, independently of its datatype. Accepted on its own by the specialised factories, whose datatype and integrality are already fixed, and included in the full NumberConstraints set.

    type NumberRangeConstraints<V extends number = number> = {
        minExclusive?: number;
        maxExclusive?: number;
        minInclusive?: number;
        maxInclusive?: number;
        in?: readonly V[];
        hasValue?: readonly V[];
    }

    Type Parameters

    • V extends number = number

      The values the enumeration admits

    Index

    Properties

    minExclusive?: number

    Exclusive minimum value (value must be strictly greater).

    Inheritance — child may only raise the exclusive lower bound.

    undefined (no minimum constraint)

    maxExclusive?: number

    Exclusive maximum value (value must be strictly less).

    Inheritance — child may only lower the exclusive upper bound.

    undefined (no maximum constraint)

    minInclusive?: number

    Inclusive minimum value (value must be greater than or equal).

    Inheritance — child may only raise the inclusive lower bound.

    undefined (no minimum constraint)

    maxInclusive?: number

    Inclusive maximum value (value must be less than or equal).

    Inheritance — child may only lower the inclusive upper bound.

    undefined (no maximum constraint)

    in?: readonly V[]

    Allowed values (closed enumeration).

    When specified, values must be members of this list. Empty arrays are ignored; the number factory takes the list as bare arguments too. Closing the domain also narrows the value the shape describes to the listed values, wherever they are stated precisely enough to be told apart; a list whose values are only known to be numbers leaves it as the whole numeric domain.

    Inheritance — child may only drop allowed values.

    undefined (no enumeration constraint)

    hasValue?: readonly V[]

    Values a member must carry.

    When specified, all listed values must appear among the ones the member carries. Empty arrays are ignored.

    Inheritance — child may only add required values.

    undefined (no required values)