import type { TableUserConfig, } from '../src'; export const tableConfigSamples: {invalid: unknown[], valid: TableUserConfig[], } = { invalid: [ {border: 1}, {border: {unknown: '-'}}, {border: {topBody: 1}}, {border: {topJoin: 1}}, {border: {topLeft: 1}}, {border: {topRight: 1}}, {border: {bottomBody: 1}}, {border: {bottomJoin: 1}}, {border: {bottomLeft: 1}}, {border: {bottomRight: 1}}, {border: {bodyLeft: 1}}, {border: {bodyRight: 1}}, {border: {bodyJoin: 1}}, {border: {joinBody: 1}}, {border: {joinLeft: 1}}, {border: {joinRight: 1}}, {border: {joinJoin: 1}}, {columns: 1}, {columns: {a: {width: 5}}}, {columns: {1: 1}}, {columns: {1: {unknown: 1}}}, {columns: {1: {alignment: 1}}}, {columns: {1: {alignment: '1'}}}, {columns: {0: {alignment: 'middle'}}}, {columns: {1: {verticalAlignment: 1}}}, {columns: {1: {verticalAlignment: '1'}}}, {columns: {0: {verticalAlignment: 'center'}}}, {columns: {1: {width: 0}}}, {columns: {1: {width: 1.5}}}, {columns: {1: {width: '5'}}}, {columns: {1: {wrapWord: 1}}}, {columns: {1: {wrapWord: 'true'}}}, {columns: {1: {truncate: '1'}}}, {columns: {1: {paddingLeft: '1'}}}, {columns: {1: {paddingRight: '1'}}}, {columns: [1]}, {columns: ['']}, {columns: [{unknown: 1}]}, {columnDefault: 1}, {columnDefault: {unknown: 1}}, {columnDefault: {alignment: 1}}, {columnDefault: {alignment: '1'}}, {columnDefault: {alignment: 'middle'}}, {columnDefault: {verticalAlignment: 1}}, {columnDefault: {verticalAlignment: '1'}}, {columnDefault: {verticalAlignment: 'center'}}, {columnDefault: {width: 0}}, {columnDefault: {width: 1.5}}, {columnDefault: {width: '5'}}, {columnDefault: {wrapWord: 1}}, {columnDefault: {wrapWord: 'true'}}, {columnDefault: {truncate: '1'}}, {columnDefault: {paddingLeft: '1'}}, {columnDefault: {paddingRight: '1'}}, {drawHorizontalLine: 1}, {unknown: 1}, {header: 'a'}, {header: {unknown: 'x'}}, {header: {content: 1}}, {header: {content: 'x', width: 10}}, ], valid: [ {}, { columns: { 0: { alignment: 'left', verticalAlignment: 'bottom', width: 10, }, 1: { alignment: 'center', verticalAlignment: 'middle', width: 10, }, 2: { alignment: 'right', verticalAlignment: 'top', width: 10, }, }, }, { border: { bodyJoin: '│', bodyLeft: '│', bodyRight: '│', bottomBody: '─', bottomJoin: '┴', bottomLeft: '└', bottomRight: '┘', joinBody: '─', joinJoin: '┼', joinLeft: '├', joinRight: '┤', topBody: '─', topJoin: '┬', topLeft: '┌', topRight: '┐', }, }, { columns: { 0: { paddingLeft: 3, }, 1: { paddingRight: 3, width: 2, }, }, }, { border: {}, columnDefault: { paddingLeft: 0, paddingRight: 1, }, drawHorizontalLine: () => { return false; }, }, { columnDefault: { width: 50, }, columns: { 0: { alignment: 'right', width: 10, }, 1: { alignment: 'center', }, 2: { width: 10, }, }, }, {columns: {0: {alignment: 'left'}}}, {columns: {1: {alignment: 'right'}}}, {columns: {2: {alignment: 'center'}}}, {columns: {3: {alignment: 'justify'}}}, {columns: {0: {verticalAlignment: 'top'}}}, {columns: {1: {verticalAlignment: 'middle'}}}, {columns: {2: {verticalAlignment: 'bottom'}}}, {border: {topBody: '-'}}, {border: {topJoin: '-'}}, {border: {topLeft: '-'}}, {border: {topRight: '-'}}, {border: {bottomBody: '-'}}, {border: {bottomJoin: '-'}}, {border: {bottomLeft: '-'}}, {border: {bottomRight: '-'}}, {border: {bodyLeft: '-'}}, {border: {bodyRight: '-'}}, {border: {bodyJoin: '-'}}, {border: {joinBody: '-'}}, {border: {joinLeft: '-'}}, {border: {joinRight: '-'}}, {border: {joinJoin: '-'}}, {columns: {1: {alignment: 'left'}}}, {columns: {1: {width: 1}}}, {columns: {1: {width: 5}}}, {columns: {1: {wrapWord: true}}}, {columns: {1: {wrapWord: false}}}, {columns: {1: {truncate: 1}}}, {columns: {1: {paddingLeft: 1}}}, {columns: {1: {paddingRight: 1}}}, {columns: []}, {columns: [{width: 5}]}, {columns: [{wrapWord: true}, {truncate: 1}]}, {columns: [{paddingLeft: 1}, {paddingRight: 1}, {alignment: 'right'}]}, {columnDefault: {alignment: 'left'}}, {columnDefault: {width: 1}}, {columnDefault: {width: 5}}, {columnDefault: {wrapWord: true}}, {columnDefault: {wrapWord: false}}, {columnDefault: {truncate: 1}}, {columnDefault: {paddingLeft: 1}}, {columnDefault: {paddingRight: 1}}, {drawHorizontalLine: (): boolean => { return false; }}, {header: {content: ''}}, {header: { alignment: 'justify', content: 'a', paddingLeft: 5, paddingRight: 8, truncate: 3, wrapWord: true, }}, ], };