Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

fromAsync

import { fromAsync } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_either.ts";

Convert an Async to an AsyncEither, treating any failure as a Left.

@example
import * as AE from "./async_either.ts";
import * as A from "./async.ts";

const value = AE.fromAsync(A.wrap(1));

const result1 = await value(); // Right(1)
function fromAsync<A, B = never>(ta: Async<A>): AsyncEither<B, A>;
§
fromAsync<A, B = never>(ta: Async<A>): AsyncEither<B, A>
[src]

§Type Parameters

§
B = never
[src]

§Parameters

§Return Type