import type { FileNode, FunctionDefRef, JSON_ROOT } from "../types";
type ExportTarget = {
    kind: "local";
    fileAbs: string;
    localName?: string;
} | {
    kind: "reexport_named";
    fileAbs: string;
    sourceAbs: string;
    exported: string;
    local?: string;
} | {
    kind: "reexport_all";
    fileAbs: string;
    sourceAbs: string;
};
type ProjectIndex = {
    existingFiles: Set<string>;
    funcRefsByFileAndName: Map<string, FunctionDefRef>;
    firstGlobalByName: Map<string, FunctionDefRef>;
    refsByFile: Map<string, FunctionDefRef[]>;
    exportsByFile: Map<string, Map<string, ExportTarget>>;
    fileNodeByAbsPath: Map<string, FileNode>;
};
export declare function buildProjectIndex(root: JSON_ROOT): ProjectIndex;
export type { ProjectIndex, ExportTarget };
