Skip to content

from

from<A>(f): Task<A>

Defined in: Core/Task.ts:74

Creates a Task from a function that returns a Promise. The factory optionally receives an AbortSignal forwarded from the call site.

A

(signal?) => Promise<A>

Task<A>

const getTimestamp = Task.from(() => Promise.resolve(Date.now()));