Returns the Ok value or throws if the result is Warn or Err.
const okValue = TernaryResult.ok('ready');assert.strictEqual(TernaryResult.unwrapThrow(okValue), 'ready');assert.throws( () => TernaryResult.unwrapThrow(TernaryResult.warn('warn', 'warned')), /Expected Ok/u,); Copy
const okValue = TernaryResult.ok('ready');assert.strictEqual(TernaryResult.unwrapThrow(okValue), 'ready');assert.throws( () => TernaryResult.unwrapThrow(TernaryResult.warn('warn', 'warned')), /Expected Ok/u,);
Returns the Ok value or throws if the result is Warn or Err.