1 | export declare type DrawLinePredicate = (index: number, size: number) => boolean;
|
2 | export declare type DrawVerticalLine = DrawLinePredicate;
|
3 | export declare type DrawHorizontalLine = DrawLinePredicate;
|
4 | export declare type BorderUserConfig = {
|
5 | readonly topLeft?: string;
|
6 | readonly topRight?: string;
|
7 | readonly topBody?: string;
|
8 | readonly topJoin?: string;
|
9 | readonly bottomLeft?: string;
|
10 | readonly bottomRight?: string;
|
11 | readonly bottomBody?: string;
|
12 | readonly bottomJoin?: string;
|
13 | readonly joinLeft?: string;
|
14 | readonly joinRight?: string;
|
15 | readonly joinBody?: string;
|
16 | readonly joinJoin?: string;
|
17 | readonly joinMiddleUp?: string;
|
18 | readonly joinMiddleDown?: string;
|
19 | readonly joinMiddleLeft?: string;
|
20 | readonly joinMiddleRight?: string;
|
21 | readonly headerJoin?: string;
|
22 | readonly bodyRight?: string;
|
23 | readonly bodyLeft?: string;
|
24 | readonly bodyJoin?: string;
|
25 | };
|
26 | export declare type BorderConfig = Required<BorderUserConfig>;
|
27 | export declare type Alignment = 'center' | 'justify' | 'left' | 'right';
|
28 | export declare type VerticalAlignment = 'bottom' | 'middle' | 'top';
|
29 | export declare type CellUserConfig = {
|
30 | |
31 |
|
32 |
|
33 | readonly alignment?: Alignment;
|
34 | |
35 |
|
36 |
|
37 | readonly verticalAlignment?: VerticalAlignment;
|
38 | |
39 |
|
40 |
|
41 | readonly truncate?: number;
|
42 | |
43 |
|
44 |
|
45 | readonly paddingLeft?: number;
|
46 | |
47 |
|
48 |
|
49 | readonly paddingRight?: number;
|
50 | |
51 |
|
52 |
|
53 | readonly wrapWord?: boolean;
|
54 | };
|
55 | export declare type ColumnUserConfig = CellUserConfig & {
|
56 | |
57 |
|
58 |
|
59 | readonly width?: number;
|
60 | };
|
61 |
|
62 |
|
63 |
|
64 | export declare type HeaderUserConfig = Omit<ColumnUserConfig, 'verticalAlignment' | 'width'> & {
|
65 | readonly content: string;
|
66 | };
|
67 | export declare type BaseUserConfig = {
|
68 | |
69 |
|
70 |
|
71 | readonly border?: BorderUserConfig;
|
72 | |
73 |
|
74 |
|
75 | readonly columnDefault?: ColumnUserConfig;
|
76 | |
77 |
|
78 |
|
79 | readonly columns?: Indexable<ColumnUserConfig>;
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 | readonly drawVerticalLine?: DrawVerticalLine;
|
86 | };
|
87 | export declare type TableUserConfig = BaseUserConfig & {
|
88 | |
89 |
|
90 |
|
91 | readonly header?: HeaderUserConfig;
|
92 | |
93 |
|
94 |
|
95 |
|
96 |
|
97 | readonly drawHorizontalLine?: DrawHorizontalLine;
|
98 | |
99 |
|
100 |
|
101 | readonly singleLine?: boolean;
|
102 | readonly spanningCells?: SpanningCellConfig[];
|
103 | };
|
104 | export declare type SpanningCellConfig = CellUserConfig & {
|
105 | readonly row: number;
|
106 | readonly col: number;
|
107 | readonly rowSpan?: number;
|
108 | readonly colSpan?: number;
|
109 | };
|
110 | export declare type StreamUserConfig = BaseUserConfig & {
|
111 | |
112 |
|
113 |
|
114 | readonly columnCount: number;
|
115 | |
116 |
|
117 |
|
118 | readonly columnDefault: ColumnUserConfig & {
|
119 | |
120 |
|
121 |
|
122 | readonly width: number;
|
123 | };
|
124 | };
|
125 | export declare type WritableStream = {
|
126 | readonly write: (rows: string[]) => void;
|
127 | };
|
128 | export declare type Indexable<T> = {
|
129 | readonly [index: number]: T;
|
130 | };
|