File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
projects/components/src/table/cells/data-parsers Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- import { Dictionary } from '@hypertrace/common' ;
21import { TableCellParser } from '../table-cell-parser' ;
32import { TableCellParserBase } from '../table-cell-parser-base' ;
43import { CoreTableCellParserType } from '../types/core-table-cell-parser-type' ;
54
65@TableCellParser ( {
76 type : CoreTableCellParserType . NoOp
87} )
9- export class TableCellNoOpParser extends TableCellParserBase < unknown , unknown , string | undefined > {
10- public parseValue ( cellData : unknown ) : unknown {
8+ export class TableCellNoOpParser < T = unknown > extends TableCellParserBase < T , T , string | undefined > {
9+ public parseValue ( cellData : T ) : T {
1110 return cellData ;
1211 }
1312
14- public parseFilterValue ( cellData : unknown ) : string | undefined {
13+ public parseFilterValue ( cellData : T | { filterValue ?: string } ) : string | undefined {
14+ // tslint:disable-next-line:strict-type-predicates
1515 if ( typeof cellData === 'object' && cellData !== null && 'filterValue' in cellData ) {
16- return ( cellData as Dictionary < unknown > ) . filterValue as string ;
16+ return cellData . filterValue ;
1717 }
1818
1919 return String ( cellData ) ;
You can’t perform that action at this time.
0 commit comments