unwrapOr<O, U>(): Exclude<O, Any> | U
Returns the success value, or fallback if the outcome is a failure.
import * as Result from './index.ts'; const TooBig = Result.Failure.define('TooBig', (d: { raw: string }) => `${d.raw} > 65535`); const parsePort = (raw: string): Result.Result<number, Result.Failure.Of<typeof TooBig>> => Number(raw) > 65535 ? TooBig({ raw }) : Number(raw); Result.unwrapOr(parsePort('99999'), 3000); // 3000