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