@types/react-dom 19.1.2 → 19.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- react-dom/README.md +1 -1
- react-dom/canary.d.ts +39 -0
- react-dom/client.d.ts +1 -1
- react-dom/experimental.d.ts +11 -30
- react-dom/index.d.ts +6 -0
- react-dom/package.json +39 -4
- react-dom/server.browser.d.ts +1 -0
- react-dom/server.bun.d.ts +1 -0
- react-dom/server.d.ts +74 -5
- react-dom/server.edge.d.ts +1 -0
- react-dom/server.node.d.ts +8 -0
- react-dom/static.browser.d.ts +1 -0
- react-dom/static.d.ts +77 -2
- react-dom/static.edge.d.ts +1 -0
- react-dom/static.node.d.ts +7 -0
react-dom/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for react-dom (https://react.dev/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 12 Nov 2025 04:37:38 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
|
14
14
|
|
react-dom/canary.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @definitelytyped/no-self-import -- self-imports in module augmentations aren't self-imports */
|
|
2
|
+
/* eslint-disable @definitelytyped/no-declare-current-package -- The module augmentations are optional */
|
|
1
3
|
/**
|
|
2
4
|
* These are types for things that are present in the upcoming React 18 release.
|
|
3
5
|
*
|
|
@@ -30,3 +32,40 @@ import React = require("react");
|
|
|
30
32
|
import ReactDOM = require(".");
|
|
31
33
|
|
|
32
34
|
export {};
|
|
35
|
+
|
|
36
|
+
declare module "react" {
|
|
37
|
+
// @enableViewTransition
|
|
38
|
+
interface ViewTransitionPseudoElement extends Animatable {
|
|
39
|
+
getComputedStyle: () => CSSStyleDeclaration;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface ViewTransitionInstance {
|
|
43
|
+
group: ViewTransitionPseudoElement;
|
|
44
|
+
imagePair: ViewTransitionPseudoElement;
|
|
45
|
+
old: ViewTransitionPseudoElement;
|
|
46
|
+
new: ViewTransitionPseudoElement;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// @enableFragmentRefs
|
|
50
|
+
interface FragmentInstance {
|
|
51
|
+
blur: () => void;
|
|
52
|
+
focus: (focusOptions?: FocusOptions | undefined) => void;
|
|
53
|
+
focusLast: (focusOptions?: FocusOptions | undefined) => void;
|
|
54
|
+
observeUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
55
|
+
unobserveUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
56
|
+
getClientRects(): Array<DOMRect>;
|
|
57
|
+
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
|
58
|
+
addEventListener(
|
|
59
|
+
type: string,
|
|
60
|
+
listener: EventListener,
|
|
61
|
+
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
|
62
|
+
): void;
|
|
63
|
+
removeEventListener(
|
|
64
|
+
type: string,
|
|
65
|
+
listener: EventListener,
|
|
66
|
+
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
|
67
|
+
): void;
|
|
68
|
+
dispatchEvent(event: Event): boolean;
|
|
69
|
+
scrollIntoView(alignToTop?: boolean): void;
|
|
70
|
+
}
|
|
71
|
+
}
|
react-dom/client.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export function createRoot(container: Container, options?: RootOptions): Root;
|
|
|
96
96
|
* hydrateRoot(document.querySelector('#root'), <App />)
|
|
97
97
|
* ```
|
|
98
98
|
*
|
|
99
|
-
* @see https://
|
|
99
|
+
* @see https://react.dev/reference/react-dom/client/hydrateRoot
|
|
100
100
|
*/
|
|
101
101
|
export function hydrateRoot(
|
|
102
102
|
container: Element | Document,
|
react-dom/experimental.d.ts
CHANGED
|
@@ -32,42 +32,23 @@ import ReactDOM = require("./canary");
|
|
|
32
32
|
|
|
33
33
|
export {};
|
|
34
34
|
|
|
35
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
|
36
|
+
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
37
|
+
|
|
35
38
|
declare module "." {
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
declare module "react" {
|
|
39
|
-
interface ViewTransitionPseudoElement extends Animatable {
|
|
40
|
-
getComputedStyle: () => CSSStyleDeclaration;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface ViewTransitionInstance {
|
|
44
|
-
group: ViewTransitionPseudoElement;
|
|
45
|
-
imagePair: ViewTransitionPseudoElement;
|
|
46
|
-
old: ViewTransitionPseudoElement;
|
|
47
|
-
new: ViewTransitionPseudoElement;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
42
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
51
43
|
interface GestureProvider extends AnimationTimeline {}
|
|
44
|
+
}
|
|
52
45
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
getClientRects(): Array<DOMRect>;
|
|
61
|
-
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
|
62
|
-
addEventListener(
|
|
63
|
-
type: string,
|
|
64
|
-
listener: EventListener,
|
|
65
|
-
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
|
66
|
-
): void;
|
|
67
|
-
removeEventListener(
|
|
68
|
-
type: string,
|
|
69
|
-
listener: EventListener,
|
|
70
|
-
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
|
71
|
-
): void;
|
|
46
|
+
declare module "./client" {
|
|
47
|
+
type TransitionIndicatorCleanup = () => VoidOrUndefinedOnly;
|
|
48
|
+
interface RootOptions {
|
|
49
|
+
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
|
|
50
|
+
}
|
|
51
|
+
interface HydrationOptions {
|
|
52
|
+
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
|
|
72
53
|
}
|
|
73
54
|
}
|
react-dom/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export as namespace ReactDOM;
|
|
|
6
6
|
|
|
7
7
|
import { Key, ReactNode, ReactPortal } from "react";
|
|
8
8
|
|
|
9
|
+
declare module "react" {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
11
|
+
interface CacheSignal extends AbortSignal {}
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
export function createPortal(
|
|
10
15
|
children: ReactNode,
|
|
11
16
|
container: Element | DocumentFragment,
|
|
@@ -84,6 +89,7 @@ export interface PreloadOptions {
|
|
|
84
89
|
type?: string | undefined;
|
|
85
90
|
nonce?: string | undefined;
|
|
86
91
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
92
|
+
media?: string | undefined;
|
|
87
93
|
}
|
|
88
94
|
export function preload(href: string, options?: PreloadOptions): void;
|
|
89
95
|
|
react-dom/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react-dom",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.3",
|
|
4
4
|
"description": "TypeScript definitions for react-dom",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,11 +61,46 @@
|
|
|
61
61
|
"default": "./server.d.ts"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
"./server.browser": {
|
|
65
|
+
"types": {
|
|
66
|
+
"default": "./server.browser.d.ts"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"./server.bun": {
|
|
70
|
+
"types": {
|
|
71
|
+
"default": "./server.bun.d.ts"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"./server.edge": {
|
|
75
|
+
"types": {
|
|
76
|
+
"default": "./server.edge.d.ts"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"./server.node": {
|
|
80
|
+
"types": {
|
|
81
|
+
"default": "./server.node.d.ts"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
64
84
|
"./static": {
|
|
65
85
|
"types": {
|
|
66
86
|
"default": "./static.d.ts"
|
|
67
87
|
}
|
|
68
88
|
},
|
|
89
|
+
"./static.browser": {
|
|
90
|
+
"types": {
|
|
91
|
+
"default": "./static.browser.d.ts"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"./static.edge": {
|
|
95
|
+
"types": {
|
|
96
|
+
"default": "./static.edge.d.ts"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"./static.node": {
|
|
100
|
+
"types": {
|
|
101
|
+
"default": "./static.node.d.ts"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
69
104
|
"./experimental": {
|
|
70
105
|
"types": {
|
|
71
106
|
"default": "./experimental.d.ts"
|
|
@@ -86,8 +121,8 @@
|
|
|
86
121
|
"scripts": {},
|
|
87
122
|
"dependencies": {},
|
|
88
123
|
"peerDependencies": {
|
|
89
|
-
"@types/react": "^19.
|
|
124
|
+
"@types/react": "^19.2.0"
|
|
90
125
|
},
|
|
91
|
-
"typesPublisherContentHash": "
|
|
92
|
-
"typeScriptVersion": "5.
|
|
126
|
+
"typesPublisherContentHash": "6f16aac4f50b7ebe3201fdac53a58874d2899d6108894538ade2d61fbb99f8c5",
|
|
127
|
+
"typeScriptVersion": "5.2"
|
|
93
128
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
react-dom/server.d.ts
CHANGED
|
@@ -22,13 +22,42 @@ declare global {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
import { ReactNode } from "react";
|
|
25
|
-
import { ErrorInfo } from "./client";
|
|
25
|
+
import { ErrorInfo, ReactFormState } from "./client";
|
|
26
|
+
import { PostponedState, ResumeOptions } from "./static";
|
|
26
27
|
|
|
27
|
-
export
|
|
28
|
+
export interface BootstrapScriptDescriptor {
|
|
28
29
|
src: string;
|
|
29
30
|
integrity?: string | undefined;
|
|
30
31
|
crossOrigin?: string | undefined;
|
|
31
|
-
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
|
36
|
+
*/
|
|
37
|
+
// TODO: Ideally TypeScripts standard library would include this type.
|
|
38
|
+
// Until then we keep the prefixed one for future compatibility.
|
|
39
|
+
export interface ReactImportMap {
|
|
40
|
+
/**
|
|
41
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference}
|
|
42
|
+
*/
|
|
43
|
+
imports?: {
|
|
44
|
+
[specifier: string]: string;
|
|
45
|
+
} | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference}
|
|
48
|
+
*/
|
|
49
|
+
integrity?: {
|
|
50
|
+
[moduleURL: string]: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference}
|
|
54
|
+
*/
|
|
55
|
+
scopes?: {
|
|
56
|
+
[scope: string]: {
|
|
57
|
+
[specifier: string]: string;
|
|
58
|
+
};
|
|
59
|
+
} | undefined;
|
|
60
|
+
}
|
|
32
61
|
|
|
33
62
|
export interface RenderToPipeableStreamOptions {
|
|
34
63
|
identifierPrefix?: string;
|
|
@@ -37,11 +66,20 @@ export interface RenderToPipeableStreamOptions {
|
|
|
37
66
|
bootstrapScriptContent?: string;
|
|
38
67
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
39
68
|
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
|
69
|
+
/**
|
|
70
|
+
* Maximum length of the header content in unicode code units i.e. string.length.
|
|
71
|
+
* Must be a positive integer if specified.
|
|
72
|
+
* @default 2000
|
|
73
|
+
*/
|
|
74
|
+
headersLengthHint?: number | undefined;
|
|
75
|
+
importMap?: ReactImportMap | undefined;
|
|
40
76
|
progressiveChunkSize?: number;
|
|
77
|
+
onHeaders?: ((headers: Headers) => void) | undefined;
|
|
41
78
|
onShellReady?: () => void;
|
|
42
79
|
onShellError?: (error: unknown) => void;
|
|
43
80
|
onAllReady?: () => void;
|
|
44
81
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
82
|
+
formState?: ReactFormState | null;
|
|
45
83
|
}
|
|
46
84
|
|
|
47
85
|
export interface PipeableStream {
|
|
@@ -56,7 +94,7 @@ export interface ServerOptions {
|
|
|
56
94
|
/**
|
|
57
95
|
* Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
|
|
58
96
|
*
|
|
59
|
-
* @see [API](https://
|
|
97
|
+
* @see [API](https://react.dev/reference/react-dom/server/renderToPipeableStream)
|
|
60
98
|
*
|
|
61
99
|
* @param children
|
|
62
100
|
* @param options
|
|
@@ -85,14 +123,23 @@ export function renderToStaticMarkup(element: ReactNode, options?: ServerOptions
|
|
|
85
123
|
|
|
86
124
|
export interface RenderToReadableStreamOptions {
|
|
87
125
|
identifierPrefix?: string;
|
|
126
|
+
importMap?: ReactImportMap | undefined;
|
|
88
127
|
namespaceURI?: string;
|
|
89
128
|
nonce?: string;
|
|
90
129
|
bootstrapScriptContent?: string;
|
|
91
130
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
92
131
|
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
|
132
|
+
/**
|
|
133
|
+
* Maximum length of the header content in unicode code units i.e. string.length.
|
|
134
|
+
* Must be a positive integer if specified.
|
|
135
|
+
* @default 2000
|
|
136
|
+
*/
|
|
137
|
+
headersLengthHint?: number | undefined;
|
|
93
138
|
progressiveChunkSize?: number;
|
|
94
139
|
signal?: AbortSignal;
|
|
95
140
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
141
|
+
onHeaders?: ((headers: Headers) => void) | undefined;
|
|
142
|
+
formState?: ReactFormState | null;
|
|
96
143
|
}
|
|
97
144
|
|
|
98
145
|
export interface ReactDOMServerReadableStream extends ReadableStream {
|
|
@@ -102,13 +149,35 @@ export interface ReactDOMServerReadableStream extends ReadableStream {
|
|
|
102
149
|
/**
|
|
103
150
|
* Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
|
|
104
151
|
*
|
|
105
|
-
* @see [API](https://
|
|
152
|
+
* @see [API](https://react.dev/reference/react-dom/server/renderToReadableStream)
|
|
106
153
|
*/
|
|
107
154
|
export function renderToReadableStream(
|
|
108
155
|
children: ReactNode,
|
|
109
156
|
options?: RenderToReadableStreamOptions,
|
|
110
157
|
): Promise<ReactDOMServerReadableStream>;
|
|
111
158
|
|
|
159
|
+
export { ResumeOptions };
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation}
|
|
163
|
+
* @version 19.2
|
|
164
|
+
*/
|
|
165
|
+
export function resume(
|
|
166
|
+
children: React.ReactNode,
|
|
167
|
+
postponedState: PostponedState,
|
|
168
|
+
options?: ResumeOptions,
|
|
169
|
+
): Promise<ReactDOMServerReadableStream>;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation}
|
|
173
|
+
* @version 19.2
|
|
174
|
+
*/
|
|
175
|
+
export function resumeToPipeableStream(
|
|
176
|
+
children: React.ReactNode,
|
|
177
|
+
postponedState: PostponedState,
|
|
178
|
+
options?: ResumeOptions,
|
|
179
|
+
): Promise<PipeableStream>;
|
|
180
|
+
|
|
112
181
|
export const version: string;
|
|
113
182
|
|
|
114
183
|
export as namespace ReactDOMServer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { prerender, version } from "./static";
|
react-dom/static.d.ts
CHANGED
|
@@ -26,25 +26,73 @@ declare global {
|
|
|
26
26
|
|
|
27
27
|
import { ReactNode } from "react";
|
|
28
28
|
import { ErrorInfo } from "./client";
|
|
29
|
+
export {};
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
declare const POSTPONED_STATE_SIGIL: unique symbol;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* This is an opaque type i.e. users should not make any assumptions about its structure.
|
|
35
|
+
* It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}.
|
|
36
|
+
*/
|
|
37
|
+
export interface PostponedState {
|
|
38
|
+
[POSTPONED_STATE_SIGIL]: never;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
|
43
|
+
*/
|
|
44
|
+
// TODO: Ideally TypeScripts standard library would include this type.
|
|
45
|
+
// Until then we keep the prefixed one for future compatibility.
|
|
46
|
+
export interface ReactImportMap {
|
|
47
|
+
/**
|
|
48
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference}
|
|
49
|
+
*/
|
|
50
|
+
imports?: {
|
|
51
|
+
[specifier: string]: string;
|
|
52
|
+
} | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference}
|
|
55
|
+
*/
|
|
56
|
+
integrity?: {
|
|
57
|
+
[moduleURL: string]: string;
|
|
58
|
+
} | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference}
|
|
61
|
+
*/
|
|
62
|
+
scopes?: {
|
|
63
|
+
[scope: string]: {
|
|
64
|
+
[specifier: string]: string;
|
|
65
|
+
};
|
|
66
|
+
} | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface BootstrapScriptDescriptor {
|
|
31
70
|
src: string;
|
|
32
71
|
integrity?: string | undefined;
|
|
33
72
|
crossOrigin?: string | undefined;
|
|
34
|
-
}
|
|
73
|
+
}
|
|
35
74
|
|
|
36
75
|
export interface PrerenderOptions {
|
|
37
76
|
bootstrapScriptContent?: string;
|
|
38
77
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
39
78
|
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
|
79
|
+
/**
|
|
80
|
+
* Maximum length of the header content in unicode code units i.e. string.length.
|
|
81
|
+
* Must be a positive integer if specified.
|
|
82
|
+
* @default 2000
|
|
83
|
+
*/
|
|
84
|
+
headersLengthHint?: number | undefined;
|
|
40
85
|
identifierPrefix?: string;
|
|
86
|
+
importMap?: ReactImportMap | undefined;
|
|
41
87
|
namespaceURI?: string;
|
|
42
88
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
89
|
+
onHeaders?: (headers: Headers) => void | undefined;
|
|
43
90
|
progressiveChunkSize?: number;
|
|
44
91
|
signal?: AbortSignal;
|
|
45
92
|
}
|
|
46
93
|
|
|
47
94
|
export interface PrerenderResult {
|
|
95
|
+
postponed: null | PostponedState;
|
|
48
96
|
prelude: ReadableStream<Uint8Array>;
|
|
49
97
|
}
|
|
50
98
|
|
|
@@ -60,6 +108,7 @@ export function prerender(
|
|
|
60
108
|
|
|
61
109
|
export interface PrerenderToNodeStreamResult {
|
|
62
110
|
prelude: NodeJS.ReadableStream;
|
|
111
|
+
postponed: null | PostponedState;
|
|
63
112
|
}
|
|
64
113
|
|
|
65
114
|
/**
|
|
@@ -75,4 +124,30 @@ export function prerenderToNodeStream(
|
|
|
75
124
|
options?: PrerenderOptions,
|
|
76
125
|
): Promise<PrerenderToNodeStreamResult>;
|
|
77
126
|
|
|
127
|
+
export interface ResumeOptions {
|
|
128
|
+
nonce?: string;
|
|
129
|
+
signal?: AbortSignal;
|
|
130
|
+
onError?: (error: unknown) => string | undefined | void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation}
|
|
135
|
+
* @version 19.2
|
|
136
|
+
*/
|
|
137
|
+
export function resumeAndPrerender(
|
|
138
|
+
children: React.ReactNode,
|
|
139
|
+
postponedState: null | PostponedState,
|
|
140
|
+
options?: Omit<ResumeOptions, "nonce">,
|
|
141
|
+
): Promise<PrerenderResult>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation}
|
|
145
|
+
* @version 19.2
|
|
146
|
+
*/
|
|
147
|
+
export function resumeAndPrerenderToNodeStream(
|
|
148
|
+
children: React.ReactNode,
|
|
149
|
+
postponedState: null | PostponedState,
|
|
150
|
+
options?: Omit<ResumeOptions, "nonce">,
|
|
151
|
+
): Promise<PrerenderToNodeStreamResult>;
|
|
152
|
+
|
|
78
153
|
export const version: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { prerender, resumeAndPrerender, version } from "./static";
|