console-table-printer 2.14.4 → 2.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import { ColorMap } from '../utils/colored-console-line';
2
2
  import { ALIGNMENT, CharLengthDict, COLOR, Dictionary } from './common';
3
3
  import { TableStyleDetails } from './internal-table';
4
4
  export { ALIGNMENT, COLOR };
5
+ export type CellValue = string | number | undefined;
5
6
  /**
6
7
  * Configuration options for a table column
7
8
  */
@@ -29,7 +30,7 @@ export interface ComputedColumn extends ColumnOptionsRaw {
29
30
  * @param array - The complete array of row data
30
31
  * @returns The computed value for this column
31
32
  */
32
- function: (arg0: any, index: number, array: any[]) => any;
33
+ function: (arg0: Dictionary, index: number, array: Dictionary[]) => CellValue;
33
34
  }
34
35
  /**
35
36
  * Function type for sorting table rows
@@ -37,13 +38,13 @@ export interface ComputedColumn extends ColumnOptionsRaw {
37
38
  * @param row2 - Second row to compare
38
39
  * @returns Negative number if row1 should come before row2, positive if row2 should come before row1, 0 if equal
39
40
  */
40
- export type RowSortFunction = (row1: any, row2: any) => number;
41
+ export type RowSortFunction = (row1: Dictionary, row2: Dictionary) => number;
41
42
  /**
42
43
  * Function type for filtering table rows
43
44
  * @param row - The row data to evaluate
44
45
  * @returns True if the row should be included, false if it should be filtered out
45
46
  */
46
- export type RowFilterFunction = (row: any) => boolean;
47
+ export type RowFilterFunction = (row: Dictionary) => boolean;
47
48
  /**
48
49
  * Default styling options applied to all columns unless overridden
49
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "console-table-printer",
3
- "version": "2.14.4",
3
+ "version": "2.14.5",
4
4
  "repository": "github:console-table-printer/console-table-printer",
5
5
  "description": "Printing pretty tables on console log",
6
6
  "main": "dist/index.js",