symfony-style-console
Version:
Use the style and utilities of the Symfony Console in Node.js
150 lines (149 loc) • 3.61 kB
TypeScript
import { PAD_TYPE } from './Helper';
/**
* Defines the styles for a Table.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* Original PHP class
*
* @author Саша Стаменковић <umpirsky@gmail.com>
*
* Original PHP class
*
* @author Florian Reuschel <florian@loilo.de>
*
* Port to TypeScript
*
*/
export default class TableStyle {
/**
* The character that pads the end of cell contents.
*/
private paddingChar;
/**
* The character horizontal borders are built from.
*/
private horizontalBorderChar;
/**
* The character vertical borders are built from.
*/
private verticalBorderChar;
/**
* The character horizontal + vertical intersections are built from
*/
private crossingChar;
/**
* A format for header cells.
*/
private cellHeaderFormat;
/**
* A format for regular cells.
*/
private cellRowFormat;
/**
* A format for regular cell's content.
*/
private cellRowContentFormat;
/**
* A format for borders.
*/
private borderFormat;
/**
* The direction cells should be padded at.
*/
private padType;
/**
* Clones the [[TableStyle]] instance.
*/
clone(): TableStyle;
/**
* Sets padding character, used for cell padding.
*
* @param paddingChar The cell padding character to use
*/
setPaddingChar(paddingChar: string): this;
/**
* Gets padding character, used for cell padding.
*/
getPaddingChar(): string;
/**
* Sets horizontal border character.
*
* @param horizontalBorderChar The horizontal border character to use
*/
setHorizontalBorderChar(horizontalBorderChar: string): this;
/**
* Gets horizontal border character.
*/
getHorizontalBorderChar(): string;
/**
* Sets vertical border character.
*
* @param verticalBorderChar The vertical border character to use
*/
setVerticalBorderChar(verticalBorderChar: string): this;
/**
* Gets vertical border character.
*/
getVerticalBorderChar(): string;
/**
* Sets crossing character.
*
* @param crossingChar The crossing character to use
*/
setCrossingChar(crossingChar: string): this;
/**
* Gets crossing character.
*/
getCrossingChar(): string;
/**
* Sets header cell format.
*
* @param cellHeaderFormat The header cell format to use
*/
setCellHeaderFormat(cellHeaderFormat: string): this;
/**
* Gets header cell format.
*/
getCellHeaderFormat(): string;
/**
* Sets row cell format.
*
* @param cellRowFormat The row cell format to use
*/
setCellRowFormat(cellRowFormat: string): this;
/**
* Gets row cell format.
*/
getCellRowFormat(): string;
/**
* Sets row cell content format.
*
* @param cellRowContentFormat The cell content format to use
*/
setCellRowContentFormat(cellRowContentFormat: string): this;
/**
* Gets row cell content format.
*/
getCellRowContentFormat(): string;
/**
* Sets table border format.
*
* @param borderFormat The border format to use
*/
setBorderFormat(borderFormat: string): this;
/**
* Gets table border format.
*/
getBorderFormat(): string;
/**
* Sets cell padding type.
*
* @param padType The padding type to use
*/
setPadType(padType: PAD_TYPE): this;
/**
* Gets cell padding type.
*/
getPadType(): PAD_TYPE;
}