Files
dpu-shared/dist/ws.d.ts
2026-02-06 17:16:17 +01:00

17 lines
517 B
TypeScript

import type { WebSocket } from "ws";
export type WsEvent = {
type: string;
data?: unknown;
};
export type WsClientChangeCallback = (clients: number) => void;
export declare class WsService {
private clients;
private listeners;
onClientChange(callback: WsClientChangeCallback): () => void;
private emitClientChange;
addClient(ws: WebSocket): void;
removeClient(ws: WebSocket): void;
broadcast(message: WsEvent): void;
getClientCount(): number;
}
//# sourceMappingURL=ws.d.ts.map