Interface: BooleanPromptOptions

Hierarchy#

Properties#

default#

• Optional default: WithPromptState<boolean>

Default value for the prompt

Defined in: src/utils/prompt.ts:88


format#

• Optional format: (value: string, state: PromptState) => Promise<string> | string

Function to format user input in the terminal.

Inherited from: BasePromptOptions.format

Defined in: src/utils/prompt.ts:40


message#

• message: string

The message to display when the prompt is rendered in the terminal.

Inherited from: BasePromptOptions.message

Defined in: src/utils/prompt.ts:24


name#

• name: string

Used as the key for the answer on the returned values (answers) object.

Inherited from: BasePromptOptions.name

Defined in: src/utils/prompt.ts:20


result#

• Optional result: (value: string, state: PromptState) => any

Function to format the final submitted value before it's returned.

Inherited from: BasePromptOptions.result

Defined in: src/utils/prompt.ts:36


skip#

• Optional skip: (state: PromptState, value: any) => boolean

Skip the prompt when returns true

Inherited from: BasePromptOptions.skip

Defined in: src/utils/prompt.ts:26


store#

• Optional store: boolean

Store the prompt answer in order to reuse it as default value the next time Defaults to false

Inherited from: BasePromptOptions.store

Defined in: src/utils/prompt.ts:45


type#

• type: confirm

Defined in: src/utils/prompt.ts:86


validate#

• Optional validate: (value: string, state: PromptState) => boolean | string

Function to validate the submitted value before it's returned.

This function may return a boolean or a string. If a string is returned it will be used as the validation error message.

Inherited from: BasePromptOptions.validate

Defined in: src/utils/prompt.ts:32