Single-line read from stdin, returning the user's input without the trailing newline.
(promptText: string)
| 287 | |
| 288 | /** Single-line read from stdin, returning the user's input without the trailing newline. */ |
| 289 | function readLine(promptText: string): Promise<string> { |
| 290 | return new Promise((resolve) => { |
| 291 | const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); |
| 292 | rl.question(promptText, (answer) => { |
| 293 | rl.close(); |
| 294 | resolve(answer); |
| 295 | }); |
| 296 | }); |
| 297 | } |
no outgoing calls
no test coverage detected