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

fromSync

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

Convert a Sync to a SyncEither, treating any failure as a Right.

@example
import { fromSync } from "./sync_either.ts";
import { wrap } from "./sync.ts";

const sync = wrap("Hello");
const syncEither = fromSync(sync);
const result = syncEither(); // Right("Hello")
function fromSync<A = never, B = never>(ta: Sync<A>): SyncEither<B, A>;
§
fromSync<A = never, B = never>(ta: Sync<A>): SyncEither<B, A>
[src]

§Type Parameters

§
A = never
[src]
§
B = never
[src]

§Parameters

§Return Type