/** * The declarations `docs_uses` answers for: every file that declares the name, * published, exported or kept to itself, each one another thing, and the one a * `file` input names when it names one. */ import { type Spelling } from '@variance-authority/mcp/tools'; import type { DeclaredName } from '@variance-authority/sense'; import { type Members } from './members.js'; import type { Namesake, PublishedDeclaration } from './uses-of.js'; /** The file the asker names a declaration by, exactly as the checkout spells it; absent when none is named. */ export declare function declaredIn(input: Readonly>): string | undefined; /** Kinds in brackets after a name, each once and sorted; nothing when none is held. */ export declare function bracketed(held: readonly (string | undefined)[]): string; /** * A name its files keep to themselves: what each declaration is, where it is * declared, and who can reach it from there. The kind is said every time, * since a name is not a thing: a Rust `mod walk;` and the `fn walk` inside it * are two declarations that share a spelling, and the export of one is no * answer about the other. */ export declare function keptLine(name: string, kept: readonly DeclaredName[], spell: Spelling): string; /** The member declarations in `file`, with their uses. */ export declare function membersIn(members: Members, file: string): Members; /** * The sentence naming a namesake of the declaration answered first: by the * entries that publish it and where it is declared, or by the exports that * reach it when no entry publishes it. */ export declare function namesakeLine(name: string, one: Pick): string; /** * The entries that publish one declaration and where it is declared, which * tells it from a namesake. A door that publishes it under another name than * `asked` says that name, and so does a file that declares it by another. */ export declare function publishedAt(one: PublishedDeclaration, asked: string): string; /** * Every declaration beside the one answered first, by file and line, said * under the headline so that a reader who stops there knows the count is one * declaration's: nothing when the name has one. They come in the order the * sections below answer them, `members` already ordered as theirs are. */ export declare function othersLines(name: string, namesakes: readonly Namesake[], kept: readonly DeclaredName[], members: Members['declared']): readonly string[]; /** Whether a door publishes the declaration under another name than `asked`, or its file declares it by another. */ export declare function renamed(one: PublishedDeclaration, asked: string): boolean; /** How to ask for one declaration, said when the answer covers more than one and no file was named. */ export declare function narrowing(files: readonly string[], file: string | undefined, spell: Spelling): readonly string[]; /** The answer for a `file` that declares no thing by the name: the files that do. */ export declare function notDeclaredIn(name: string, file: string, files: readonly string[]): string; //# sourceMappingURL=uses-declarations.d.ts.map