import { SocketTransport } from '../transport.js'; /** * One connection on the server, speaking typed JSON. The mirror image of * `JsonSocket`: `TIn` is what the client sends, `TOut` is what you send back. * * This was `NiceSocket`, and it used to `extend` the `ws` `WebSocket` class — * which meant `NiceSocketServer` could not simply construct one (the instances * come from `ws`, already built) and grafted the two methods onto each incoming * socket with `Object.create(ws, {…descriptors})`. Taking the transport as a * constructor argument instead removes both the inheritance and the hack. */ export declare class JsonConnection { private readonly transport; private readonly emitMessage; readonly onMessage: (listener: (data: TIn) => void) => () => boolean; private readonly emitClose; readonly onClose: (listener: (data: void) => void) => () => boolean; constructor(transport: SocketTransport); send(value: TOut): void; close(): void; private processMessage; } //# sourceMappingURL=JsonConnection.d.ts.map