Extracts the successful value from a ResultAsync, or throws the error if it's a failure.
The type of the success value.
A string literal type for the error label.
The ResultAsync to process.
A Promise that resolves with the success value.
Promise
The Err object if the result is a failure.
const result = someSafeAsyncFunction();const value = await unsafeAsync(result); // Throws if result is an error Copy
const result = someSafeAsyncFunction();const value = await unsafeAsync(result); // Throws if result is an error
Extracts the successful value from a ResultAsync, or throws the error if it's a failure.