summaryrefslogtreecommitdiff
path: root/js/console_table.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/console_table.ts')
-rw-r--r--js/console_table.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/console_table.ts b/js/console_table.ts
index 735ed0f9e..d7cae124c 100644
--- a/js/console_table.ts
+++ b/js/console_table.ts
@@ -51,7 +51,7 @@ function renderRow(row: string[], columnWidths: number[]): string {
}
export function cliTable(head: string[], columns: string[][]): string {
- const rows = [];
+ const rows: string[][] = [];
const columnWidths = head.map((h: string) => countBytes(h));
const longestColumn = columns.reduce(
(n: number, a: string[]) => Math.max(n, a.length),
@@ -64,10 +64,7 @@ export function cliTable(head: string[], columns: string[][]): string {
if (rows[j] === undefined) {
rows[j] = [];
}
- // tslint:disable-next-line:no-any
- const value = ((rows[j][i] as any) = column.hasOwnProperty(j)
- ? column[j]
- : "");
+ const value = (rows[j][i] = column.hasOwnProperty(j) ? column[j] : "");
const width = columnWidths[i] || 0;
const counted = countBytes(value);
columnWidths[i] = Math.max(width, counted);