UNPKG

@siemens/ngx-datatable

Version:

ngx-datatable is an Angular table grid component for presenting large and complex data.

30 lines (29 loc) 1.05 kB
import { TableColumnProp } from '../types/table-column.type'; export type ValueGetter = (obj: any, prop: TableColumnProp) => any; /** * Always returns the empty string '' */ export declare const emptyStringGetter: () => string; /** * Returns the appropriate getter function for this kind of prop. * If prop == null, returns the emptyStringGetter. */ export declare const getterForProp: (prop: TableColumnProp | undefined) => ValueGetter; /** * Returns the value at this numeric index. * @param row array of values * @param index numeric index * @returns any or '' if invalid index */ export declare const numericIndexGetter: (row: any[], index: number) => any; /** * Returns the value of a field. * (more efficient than deepValueGetter) * @param obj object containing the field * @param fieldName field name string */ export declare const shallowValueGetter: (obj: any, fieldName: string) => any; /** * Returns a deep object given a string. zoo['animal.type'] */ export declare const deepValueGetter: (obj: any, path: string) => any;