fromSSE()
Emit server-sent events from a URL.
Import
Section titled “Import”import { fromSSE } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function fromSSE(url: string): Operator<never, SseEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url | string | SSE endpoint URL. |
Returns
Section titled “Returns”A source operator that emits each SSE event.
Example
Section titled “Example”fromSSE("https://example.com/events");Source
Section titled “Source”packages/ts/src/graph/sources.ts