UNPKG

@radixdlt/primitives

Version:
5 lines (3 loc) 185 B
import { Result, ResultAsync, okAsync } from 'neverthrow' export const resultToAsync = <T, E>(result: Result<T, E>): ResultAsync<T, E> => result.asyncAndThen(value => okAsync(value))