mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-06-16 12:32:13 -04:00
10 lines
392 B
TypeScript
10 lines
392 B
TypeScript
import { EventEmitter } from "node:events";
|
|
import type { TypedEmitter } from "tiny-typed-emitter";
|
|
import type { ServerEventHandlers } from "~/schemas/server-events";
|
|
|
|
/**
|
|
* Global event emitter for server-side events
|
|
* Use this to emit events that should be broadcasted to connected clients via SSE
|
|
*/
|
|
export const serverEvents = new EventEmitter() as TypedEmitter<ServerEventHandlers>;
|