import type { AnalyzeLintTierOptions, LintTierMessage } from './lintTierAnalysis.ts';
/** Worker-side phase timings (milliseconds), when `--profile` is enabled. */
export interface LintProfilePhases {
    /** Time spent constructing ESLint and resolving config. */
    configMs: number;
    /** Time spent in `lintFiles`. */
    lintMs: number;
    /** Wall time inside the worker (config + lint). */
    totalMs: number;
}
export interface PackageLintResult {
    errors: number;
    files: number;
    messages: LintTierMessage[];
    output: string;
    pkg: string;
    /** Present when profile mode is on. */
    profile?: LintProfilePhases & {
        spawnMs: number;
        wallMs: number;
    };
    /** Parent wall clock including process spawn / queue (ms). */
    timeMs: number;
    warnings: number;
}
/**
 * Force a recommendedConfig-based ESLint setup (bypasses the project's
 * eslint.config for this package). Used for analyze mode and `--type-checked`
 * overrides.
 */
export type LintConfigOverride = AnalyzeLintTierOptions;
export interface LintPackageJobOptions {
    analyze: boolean;
    /** @deprecated Prefer {@link configOverride} */
    analyzeTier?: AnalyzeLintTierOptions;
    cache: boolean;
    cacheLocation?: string;
    /** When set, use recommendedConfig override instead of project eslint.config. */
    configOverride?: LintConfigOverride;
    cycleDepth?: number;
    fix: boolean;
    /** Whether generated project configs should honor the repository .gitignore. */
    gitignore?: boolean;
    /** Absolute path to a repository .gitignore file to apply as global ignores. */
    gitignorePath?: string;
    profile?: boolean;
    verbose: boolean;
}
type WorkerLintPayload = Pick<PackageLintResult, 'errors' | 'files' | 'messages' | 'warnings'> & {
    profile?: LintProfilePhases;
};
export interface LintPoolJob {
    cacheLocation?: string;
    cwd: string;
    options: LintPackageJobOptions;
}
/**
 * Persistent ESLint worker pool. Workers stay alive across packages so the
 * ESLint plugin graph is paid once per worker instead of once per package.
 */
export declare class LintWorkerPool {
    private closed;
    private nextJobId;
    private readonly queue;
    private readonly rootDir;
    private readonly size;
    private readonly workers;
    constructor(rootDir: string, size: number);
    close(): Promise<void>;
    run(job: LintPoolJob): Promise<WorkerLintPayload & {
        output: string;
    }>;
    runAll(jobs: LintPoolJob[]): Promise<(WorkerLintPayload & {
        output: string;
    })[]>;
    /** Start worker processes (idempotent). */
    start(): void;
    private consumeStdout;
    private failWorkerJobs;
    private pump;
    private spawnWorker;
}
/** @deprecated Prefer {@link LintWorkerPool} — one-shot spawn for a single package. */
export declare function lintOnePackageProcess({ analyze, analyzeTier, cache, cacheLocation, cwd, cycleDepth, fix, gitignore, gitignorePath, profile, rootDir, verbose, }: LintPackageJobOptions & {
    cacheLocation?: string;
    cwd: string;
    rootDir?: string;
}): Promise<WorkerLintPayload & {
    output: string;
}>;
export {};
//# sourceMappingURL=lintNextWorker.d.ts.map