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) 248 B
import { type Option } from './option.js'; /** * Return one of this pattern: * * 1. a=Some, b=None => _a_ * 2. a=None, b=Some => _b_ * 3. Others => `None` */ export declare function xorForOption<T>(a: Option<T>, b: Option<T>): Option<T>;