securityos/node_modules/next/dist/server/send-payload/index.d.ts

26 lines
870 B
TypeScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import type RenderResult from '../render-result';
import { setRevalidateHeaders } from './revalidate-headers';
export type PayloadOptions = {
private: true;
} | {
private: boolean;
stateful: true;
} | {
private: boolean;
stateful: false;
revalidate: number | false;
};
export { setRevalidateHeaders };
export declare function sendEtagResponse(req: IncomingMessage, res: ServerResponse, etag: string | undefined): boolean;
export declare function sendRenderResult({ req, res, result, type, generateEtags, poweredByHeader, options, }: {
req: IncomingMessage;
res: ServerResponse;
result: RenderResult;
type: 'html' | 'json' | 'rsc';
generateEtags: boolean;
poweredByHeader: boolean;
options?: PayloadOptions;
}): Promise<void>;