UNPKG

ts-data-forge

Version:

[![npm version](https://img.shields.io/npm/v/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![npm downloads](https://img.shields.io/npm/dm/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![License](https://img.shields.

19 lines 616 B
import { type UnwrapWarn } from './types.mjs'; /** * Safely unwraps the Warn value. * * @example * * ```ts * const warnValue = TernaryResult.warn('ok', 'careful'); * * const okValue = TernaryResult.ok('ok'); * * assert.strictEqual(TernaryResult.unwrapWarn(warnValue), 'careful'); * * // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression * assert.strictEqual(TernaryResult.unwrapWarn(okValue), undefined); * ``` */ export declare const unwrapWarn: <R extends UnknownTernaryResult>(result: R) => UnwrapWarn<R> | undefined; //# sourceMappingURL=ternary-result-unwrap-warn.d.mts.map