@b-jones-rfd/func-help - v0.7.1
    Preparing search index...

    Type Alias AsyncEffect<A>

    AsyncEffect: () => Promise<A>

    A deferred asynchronous computation: the thunk AsyncIO.from wraps.

    A thunk rather than a Promise, because a promise has already started its work; the thunk lets AsyncIO decide when it runs.

    Type Parameters

    • A

      The value the promise resolves to.

    Type Declaration

      • (): Promise<A>
      • Returns Promise<A>

    import { AsyncIO, type AsyncEffect } from '@b-jones-rfd/func-help'
    const greet: AsyncEffect<string> = async () => 'hello'
    const io = AsyncIO.from(greet)