import ts from 'typescript';
import { type LatticeValue } from './lattice.js';
import { ExpressionEvaluator } from './expressionEvaluator.js';
export interface ImportInfo {
    /** The module specifier string (e.g., './config'). */
    readonly moduleSpecifier: string;
    /** The imported name in the source module (or 'default' for default imports). */
    readonly importedName: string;
    /** Whether this is a namespace import (import * as X). */
    readonly isNamespace: boolean;
}
/**
 * Import resolver callback — provided by WholeProgramAnalyzer.
 */
export type ImportResolver = (fromFile: ts.SourceFile, moduleSpecifier: string, importedName: string) => LatticeValue;
/**
 * Namespace import resolver — resolves `import * as X` to an object of all exports.
 */
export type NamespaceResolver = (fromFile: ts.SourceFile, moduleSpecifier: string) => LatticeValue;
export declare class ModuleEnvironment {
    readonly sourceFile: ts.SourceFile;
    private readonly values;
    private readonly imports;
    private readonly functions;
    private readonly assignmentCounts;
    private readonly exports;
    private readonly starReExports;
    private readonly checker;
    private readonly importResolver?;
    private readonly namespaceResolver?;
    constructor(sourceFile: ts.SourceFile, checker: ts.TypeChecker, importResolver?: ImportResolver, namespaceResolver?: NamespaceResolver);
    get(symbol: ts.Symbol): LatticeValue;
    set(symbol: ts.Symbol, value: LatticeValue): void;
    /**
     * Resolve a symbol's value — handles imports on demand.
     */
    resolve(symbol: ts.Symbol): LatticeValue;
    markImport(symbol: ts.Symbol, info: ImportInfo): void;
    markExport(name: string, symbol: ts.Symbol): void;
    addStarReExport(moduleSpecifier: string): void;
    getExport(name: string): LatticeValue;
    getAllExports(): Map<string, LatticeValue>;
    setFunction(symbol: ts.Symbol, decl: ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction): void;
    getFunction(symbol: ts.Symbol): ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction | undefined;
    incrementAssignment(symbol: ts.Symbol): number;
    getAssignmentCount(symbol: ts.Symbol): number;
    /** Iterate all symbol → value pairs. */
    entries(): IterableIterator<[ts.Symbol, LatticeValue]>;
}
/**
 * Analyze a source file's top-level statements, building a ModuleEnvironment
 * with lattice values for every top-level variable.
 */
export declare function analyzeModule(sourceFile: ts.SourceFile, checker: ts.TypeChecker, importResolver?: ImportResolver, namespaceResolver?: NamespaceResolver, inliningDepth?: number): ModuleEnvironment;
export declare function tryInlineCall(expr: ts.CallExpression, evaluator: ExpressionEvaluator, env: ModuleEnvironment, checker: ts.TypeChecker, depth: number): LatticeValue | undefined;
//# sourceMappingURL=moduleAnalyzer.d.ts.map