import type { EcopagesSocket, WebSocketCloseInfo } from '../../../types/public-types.js'; /** * @remarks * Bun and Node expose different raw socket types but share the same * {@link OutgoingWebSocketMessage} contract. Adapters supply only `send`/`close`; * {@link createEcopagesSocket} owns message normalization and stream forwarding. */ export interface WebSocketSendTransport { send(data: string | Uint8Array): void; close(code?: number, reason?: string): void; } /** * @remarks * Bun and Node adapters previously duplicated outgoing-message dispatch and * stream forwarding; this is the shared implementation both transports delegate to. */ export declare function createEcopagesSocket>(transport: WebSocketSendTransport, meta: { kind: string; params: TParams; search: Record; context: TContext; }): EcopagesSocket; export declare function toWebSocketCloseInfo(code: number, reason: string): WebSocketCloseInfo; export declare function invokeWebSocketHandlerHook(kind: string, hookName: string, result: void | Promise): void;