mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
24 lines
705 B
TypeScript
Vendored
24 lines
705 B
TypeScript
Vendored
import type { ServerManifest } from "bun:app/server";
|
|
import type { ReactElement } from "react";
|
|
|
|
export interface PipeableStream<T> {
|
|
/** Returns the input, which should match the Node.js writable interface */
|
|
pipe: <T extends NodeJS.WritableStream>(destination: T) => T;
|
|
abort: () => void;
|
|
}
|
|
|
|
export function renderToPipeableStream<T = any>(
|
|
model: ReactElement,
|
|
webpackMap: ServerManifest,
|
|
options?: RenderToPipeableStreamOptions,
|
|
): PipeableStream<T>;
|
|
|
|
export interface RenderToPipeableStreamOptions {
|
|
onError?: (error: Error) => void;
|
|
identifierPrefix?: string;
|
|
onPostpone?: () => void;
|
|
temporaryReferences?: any;
|
|
environmentName?: string;
|
|
filterStackFrame?: () => boolean;
|
|
}
|