Skip to content

PromptConfig ​

Discriminated union of all prompt configurations.

Use the kind field to narrow:

ts
if (config.kind === 'select') {
  config.choices // readonly SelectChoice[] | undefined
}

Signatures ​

ts
type PromptConfig = ConfirmPromptConfig | InputPromptConfig | SelectPromptConfig | MultiselectPromptConfig;

See Also ​

Released under the MIT License.