Skip to content

SSEStreamHelper

Defined in: src/util/types.ts:276

Helper interface for Server-Sent Events (SSE) streaming. Provides methods to write SSE-formatted messages.

onAbort(callback): void

Defined in: src/util/types.ts:291

Register a callback to be executed when the stream is aborted.

() => void

Callback function

void


sleep(ms): Promise<void>

Defined in: src/util/types.ts:286

Sleep for a specified duration.

number

Milliseconds to sleep

Promise<void>


writeSSE(message): Promise<void>

Defined in: src/util/types.ts:281

Write a Server-Sent Event message.

SSEMessage

SSE message with data, event, id, and retry fields

Promise<void>