Extracts the successful value from a Result, or throws the error if it's a failure.
The type of the success value.
A string literal type for the error label.
The Result to process.
The success value if the result is successful.
The Err object if the result is a failure.
const result = someSafeFunction();const value = unsafe(result); // Throws if result is an error Copy
const result = someSafeFunction();const value = unsafe(result); // Throws if result is an error
Extracts the successful value from a Result, or throws the error if it's a failure.