import type { ServerWebSocket } from "bun"; import { Channel, type WsData } from "./channel"; import { Library } from "./library"; // Shared application state export const state = { channels: new Map(), userConnections: new Map>>(), library: null as unknown as Library, }; export function setLibrary(lib: Library) { state.library = lib; }