/** * 搜索历史管理 Hook */ export interface UseSearchHistoryOptions { /** * 存储 key */ historyKey: string; /** * 最大历史记录数量 */ maxHistoryCount: number; /** * 自定义加载历史记录函数 */ onLoadHistory?: () => string[]; /** * 自定义保存历史记录函数 */ onSaveHistory?: (history: string[]) => void; } export interface UseSearchHistoryResult { /** * 历史记录数组 */ history: string[]; /** * 添加历史记录 */ addHistory: (keyword: string) => void; /** * 删除历史记录 */ removeHistory: (keyword: string) => void; /** * 清除全部历史记录 */ clearAllHistory: () => void; /** * 重新加载历史记录 */ reloadHistory: () => void; } /** * 搜索历史管理 Hook * 支持自定义存储逻辑 */ export declare const useSearchHistory: (options: UseSearchHistoryOptions) => UseSearchHistoryResult;