★ Constructor
Creates the `Range` instance with a range of the given required `min`, `max` and optional current `value`, `step`
Range()
Range()constructor(min: Min, max: Max, value?: number, step: Step = 1 as Step) {
this.#maximum = new Maximum(max);
this.#minimum = new Minimum(min);
this.#step = step;
// Sets the range value between the given `min` and `max`.
this.value = value;
// Define the `min` and `max` property.
Object.defineProperties(this, {
min: {
value: min,
enumerable: true,
writable: false,
},
max: {
value: max,
enumerable: true,
writable: false,
},
});
}Parameters
Example usage
Last updated