Skip to content

SendOptions

reference
1 min readUpdated

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

PropertyType
compressboolean

Diagram

mermaid
graph LR
  Message[WebSocket message] --> Options[SendOptions]
  Options --> Compress[compress: boolean]
  Options --> Send[Send operation]

Usage

ts
import type { SendOptions } from "./helper/websocket";

const options: SendOptions = {
  compress: true,
};

// Pass `options` to the WebSocket message send operation.

AI Coding Instructions

  • Set compress explicitly when constructing SendOptions.
  • Keep this interface limited to message-send configuration.
  • Use SendOptions as a type annotation for options passed into WebSocket send code.
  • Do not treat compress as message content; it only controls send behavior.

Was this page helpful?

Download as PDF
SendOptions — Hono (narrator proof)