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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://error.angular-package.dev/draft-5/rangeerror/accessors/get-range.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
