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) 297 B
import { type Undefinable } from './undefinable.js'; /** * Return one of this pattern: * * 1. a=others, b=undefined => _a_ * 2. a=undefined, b=others => _b_ * 3. Others => `undefined` */ export declare function xorForUndefinable<T>(a: Undefinable<T>, b: Undefinable<T>): Undefinable<T>;