linktree/node_modules/preact-render-to-string/dist/stream-node.d.ts
2025-06-16 13:37:14 +02:00

20 lines
461 B
TypeScript

import { VNode } from 'preact';
import { WritableStream } from 'node:stream';
interface RenderToPipeableStreamOptions {
onShellReady?: () => void;
onAllReady?: () => void;
onError?: (error: any) => void;
}
interface PipeableStream {
abort: (reason?: unknown) => void;
pipe: (writable: WritableStream) => void;
}
export function renderToPipeableStream<P = {}>(
vnode: VNode<P>,
options: RenderToPipeableStreamOptions,
context?: any
): PipeableStream;