@mikuroxina/mini-fn
    Preparing search index...

    Function unwrapErr

    • Unwraps the Err value from a Result, or throws an error.

      Type Parameters

      • E
      • T

      Parameters

      Returns E

      The unwrapped item.

      Examples

      expect(() => unwrapErr(ok(3))).toThrowError("unwrapped Ok");
      expect(unwrapErr(err(4))).toStrictEqual(4);