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)