Constructor

The `Inequality` primitive wrapper object constructor

Inequality()

Creates a child class instance with the given primitive value.

constructor(value: Value) {
  super(value);
  this.#greater = new Greater(value);
  this.#less = new Less(value);
}

Parameters

value:Value

The value of the generic type variable Value is the primitive value of a new child class instance.

Example usage

// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Age` class and extend it with `Inequality`.
class Age<Value extends number> extends Inequality<Value> {}

// Initialize `Age`.
const age = new Age(27);

// Returns Age {27} of Age<27>.
age;

Last updated