Readonly
See unwrapOrThrow.
Unwraps a Result, throwing the error if it exists.
The type of the value.
The type of the error.
The Result to unwrap.
The unwrapped value.
The error if the result contains an error.
const result = someFunctionThatReturnsResult();const value = unwrapOrThrow(result);console.log(value); Copy
const result = someFunctionThatReturnsResult();const value = unwrapOrThrow(result);console.log(value);
See unwrapOrThrow.