UNPKG

rasengan

Version:

The modern React Framework

23 lines (22 loc) 774 B
import { JSX } from 'react'; import { type Response } from 'express'; import type { Metadata, MetadataWithoutTitleAndDescription } from '../../routing/types.js'; import { BuildOptions } from '../../server/build/index.js'; export type RenderStreamFunction = (StaticRouterComponent: React.ReactNode, res: Response, options: { metadata: { page: Metadata; layout: MetadataWithoutTitleAndDescription; }; assets?: JSX.Element[]; buildOptions?: BuildOptions; statusCode?: number; responseHeaders?: Record<string, string>; }, stream?: boolean) => Promise<void | string>; /** * Render the app to a stream * @param StaticRouterComponent * @param helmetContext * @param res * @returns */ export declare const render: RenderStreamFunction;