UNPKG

rwsdk

Version:

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

13 lines (12 loc) 645 B
import { FC, ReactElement } from "react"; import { DocumentProps } from "../lib/types.js"; import { type PartialRequestInfo } from "../requestInfo/types"; export interface RenderToStreamOptions { Document?: FC<DocumentProps>; ssr?: boolean; injectRSCPayload?: boolean; onError?: (error: unknown) => void; requestInfo?: PartialRequestInfo; } export declare const IdentityDocument: FC<DocumentProps>; export declare const renderToStream: (element: ReactElement, { ssr: shouldSSR, Document, injectRSCPayload: shouldInjectRSCPayload, requestInfo: givenRequestInfo, onError, }?: RenderToStreamOptions) => Promise<ReadableStream>;