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

10 lines (9 loc) 277 B
import { type Maybe } from '../core/maybe.js'; /** * Return one of this pattern: * * 1. a=others, b=null|undefined => _a_ * 2. a=null|undefined, b=others => _b_ * 3. Others => `undefined` */ export declare function xorForMaybe<T>(a: Maybe<T>, b: Maybe<T>): Maybe<T>;