> For the complete documentation index, see [llms.txt](https://musicq.gitbook.io/unwrapit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://musicq.gitbook.io/unwrapit/apis/err.md).

# err

`err` is used to create an error `Result` type.

### Usage

```typescript
import {err} from 'unwrapit'

const v = err('error')
//    ^? Result<unknown, string>
```

You can specify the ok value type

```typescript
const v = err<string, number>('error')
//    ^? Result<number, string>
```
