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' ;
2
1
import { TableCellParser } from '../table-cell-parser' ;
3
2
import { TableCellParserBase } from '../table-cell-parser-base' ;
4
3
import { CoreTableCellParserType } from '../types/core-table-cell-parser-type' ;
5
4
6
5
@TableCellParser ( {
7
6
type : CoreTableCellParserType . NoOp
8
7
} )
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 {
11
10
return cellData ;
12
11
}
13
12
14
- public parseFilterValue ( cellData : unknown ) : string | undefined {
13
+ public parseFilterValue ( cellData : T | { filterValue ?: string } ) : string | undefined {
14
+ // tslint:disable-next-line:strict-type-predicates
15
15
if ( typeof cellData === 'object' && cellData !== null && 'filterValue' in cellData ) {
16
- return ( cellData as Dictionary < unknown > ) . filterValue as string ;
16
+ return cellData . filterValue ;
17
17
}
18
18
19
19
return String ( cellData ) ;
You can’t perform that action at this time.
0 commit comments