WebSocketMinimal

See source code
Table of contents

Minimal server-side WebSocket interface that is compatible with

  • The standard WebSocket interface (cloudflare, deno, some node setups)
  • The 'ws' WebSocket interface (some node setups)
  • The Bun.serve socket implementation
interface WebSocketMinimal {}

Properties

addEventListener

optional
addEventListener?: (
  type: 'close' | 'error' | 'message',
  listener: (event: any) => void
) => void

close

close: () => void

readyState

readyState: number

removeEventListener

optional
removeEventListener?: (
  type: 'close' | 'error' | 'message',
  listener: (event: any) => void
) => void

send

send: (data: string) => void

Prev
TLSyncLog
Next
TLSyncUserInfo