Interface: StringPromptOptions
#
Hierarchy↳ StringPromptOptions
#
Properties#
default• Optional
default: WithPromptState<string>
Default value for the prompt
Defined in: src/utils/prompt.ts:94
#
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
#
multiline• Optional
multiline: boolean
Allow the input to be multiple lines
Defined in: src/utils/prompt.ts:96
#
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: input | invisible | list | password | text
Defined in: src/utils/prompt.ts:92
#
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.
Inherited from: BasePromptOptions.validate
Defined in: src/utils/prompt.ts:32