import Fuse, { type IFuseOptions } from 'fuse.js'; import type Slugger from 'github-slugger'; import type { Lexer } from 'marked'; import { type TextExtractors } from '../markdown/extract'; import type { MarkdownDocument } from './document'; import type { SearchResult } from './result'; export declare function defaultFuseOptions(): IFuseOptions; export type IndexingOptions = { /** * The fuse index to which the indexed markdown document parts will be added. * * You can use the `defaultFuseOptions` function to get a default options object. */ fuse?: Fuse>; /** * The markdown options that are used to extract the markdown parts. */ markdown?: Partial; }; export type MarkdownOptions = { /** * Extractors that are used to extract text from the markdown parts. * * You can use this to override the default extractors, or to add custom ones when using marked extensions. */ extractors: TextExtractors; /** * The slugger that is used to generate unique IDs for headers. */ sluggerFactory: () => Slugger; /** * The lexer that is used to tokenize the markdown source. */ lexerFactory: () => Lexer; }; export declare function mergeMarkdownOptions(options?: Partial): MarkdownOptions; export declare function index(documents: MarkdownDocument[], options?: IndexingOptions): Fuse>;