doc.yeswiki.pro/node_modules/@docsearch/react/dist/esm/stored-searches.d.ts
2023-05-20 19:38:02 +03:00

12 lines
447 B
TypeScript

import type { StoredDocSearchHit } from './types';
declare type CreateStoredSearchesOptions = {
key: string;
limit?: number;
};
export declare type StoredSearchPlugin<TItem> = {
add: (item: TItem) => void;
remove: (item: TItem) => void;
getAll: () => TItem[];
};
export declare function createStoredSearches<TItem extends StoredDocSearchHit>({ key, limit, }: CreateStoredSearchesOptions): StoredSearchPlugin<TItem>;
export {};