/** * Copyright © 2024 650 Industries. * Copyright © 2024 2023 Daishi Kato * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type { ReactNode } from 'react'; import type { PathSpec } from './path'; export declare const REQUEST_HEADERS = "__expo_requestHeaders"; type Config = any; type Elements = Record; export type BuildConfig = { pathname: string | PathSpec; isStatic?: boolean | undefined; entries?: { input: string; skipPrefetch?: boolean | undefined; isStatic?: boolean | undefined; }[]; context?: Record; customCode?: string; customData?: unknown; }[]; export type RenderEntries = (input: string, options: { params: unknown | undefined; buildConfig: BuildConfig | undefined; }) => Promise; export type GetBuildConfig = (unstable_collectClientModules: (input: string) => Promise) => Promise; export type GetSsrConfig = (pathname: string, options: { searchParams: URLSearchParams; buildConfig?: BuildConfig | undefined; }) => Promise<{ input: string; searchParams?: URLSearchParams; html: ReactNode; } | null>; export declare function defineEntries(renderEntries: RenderEntries, getBuildConfig?: GetBuildConfig, getSsrConfig?: GetSsrConfig): { renderEntries: RenderEntries; getBuildConfig: GetBuildConfig | undefined; getSsrConfig: GetSsrConfig | undefined; }; export type EntriesDev = { default: ReturnType; }; export type EntriesPrd = EntriesDev & { loadConfig: () => Promise; loadModule: (id: string) => Promise; dynamicHtmlPaths: [pathSpec: PathSpec, htmlHead: string][]; publicIndexHtml: string; }; type RenderStore = { rerender: (input: string, params?: unknown) => void; context: Record; }; /** * This is an internal function and not for public use. */ export declare const runWithRenderStore: (renderStore: RenderStore, fn: () => T) => T; export declare function rerender(input: string, params?: unknown): Promise; export declare function getContext = Record>(): RscContext; /** Get the request headers used to make the server component or action request. */ export declare function unstable_headers(): Promise; export {}; //# sourceMappingURL=server.d.ts.map