greaterThan()
Checks whether the primitive value of a child class is greater than the given value
Inequality.prototype.greaterThan()
Inequality.prototype.greaterThan()
Checks whether the primitive value of a child class instance is greater than the given value
.
public greaterThan(value: number): boolean {
return this.#greater.than(value);
}
Parameters
value:
number
value:
number
A rest parameter of the numbers to test.
Return type
Returns
The return value is a boolean
indicating whether the primitive value of a child class instance is greater than the given value
.
Example usage
// Example usage.
import { Inequality } from '@angular-package/range';
// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}
// Initialize `Year`.
const year = new Year(1981);
// Returns Year {1981} of Year<1981>.
year;
// Returns false. 1981 > 1982.
year.greaterThan(1982);
// Returns true. 1981 > 1980.
year.greaterThan(1980);
Last updated