> 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/typeerror/properties/static-template.md).

# static template

## `TypeError.template`

A template of the error message of [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) type with the replaceable [`{problem}`](/draft-5/commonerror/properties/static-template.md#problem), [`{fix}`](/draft-5/commonerror/properties/static-template.md#fix) and optional [`{id}`](/draft-5/commonerror/properties/static-template.md#id), [`{max}`](/draft-5/commonerror/properties/static-template.md#max), [`{min}`](/draft-5/commonerror/properties/static-template.md#min), [`{type}`](/draft-5/commonerror/properties/static-template.md#type) tags.

By default, it's set to `Problem{id}: {problem} => Fix: {fix} must be of the {type}`.

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

```typescript
public static template = `Problem{id}: {problem} => Fix: {fix} must be of the {type}`;
```

{% endcode %}

## Example usage

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

// Change the template.
TypeError.template = `Problem({id}): {problem} => Fix: {fix}`;

// Returns
// TypeError: Problem(AE:427): The `age` parameter is wrong. => Fix: Provided `age` must be different type. 
new RangeError(
  'The `age` parameter is wrong.', // Problem
  'Provided `age` must be different type. ', // Fix
  'AE:427', // Identification
  'string',  // Type
);
```
