Kind: Constant
Source: src/adapter/bun/websocket.ts
Part of: Adapter
Definition
tsUpgradeWebSocket<any>
Value
tsdefineWebSocketHelper((c, events) => {
const server = getBunServer<{
upgrade<T>(
req: Request,
options?: {
data: T
}
): boolean
}>(c)
if (!server) {
throw new TypeError('env has to include the 2nd argument of fetch.')
}
const upgradeResult = server.upgrade<BunWebSocketData>(c.req.raw, {
data: {
events,
url: new URL(c.req.url),
…
Was this page helpful?