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) 239 B
import { assertIsNotFrozen } from '../../../internal/assert.js'; /** * @throws * This throw an `Error` instance if the _input_ is frozen. */ export function unsafeAsMutOption(input) { assertIsNotFrozen(input); return input; }