/** * Streams server-sent events from the given URL * * @param url - The URL to stream events from * @param options - The options for the SSE stream * @param options.onMessage - The function to call when a message is received * @param options.onError - The function to call when an error occurs * @param options.onClose - The function to call when the stream finishes successfully * @param options.fetchFn - The function to use to fetch the events. Consumers need to provide a fetch function that supports server-sent events. */ export declare const fetchServerEvents: (url: string, { onMessage, onError, onClose, fetchFn, ...requestOptions }: RequestInit & { onMessage: (data: Record, eventName?: string) => Promise; onError?: ((err: unknown) => void) | undefined; onClose?: (() => void | Promise) | undefined; fetchFn: typeof fetch; }) => Promise; //# sourceMappingURL=fetch-server-events.d.cts.map