Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumeration members

DATA = "DATA"
ENABLED = "ENABLED"
MESSAGE = "MESSAGE"
STATE = "STATE"
SUBTASK = "SUBTASK"
TITLE = "TITLE"

Type aliases

ForgeListrTaskDefinition: ListrTask<never>
ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>: ListrOptions<Ctx> & ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>

Parent class options.

Parent class has more options where you can also select the and set renderer and non-tty renderer.

Any subtasks will respect those options so they will be stripped of that properties.

Type parameters

ListrContext: any | undefined

Listr Default Context

ListrDefaultRenderer: typeof DefaultRenderer

Type of default renderer

ListrDefaultRendererValue: "default"

The default renderer value used in Listr2 applications

ListrEvent: { data?: string | boolean; type: Exclude<ListrEventType, "MESSAGE" | "DATA"> } | { data: string; type: DATA } | { data: Task<any, any>["message"]; type: MESSAGE }

The internal communication event.

ListrFallbackRenderer: typeof VerboseRenderer

Type of default fallback renderer

ListrFallbackRendererValue: "verbose"

Name of default fallback renderer

Returns the class type from friendly names of the renderers.

Type parameters

ListrGetRendererOptions<T>: T extends ListrDefaultRendererValue ? ListrDefaultRenderer["rendererOptions"] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer["rendererOptions"] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer["rendererOptions"] : T extends ListrSilentRenderer ? ListrSilentRenderer["rendererOptions"] : T extends ListrRendererFactory ? T["rendererOptions"] : never

Returns renderer global options depending on the renderer type.

Type parameters

ListrGetRendererTaskOptions<T>: T extends ListrDefaultRendererValue ? ListrDefaultRenderer["rendererTaskOptions"] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer["rendererTaskOptions"] : T extends ListrSilentRenderer ? ListrSilentRenderer["rendererTaskOptions"] : T extends ListrRendererFactory ? T["rendererTaskOptions"] : never

Returns renderer per task options depending on the renderer type.

Type parameters

ListrRendererFactory: typeof ListrRenderer

A renderer factory from the current type

Listr2 can process either the integrated renderers as string aliases, or utilize a compatible style renderer that extends the ListrRenderer abstract class.

ListrSilentRenderer: typeof SilentRenderer

Typeof silent renderer

ListrSilentRendererValue: "silent"

Silent rendere for internal usage

ListrSimpleRenderer: typeof SimpleRenderer

Typeof simple renderer

ListrSimpleRendererValue: "simple"

Simple renderer that simplifies things

ListrSubClassOptions<Ctx, Renderer>: ListrOptions<Ctx> & Omit<ListrDefaultRendererOptions<Renderer>, "renderer">

Sub class options.

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

Type parameters

ListrTaskResult<Ctx>: string | Promise<any> | Listr<Ctx, ListrRendererValue, any> | Readable | NodeJS.ReadableStream | Observable<any>

Task can be set of sync or async function, an Observable or a stream.

Type parameters

  • Ctx

PromptOptions<T>: Unionize<{ [ K in PromptTypes]-?: T extends true ? { type: K } & PromptOptionsType<K> & { name: string | (() => string) } : { type: K } & PromptOptionsType<K> }> | (({ type: string } & T) extends true ? PromptOptionsType<string> & { name: string | (() => string) } : PromptOptionsType<string>)

Returns all the prompt options depending on the type selected.

Type parameters

  • T: boolean = false

PromptOptionsType<T>: T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record<PropertyKey, unknown> : any

Type parameters

  • T

PromptTypes: "AutoComplete" | "BasicAuth" | "Confirm" | "Editable" | "Form" | "Input" | "Invisible" | "List" | "MultiSelect" | "Numeral" | "Password" | "Quiz" | "Scale" | "Select" | "Snippet" | "Sort" | "Survey" | "Text" | "Toggle"
TeardownLogic: Subscription | Unsubscribable | (() => void) | void
Unionize<T>: { [ P in keyof T]: T[P] }[keyof T]

Type parameters

  • T: Record<PropertyKey, unknown>