/** * Resolves Go import paths to Nx project names using longest-prefix matching. */ import { Replacement } from '../types/import-map-result'; /** * Resolves an import path to an Nx project name. * * Uses longest-prefix matching against the import map, with replace * directive support for the source project. * * Performance: Sorted path arrays are cached to avoid O(n log n) sorting * on every call. For a workspace with 100 projects and 10,000 Go files, * this reduces total sort operations from ~10,000 to ~100. * * @param importPath - The Go import path (e.g., "github.com/myorg/shared/utils") * @param baseImportMap - Base mapping of module paths to project names * @param sourceProject - The project that contains the import statement * @param projectReplaceDirectives - Per-project replace directive mappings * @returns Target project name or null if not resolved to workspace project */ export declare function resolveImport(importPath: string, baseImportMap: Map, sourceProject: string, projectReplaceDirectives: Map>): string | null;