[**@cprussin/option-result v2.0.1**](../README.md)

***

# Function: Err()

> **Err**\<`T`, `E`\>(`error`): [`Result`](../classes/Result.md)\<`T`, `E`\>

Defined in: [result.ts:598](https://github.com/cprussin/cprussin-monorepo/blob/45be92bc13a41d9f46c6ab9ed2d9a61167827e46/packages/option-result/src/result.ts#L598)

Construct a [Result](../classes/Result.md) containing an error value.

## Type Parameters

### T

`T` *extends* `object`

the type of success values

### E

`E` *extends* `object`

the type of the error value

## Parameters

### error

`E`

the error contained by the [Result](../classes/Result.md)

## Returns

[`Result`](../classes/Result.md)\<`T`, `E`\>

a [Result](../classes/Result.md) containing an error `error`

## See

 - [Result.Ok](../classes/Result.md#ok-2)
 - [Result.wrap](../classes/Result.md#wrap)
 - [Result.wrapAsync](../classes/Result.md#wrapasync)
