import ts from 'typescript';
import { CompilerContext } from '../compilerContext.js';
import type { ServiceRegistry } from '../discovery/serviceDiscovery.js';
import { type LatticeValue } from './lattice.js';
import { ModuleEnvironment } from './moduleAnalyzer.js';
export interface WholeProgramAnalyzerOptions {
    /** Maximum inlining depth for pure functions (default: 1). */
    readonly inliningDepth?: number;
}
export declare class WholeProgramAnalyzer {
    private readonly program;
    private readonly checker;
    private readonly context;
    private readonly serviceRegistry;
    private readonly inliningDepth;
    /** Cached module environments keyed by file path. */
    private readonly cache;
    /** Files currently being analyzed (cycle detection). */
    private readonly inProgress;
    /** Track which diagnostics we've already emitted to avoid duplicates. */
    private readonly emittedDiagnostics;
    constructor(context: CompilerContext, serviceRegistry: ServiceRegistry, options?: WholeProgramAnalyzerOptions);
    /**
     * Analyze a source file and return its module environment.
     * Results are cached — calling this twice for the same file is free.
     */
    analyzeFile(sourceFile: ts.SourceFile): ModuleEnvironment;
    /**
     * Resolve a symbol to its lattice value, analyzing the declaring module if needed.
     */
    resolveSymbol(symbol: ts.Symbol): LatticeValue;
    /**
     * Evaluate an arbitrary expression using the module's environment.
     * Supports pure function inlining and cross-module resolution.
     */
    evaluateExpression(expr: ts.Expression, sourceFile: ts.SourceFile): LatticeValue;
    /**
     * Resolve an import across modules.
     */
    resolveImport(fromFile: ts.SourceFile, moduleSpecifier: string, importedName: string): LatticeValue;
    /**
     * Resolve a namespace import (import * as X) — returns an object of all exports.
     */
    resolveNamespaceImport(fromFile: ts.SourceFile, moduleSpecifier: string): LatticeValue;
    /**
     * Find the import declaration node for a given module specifier and emit a diagnostic.
     * Deduplicates by file+specifier+code to avoid noisy repeated errors.
     */
    private emitImportDiagnostic;
    private findImportNode;
    private resolveModulePath;
    private resolveModulePathFromProgram;
    private buildResolutionCandidates;
}
//# sourceMappingURL=wholeProgramAnalyzer.d.ts.map