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