import type { Declaration } from './types';
/**
 * Optimize declarations
 */
export declare function optimizeDeclarations(declarations: Declaration[], config?: OptimizerConfig): { declarations: Declaration[], result: OptimizationResult };
/**
 * Optimize a .d.ts file
 */
export declare function optimizeFile(filePath: string, config?: OptimizerConfig): Promise<OptimizationResult>;
/**
 * Minify .d.ts content
 */
export declare function minifyDts(content: string): string;
/**
 * Optimizer configuration
 */
export declare interface OptimizerConfig {
  removeUnusedImports?: boolean
  deduplicateDeclarations?: boolean
  inlineSimpleTypes?: boolean
  removeEmptyInterfaces?: boolean
  mergeInterfaces?: boolean
  sortDeclarations?: boolean
  sortImports?: boolean
  removeComments?: boolean
  minify?: boolean
  treeShake?: boolean
  entryPoints?: string[]
}
/**
 * Optimization result
 */
export declare interface OptimizationResult {
  originalSize: number
  optimizedSize: number
  savings: number
  savingsPercent: number
  removedImports: number
  removedDeclarations: number
  mergedInterfaces: number
  inlinedTypes: number
}
/**
 * Type usage tracker for tree shaking
 */
declare class _TypeUsageTracker {
  addDeclaration(decl: Declaration): void;
  addUsage(typeName: string): void;
  addReference(fromType: string, toType: string): void;
  getReachableTypes(): Set<string>;
  isUsed(typeName: string): boolean;
}
