target Promise
success result for resolved promise or error result for rejected promise
const successResult = await getResult(Promise.resolve('foo'));
successResult.unwrap(); // returns 'foo'
const errorResult = await getResult(Promise.reject('bar'));
errorResult.unwrapErr(); // returns 'bar'
Generated using TypeDoc
Converts
Promise
toResult