UNPKG

663 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const readline = require("readline");
4const rl = readline.createInterface({
5 input: process.stdin,
6 output: process.stdout
7});
8class 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}
26exports.Prompt = Prompt;
27//# sourceMappingURL=Prompt.js.map
\No newline at end of file