import { JsonObject } from "./glitchClient.js"; export interface SseMessage { readonly event: string; readonly data: JsonObject; readonly raw: string; } /** * Parse a Server-Sent Events stream from a fetch Response body. * * Reads the response body to completion (or until the signal aborts), splitting * on blank-line record boundaries and invoking onMessage for each event. `data` * is JSON-parsed when possible; comments (`:` lines) and heartbeats are ignored. */ export declare function parseSseStream(response: Response, onMessage: (message: SseMessage) => void | Promise, signal?: AbortSignal): Promise;