UNPKG

nucleus-ui-builder

Version:
45 lines (44 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return CommandSchemaBuilder; } }); function _define_property(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } class CommandSchemaBuilder { addPositional(name, config) { this.schema.positional[name] = config; return this; } addOption(name, config) { this.schema.options[name] = config; return this; } build() { return this.schema; } constructor(schema = { positional: {}, options: {} }){ _define_property(this, "schema", void 0); this.schema = schema; } } //# sourceMappingURL=command.schema.builder.js.map