Kind: Interface
Source: src/helper/websocket/index.ts
Part of: Helper
Options for sending message
SendOptions defines options applied when sending a WebSocket message. Its compress property controls whether message compression is enabled for the send operation.
Properties
| Property | Type |
|---|---|
compress | boolean |
Diagram
mermaidgraph LR Message[WebSocket message] --> Options[SendOptions] Options --> Compress[compress: boolean] Options --> Send[Send operation]
Usage
tsimport type { SendOptions } from "./helper/websocket";
const options: SendOptions = {
compress: true,
};
// Pass `options` to the WebSocket message send operation.
AI Coding Instructions
- Set
compressexplicitly when constructingSendOptions. - Keep this interface limited to message-send configuration.
- Use
SendOptionsas a type annotation for options passed into WebSocket send code. - Do not treat
compressas message content; it only controls send behavior.
Was this page helpful?