Add web front-end and fix API issues
CI/CD Pipeline / test (push) Failing after 2m38s
CI/CD Pipeline / deploy-internal (push) Has been skipped

This commit is contained in:
chris committed 2026-08-28 21:47:05 -04:00
1 parent 45ca4de0ad
commit a7524412f0
2571 files changed
+86998 -5

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { fromEvent, share } from 'rxjs';
const sharedEvents = new WeakMap();
/**
* Creates an observable for a specific event of an `EventEmitter` instance.
*
* The underlying event listener is set up only once across the application for that event emitter/name pair.
*/
export function fromSharedEvent(emitter, event) {
let emitterEvents = sharedEvents.get(emitter);
if (!emitterEvents) {
emitterEvents = new Map();
sharedEvents.set(emitter, emitterEvents);
}
let observable = emitterEvents.get(event);
if (!observable) {
observable = fromEvent(emitter, event).pipe(share());
emitterEvents.set(event, observable);
}
return observable;
}