Documentation / listr2 / ListrOptions
Interface: ListrOptions<Ctx>
Defined in: packages/listr2/src/interfaces/listr.interface.ts:17
Options to set the behavior of Listr.
Extended by
Type Parameters
Ctx
Ctx = ListrContext
Properties
ctx?
optionalctx:Ctx
Defined in: packages/listr2/src/interfaces/listr.interface.ts:24
Inject a context through this options wrapper.
Default Value
{}
See
https://listr2.kilic.dev/listr/context.html
concurrent?
optionalconcurrent:number|boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:34
Concurrency limits how many tasks will be running in parallel.
falsewill only run a single task at a time.truewill set it toInfinityto run all the tasks in parallel.- Given a
numberit will limit the concurrency to that number.
Default Value
false
exitOnError?
optionalexitOnError:boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:43
Determine the default behavior of exiting on errors.
truewill exit the current Listr whenever it encounters an error.falsewill continue the execution of current Listr if it encounters an error.
Default Value
true
exitAfterRollback?
optionalexitAfterRollback:boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:55
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.
truewill stop the execution whenever a rollback happens.falsewill continue after successfully recovering from a rollback.
Default Value
true
collectErrors?
optionalcollectErrors:false|"minimal"|"full"
Defined in: packages/listr2/src/interfaces/listr.interface.ts:66
Collects errors inside the Listr.errors.
falsewill collect no errors.minimalwill only collect the error message and the location.fullwill 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
registerSignalListeners?
optionalregisterSignalListeners:boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:73
Listr will track SIGINIT signal to update the renderer one last time before failing, therefore it needs to register exit listeners.
Default Value
truefallbackRendererCondition?
optionalfallbackRendererCondition:boolean| () =>boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:79
Determine the certain condition required to use the fallback renderer.
Default Value
handled internallysilentRendererCondition?
optionalsilentRendererCondition:boolean| () =>boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:85
Determine the certain condition required to use the silent renderer.
Default Value
handled internallyforceTTY?
optionalforceTTY:boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:91
Forces TTY stdout even though your current output may not be compatible.
Default Value
false
forceUnicode?
optionalforceUnicode:boolean
Defined in: packages/listr2/src/interfaces/listr.interface.ts:97
Forces unicode icons even though your current output may not be compatible.
Default Value
false