symfony-style-console
Version:
Use the style and utilities of the Symfony Console in Node.js
55 lines (54 loc) • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
*
* Original PHP Class
*
* @author Florian Reuschel <florian@loilo.de>
*
* Port to TypeScript
*/
var TableCell = /** @class */ (function () {
/**
* Creates a new TableCell.
*
* @param value The cell's text content
* @param options The cell's options
*/
function TableCell(value, options) {
if (value === void 0) { value = ''; }
if (options === void 0) { options = {}; }
this.value = value;
this.options = Object.assign({
rowspan: 1,
colspan: 1
}, options);
}
/**
* Returns the cell value.
*
* @return string
*/
TableCell.prototype.toString = function () {
return this.value;
};
/**
* Gets number of colspan.
*
* @return colspan
*/
TableCell.prototype.getColspan = function () {
return this.options.colspan;
};
/**
* Gets number of rowspan.
*
* @return rowspan
*/
TableCell.prototype.getRowspan = function () {
return this.options.rowspan;
};
return TableCell;
}());
exports.default = TableCell;