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>`.

7 lines (6 loc) 229 B
import type { Undefinable } from './undefinable.js'; /** * Return _a_ if _a_ is not `undefined`. * Otherwise, return _b_. */ export declare function orForUndefinable<T>(a: Undefinable<T>, b: Undefinable<T>): Undefinable<T>;