Unwraps the Err value from a Result, or throws an error.
Err
Result
The value which should be an Err.
The unwrapped item.
expect(() => unwrapErr(ok(3))).toThrowError("unwrapped Ok");expect(unwrapErr(err(4))).toStrictEqual(4); Copy
expect(() => unwrapErr(ok(3))).toThrowError("unwrapped Ok");expect(unwrapErr(err(4))).toStrictEqual(4);
Unwraps the
Errvalue from aResult, or throws an error.