import { Task } from 'fp-ts/lib/Task' export * from 'fp-ts/lib/Task' /** * Task constructor function * */ export const newTask = (f: () => Promise): Task => f /** * Runs a Task. This will construct and effectively start the execution of the underlying Promise. */ export const runTask = (x: Task): Promise => x() /** * A function that returns a noop Task */ export const noOpTask = newTask(async () => {})