Skip to content

Documentation / @listr2/prompt-adapter-enquirer / ListrEnquirerPromptAdapter

Class: ListrEnquirerPromptAdapter

Extends

  • ListrPromptAdapter

Constructors

new ListrEnquirerPromptAdapter()

new ListrEnquirerPromptAdapter(task, wrapper): ListrEnquirerPromptAdapter

Parameters

task: Task<any, any, any>

wrapper: TaskWrapper<any, any, any>

Returns

ListrEnquirerPromptAdapter

Inherited from

ListrPromptAdapter.constructor

Defined in

listr2/dist/index.d.ts:411

Properties

task

protected task: Task<any, any, any>

Inherited from

ListrPromptAdapter.task

Defined in

listr2/dist/index.d.ts:408


wrapper

protected wrapper: TaskWrapper<any, any, any>

Inherited from

ListrPromptAdapter.wrapper

Defined in

listr2/dist/index.d.ts:409


error

error: PromptError

Defined in

prompt-adapter-enquirer/src/prompt.ts:7

Accessors

instance

get instance(): EnquirerPromptInstance

Get the current running instance of enquirer.

Returns

EnquirerPromptInstance

Defined in

prompt-adapter-enquirer/src/prompt.ts:13

Methods

reportStarted()

protected reportStarted(): void

Returns

void

Inherited from

ListrPromptAdapter.reportStarted

Defined in

listr2/dist/index.d.ts:412


reportFailed()

protected reportFailed(): void

Returns

void

Inherited from

ListrPromptAdapter.reportFailed

Defined in

listr2/dist/index.d.ts:413


reportCompleted()

protected reportCompleted(): void

Returns

void

Inherited from

ListrPromptAdapter.reportCompleted

Defined in

listr2/dist/index.d.ts:414


restoreState()

protected restoreState(): void

Returns

void

Inherited from

ListrPromptAdapter.restoreState

Defined in

listr2/dist/index.d.ts:415


run()

run<T>(options, settings?): Promise<T>

Create a new prompt with enquirer.

enquirer is a peer dependency that must be installed seperately.

Type Parameters

T = any

Parameters

options: EnquirerPromptOptions | EnquirerPromptOptions<true>[]

settings?: EnquirerPromptSettings

Returns

Promise<T>

Overrides

ListrPromptAdapter.run

Defined in

prompt-adapter-enquirer/src/prompt.ts:22


cancel()

cancel(options?): void

Cancel the ongoing prompt.

Parameters

options?: EnquirerPromptCancelOptions

Returns

void

Defined in

prompt-adapter-enquirer/src/prompt.ts:98