get greater()

The get accessor obtains from the private #greater property an instance of the Greater

Inequality.prototype.greater

The get accessor obtains from the private #greater property an instance of the Greater with a primitive value from a given value of the Inequality constructor.

inequality.class.ts
public get greater(): Greater<Value> {
  return this.#greater;
}

Return type

Greater<Value>

The return type is the Greater primitive wrapper object that takes the generic type variable Value of the Inequality object.

Returns

The return value is the Greater instance with a primitive value from the given value of the Inequality constructor.

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 Greater {1981} of Greater<1981>
year.greater;

// Returns `false`.
year.greater.than(1982);

// Returns `false`.
year.greater.thanEvery(1981, 1982, 1983);

// Returns `true`.
year.greater.thanSome(1981, 1980, 1979);

Last updated