Unwraps a ResultAsync, throwing the error if it exists.
The type of the value.
The type of the error.
The ResultAsync to unwrap.
A promise that resolves to the unwrapped value.
The error if the result contains an error.
const result = someAsyncFunctionThatReturnsResult();const value = await unsafeUnwrapAsync(result);console.log(value); Copy
const result = someAsyncFunctionThatReturnsResult();const value = await unsafeUnwrapAsync(result);console.log(value);
Unwraps a ResultAsync, throwing the error if it exists.