Interface: BasePromptOptions
#
HierarchyBasePromptOptions
#
Properties#
format• Optional
format: (value
: string, state
: PromptState) => Promise<string> | string
Function to format user input in the terminal.
Defined in: src/utils/prompt.ts:40
#
message• message: string
The message to display when the prompt is rendered in the terminal.
Defined in: src/utils/prompt.ts:24
#
name• name: string
Used as the key for the answer on the returned values (answers) object.
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.
Defined in: src/utils/prompt.ts:36
#
skip• Optional
skip: (state
: PromptState, value
: any) => boolean
Skip the prompt when returns true
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
Defined in: src/utils/prompt.ts:45
#
validate• Optional
validate: (value
: string, state
: PromptState) => boolean | string
This function may return a boolean or a string. If a string is returned it will be used as the validation error message.
Defined in: src/utils/prompt.ts:32