method AsyncResult.prototype.orThrow
AsyncResult.prototype.orThrow(): Promise<T>

Returns the Ok value or throws the Err error.

Async version of Result.orThrow().

Return Type

Promise<T>

Promise of the unwrapped Ok value

Throws

The contained Err error

Usage

import { AsyncResult } from "result/mod.ts";