vite-plugin-react-server
Version:
Vite plugin for React Server Components (RSC)
19 lines • 729 B
TypeScript
import type { ServerResponse } from "node:http";
import type { ReadableStream } from "node:stream/web";
import type { Logger } from "vite";
import type { PanicThreshold } from "../types.js";
export interface PipeToResponseOptions {
stream: ReadableStream<Uint8Array> | any;
response: ServerResponse;
contentType: string;
logger: Logger;
verbose?: boolean;
panicThreshold?: PanicThreshold;
context?: string;
}
/**
* Pipes a ReadableStream to an HTTP response with proper error handling and headers.
* This is a common pattern used across the plugin for streaming responses.
*/
export declare function pipeToResponse(options: PipeToResponseOptions): void;
//# sourceMappingURL=pipeToResponse.d.ts.map