# get greater()

## `Inequality.prototype.greater`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains from the private [`#greater`](https://range.angular-package.dev/draft/inequality/properties/greater) property an instance of the [`Greater`](https://range.angular-package.dev/draft/greater) with a [primitive value](https://range.angular-package.dev/draft/greater/methods/valueof) from a given [`value`](https://range.angular-package.dev/draft/constructor#value-value) of the [`Inequality`](https://range.angular-package.dev/draft/inequality) constructor.

{% code title="inequality.class.ts" %}

```typescript
public get greater(): Greater<Value> {
  return this.#greater;
}
```

{% endcode %}

### Return type

#### `Greater<`[<mark style="color:green;">`Value`</mark>](https://range.angular-package.dev/draft/generic-type-variables#inequality-less-than-value-greater-than)`>`

The **return type** is the [`Greater`](https://range.angular-package.dev/draft/greater) [primitive wrapper](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) object that takes the generic type variable [`Value`](https://range.angular-package.dev/draft/generic-type-variables#inequality-less-than-value-greater-than) of the [`Inequality`](https://range.angular-package.dev/draft/inequality) object.

### Returns

The **return value** is the [`Greater`](https://range.angular-package.dev/draft/greater) instance with a [primitive value](https://range.angular-package.dev/draft/greater/methods/valueof) from the given [`value`](https://range.angular-package.dev/draft/constructor#value-value) of the [`Inequality`](https://range.angular-package.dev/draft/inequality) constructor.

## Example usage

```typescript
// 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);
```
