import type { ViteDevServer } from 'vite'; import type { WebSocketConfig } from '@janux/server'; /** * The dev half of first-class WebSockets: `janux dev` serves HTTP through * Vite's node server, where `Bun.serve`'s upgrade seam does not exist. The * handshake and the `JanuxSocket` adaptation are the same ones `@janux/node` * uses in production — they live in `@janux/server/node-websocket` so dev and * deploy cannot drift. * * The listener ignores every other upgrade without touching the socket: * Vite's own HMR WebSocket upgrades through its own listener on this server. */ /** Resolved per upgrade, so an edited `src/ws.ts` serves fresh handlers to new connections. */ type LoadConfig = () => Promise; export declare function attachDevWebSocket(vite: ViteDevServer, load: LoadConfig): void; export {};