diff --git a/projects/components/src/table/cells/data-parsers/table-cell-no-op-parser.ts b/projects/components/src/table/cells/data-parsers/table-cell-no-op-parser.ts index 1391bbb4f..96747d727 100644 --- a/projects/components/src/table/cells/data-parsers/table-cell-no-op-parser.ts +++ b/projects/components/src/table/cells/data-parsers/table-cell-no-op-parser.ts @@ -1,4 +1,3 @@ -import { Dictionary } from '@hypertrace/common'; import { TableCellParser } from '../table-cell-parser'; import { TableCellParserBase } from '../table-cell-parser-base'; import { CoreTableCellParserType } from '../types/core-table-cell-parser-type'; @@ -6,14 +5,15 @@ import { CoreTableCellParserType } from '../types/core-table-cell-parser-type'; @TableCellParser({ type: CoreTableCellParserType.NoOp }) -export class TableCellNoOpParser extends TableCellParserBase { - public parseValue(cellData: unknown): unknown { +export class TableCellNoOpParser extends TableCellParserBase { + public parseValue(cellData: T): T { return cellData; } - public parseFilterValue(cellData: unknown): string | undefined { + public parseFilterValue(cellData: T | { filterValue?: string }): string | undefined { + // tslint:disable-next-line:strict-type-predicates if (typeof cellData === 'object' && cellData !== null && 'filterValue' in cellData) { - return (cellData as Dictionary).filterValue as string; + return cellData.filterValue; } return String(cellData);