unwrap<O>(outcome: O): Exclude<O, Any>
Returns the success value, or throws the failure.
The failure is thrown by identity — a Failure is an Error, so the stack keeps
pointing at where it was created rather than at this line. That is usually what you want
while debugging; when you would rather record the unwrap site, use expect(), which
builds a fresh error and files the original under cause.
import * as Result from './index.ts'; import * as Args from '../args/index.ts'; const flags = Result.unwrap(Args.parse('/repo')); // ParsedFlags, or the ParseFailure throws
outcome: O