Static
inputAn input style prompt.
for displaying the prompt
Optional
defaultValue?: stringif user submits without typing anything. Default: "."
display for the prompt
Optional
required?: undefinedif the user input is required, incompatible with options.defaultValue
Optional
defaultValue?: undefinedif user submits without typing anything. Default: "."
display for the prompt
if the user input is required, incompatible with options.defaultValue
Promise
Static
secretA secret prompt.
Static
yesA confirm style prompt. Styles question as y/N
for displaying the prompt
Optional
defaultValue?: booleanif user submits without typing anything. Defaults false
display for the prompt
the boolean answer
Wrapper for prompter library Because @inquirer/prompts library set the methods as non-configurable, we cannot mock the methods directly. see details: https://github.com/orgs/nodejs/discussions/47959