1 | // Type definitions for cli-table 0.3
|
2 | // Project: https://github.com/Automattic/cli-table
|
3 | // Definitions by: AryloYeung <https://github.com/arylo>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 | // TypeScript Version: 2.1
|
6 |
|
7 | interface TableOptions {
|
8 | chars: Partial<Record<(
|
9 | 'top' |
|
10 | 'top-mid' |
|
11 | 'top-left' |
|
12 | 'top-right' |
|
13 | 'bottom' |
|
14 | 'bottom-mid' |
|
15 | 'bottom-left' |
|
16 | 'bottom-right' |
|
17 | 'left' |
|
18 | 'left-mid' |
|
19 | 'mid' |
|
20 | 'mid-mid' |
|
21 | 'right' |
|
22 | 'right-mid' |
|
23 | 'middle'
|
24 | ), string>>;
|
25 | truncate: string;
|
26 | colors: boolean;
|
27 | colWidths: number[];
|
28 | colAligns: Array<"left" | "middle" | "right">;
|
29 | style: Partial<{
|
30 | 'padding-left': number;
|
31 | 'padding-right': number;
|
32 | head: string[];
|
33 | border: string[];
|
34 | compact: boolean;
|
35 | }>;
|
36 | head: string[];
|
37 | }
|
38 |
|
39 | declare class Table extends Array {
|
40 | constructor(options?: Partial<TableOptions>);
|
41 | toString(): string;
|
42 | static version: string;
|
43 | }
|
44 |
|
45 | export = Table;
|