import { Renderable } from '@tempots/dom'; import { FetchFunction } from './fetch'; /** * Options for server-side rendering. * @public */ export type RenderSSROptions = { /** * The HTML content to be rendered. */ html: string; /** * The URL of the page being rendered. */ url: string; /** * The selector for the root element where the app will be mounted. */ selector: string; /** * A function that returns the renderable app component. */ makeApp: () => Renderable; /** * Make a fetch function to use for the app. */ makeFetch?: (originalFetch: FetchFunction) => FetchFunction; /** * If true, the rendering will wait for the fetch to complete before completing. */ waitFetch?: boolean; }; /** * Renders a DOM tree to a string using a fake dom implementation. * * @param html - The static HTML where to render the app. * @param url - The URL to use for the fake window. * @param selector - The selector to use find the parent element for the app. * @param makeApp - A function that creates the app to render. * @public */ export declare function renderSSR({ html, url, selector, makeApp, makeFetch, waitFetch, }: RenderSSROptions): Promise;