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>

Defined in

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