@lyrasearch/plugin-match-highlight
Version:
Lyrasearch plugin for search match highlighting
11 lines (10 loc) • 846 B
text/typescript
import type { Lyra, PropertiesSchema } from '@lyrasearch/lyra';
import type { afterInsert as esmAfterInsert, LyraWithHighlight, searchWithHighlight as esmSearchWithHighlight } from './index.js';
export interface LyraPluginMatchHighlight {
afterInsert: typeof esmAfterInsert;
searchWithHighlight: typeof esmSearchWithHighlight;
}
export type RequireCallback = (err: Error | undefined, lyra?: LyraPluginMatchHighlight) => void;
export declare function afterInsert<S extends PropertiesSchema>(this: Lyra<S> | LyraWithHighlight<S>, ...args: Parameters<typeof esmAfterInsert>): ReturnType<typeof esmAfterInsert>;
export declare function searchWithHighlight(...args: Parameters<typeof esmSearchWithHighlight>): ReturnType<typeof esmSearchWithHighlight>;
export declare function requireLyraPluginMatchHighlight(callback: RequireCallback): void;