> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/range-1/inequality/accessors/get-greater.md).

# 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`](/range-1/inequality/properties/greater.md) property an instance of the [`Greater`](/range-1/greater/overview.md) with a [primitive value](/range-1/greater/methods/valueof.md) from a given [`value`](/range-1/inequality/constructor.md#value-value) of the [`Inequality`](/range-1/inequality/overview.md) 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>](/range-1/inequality/generic-type-variables.md#inequality-less-than-value-greater-than)`>`

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

### Returns

The **return value** is the [`Greater`](/range-1/greater/overview.md) instance with a [primitive value](/range-1/greater/methods/valueof.md) from the given [`value`](/range-1/inequality/constructor.md#value-value) of the [`Inequality`](/range-1/inequality/overview.md) 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);
```
