Skip to content

Documentation / listr2 / ListrSubClassOptions

Interface: ListrSubClassOptions<Ctx, Renderer, FallbackRenderer>

Subtasks has reduced set options where the missing ones are explicitly set by the base class.

Extends

Type Parameters

Ctx = ListrContext

Renderer extends ListrRendererValue = ListrPrimaryRendererValue

FallbackRenderer extends ListrRendererValue = ListrSecondaryRendererValue

Properties

ctx?

optional ctx: Ctx

Inject a context through this options wrapper.

Default Value

{}

See

https://listr2.kilic.dev/listr/context.html

Inherited from

Omit.ctx

Defined in

packages/listr2/src/interfaces/listr.interface.ts:24


concurrent?

optional concurrent: number | boolean

Concurrency limits how many tasks will be running in parallel.

  • false will only run a single task at a time.
  • true will set it to Infinity to run all the tasks in parallel.
  • Given a number it will limit the concurrency to that number.

Default Value

false

Inherited from

Omit.concurrent

Defined in

packages/listr2/src/interfaces/listr.interface.ts:34


exitOnError?

optional exitOnError: boolean

Determine the default behavior of exiting on errors.

  • true will exit the current Listr whenever it encounters an error.
  • false will continue the execution of current Listr if it encounters an error.

Default Value

true

Inherited from

Omit.exitOnError

Defined in

packages/listr2/src/interfaces/listr.interface.ts:43


exitAfterRollback?

optional exitAfterRollback: boolean

Determine the behavior of exiting after rollback actions.

This is independent of exitOnError, since failure of a rollback can be a more critical operation comparing to failing a single task.

  • true will stop the execution whenever a rollback happens.
  • false will continue after successfully recovering from a rollback.

Default Value

true

Inherited from

Omit.exitAfterRollback

Defined in

packages/listr2/src/interfaces/listr.interface.ts:55


collectErrors?

optional collectErrors: false | "minimal" | "full"

Collects errors inside the Listr.errors.

  • false will collect no errors.
  • minimal will only collect the error message and the location.
  • full will clone the current context and task in to the error instance.

Default Value

false

See

https://listr2.kilic.dev/task/error-handling.html#collected-errors

Inherited from

Omit.collectErrors

Defined in

packages/listr2/src/interfaces/listr.interface.ts:66


rendererOptions?

optional rendererOptions: ListrGetRendererOptions<Renderer>

Renderer options depending on the current renderer.

Inherited from

ListrPrimaryRendererOptions.rendererOptions

Defined in

packages/listr2/src/interfaces/renderer.interface.ts:96


fallbackRendererOptions?

optional fallbackRendererOptions: ListrGetRendererOptions<FallbackRenderer>

Renderer options depending on the fallback renderer.

Inherited from

ListrSecondaryRendererOptions.fallbackRendererOptions

Defined in

packages/listr2/src/interfaces/renderer.interface.ts:114