The value which should be an Err
.
The unwrapped item.
import { err, ok, unwrapErr } from "./result.ts";
import { assertEquals, assertThrows } from "../deps.ts";
assertThrows(() => unwrapErr(ok(3)), "unwrapped Ok");
assertEquals(unwrapErr(err(4)), 4);
Generated using TypeDoc
Unwraps the
Err
value from aResult
, or throws an error.