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) 197 B
import type { Option } from './option.js'; /** * Return _b_ if _a_ is `Some(T)`. * Otherwise, return _a_. */ export declare function andForOption<T, U>(a: Option<T>, b: Option<U>): Option<U>;