Skip to main content
Module

x/hkts/option.ts>toUndefined

Functional programming tools: option, either, task, state, optics, etc.
Latest
variable toUndefined
import { toUndefined } from "https://deno.land/x/hkts@v0.0.52/option.ts";

toUndefined returns either undefined or the inner value of an Option. This is useful for interacting with code that handles undefined but has no concept of the Option type.

type

<A>(ma: Option<A>) => A | undefined