# static isMaximum()

## `Maximum.isMaximum()`

Checks whether the value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type is the [`Maximum`](https://range.angular-package.dev/maximum) instance of any or the given primitive [value](#max-value).

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

```typescript
public static isMaximum<Value extends number>(
  value: any,
  max?: Value
): value is Maximum<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof max === 'number' ? value.valueOf() === max : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`max`](#max-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Maximum`](https://range.angular-package.dev/maximum) instance.

#### `max?:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

Optional maximum of the generic type variable [`Value`](#valueextendsnumber) to check if it's the primitive value of the given [`value`](#value-any).

### Return type

#### `value is Maximum<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Maximum`](https://range.angular-package.dev/maximum) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the provided value is an instance of [`Maximum`](https://range.angular-package.dev/maximum).

### Example usage

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


```
