Skip to content

WebSocketToken

type WebSocketToken<T extends WebSocketDescriptor = WebSocketDescriptor> = ContractEntry<"ws", T>

Branded WS contract entry for one route (e.g. Chat.chat): what a route’s contract: option accepts, and the WS sibling of the HTTP RequestToken. The brand is type-level only; at runtime the entry is a plain WebSocketDescriptor.

Learn: Contracts

Last updated: