DefinitelyTyped/types/markdown-table/markdown-table-tests.ts
2020-03-04 10:28:58 -08:00

21 lines
444 B
TypeScript

import table, { Options } from 'markdown-table';
table([[''], ['']]); // $ExpectType string
table([], {}); // $ExpectType string
table(['']); // $ExpectError
table(); // $ExpectError
table({}); // $ExpectError
const options: Options = {
align: '',
padding: true,
delimiterStart: true,
delimiterEnd: true,
alignDelimiters: true,
stringLength: _ => 0
};
options.align = [''];
table([], options); // $ExpectType string