A deferred asynchronous computation: the thunk AsyncIO.from wraps.
AsyncIO.from
A thunk rather than a Promise, because a promise has already started its work; the thunk lets AsyncIO decide when it runs.
Promise
AsyncIO
The value the promise resolves to.
import { AsyncIO, type AsyncEffect } from '@b-jones-rfd/func-help'const greet: AsyncEffect<string> = async () => 'hello'const io = AsyncIO.from(greet) Copy
import { AsyncIO, type AsyncEffect } from '@b-jones-rfd/func-help'const greet: AsyncEffect<string> = async () => 'hello'const io = AsyncIO.from(greet)
A deferred asynchronous computation: the thunk
AsyncIO.fromwraps.A thunk rather than a
Promise, because a promise has already started its work; the thunk letsAsyncIOdecide when it runs.