> For the complete documentation index, see [llms.txt](https://error.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://error.angular-package.dev/draft-5/rangeerror/accessors/get-range.md).

# get range()

## ​`RangeError.prototype.range`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains the [minimum](/draft-5/rangeerror/accessors/get-min.md) and [maximum](/draft-5/rangeerror/accessors/get-max.md) range in the form of an [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object).

{% code title="range-error.class.ts" %}

```typescript
public get range(): { min?: Min; max?: Max } {
  return {
    min: this.#min,
    max: this.#max,
  };
}
```

{% endcode %}

### Return type

#### `{ min?:`[<mark style="color:green;">`Min`</mark>](/draft-5/rangeerror/generic-type-variables.md#rangeerror-less-than-id-min-max-greater-than-1)`; max?:`[<mark style="color:green;">`Max`</mark>](/draft-5/rangeerror/generic-type-variables.md#rangeerror-less-than-id-min-max-greater-than-2)`}`

The **return type** is the [`object`](https://www.typescriptlang.org/docs/handbook/basic-types.html#object) that consists of the `min` and `max` properties, indicating the error range.

### Returns

The **return value** is an [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) that consists of the [minimum](/draft-5/rangeerror/accessors/get-min.md) range under the `min` property and the [maximum](/draft-5/rangeerror/accessors/get-max.md) under the `max` property.

`min` - The minimum range of generic type variable [`Min`](/draft-5/rangeerror/generic-type-variables.md#rangeerror-less-than-id-min-max-greater-than-1) of the [`RangeError`](/draft-5/rangeerror/overview.md) instance.\
`max` - The maximum range of generic type variable [`Max`](/draft-5/rangeerror/generic-type-variables.md#rangeerror-less-than-id-min-max-greater-than-2) of the [`RangeError`](/draft-5/rangeerror/overview.md) instance.

## Example usage

```typescript
// Example usage.
import { RangeError } from '@angular-package/error';

// Returns "{min: 9, max: 27}".
new RangeError('problem', 'Fix accessor.', '(AE:427)', 9, 27).range;
```
