(message: string)
| 484 | } |
| 485 | |
| 486 | export function confirm(message: string): Promise<boolean> { |
| 487 | const rl = createInterface({ input: process.stdin, output: process.stderr }); |
| 488 | return new Promise((resolve) => { |
| 489 | rl.question(`${message} (y/N) `, (answer: string) => { |
| 490 | rl.close(); |
| 491 | resolve(answer.toLowerCase() === 'y'); |
| 492 | }); |
| 493 | }); |
| 494 | } |
no test coverage detected