> For the complete documentation index, see [llms.txt](https://range.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://range.angular-package.dev/inequality/constructor.md).

# Constructor

## `Inequality()`

Creates a child class instance with the given primitive [`value`](#value-value).

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

### Parameters

#### `value:`<mark style="color:green;">`Value`</mark>

The value of the generic type variable [`Value`](/inequality/generic-type-variables.md#inequality-less-than-value-greater-than) is the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a new child class instance.

## Example usage

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