import type { SearchIndex } from '../search-index.js'; import type { Said } from './held-sentence.js'; import type { ExportedMatch } from './search-matches.js'; /** The first `count` of `items` under `before`, a total order, without sorting the rest. */ export declare function first(items: readonly T[], count: number, before: (a: T, b: T) => number): T[]; /** * Exported names given by id, nearest thing to a ranking. * * Grouped by name because one name exported from a barrel and from the file that * declares it is one thing to go and look at, and ordered by how many files * export it — which is the only count this half has — once `openings` has * said where the question was found. A name is shown and ranked through one * row: where its question was found first, then source before tests and * stories, so the place shown is the implementation rather than its exercise. * * `through` holds, for a name reached by a doc and not by its own words, the * rows whose doc was read: the row shown and the rows listed are among them, * since another file's `sum` says nothing about this one's. `files` still * counts every file that exports the name. * * `openings`, when given, are the rows whose doc says the question in its * opening paragraph, and where it was found then orders first, as the * published half orders: a name its own words reached, then one a doc opens * with, then one a doc says later. `exact` holds the names that are the question * whole and where each orders, before all of them. */ export declare function exported(index: SearchIndex, names: Iterable, shown: ReadonlySet, within: ReadonlySet | undefined, said: Said, through?: ReadonlyMap>, openings?: ReadonlySet, exact?: ReadonlyMap): { readonly total: number; head(count: number): readonly ExportedMatch[]; rows(): readonly number[]; }; /** * The order one name's exported rows are shown in: source before tests before * stories, then {@link rowTextOrder}, by what the rows say and never by where * the index wrote them, which follows file names. The kind column orders first, * so a row is read only at a tie on it. */ export declare const exportedOrder: (index: SearchIndex) => (a: number, b: number) => number; /** * The exported rows a doc reached, by name, in `within` when it is named: what * `exported` shows such a name through. A name in `byName` is left out, since * its own words reached every row of it. */ export declare function docRows(index: SearchIndex, rows: Iterable, within: ReadonlySet | undefined, byName: ReadonlySet): Map>; //# sourceMappingURL=exported-matches.d.ts.map