function unwrapimport { unwrap } from "https://deno.land/x/ahh@v0.11.0/src/result/mod.ts"; unwrap<T, E extends Error>(res: Result<T, E>): res extends Ok<T> ? T : neverReturns res if it is an Ok, or throws. ExamplesExample 1 import { default as R } from "./mod.ts"; console.log(R.unwrap(1)); // 1 R.unwrap(Error()); // throws Type ParametersTE extends ErrorParametersres: Result<T, E>Returnsres extends Ok<T> ? T : never