import { Result, MapResult } from '../types.mjs'; /** * Filters and sorts an array of results based on a maximum score and a limit. * * @template T - The type of the result data. * @param results - An array of results to filter and sort. Each result must have a `score` property. * @param maxScore - The maximum score threshold. Results with a score greater than this value will be excluded. * @param limit - The maximum number of results to return after filtering and sorting. * @returns A new array of results that are filtered by the maximum score, sorted in ascending order of score, and limited to the specified number of items. */ declare const filterResults: (results: Result[], maxScore: number, limit: number) => Result[]; /** * Transforms an array of `Result` objects into an array of `Result` objects * by applying an optional mapping function to the `item` property of each result. * * @template T - The type of the input items in the results. * @template U - The type of the output items in the results after mapping. * * @param results - An array of `Result` objects to be transformed. * @param mapResult - An optional function that maps an item of type `T` to type `U`. * If not provided, the original results are returned as `Result[]`. * * @returns An array of `Result` objects. If `mapResult` is not provided, the original * results are returned with their type cast to `Result[]`. */ declare const getMapResultItem: (results: Result[], mapResult?: MapResult) => Result[]; declare const parseResults: (results: Result[], maxScore: number, limit: number, mapResult?: MapResult) => Result[]; export { filterResults, getMapResultItem, parseResults };