Skip to content

SSEStreamHelper

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

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

onAbort(callback): void

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

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:287

Sleep for a specified duration.

number

Milliseconds to sleep

Promise<void>


writeSSE(message): Promise<void>

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

Write a Server-Sent Event message.

SSEMessage

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

Promise<void>