Skip to content

SseParser

Defined in: sse.ts:33

Incremental SSE frame parser. Feed it decoded text; it yields complete messages. Holds partial frames across chunk boundaries — a data: line split mid-UTF-8-sequence or mid-JSON is the normal case on a real network, not an edge case.

new SseParser(): SseParser

SseParser

flush(): SseMessage[]

Defined in: sse.ts:71

Flush a trailing frame that never got its blank line (server closed).

SseMessage[]


push(chunk): SseMessage[]

Defined in: sse.ts:43

Feed a chunk of decoded text; returns every message it completed.

string

SseMessage[]