Controller types for WebSocket
Add types to controller.ts for handling websocket connections:
- The
WebSocketResponse
interface can be used to initiate a connection - The
WebSocketEvent
type can be used by awebSocketEvent(event: WebSocketEvent)
function in a controller to handle incoming messages and connections. - The
Request.webSocket
constant can be used to check if this is an attempt to open a web socket connection in aget(req: Request)
function.