import type { DtsGenerationConfig, GenerationStats } from './types';
/**
 * Discover workspace projects from TypeScript project references
 */
export declare function discoverWorkspaceProjects(rootTsConfig: string): Promise<WorkspaceProject[]>;
/**
 * Sort projects by their dependencies (topological sort)
 * Projects with no dependencies come first
 */
export declare function sortProjectsByDependencies(projects: WorkspaceProject[]): WorkspaceProject[];
/**
 * Generate declarations for all projects in a workspace
 */
export declare function generateWorkspace(config: WorkspaceConfig): Promise<WorkspaceGenerationResult>;
/**
 * Discover and generate declarations for a monorepo
 * Automatically discovers projects from TypeScript project references
 */
export declare function generateMonorepo(rootPath: string, options?: Partial<DtsGenerationConfig>): Promise<WorkspaceGenerationResult>;
/**
 * Parse workspace patterns from package.json workspaces field
 */
export declare function discoverWorkspaceFromPackageJson(rootPath: string): Promise<string[]>;
/**
 * Resolve workspace patterns to actual project paths
 */
export declare function resolveWorkspacePatterns(rootPath: string, patterns: string[]): Promise<string[]>;
/**
 * Generate declarations for a workspace defined in package.json
 */
export declare function generateFromPackageWorkspaces(rootPath: string, options?: Partial<DtsGenerationConfig>): Promise<WorkspaceGenerationResult>;
/**
 * Workspace project configuration
 */
export declare interface WorkspaceProject {
  name: string
  root: string
  tsconfigPath: string
  references: string[]
  config?: Partial<DtsGenerationConfig>
}
/**
 * Workspace configuration
 */
export declare interface WorkspaceConfig {
  root: string
  projects: WorkspaceProject[]
  sharedConfig?: Partial<DtsGenerationConfig>
}
/**
 * Result of workspace generation
 */
export declare interface WorkspaceGenerationResult {
  success: boolean
  projects: Array<{
    name: string
    stats: GenerationStats
    success: boolean
    error?: string
  }>
  durationMs: number
}
