1 | import { TextAccessor } from './Accessors';
|
2 | export declare const presets: {
|
3 | eq: (a: any, b: any) => boolean;
|
4 | contains: (a: string, b: string) => boolean;
|
5 | startsWith: (a: string, b: string) => boolean;
|
6 | };
|
7 | export declare type FilterFunction<TDataItem> = (item: TDataItem, searchTerm: string, idx?: number) => boolean;
|
8 | export declare type FilterPreset = keyof typeof presets;
|
9 | export declare type Filter<TDataItem> = boolean | FilterPreset | FilterFunction<TDataItem> | null;
|
10 | export declare function useFilteredData<TDataItem>(data: readonly TDataItem[], filterer: Filter<TDataItem>, searchTerm?: string, textAccessor?: TextAccessor): readonly TDataItem[];
|
11 |
|
\ | No newline at end of file |