import type { PythonClass, PythonDeclarationIndex } from "./declarations.js"; import type { PythonImportIndex } from "./imports.js"; export type ModuleView = { readonly path: string; readonly imports: PythonImportIndex; readonly declarations: PythonDeclarationIndex; }; export type AncestryRequest = { readonly view: ModuleView; readonly modules: ReadonlyMap; readonly sourcePaths: readonly string[]; }; export type Ancestor = { readonly name: string; readonly origin: string | null; /** Dotted name of a declaration inside the unit; null for a reference. */ readonly qualifiedName: string | null; readonly declared: PythonClass | null; readonly view: ModuleView; }; /** * The classes a name resolves to, most derived first: the declaration itself, * then each base, following imports into the modules that declare them. A base * whose declaration lies outside the analysis unit still yields its origin, so * a declared type can be recognized without being readable. */ export declare function ancestry(name: string, request: AncestryRequest): readonly Ancestor[]; /** The dotted name a module answers to, taken from its path in the unit. */ export declare function dottedModuleName(relPath: string): string | null;