import type { RequestHandler } from '@sveltejs/kit'; import type { SSEManager } from '../sse.js'; export interface StreamHandlerOptions { /** * Heartbeat interval in ms. A comment line (`: heartbeat`) is sent * periodically to keep the stream alive through idle-timeout proxies and to * detect a dead socket (enqueue then throws → the connection is pruned). * Default 25_000 (25s). Set 0 to disable. */ heartbeatMs?: number; /** * Max concurrent SSE connections per user. Requests beyond this are refused * with 429, bounding the file descriptors / memory a single account can * hold open. Default 5. */ maxConnectionsPerUser?: number; } export declare function createStreamHandler(sse: SSEManager, options?: StreamHandlerOptions): { GET: RequestHandler; };