import { type Deferred } from "@nats-io/nats-core/internal"; import { type Server, type Socket } from "node:net"; export type ConnectionAction = (c: Connection) => void; export declare class Connection { socket: Socket | null; debug: boolean; pending: Promise[]; ca?: ConnectionAction; closed: Deferred; static ping: Uint8Array; static pong: Uint8Array; constructor(socket: Socket, debug?: boolean, ca?: ConnectionAction); startReading(): void; processInbound(buf: Uint8Array): void; write(buf: Uint8Array): void; close(): Promise; } export declare class TestServer { listener?: Server; port: number; info: Uint8Array; debug: boolean; clients: Connection[]; accept: Deferred; ready: Deferred; constructor(debug?: boolean, ca?: ConnectionAction); getPort(): number; stop(): Promise; }