WebSocketMinimal
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?: (
type: 'close' | 'error' | 'message',
listener: (event: any) => void
) => void
close: () => void
readyState: number
removeEventListener?: (
type: 'close' | 'error' | 'message',
listener: (event: any) => void
) => void
send: (data: string) => void