Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ahh/src/result/mod.ts>inspect

Opinionated idiomatic type-safety functions.
Go to Latest
function inspect
import { inspect } from "https://deno.land/x/ahh@v0.11.0/src/result/mod.ts";

Calls f with res, and returns the original res.

Examples

Example 1

import { default as R } from "./mod.ts";

console.log(R.inspect(1, (i) => i + 1)); // 1
console.log(R.inspect(Error(), (i: number) => i + 1)); // Error()

Type Parameters

T
E extends Error

Parameters

res: Result<T, E>
f: (_: T) => unknown