/** * How the places that import a name are counted, the one count every answer * that says how many places import a name gives: the sites `uses` lists, * split by whether they import it for certain, and those split by whether * they are inside the package that declares the name or in another one. */ import { type Site } from './uses-of.js'; /** The places that import a name, those from other packages and those inside `home`. */ export interface Counted { /** The sites that import the name, which are the places counted. */ readonly certain: readonly Site[]; /** The sites that may read the name and are no use of it, counted apart. */ readonly off: readonly Site[]; readonly whole: readonly Site[]; /** The certain sites in other packages than `home`; none when no package is known to declare the name. */ readonly outside: readonly Site[]; /** The certain sites inside `home`; none when no package is known to declare the name. */ readonly inside: readonly Site[]; } /** Every site of a name counted against the package that declares it, when one is known. */ export declare function counted(sites: readonly Site[], home: string | undefined): Counted; /** `sites` split by whether they are inside `home`; none on either side when `home` is unknown. */ export declare function apart(sites: readonly Site[], home: string | undefined): Pick; /** * Where the places are, said after the count: `: 1 from another package and * 2 inside @acme/lib` when they are on both sides, `, all inside @acme/lib` * or `, from another package` when they are on one; empty when there is no * place. */ export declare function spokenSplit(count: Pick, home: string): string; /** How many places import a name, and how many packages those places sit in. */ export interface ImportedIn { readonly places: number; /** The packages the places sit in, the declaring one included; a place no manifest holds is in none. */ readonly packages: number; } /** The places among `sites` that {@link counted} counts, and the packages they sit in. */ export declare function importingIn(sites: readonly Site[]): ImportedIn; //# sourceMappingURL=uses-count.d.ts.map