import type { SourceFile } from 'ts-morph'; import { Project } from 'ts-morph'; import type { FileTransformResult } from './types.js'; /** * Create a ts-morph Project for file-system transforms. * * @function * @param cwd - The working directory containing tsconfig.json * @returns A configured ts-morph Project */ export declare const createProject: (cwd: string) => Project; /** * Create a ts-morph Project for in-memory transforms. * * Useful for transforming code strings without touching the file system. * * @function * @returns A configured ts-morph Project with in-memory file system */ export declare const createInMemoryProject: () => Project; /** * Add source files matching glob patterns to a project. * * @function * @param project - The ts-morph Project * @param cwd - The working directory * @param include - Glob patterns to include */ export declare const addSourceFiles: (project: Project, cwd: string, include: string[]) => void; /** * Check if a file should be excluded based on glob patterns. * * This is a simple substring match that strips glob wildcards like double-star * prefix and suffix patterns. * * @function * @param filePath - The file path to check * @param exclude - Array of glob patterns to exclude * @returns True if the file should be excluded */ export declare const shouldExcludeFile: (filePath: string, exclude: string[]) => boolean; /** * Get source files from a project, excluding those matching patterns. * * @function * @param project - The ts-morph Project * @param exclude - Glob patterns to exclude * @returns Array of source files to process */ export declare const getSourceFiles: (project: Project, exclude: string[]) => SourceFile[]; /** * Aggregated result statistics. */ export interface AggregatedStats { /** Total files modified */ modifiedFiles: number; /** Total errors across all files */ totalErrors: number; /** Total files processed */ totalFiles: number; /** Total transformations applied */ totalTransformations: number; /** Total warnings across all files */ totalWarnings: number; } /** * Aggregate file results into overall statistics. * * @function * @param files - Array of file transform results * @returns Aggregated statistics */ export declare const aggregateResults: (files: FileTransformResult[]) => AggregatedStats; //# sourceMappingURL=project.d.ts.map