import type { PackageManager, Workspace } from '../pm/index.ts';
import { type IncrementalPlan } from './incremental.ts';
import { type ActionOutcome } from './result.ts';
export interface CompileParams {
    incremental?: boolean;
    incrementalPlan?: IncrementalPlan;
    isVerbose?: boolean;
    jobs: number;
    pkg?: string;
    shouldExitOnFail?: boolean;
}
interface CompilePackageParams {
    isVerbose?: boolean;
    pkg: string;
    shouldExitOnFail?: boolean;
}
type WorkspaceDependencyField = 'dependencies' | 'devDependencies';
interface WorkspacePackageJson {
    dependencies?: Record<string, string>;
    devDependencies?: Record<string, string>;
}
export interface CompileWorkspace extends Workspace {
    listed?: boolean;
    packageJson: WorkspacePackageJson;
}
export declare function allCompileWorkspaces(pm: PackageManager): CompileWorkspace[];
export declare function emitWorkspaces(pm: PackageManager): CompileWorkspace[];
export declare function validationWorkspaces(pm: PackageManager): CompileWorkspace[];
export declare function getWorkspaceDependencyNames(workspace: CompileWorkspace, workspaceNames: Set<string>, fields: WorkspaceDependencyField[]): string[];
export declare function createWorkspaceDependencyGraph(workspaces: CompileWorkspace[], fields: WorkspaceDependencyField[]): {
    dependencies: Map<string, Set<string>>;
    dependents: Map<string, Set<string>>;
    workspacesByName: Map<string, CompileWorkspace>;
};
export declare const compile: ({ isVerbose, pkg, incremental, jobs, incrementalPlan, shouldExitOnFail, }: CompileParams) => ActionOutcome | Promise<ActionOutcome>;
export declare const compilePackage: ({ shouldExitOnFail, pkg, isVerbose, }: CompilePackageParams) => ActionOutcome;
export declare const compileAll: ({ shouldExitOnFail, jobs, isVerbose, incremental, incrementalPlan, }: CompileParams) => Promise<ActionOutcome>;
export {};
//# sourceMappingURL=compile.d.ts.map