kinetex - v1.0.0-rc.1
    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

    Constructors

    Properties

    Constructors

    • 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

    Properties

    readable: ReadableStream<SSEEvent>

    The readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream. This stream emits the transformed output data.

    MDN Reference

    writable: WritableStream<string | Uint8Array<ArrayBufferLike>>

    The writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream. This stream accepts input data that will be transformed and emitted to the readable stream.

    MDN Reference