UNPKG

symfony-style-console

Version:

Use the style and utilities of the Symfony Console in Node.js

49 lines (48 loc) 929 B
/** * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> * * Original PHP Class * * @author Florian Reuschel <florian@loilo.de> * * Port to TypeScript */ export default class TableCell { /** * Creates a new TableCell. * * @param value The cell's text content * @param options The cell's options */ constructor(value = '', options = {}) { this.value = value; this.options = Object.assign({ rowspan: 1, colspan: 1 }, options); } /** * Returns the cell value. * * @return string */ toString() { return this.value; } /** * Gets number of colspan. * * @return colspan */ getColspan() { return this.options.colspan; } /** * Gets number of rowspan. * * @return rowspan */ getRowspan() { return this.options.rowspan; } }