kinetex - v1.4.0
    Preparing search index...

    Class SSETransformStream

    A TransformStream that converts raw bytes/strings into SSEEvent objects. Pipe a fetch response body through this to get a stream of events.

    Hierarchy

    • TransformStream<Uint8Array | string, SSEEvent>
      • SSETransformStream
    Index
    • Parameters

      • options: { onParseError?: (err: unknown, raw: string) => void } = {}
        • OptionalonParseError?: (err: unknown, raw: string) => void

          Callback invoked when a parse error occurs. The error is logged via the callback but the chunk is silently dropped. The stream continues processing subsequent chunks.

      Returns SSETransformStream

    readable: ReadableStream<SSEEvent>

    The readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream.

    MDN Reference

    writable: WritableStream<string | Uint8Array<ArrayBufferLike>>

    The writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream.

    MDN Reference