> For the complete documentation index, see [llms.txt](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/fstoolkit.errorhandling/asyncresultoption/transforms/ofasyncoption.md).

# ofAsyncOption

Namespace: `FsToolkit.ErrorHandling`

Transforms a `Async<'T option>` into an `Async<Result<'T option, 'Error>>`.

## Function Signature

```fsharp
Async<'T option> -> Async<Result<'T option, 'Error>>
```

## Examples

### Example 1

```fsharp
let result = AsyncResultOption.ofAsyncOption (async { return Some 42 })
// async { return Ok (Some 42) }
```

### Example 2

```fsharp
let result = AsyncResultOption.ofAsyncOption (async { return None })
// async { return Ok None }
```
