• Unwraps the value for the result whose type parameters of are same.

    Type Parameters

    • T

    Parameters

    • res: Result<T, T>

      The source result.

    Returns T

    The contained value.

    Examples

    import { err, mergeOkErr, ok } from "./result.ts";
    import { assertEquals } from "../deps.ts";

    assertEquals(mergeOkErr(ok(3)), 3);
    assertEquals(mergeOkErr(err(4)), 4);

Generated using TypeDoc