stored-searches.d.ts 447 B

123456789101112
  1. import type { StoredDocSearchHit } from './types';
  2. declare type CreateStoredSearchesOptions = {
  3. key: string;
  4. limit?: number;
  5. };
  6. export declare type StoredSearchPlugin<TItem> = {
  7. add: (item: TItem) => void;
  8. remove: (item: TItem) => void;
  9. getAll: () => TItem[];
  10. };
  11. export declare function createStoredSearches<TItem extends StoredDocSearchHit>({ key, limit, }: CreateStoredSearchesOptions): StoredSearchPlugin<TItem>;
  12. export {};