export type WizardSelectOption = { value: T; label: string; hint?: string; }; export type WizardSelectParams = { message: string; options: Array>; initialValue?: T; }; export type WizardMultiSelectParams = { message: string; options: Array>; initialValues?: T[]; }; export type WizardTextParams = { message: string; initialValue?: string; placeholder?: string; validate?: (value: string) => string | undefined; }; export type WizardConfirmParams = { message: string; initialValue?: boolean; }; export type WizardProgress = { update: (message: string) => void; stop: (message?: string) => void; }; export type WizardPrompter = { intro: (title: string) => Promise; outro: (message: string) => Promise; note: (message: string, title?: string) => Promise; select: (params: WizardSelectParams) => Promise; multiselect: (params: WizardMultiSelectParams) => Promise; text: (params: WizardTextParams) => Promise; confirm: (params: WizardConfirmParams) => Promise; progress: (label: string) => WizardProgress; }; export class WizardCancelledError extends Error { constructor(message = "wizard cancelled") { super(message); this.name = "WizardCancelledError"; } }