smartcli/dist/smartcli.classes.interaction.js

41 lines
2.1 KiB
JavaScript
Raw Normal View History

2016-06-16 00:58:45 +00:00
"use strict";
require("typings-global");
2016-08-26 09:52:09 +00:00
const plugins = require("./smartcli.plugins");
class Interaction {
constructor() {
}
;
askQuestion(optionsArg) {
let done = plugins.q.defer();
plugins.inquirer.prompt([{
type: optionsArg.type,
message: optionsArg.message,
default: optionsArg.default,
choices: optionsArg.choices,
validate: optionsArg.validate
}]).then(answers => {
done.resolve(answers);
});
}
;
}
exports.Interaction = Interaction;
class QuestionTree {
constructor(questionString, optionsArray) {
}
;
}
exports.QuestionTree = QuestionTree;
;
class QuestionTreeNode {
constructor() {
}
}
exports.QuestionTreeNode = QuestionTreeNode;
;
class QuestionStorage {
2016-08-26 07:21:42 +00:00
constructor() {
2016-06-16 00:58:45 +00:00
}
2016-08-26 07:21:42 +00:00
}
2016-08-26 09:52:09 +00:00
exports.QuestionStorage = QuestionStorage;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRjbGkuY2xhc3Nlcy5pbnRlcmFjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0Y2xpLmNsYXNzZXMuaW50ZXJhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixNQUFZLE9BQU8sV0FBTSxvQkFBb0IsQ0FBQyxDQUFBO0FBZTlDO0lBQ0k7SUFDQSxDQUFDOztJQUVELFdBQVcsQ0FBQyxVQU1YO1FBQ0csSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUM3QixPQUFPLENBQUMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDO2dCQUNyQixJQUFJLEVBQUUsVUFBVSxDQUFDLElBQUk7Z0JBQ3JCLE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