import type { CompilerOptions, Diagnostic } from 'typescript'; import { TsConfig } from '../mod_config/index.js'; /** * Interface for error summary data */ export interface IErrorSummary { errorsByFile: Record; generalErrors: Diagnostic[]; totalErrors: number; totalFiles: number; } /** * Interface for task information */ export interface ITaskInfo { taskNumber: number; totalTasks: number; sourcePattern: string; destDir: string; fileCount: number; } /** * Interface for compilation result */ export interface ICompileResult { emittedFiles: string[]; errorSummary: IErrorSummary; } /** * TsCompiler handles TypeScript compilation with error tracking, * configuration management, and output unpacking. */ export declare class TsCompiler { private config; private cwd; private argvArg?; constructor(cwd?: string, argvArg?: any); /** * Get the current working directory */ getCwd(): string; /** * Get the TsConfig instance */ getConfig(): TsConfig; /** * Create compiler options by merging defaults, tsconfig.json, and custom options */ createOptions(customOptions?: CompilerOptions): CompilerOptions; /** * Create a TypeScript program from file names and options */ private createProgram; /** * Process TypeScript diagnostics and return error summary */ private processDiagnostics; /** * Display error summary to console */ private displayErrorSummary; /** * Handle skipLibCheck warning display */ private handleSkipLibCheckWarning; /** * Compile files with error tracking (returns result instead of throwing) */ compileFiles(fileNames: string[], customOptions?: CompilerOptions, taskInfo?: ITaskInfo): Promise; /** * Compile files (throws on error) */ compileFilesOrThrow(fileNames: string[], customOptions?: CompilerOptions): Promise; /** * Compile glob patterns with automatic unpacking */ compileGlob(globPatterns: Record, customOptions?: CompilerOptions): Promise; /** * Check if files can be emitted without actually emitting */ checkEmit(fileNames: string[], customOptions?: CompilerOptions): Promise; /** * Check TypeScript files for type errors without emission */ checkTypes(fileNames: string[], customOptions?: CompilerOptions): Promise; /** * Merge multiple error summaries into one */ private mergeErrorSummaries; /** * Display final compilation summary */ private displayFinalSummary; }