-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathrsdw.d.ts
45 lines (40 loc) · 1.12 KB
/
rsdw.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare module "react-server-dom-webpack/server.edge" {
export type ReactClientValue = any;
export type ClientReferenceManifestEntry = {
id: string;
// chunks is a double indexed array of chunkId / chunkFilename pairs
chunks: Array<string>;
name: string;
};
export type ClientManifest = {
[id: string]: ClientReferenceManifestEntry;
};
export type Options = {
identifierPrefix?: string;
signal?: AbortSignal;
onError?: (error: unknown) => void;
onPostpone?: (reason: string) => void;
};
export function renderToReadableStream(
model: ReactClientValue,
webpackMap: ClientManifest,
options?: Options
): ReadableStream;
}
declare module "react-server-dom-webpack/client.edge" {
export function createFromReadableStream(
stream: ReadableStream,
options: {
ssrManifest: {
moduleLoading: any;
moduleMap: any;
};
}
): Promise<React.JSX.Element>;
}
declare module "react-server-dom-webpack/client" {
export function createFromReadableStream(
stream: ReadableStream,
options?: Record<string, any>
): Promise<React.JSX.Element>;
}