# ⚠ getMax()

## `Range.prototype.getMax()`

{% hint style="danger" %}
**Deprecated**: This feature is no longer recommended. Avoid using it, and update existing code if possible. Be aware that this feature may cease to work at any time.
{% endhint %}

The `getMax()` method gets the **maximum** range of a specified [`Range`](/range/overview.md) object.

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

```typescript
public getMax(): Max {
  return this.#maximum.valueOf();
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Max`</mark>](/range/generic-type-variables.md#maxextendsnumber)

### Returns

The **return value** is the [**maximum**](https://range.angular-package.dev/range/methods/pages/axyOCaYA3ZNCNCFu5va6#range.prototype.max) range of a generic type variable [`Max`](/range/generic-type-variables.md#maxextendsnumber).

## Example usage

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

// Create new instance.
const range = new Range(4, 27);

// Returns 27 of type 27.
range.getMax();
```


---

# Agent Instructions: 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:

```
GET https://range.angular-package.dev/range/methods/getmax.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
