export interface TranslationKey { key: string; file: string; line: number; column?: number; context?: string; } export interface TranslationFile { language: string; path: string; keys: Record; } export interface AnalysisResult { summary: { totalTranslations: number; totalUsedKeys: number; totalUnusedKeys: number; totalMissingKeys: number; coverage: number; languages: string[]; }; usedKeys: TranslationKey[]; unusedKeys: string[]; missingKeys: TranslationKey[]; dynamicPatterns: { pattern: string; matches: string[]; }[]; ignoredKeys: string[]; translationFiles: TranslationFile[]; config: AnalysisConfig; } export interface AnalysisConfig { localesPath: string; srcPath: string; patterns?: { typescript?: string[]; html?: string[]; javascript?: string[]; }; ignoreKeys?: string[]; ignoreDynamicKeys?: boolean; languages?: string[]; excludeDirs?: string[]; outputFormat?: OutputFormat; outputDir?: string; outputSections?: OutputSection[]; exitOnIssues?: boolean; verbose?: boolean; plugins?: PluginConfig[]; } export type OutputFormat = 'console' | 'json' | 'csv' | 'xml' | 'html'; export type OutputSection = 'summary' | 'dynamicPatterns' | 'ignored' | 'unused' | 'missing' | 'usedKeys' | 'translationKeys' | 'config'; export interface PluginConfig { name: string; enabled?: boolean; options?: Record; } export interface Plugin { readonly name: string; readonly version: string; readonly description: string; initialize(context: PluginContext): Promise | void; cleanup?(): Promise | void; } export interface PluginContext { config: AnalysisConfig; logger: Logger; eventBus: EventBus; } export interface AnalyzerPlugin extends Plugin { analyze(context: AnalysisContext): Promise>; } export interface ExtractorPlugin extends Plugin { readonly supportedExtensions: string[]; extractKeys(filePath: string, content: string): Promise; } export interface FormatterPlugin extends Plugin { readonly outputFormat: OutputFormat; format(result: AnalysisResult, sections: OutputSection[]): Promise; } export interface ValidatorPlugin extends Plugin { validate(result: AnalysisResult): Promise; } export interface ReporterPlugin extends Plugin { report(result: AnalysisResult, output: string): Promise; } export interface AnalysisContext { config: AnalysisConfig; sourceFiles: string[]; translationFiles: TranslationFile[]; extractedKeys: TranslationKey[]; } export interface ValidationResult { isValid: boolean; errors: ValidationError[]; warnings: ValidationWarning[]; } export interface ValidationError { type: string; message: string; key?: string; file?: string; line?: number; } export interface ValidationWarning { type: string; message: string; key?: string; file?: string; line?: number; } export interface EventBus { emit(event: string, data: T): void; on(event: string, handler: (data: T) => void): void; off(event: string, handler: Function): void; } export interface Logger { info(message: string, ...args: any[]): void; warn(message: string, ...args: any[]): void; error(message: string, ...args: any[]): void; debug(message: string, ...args: any[]): void; verbose(message: string, ...args: any[]): void; } export declare class TranslationCheckerError extends Error { readonly code: string; readonly details?: any | undefined; constructor(message: string, code: string, details?: any | undefined); } export declare class PluginError extends TranslationCheckerError { readonly pluginName: string; constructor(message: string, pluginName: string, details?: any); } export declare class ConfigurationError extends TranslationCheckerError { constructor(message: string, details?: any); } export type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; export type RequiredConfig = Required>; export interface FileSystemAdapter { readFile(path: string): Promise; writeFile(path: string, content: string): Promise; readdir(path: string): Promise; exists(path: string): Promise; isDirectory(path: string): Promise; glob(pattern: string, options?: any): Promise; } //# sourceMappingURL=index.d.ts.map