import type { Request } from 'express'; import { type SsrContext } from '@dr.pogodin/react-global-state'; /** Mapping "chunkName" > array of asset paths. */ export type ChunkGroupsT = Record; export type InjT = { CHUNK_GROUPS?: ChunkGroupsT; CONFIG?: Record; ISTATE?: unknown; }; declare global { interface Window { REACT_UTILS_INJECTION?: InjT; } } export interface SsrContextT extends SsrContext { chunkGroups: ChunkGroupsT; chunks: string[]; /** If set at the end of SSR, the rendered will trigger * server-side redirect to this URL (and use the status * code). */ redirectTo?: string; req: Request; status: number; } declare const getSsrContext: (throwWithoutSsrContext?: boolean) => SsrContextT | undefined; export { getSsrContext, };