import { UpgradeWebSocketOptions } from "./upgrade-websocket.js";
import * as hono_ws0 from "hono/ws";

//#region src/lib/hono-websocket.d.ts

/**
 * Serve a WebSocket from a Hono route.
 *
 * Both of Hono's forms work: as route middleware,
 * `app.get("/ws", upgradeWebSocket(createEvents))`, and called directly with a
 * context, `upgradeWebSocket(c, events)`.
 *
 * A request without `Upgrade: websocket` is left alone — the middleware form
 * passes it to the next handler, so an ordinary `GET` on the same path still
 * reaches the route below it.
 *
 * Pass `protocol` to negotiate a subprotocol, exactly as with the low-level
 * helper. Unlike Hono's Deno adapter this never echoes the client's first offer
 * on its own: an un-asked-for subprotocol is one the server has not agreed to
 * speak.
 */
declare const upgradeWebSocket: hono_ws0.UpgradeWebSocket<WebSocket, UpgradeWebSocketOptions, hono_ws0.WSEvents<WebSocket>>;
//#endregion
export { upgradeWebSocket };
//# sourceMappingURL=hono-websocket.d.ts.map