Constructs a new ServerSentEventEncodeStream.
ReadonlyreadableThe readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream.
ReadonlywritableThe writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream.
A
TransformStreamthat encodesServerSentEventobjects into standard SSE wire strings.Each message is delimited with a blank line (
\n\n) and multi-line data payloads are split into individualdata:lines. // src/text/sse-encode.ts import { ServerSentEvent } from "./sse-types.js";/** A
TransformStreamthat encodesServerSentEventobjects into standard SSE wire strings. Each message is delimited with a blank line (\n\n) and multi-line data payloads are split into individualdata:lines.Example