fromWebSocket()
Emit WebSocket events from a URL.
Import
Section titled “Import”import { fromWebSocket } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function fromWebSocket(url: string): Operator<never, WebSocketEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url | string | WebSocket endpoint URL. |
Returns
Section titled “Returns”A source operator that emits connection, message, and close events.
Example
Section titled “Example”fromWebSocket("wss://example.com/socket");Source
Section titled “Source”packages/ts/src/graph/sources.ts