Skip to content

WebSocketUpgradeHandlerScope

type WebSocketUpgradeHandlerScope<D extends InjectMap = {}, T extends WebSocketDescriptor = {}> = intersection

The upgrade hook’s scope: the WebSocketHandlerScope shape plus the pre-connection state writer. Values written to state seed the accepted connection’s ws.state, so a verified identity crosses from the request moment into the connection without being re-derived in open.

Learn: Inline handlers