Saltar al contenido principal
Versión: 0.19.0

Function: runWizard()

function runWizard(steps, options?): Promise<WizardAnswers>;

Defined in: tui/ink/wizard.tsx:257

Asks steps in order and resolves with every answer by step name. A step's message, choices or default can depend on earlier answers, and when skips it, so a consumer's whole interactive menu becomes a list of step definitions.

Ctrl+C rejects with an error named "ExitPromptError", like @inquirer/prompts, so isExitPromptError() keeps working. Without a TTY (or with plain) it asks the same steps through @inquirer/prompts.

Parameters​

ParameterType
stepsWizardStep[]
optionsWizardOptions

Returns​

Promise<WizardAnswers>