(message: string)
| 105 | } |
| 106 | |
| 107 | async function askConfirm(message: string): Promise<boolean> { |
| 108 | const name = `Confirm-${serialId()}`; |
| 109 | |
| 110 | return prompt([ |
| 111 | { |
| 112 | message, |
| 113 | name, |
| 114 | prefix, |
| 115 | type: "confirm", |
| 116 | initial: true, |
| 117 | onCancel: cancelFlow, |
| 118 | } as BooleanPromptOptions, |
| 119 | ]) |
| 120 | .then((responses: any) => responses[name]) |
| 121 | .catch((err: unknown) => { |
| 122 | error(err); |
| 123 | }); |
| 124 | } |
| 125 | |
| 126 | async function askList<Choice extends string>( |
| 127 | message: string, |