This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/node_modules/next/dist/server/app-render/app-render.d.ts
2025-01-11 09:54:09 +03:00

53 lines
2.6 KiB
TypeScript

/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type { ActionResult, DynamicParamTypesShort, FlightRouterState, FlightSegmentPath, RenderOpts, Segment } from 'next/dist/server/app-render/types';
import type { StaticGenerationStore } from 'next/dist/client/components/static-generation-async-storage.external';
import type { RequestStore } from 'next/dist/client/components/request-async-storage.external';
import type { NextParsedUrlQuery } from 'next/dist/server/request-meta';
import type { AppPageModule } from 'next/dist/server/future/route-modules/app-page/module';
import type { ClientReferenceManifest } from 'next/dist/build/webpack/plugins/flight-manifest-plugin';
import type { Revalidate } from 'next/dist/server/lib/revalidate';
import RenderResult, { type AppPageRenderResultMetadata } from 'next/dist/server/render-result';
import { type ErrorHandler } from 'next/dist/server/app-render/create-error-handler';
import type { DeepReadonly } from 'next/dist/shared/lib/deep-readonly';
export type GetDynamicParamFromSegment = (segment: string) => {
param: string;
value: string | string[] | null;
treeSegment: Segment;
type: DynamicParamTypesShort;
} | null;
type AppRenderBaseContext = {
staticGenerationStore: StaticGenerationStore;
requestStore: RequestStore;
componentMod: AppPageModule;
renderOpts: RenderOpts;
};
export type GenerateFlight = typeof generateFlight;
export type AppRenderContext = AppRenderBaseContext & {
getDynamicParamFromSegment: GetDynamicParamFromSegment;
query: NextParsedUrlQuery;
isPrefetch: boolean;
requestTimestamp: number;
appUsingSizeAdjustment: boolean;
flightRouterState?: FlightRouterState;
requestId: string;
defaultRevalidate: Revalidate;
pagePath: string;
clientReferenceManifest: DeepReadonly<ClientReferenceManifest>;
assetPrefix: string;
flightDataRendererErrorHandler: ErrorHandler;
serverComponentsErrorHandler: ErrorHandler;
isNotFoundPath: boolean;
res: ServerResponse;
};
export type CreateSegmentPath = (child: FlightSegmentPath) => FlightSegmentPath;
declare function generateFlight(ctx: AppRenderContext, options?: {
actionResult: ActionResult;
skipFlight: boolean;
asNotFound?: boolean;
}): Promise<RenderResult>;
export type BinaryStreamOf<T> = ReadableStream<Uint8Array>;
export type AppPageRender = (req: IncomingMessage, res: ServerResponse, pagePath: string, query: NextParsedUrlQuery, renderOpts: RenderOpts) => Promise<RenderResult<AppPageRenderResultMetadata>>;
export declare const renderToHTMLOrFlight: AppPageRender;
export {};