1 | ;
|
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3 | return new (P || (P = Promise))(function (resolve, reject) {
|
4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
7 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8 | });
|
9 | };
|
10 | Object.defineProperty(exports, "__esModule", { value: true });
|
11 | function ask() {
|
12 | return __awaiter(this, void 0, void 0, function* () {
|
13 | return new Promise(resolve => {
|
14 | /*
|
15 | const prompt = inquirer.createPromptModule();
|
16 | prompt({
|
17 | name: 'type',
|
18 | type: 'list',
|
19 | message: 'what ui do you want?',
|
20 | choices: ['gui', 'cli'],
|
21 |
|
22 | }).then(answer => {
|
23 | console.log(`answer: ${JSON.stringify(answer)}`);
|
24 | resolve(true);
|
25 | });
|
26 | */
|
27 | setTimeout(() => {
|
28 | console.log('wait 10s');
|
29 | resolve(true);
|
30 | }, 10000);
|
31 | });
|
32 | // const bla = await promise;
|
33 | });
|
34 | }
|
35 | function bla() {
|
36 | return __awaiter(this, void 0, void 0, function* () {
|
37 | yield ask();
|
38 | console.log('end bla');
|
39 | });
|
40 | }
|
41 | bla();
|
42 | console.log('test');
|
43 | /*
|
44 |
|
45 | const prompt = inquirer.createPromptModule();
|
46 | prompt({
|
47 | name: 'type',
|
48 | type: 'list',
|
49 | message: 'editor type is not specified, select one',
|
50 | choices: ['gui', 'cli']
|
51 | }).then(answer => {
|
52 | console.log('wtf?!');
|
53 | if (!config.editor) {
|
54 | config.editor = new EditorConfig();
|
55 | }
|
56 | config.editor.type = <'gui' | 'cli'>(<{ type: string }>answer).type;
|
57 | console.log('antwoord?');
|
58 | resolve();
|
59 | });
|
60 |
|
61 | */
|
62 | //# sourceMappingURL=question.js.map |
\ | No newline at end of file |