UNPKG

@redwoodjs/sdk

Version:

Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime

9 lines (8 loc) 432 B
import { type EventSourceMessage } from "eventsource-parser/stream"; interface UseEventStreamOptions { onEvent: (event: EventSourceMessage) => void; onError?: (error: unknown) => void; } export declare function useEventStream({ onEvent, onError, }: UseEventStreamOptions): () => WritableStream<Uint8Array>; export declare function createLoggingStream(label?: string): WritableStream<Uint8Array<ArrayBufferLike>>; export {};