import Fuse from 'fuse.js'; export interface UseFuseSearchOptions { /** If false, then searching will not be performed and noInputEmptyList will determine what results are shown (all or none). */ enabled?: boolean; /** * If true, then an empty search input will return an empty list (no matches). If false, then an empty input will * simply show all items in the list. False is useful when _narrowing_ a list of items using search. Default false. */ noInputEmptyList?: boolean; /** The maximum number of search results to return. No limit if undefined. Defaults to undefined. */ max?: number; /** Override any of the default fuse options. */ fuseOptions?: Fuse.IFuseOptions; } /** * Uses fuse to perform client-side fuzzy searching. * @param list The full list of items that can be searched. * @param search The search string or fuse expression to search the list of items with. * @param keys If T is an object, then this specifies the key(s) of the object that should be used for searching. * @param options Additional options for the hook, see UseFuseSearchOptions. * @returns A list of fuse search result objects, one per item. */ export declare function useFuseSearch(list: readonly T[], search: string | Fuse.Expression, keys: keyof T | (keyof T)[], // TODO deep keys? Supported by fuse but typing them is awkward options?: UseFuseSearchOptions): Fuse.FuseResult[]; //# sourceMappingURL=useFuseSearch.d.ts.map