diff --git a/types/table/index.d.ts b/types/table/index.d.ts index 9deca5a961..7ac5104a8e 100644 --- a/types/table/index.d.ts +++ b/types/table/index.d.ts @@ -6,41 +6,41 @@ export type borderType = 'honeywell' | 'norc' | 'ramac' | 'void'; export interface ColumnConfig { - alignment?: string; - width?: number; - truncate?: number; - paddingLeft?: string; - paddingRight?: string; + alignment?: string; + width?: number; + truncate?: number; + paddingLeft?: string; + paddingRight?: string; } export interface JoinStruct { - topBody?: string; - topJoin?: string; - topLeft?: string; - topRight?: string; + topBody?: string; + topJoin?: string; + topLeft?: string; + topRight?: string; - bottomBody?: string; - bottomJoin?: string; - bottomLeft?: string; - bottomRight?: string; + bottomBody?: string; + bottomJoin?: string; + bottomLeft?: string; + bottomRight?: string; - bodyLeft?: string; - bodyRight?: string; - bodyJoin?: string; + bodyLeft?: string; + bodyRight?: string; + bodyJoin?: string; - joinBody?: string; - joinLeft?: string; - joinRight?: string; - joinJoin?: string; + joinBody?: string; + joinLeft?: string; + joinRight?: string; + joinJoin?: string; } export interface TableUserConfig { - columns?: { - [index: number]: ColumnConfig - }; - drawJoin?(index: number, size: number): boolean; - border?: JoinStruct; - columnDefault?: ColumnConfig; + columns?: { + [index: number]: ColumnConfig + }; + drawJoin?(index: number, size: number): boolean; + border?: JoinStruct; + columnDefault?: ColumnConfig; } export function table(data: any[], userConfig?: TableUserConfig): string; diff --git a/types/table/table-tests.ts b/types/table/table-tests.ts index f3f4662b69..6d6ae43ee4 100644 --- a/types/table/table-tests.ts +++ b/types/table/table-tests.ts @@ -3,9 +3,9 @@ import * as table from 'table'; const border: table.JoinStruct = table.getBorderCharacters('norc'); const data = [ - ['first name', 'last name'], - ['jane', 'doe'], - ['john', 'doe'] + ['first name', 'last name'], + ['jane', 'doe'], + ['john', 'doe'] ]; const config: table.TableUserConfig = { border };