UNPKG

typescript-monads

Version:
10 lines 290 B
import { of, throwError } from 'rxjs'; export function resultToObservable(result) { if (result.isOk()) { return of(result.unwrap()); } else { return throwError(function () { return result.unwrapFail(); }); } } //# sourceMappingURL=result-to-observable.js.map