1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const readline = require("readline");
|
4 | const rl = readline.createInterface({
|
5 | input: process.stdin,
|
6 | output: process.stdout
|
7 | });
|
8 | class Prompt {
|
9 | constructor() {
|
10 | this.rl = readline.createInterface({
|
11 | input: process.stdin,
|
12 | output: process.stdout
|
13 | });
|
14 | }
|
15 | ask(message) {
|
16 | return new Promise((resolve) => {
|
17 | this.rl.question(message, (answer) => {
|
18 | resolve(answer);
|
19 | });
|
20 | });
|
21 | }
|
22 | close() {
|
23 | this.rl.close();
|
24 | }
|
25 | }
|
26 | exports.Prompt = Prompt;
|
27 |
|
\ | No newline at end of file |