method Result.prototype.orThrow
Result.prototype.orThrow(): T

Returns the Ok value or throws the Err error.

This is useful at process or demo boundaries where exception-style control flow is acceptable and a caller wants to avoid repetitive take() / isErr(...) branching.

Return Type

The unwrapped Ok value

Throws

The contained Err error

Usage

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