Skip to content

Documentation / listr2 / ListrPromptAdapter

Class: abstract ListrPromptAdapter

Constructors

new ListrPromptAdapter(task, wrapper)

new ListrPromptAdapter(task, wrapper): ListrPromptAdapter

Parameters

task: ListrTaskObject<any, any, any>

wrapper: ListrTaskWrapper<any, any, any>

Returns

ListrPromptAdapter

Source

packages/listr2/src/utils/prompts/adapter.ts:9

Properties

state

private state: ListrTaskState

Source

packages/listr2/src/utils/prompts/adapter.ts:7


task

protected task: ListrTaskObject<any, any, any>

Source

packages/listr2/src/utils/prompts/adapter.ts:10


wrapper

protected wrapper: ListrTaskWrapper<any, any, any>

Source

packages/listr2/src/utils/prompts/adapter.ts:11

Methods

reportStarted()

protected reportStarted(): void

Returns

void

Source

packages/listr2/src/utils/prompts/adapter.ts:14


reportFailed()

protected reportFailed(): void

Returns

void

Source

packages/listr2/src/utils/prompts/adapter.ts:25


reportCompleted()

protected reportCompleted(): void

Returns

void

Source

packages/listr2/src/utils/prompts/adapter.ts:30


restoreState()

protected restoreState(): void

Returns

void

Source

packages/listr2/src/utils/prompts/adapter.ts:35


run()

abstract run<T>(...args): T | Promise<T>

Type parameters

T = any

Parameters

• ...args: any[]

Returns

T | Promise<T>

Source

packages/listr2/src/utils/prompts/adapter.ts:44