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

getInitializableAsync

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

Create an Initializable instance for Async given an Initializable for the inner type.

@example
import { getInitializableAsync, wrap } from "./async.ts";
import * as N from "./number.ts";
import { pipe } from "./fn.ts";

const initializableAsync = getInitializableAsync(N.InitializableNumberSum);
const async1 = wrap(2);
const async2 = wrap(3);

const result = await pipe(
  async1,
  initializableAsync.combine(async2),
); // 5

const init = await pipe(
  initializableAsync,
  initializableAsync.init()
); // 0
function getInitializableAsync<A>(I: Initializable<A>): Initializable<Async<A>>;
§
getInitializableAsync<A>(I: Initializable<A>): Initializable<Async<A>>
[src]

§Type Parameters

§Parameters