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.

20 lines 483 B
import { type NarrowToErr } from './types.mjs'; /** * Type guard for the Err variant. * * @example * * ```ts * const maybeErr = TernaryResult.err('boom') as TernaryResult< * number, * string, * string * >; * * if (TernaryResult.isErr(maybeErr)) { * assert.strictEqual(maybeErr.value, 'boom'); * } * ``` */ export declare const isErr: <R extends UnknownTernaryResult>(result: R) => result is NarrowToErr<R>; //# sourceMappingURL=ternary-result-is-err.d.mts.map