DefinitelyTyped/types/table/table-tests.ts
2017-12-07 19:42:38 +03:00

18 lines
333 B
TypeScript

import * as table from 'table';
const border: table.JoinStruct = table.getBorderCharacters('norc');
const data = [
['first name', 'last name'],
['jane', 'doe'],
['john', 'doe']
];
const config: table.TableUserConfig = {
border,
columnCount: 1,
drawHorizontalLine: () => true
};
table.table(data, config);