type FilterableDatum> = T & { searchStr: string; }; export declare function filterArray>(data: FilterableDatum[], searchText: string, filterField: keyof FilterableDatum, filterValue: FilterableDatum[keyof FilterableDatum]): FilterableDatum[]; export declare function paginateArray(array: T[], pageSize: number, pageNumber: number): T[]; export declare function getOptions(data: T[], attr: keyof T): { text: string | T[keyof T]; value: string | T[keyof T]; }[]; interface SortableItem { [key: string]: unknown; } /** * Sorts an array of objects based on a specified column and direction. */ export declare function sortArray( /** The array to sort. */ array: T[], /** The column to sort by. */ column: keyof T, /** The sorting direction ('ascending' or 'descending'). */ direction: 'ascending' | 'descending', /** Whether or not sorting is turned on */ sortable: boolean): T[]; export type Formatter = (value: T) => string; export type FieldFormatters = { [K in keyof T]?: Formatter; }; /** * Formats a value based on a field and a dictionary of formatters. */ export declare function formatValue>( /** The object containing the field. */ item: FilterableDatum, /** The field to format. */ field: keyof T, /** An optional dictionary of formatters. */ fieldFormatters?: FieldFormatters): string | FilterableDatum[keyof T]; export {};