Skip to content

Documentation / listr2 / ListrTaskFn

Type alias: ListrTaskFn<Ctx, Renderer, FallbackRenderer>

ListrTaskFn<Ctx, Renderer, FallbackRenderer>: (ctx, task) => void | ListrTaskResult<Ctx>

The callback function from the user that defines the task.

Type parameters

Ctx

Renderer extends ListrRendererFactory

FallbackRenderer extends ListrRendererFactory

Parameters

ctx: Ctx

task: ListrTaskWrapper<Ctx, Renderer, FallbackRenderer>

Returns

void | ListrTaskResult<Ctx>

Source

packages/listr2/src/interfaces/task.interface.ts:81