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/async.ts";

Convert a synchronous computation to an asynchronous one.

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

const sync = wrap(() => "Hello");
const async = fromSync(sync);

const result = await async(); // "Hello"
function fromSync<A>(fa: Sync<A>): Async<A>;
§
fromSync<A>(fa: Sync<A>): Async<A>
[src]

§Type Parameters

§Parameters

§Return Type