The type of the result to unwrap.
The Result, ResultAsync.
The success value, or a Promise of the success value for async results.
The error value if the result is a Failure.
import { Result } from '@praha/byethrow';
const result: Result.Result<number, string> = Result.succeed(100);
const value = Result.unwrap(result); // 100
import { Result } from '@praha/byethrow';
const result: Result.Result<number, string> = Result.fail('Oops');
const value = Result.unwrap(result); // throws 'Oops'
Extracts the success value from a Result, ResultAsync.
If the result is a Failure, it throws the contained error. For ResultAsync, it returns a Promise that resolves to the success value or rejects with the error.