summaryrefslogtreecommitdiff
path: root/js/console_table.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-21 16:40:10 -0400
committerGitHub <noreply@github.com>2019-04-21 16:40:10 -0400
commit9dfebbc9496138efbeedc431068f41662c780f3e (patch)
treec3718c3dc132d11c08c8fc18933daebf886bf787 /js/console_table.ts
parent6cded14bdf313762956d4d5361cfe8115628b535 (diff)
Fix eslint warnings (#2151)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
Diffstat (limited to 'js/console_table.ts')
-rw-r--r--js/console_table.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/console_table.ts b/js/console_table.ts
index 43819c5fe..d4a404aa1 100644
--- a/js/console_table.ts
+++ b/js/console_table.ts
@@ -53,9 +53,9 @@ function renderRow(row: string[], columnWidths: number[]): string {
export function cliTable(head: string[], columns: string[][]): string {
const rows: string[][] = [];
- const columnWidths = head.map((h: string) => countBytes(h));
+ const columnWidths = head.map((h: string): number => countBytes(h));
const longestColumn = columns.reduce(
- (n: number, a: string[]) => Math.max(n, a.length),
+ (n: number, a: string[]): number => Math.max(n, a.length),
0
);
@@ -72,8 +72,8 @@ export function cliTable(head: string[], columns: string[][]): string {
}
}
- const divider = columnWidths.map((i: number) =>
- tableChars.middleMiddle.repeat(i + 2)
+ const divider = columnWidths.map(
+ (i: number): string => tableChars.middleMiddle.repeat(i + 2)
);
let result =