mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
21 lines
444 B
TypeScript
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
|