Closed ghost closed 3 years ago
I want to pass the task object to another function, like so.
task
import tsk, { TaskFunction } from 'tasuku' async function scanPage(page: number, task: TaskFunction) { ....... task.setOutput(`Scanning page ${page}...`) ........ } tsk( 'Scanning page', async (task) => { await scanPage(1, task) } )
This doesn't work because TaskFunction is not exported. Great library otherwise though, congrats, I switched from listr2
TaskFunction
Thanks @erikKeresztes
Does the solution in https://github.com/privatenumber/tasuku/pull/2 work for you?
Thanks @erikKeresztes Does the solution in #2 work for you?
Does the solution in #2 work for you?
Yes, thank you
I want to pass the
task
object to another function, like so.This doesn't work because
TaskFunction
is not exported. Great library otherwise though, congrats, I switched from listr2