Skip to main content

InclusiveMinMax

Extends MinMax with inclusivity control for both bounds.

Sinceโ€‹

2.0.0


Exampleโ€‹

const range1: InclusiveMinMax = { min: 0, max: 10 }; // [0, 10) - default
const range2: InclusiveMinMax = { min: 0, max: 10, minInclusive: false }; // (0, 10)
const range3: InclusiveMinMax = { min: 0, max: 10, maxInclusive: true }; // [0, 10]
const range4: InclusiveMinMax = { min: 0, max: 10, minInclusive: false, maxInclusive: true }; // (0, 10]

Extendsโ€‹


Propertiesโ€‹

min: numberโ€‹

Minimum value

Inherited from: MinMax.minโ€‹

max: numberโ€‹

Maximum value

Inherited from: MinMax.maxโ€‹

minInclusive?: booleanโ€‹

Whether the minimum value is inclusive (default: true)

maxInclusive?: booleanโ€‹

Whether the maximum value is inclusive (default: false)