import { SubAppRenderPipeline } from "../subapp/subapp-render-pipeline"; import { SubAppSSRData, SubAppFeatureResult, LoadSubAppOptions, SubAppMountInfo } from "../subapp/types"; import { ServerFrameworkLib } from "./types"; /** * The server side rendering pipeline for a subapp * * The pipeline involves preparing the data (which is async), and then rendering the * component to string or stream, which can be sync or async. * * It's also possible that the subapp only wants the data but not actually rendering * the component. * * - load will setup this and kick off prepare data * - start will await for prepare data and render, and inject result into HTML */ export declare class SubAppServerRenderPipeline implements SubAppRenderPipeline { /** options for rendering the subapp into HTML page */ options: LoadSubAppOptions; /** the promise for subapp's data prepare */ preparePromise?: Promise; ssrData?: SubAppSSRData; framework?: ServerFrameworkLib; startTime?: number; /** spot in HTML output to inject the result from SSR */ outputSpot?: any; /** data from prepareData */ prepResult?: SubAppFeatureResult; static INITIAL_STATE_TAG_ID: number; constructor(data: SubAppSSRData); start(_reload?: boolean): Promise; /** start to run through all the subapp's features to prepare data for calling renderToString */ startPrepare(): void; waitForPrepare(): Promise; getPrepResult(): SubAppFeatureResult; isPrepared(): boolean; executeRender(): void; /** Hot module reload (HMR) support - empty filler */ _reload: () => Promise; /** For HMR: a component mount itself to the subapp/pipeline - empty filler */ _mount: (info: SubAppMountInfo) => void; /** For HMR: a component unmount itself from the subapp/pipeline - empty filler */ _unmount: (info: SubAppMountInfo) => void; }