UNPKG

option-t

Version:

A toolkit of Nullable/Option/Result type implementation in ECMAScript. Their APIs are inspired by Rust's `Option<T>` and `Result<T, E>`.

8 lines (7 loc) 307 B
import type { Undefinable } from '../../undefinable/core/undefinable.js'; import { type Maybe } from '../core/maybe.js'; /** * Return `undfined` if _input_ is `null` or `undfined`. * Otherwise, return `T` directly. */ export declare function toUndefinableFromMaybe<T>(input: Maybe<T>): Undefinable<T>;