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) 415 B
import { type Undefinable, type NotUndefined } from '../core/undefinable.js'; /** * Zips _self_ with another `Undefinable<T>`. * If _self_ is `T` and _other_ is `U`, this method returns `[NotUndefined<T>, NotUndefined<U>]`. * Otherwise, `undefined` is returned. */ export declare function zipForUndefinable<T, U>(self: Undefinable<T>, other: Undefinable<U>): Undefinable<[NotUndefined<T>, NotUndefined<U>]>;