File size: 1,119 Bytes
9ada4bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Separator = void 0;
const chalk_1 = __importDefault(require("chalk"));
const figures_1 = __importDefault(require("@inquirer/figures"));
/**
* Separator object
* Used to space/separate choices group
*/
class Separator {
constructor(separator) {
Object.defineProperty(this, "separator", {
enumerable: true,
configurable: true,
writable: true,
value: chalk_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line))
});
Object.defineProperty(this, "type", {
enumerable: true,
configurable: true,
writable: true,
value: 'separator'
});
if (separator) {
this.separator = separator;
}
}
static isSeparator(choice) {
return Boolean(choice && choice.type === 'separator');
}
}
exports.Separator = Separator;
|