@types/table
Advanced tools
Comparing version 4.0.7 to 5.0.0
@@ -1,19 +0,11 @@ | ||
// Type definitions for table 4.0 | ||
// Type definitions for table 5.0 | ||
// Project: https://github.com/gajus/table | ||
// Definitions by: Evan Shortiss <https://github.com/evanshortiss> | ||
// mrmlnc <https://github.com/mrmlnc> | ||
// Daniel Perez Alvarez <https://github.com/unindented> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
export type BorderType = 'honeywell' | 'norc' | 'ramac' | 'void'; | ||
export type TableBorderTemplate = 'honeywell' | 'norc' | 'ramac' | 'void'; | ||
export interface ColumnConfig { | ||
alignment?: 'left' | 'center' | 'right'; | ||
paddingLeft?: number; | ||
paddingRight?: number; | ||
truncate?: number; | ||
width?: number; | ||
wrapWord?: boolean; | ||
} | ||
export interface JoinStruct { | ||
export interface TableBorder { | ||
topBody?: string; | ||
@@ -39,17 +31,32 @@ topJoin?: string; | ||
export interface TableColumns { | ||
alignment?: 'left' | 'center' | 'right'; | ||
paddingLeft?: number; | ||
paddingRight?: number; | ||
truncate?: number; | ||
width?: number; | ||
wrapWord?: boolean; | ||
} | ||
export type TableDrawHorizontalLine = (index: number, size: number) => boolean; | ||
export interface TableUserConfig { | ||
border?: TableBorder; | ||
columns?: { | ||
[index: number]: ColumnConfig | ||
[index: number]: TableColumns; | ||
}; | ||
drawHorizontalLine?: (index: number, size: number) => boolean; | ||
border?: JoinStruct; | ||
columnDefault?: ColumnConfig; | ||
columnDefault?: TableColumns; | ||
columnCount?: number; | ||
drawHorizontalLine?: TableDrawHorizontalLine; | ||
singleLine?: boolean; | ||
} | ||
export interface TableStream { | ||
write(row: string[]): void; | ||
} | ||
export function table(data: any[], userConfig?: TableUserConfig): string; | ||
export function createStream(userConfig: TableUserConfig): { write: string[] }; | ||
export function createStream(userConfig: TableUserConfig): TableStream; | ||
export function getBorderCharacters(templateName: BorderType): JoinStruct; | ||
export function getBorderCharacters(templateName: TableBorderTemplate): TableBorder; |
{ | ||
"name": "@types/table", | ||
"version": "4.0.7", | ||
"version": "5.0.0", | ||
"description": "TypeScript definitions for table", | ||
@@ -16,6 +16,11 @@ "license": "MIT", | ||
"githubUsername": "mrmlnc" | ||
}, | ||
{ | ||
"name": "Daniel Perez Alvarez", | ||
"url": "https://github.com/unindented", | ||
"githubUsername": "unindented" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -28,4 +33,4 @@ "type": "git", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "ce2252813527314141f85d25daa569d5ef34ca8ffe2b8d32f40119852b9bdd34", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "4243444de091409612f8c440e316a831d0163264174c645aa08b9ca67aa65391", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/table | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/table. | ||
Additional Details | ||
* Last updated: Thu, 05 Sep 2019 18:17:16 GMT | ||
### Additional Details | ||
* Last updated: Wed, 01 Apr 2020 21:47:22 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Evan Shortiss <https://github.com/evanshortiss>, and mrmlnc <https://github.com/mrmlnc>. | ||
These definitions were written by [Evan Shortiss](https://github.com/evanshortiss), [mrmlnc](https://github.com/mrmlnc), and [Daniel Perez Alvarez](https://github.com/unindented). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4400
49