> 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/commonerror/accessors/get-fix.md).

# get fix()

## `CommonError.prototype.fix`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains a possible [solution](/getting-started/basic-concepts.md#fix) to the described [problem](/commonerror/accessors/get-problem.md) by returning the [`#fix`](/commonerror/properties/fix.md) property of a specified object.

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

```typescript
public get fix(): string {
  return this.#fix;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)

### Returns

The **return value** is the fix of a [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) type.

## Example usage

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

// Extend the `CommonError` class.
class TestError<Id extends string> extends CommonError<Id> {}

// Returns "Fix accessor."
new TestError('problem', 'Fix accessor.', '(AE:427)').fix;
```
