* Emit event
(type: FileSystemEventType, nodeId?: string, path?: string)
| 72 | * Emit event |
| 73 | */ |
| 74 | private emit(type: FileSystemEventType, nodeId?: string, path?: string): void { |
| 75 | const event: FileSystemEvent = { |
| 76 | type, |
| 77 | nodeId, |
| 78 | path, |
| 79 | timestamp: Date.now(), |
| 80 | }; |
| 81 | this.listeners.forEach((listener) => { |
| 82 | try { |
| 83 | listener(event); |
| 84 | } catch (error) { |
| 85 | console.error('[FileSystemStore] Listener error:', error); |
| 86 | } |
| 87 | }); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Subscribe to change events |
no test coverage detected