import WebSocket, { WebSocketServer } from "ws"; //#region src/server.d.ts type JsonPrimitive = null | string | number | boolean; type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue; }; type WsRelayClientMessage = { type: 'subscribe'; topic: string; } | { type: 'unsubscribe'; topic: string; } | { type: 'publish'; topic: string; payload: JsonValue; }; type WsRelayServerMessage = { topic: string; payload: JsonValue; }; type WsRelayServerOptions = WebSocket.ServerOptions & { port?: number; onError?: (err: Error) => void; }; type WsRelayServer = { wss: WebSocketServer; ready: Promise; address: () => WebSocket.AddressInfo | string | null; close: () => Promise; publish: (topic: string, payload: JsonValue) => void; getSubscriberCount: (topic?: string) => number; }; declare const createWsRelayServer: (options?: WsRelayServerOptions) => WsRelayServer; //#endregion export { WsRelayClientMessage, WsRelayServer, WsRelayServerMessage, WsRelayServerOptions, createWsRelayServer }; //# sourceMappingURL=server.d.mts.map