Skip to main content
Version: v10.0.0

HonoSocketPath

Union of the paths a Socket can connect to on a Hono app: every route handled by upgradeWebSocket() , including the basePath() and app.route() prefixes. A :param segment accepts any value, so

/chat/:roomId becomes `/chat/${string}` and /chat/42 matches it.

Hono has no realtime protocol of its own, so this checks the address only. Describe the messages the route sends and receives with ListenerModel and EmitterModel in a createSocketSdk schema.


Import
import { HonoSocketPath } from "@hyper-fetch/hono"

Preview​

type HonoSocketPath<App> = { [ Path in keyof WebSocketEndpoints<App> & string]: ToPathPattern<Path> }[keyof WebSocketEndpoints<App> & string];