Skip to main content
Module

x/ahh/mod.ts>O.inspect

Idiomatic type-safety functions.
Go to Latest
method O.inspect
Re-export
import { O } from "https://deno.land/x/ahh@v0.10.1/mod.ts";

Calls f with opt, and returns the original opt.

Examples

import { O, None } from "./mod.ts";

console.log(O.inspect(1, (i) => i + 1)); // 1
console.log(O.inspect(None, (i: number) => i + 1)); // undefined

Parameters

opt: Option<T>
f: (_: T) => unknown