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) 274 B
import type { Nullable } from '../nullable/nullable.js'; import { type Maybe } from './maybe.js'; /** * Return `null` if _input_ is `null` or `undfined`. * Otherwise, return `T` directly. */ export declare function toNullableFromMaybe<T>(input: Maybe<T>): Nullable<T>;