import * as fs from 'fs'; /** * 文件监控配置接口 */ interface FileMonitorConfig { filePath: string; onChange?: (curr: fs.Stats, prev: fs.Stats) => void; onDelete?: () => void; onStart?: () => void; onError?: (error: Error) => void; debounceTime?: number; duplicateCheckTime?: number; } /** * 单文件监控类(去重阈值可配置) */ declare class SingleFileMonitor { private filePath; private onChange; private onDelete; private onError; private watcher; private exists; private lastModified; private lastSize; private debounceTimer; private debounceTime; private duplicateCheckTime; private lastChangeTime; private lastChangeSize; private isProcessingChange; private config; constructor(config: FileMonitorConfig); private init; private startWatching; private checkFileExists; private handleFileChange; private checkFileStatus; close(): void; } export { SingleFileMonitor, FileMonitorConfig };