import type { LintFs } from "./model.js"; /** A single import/export/require/dynamic-import specifier found in a source file. */ export interface ImportRef { /** Source file, posix-relative to the workspace root. */ file: string; /** The raw module specifier as written. */ specifier: string; kind: "relative" | "bare"; /** True for `import type` / type-only specifiers (erased at compile time). */ typeOnly: boolean; /** True when the file is a test/spec (not shipped). */ isTest: boolean; /** True when the declaration carries import attributes (`with { type: "json" }`). */ importAttributes: boolean; /** For bare specifiers: the package name (scope-aware), e.g. "@scope/pkg". */ packageName?: string; /** For relative specifiers that resolve outside the owning package dir: where they land. */ escapesTo?: string; } /** Imports found in each workspace package, keyed by the package dir (posix). */ export type SourceImportView = Map; export interface RawImport { specifier: string; typeOnly: boolean; importAttributes: boolean; } export declare function extractRelevantImports(text: string, fileName: string): RawImport[]; export declare function mayContainRelevantImport(source: string, workspaceNames: ReadonlySet): boolean; /** * Parse the real import graph of every workspace package's `src`, using the * TypeScript compiler's own parser (the engine typescript-eslint runs on). The * result feeds the import-driven rules — what code actually imports, not what * package.json declares. */ export declare function scanSourceImports(fs: LintFs, rootDir: string, packages: Array<{ dir: string; workspaceNames: ReadonlySet; }>): Promise; export declare function scanImportFiles(fs: LintFs, rootDir: string, files: string[]): Promise;