Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumeration members

DATA = "DATA"
MESSAGE = "MESSAGE"

Type aliases

CrossSpawnArgs: ReadonlyArray<string> | undefined

List of string arguments.

CrossSpawnOptions: SpawnOptions & { logger?: LoggerFunction; updateErrorCallback?: any }
ForgeListrTask<T>: TaskWrapper<T, ListrDefaultRenderer>

Type parameters

  • T

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

LoggerFunction: (message: string) => void

Type declaration

    • (message: string): void
    • Parameters

      • message: string

      Returns void

ModuleType: "prod" | "dev" | "optional"
PackageJSONWithDeps: { dependencies?: Record<string, string>; devDependencies?: Record<string, string> }

Type declaration

  • Optional dependencies?: Record<string, string>
  • Optional devDependencies?: Record<string, string>
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"
RebuildMode: "sequential" | "parallel"
TeardownLogic: Subscription | Unsubscribable | (() => void) | void
Unionize<T>: { [ P in keyof T]: T[P] }[keyof T]

Type parameters

  • T: Record<PropertyKey, unknown>