toWebSocket()
Creates a to web socket.
Import
Section titled “Import”import { toWebSocket } from "@graphrefly/ts/adapters";Signature
Section titled “Signature”function toWebSocket( graph: Graph, source: Node<T>, request: WebSocketRequest, sendOf: WebSocketSendOf<T>, opts: OutboundAdapterOptions = {},): OutboundBundle<T, WebSocketSendResult>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
source | Node<T> | Source node that provides graph-visible input. |
request | WebSocketRequest | Request value to lower, route, or record. |
sendOf | WebSocketSendOf<T> | send of value used by the helper. |
opts | OutboundAdapterOptions | Options that configure the helper. |
Returns
Section titled “Returns”The to web socket result.
Example
Section titled “Example”import { toWebSocket } from "@graphrefly/ts/adapters";Source
Section titled “Source”packages/ts/src/adapters/environment-outbound.ts