Warp/node_modules/@docsearch/react/dist/esm/stored-searches.d.ts
2024-01-05 19:14:38 +07: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 {};