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

Source

listr2/dist/index.d.ts:411

Properties

task

protected task: Task<any, any, any>

Inherited from

ListrPromptAdapter.task

Source

listr2/dist/index.d.ts:408


wrapper

protected wrapper: TaskWrapper<any, any, any>

Inherited from

ListrPromptAdapter.wrapper

Source

listr2/dist/index.d.ts:409


error

error: PromptError

Source

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


prompt

private prompt: EnquirerPromptInstance

Source

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

Accessors

instance

get instance(): EnquirerPromptInstance

Get the current running instance of enquirer.

Returns

EnquirerPromptInstance

Source

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

Methods

reportStarted()

protected reportStarted(): void

Returns

void

Inherited from

ListrPromptAdapter.reportStarted

Source

listr2/dist/index.d.ts:412


reportFailed()

protected reportFailed(): void

Returns

void

Inherited from

ListrPromptAdapter.reportFailed

Source

listr2/dist/index.d.ts:413


reportCompleted()

protected reportCompleted(): void

Returns

void

Inherited from

ListrPromptAdapter.reportCompleted

Source

listr2/dist/index.d.ts:414


restoreState()

protected restoreState(): void

Returns

void

Inherited from

ListrPromptAdapter.restoreState

Source

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

Source

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


cancel()

cancel(options?): void

Cancel the ongoing prompt.

Parameters

options?: EnquirerPromptCancelOptions

Returns

void

Source

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