Extracts the value from a successful result, or throws the error.
The result to unwrap.
The success value.
The error if the result is Err.
Err
resultUnwrap({ ok: true, value: 42 }); // 42resultUnwrap({ ok: false, error: e }); // throws e Copy
resultUnwrap({ ok: true, value: 42 }); // 42resultUnwrap({ ok: false, error: e }); // throws e
Extracts the value from a successful result, or throws the error.