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) 266 B
import type { Nullable } from '../../nullable/core/nullable.js'; import type { Option } from './option.js'; /** * Return `T` if _input_ is `Some(T)`. * Otherwise, return `null`. */ export declare function toNullableFromOption<T>(input: Option<T>): Nullable<T>;