import { O } from "https://deno.land/x/ahh@v0.9.1/src/option/mod.ts";
Returns the contained Some
value.
Throws if the Option
is a None
with the provided
message
.
Examples
import { O, None } from "./mod.ts";
console.log(O.expect(1, "returns")); // 1
O.expect(None, "throws"); // throws