Returns the Err value or throws if the result is not Err.
const errValue = TernaryResult.err('boom');assert.strictEqual(TernaryResult.unwrapErrThrow(errValue), 'boom');assert.throws( () => TernaryResult.unwrapErrThrow(TernaryResult.ok('value')), /Expected Err/u,); Copy
const errValue = TernaryResult.err('boom');assert.strictEqual(TernaryResult.unwrapErrThrow(errValue), 'boom');assert.throws( () => TernaryResult.unwrapErrThrow(TernaryResult.ok('value')), /Expected Err/u,);
Returns the Err value or throws if the result is not Err.