@notes-sync/service
Version:
Background service for AI-powered note synchronization
14 lines (10 loc) • 308 B
text/typescript
import { EventEmitter } from 'node:events';
export class SystemEvents {
private static emitter = new EventEmitter();
static onAddNote(callback: (text: string) => void) {
this.emitter.on('add-note', callback);
}
static emitAddNote(text: string) {
this.emitter.emit('add-note', text);
}
}