Extracts the successful value from a ResultAsync, throwing an error if it represents a failure.
A ResultAsync
The success value if present
An Err if the Result contains an error
const value = await unsafe(someSafeAsyncFunction());// If someSafeAsyncFunction() returns an error, the error will be thrown Copy
const value = await unsafe(someSafeAsyncFunction());// If someSafeAsyncFunction() returns an error, the error will be thrown
Extracts the successful value from a ResultAsync, throwing an error if it represents a failure.