Closed luzianscherrer closed 1 year ago
The error is gone if you add TableUserConfig type for the config variable. I'm not sure if this is what we can fix. Do you have any suggestions?
Yep, I can confirm that. For me it's fine, but I think the examples should be updated accordingly.
That would be:
import { table, TableUserConfig } from 'table';
const data = [
['0A', '0B', '0C', '0D 0E 0F'],
['1A', '1B', '1C', '1D 1E 1F'],
['2A', '2B', '2C', '2D 2E 2F'],
];
const config: TableUserConfig = {
columnDefault: {
width: 10,
},
columns: [
{ alignment: 'left' },
{ alignment: 'center' },
{ alignment: 'right' },
{ alignment: 'justify' }
],
};
console.log(table(data, config));
Thanks. I will update it soon.
I'm getting the following error when running the alignment sample from the README:
This is the code that I'm using:
Versions used: