[**@cprussin/option-result v2.0.0**](../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/c4cae9afc0f1d2361327617312f36819ab993c71/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)
