@sudoo/coco
Version:
:ocean: A simple command line tool framework
31 lines (30 loc) • 678 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class Argument {
constructor(name) {
this._name = name;
this._description = null;
this._isOptional = false;
}
static create(name) {
return new Argument(name);
}
get isOptional() {
return this._isOptional;
}
get description() {
return this._description || '';
}
get name() {
return this._name;
}
setDescription(description) {
this._description = description;
return this;
}
optional() {
this._isOptional = true;
return this;
}
}
exports.Argument = Argument;