mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
style(table): Use official indent from .editorconfig
This commit is contained in:
parent
b13b82c214
commit
7e9a1c9323
52
types/table/index.d.ts
vendored
52
types/table/index.d.ts
vendored
@ -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;
|
||||
|
||||
@ -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 };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user