type alias WebSocketUpgradeRouter
Since 0.2.0

Consulted by an HTTP adapter for every inbound WebSocket upgrade request.

After M70a, the upgrade router is called through the kernel middleware pipeline (via UPGRADE_INTENT), not before it. Returning null means "this is not a WebSocket route" and the adapter falls through to normal HTTP handling, so registering a router never changes the behavior of non-WebSocket traffic.

Definition

(request: Request) => Promise<WebSocketUpgradeDecision | null>

Usage

import { type WebSocketUpgradeRouter } from "common/src/index.ts";