@types/react-dom 19.2.4 → 19.2.6
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 +8 -1
- react-dom/package.json +2 -2
- react-dom/server.browser.d.ts +1 -1
- react-dom/server.bun.d.ts +9 -1
- react-dom/server.d.ts +33 -6
- react-dom/server.edge.d.ts +1 -1
- react-dom/server.node.d.ts +1 -0
- react-dom/static.browser.d.ts +1 -1
- react-dom/static.d.ts +13 -3
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: Thu,
|
|
11
|
+
* Last updated: Thu, 03 Sep 2026 09:37:09 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
|
@@ -40,7 +40,14 @@ export interface BrowserUsable {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
declare module "." {
|
|
43
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Creates an opaque Usable that opts a subtree into browser-only rendering.
|
|
45
|
+
* `reason` is diagnostic metadata: an SSR renderer uses it as the `cause` of
|
|
46
|
+
* the recoverable error it reports when deferring the subtree to the browser.
|
|
47
|
+
* A function is called lazily by that renderer; in the browser the reason is
|
|
48
|
+
* never observed.
|
|
49
|
+
*/
|
|
50
|
+
function browser(reason?: string | (() => unknown)): BrowserUsable;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
declare module "react" {
|
react-dom/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react-dom",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.6",
|
|
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",
|
|
@@ -123,6 +123,6 @@
|
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@types/react": "^19.2.0"
|
|
125
125
|
},
|
|
126
|
-
"typesPublisherContentHash": "
|
|
126
|
+
"typesPublisherContentHash": "155fba39b5e2df2cbeb1a49946eade19d0fc20831bea88465f902a543badc8dd",
|
|
127
127
|
"typeScriptVersion": "5.6"
|
|
128
128
|
}
|
react-dom/server.browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume, version } from "./server";
|
react-dom/server.bun.d.ts
CHANGED
react-dom/server.d.ts
CHANGED
|
@@ -31,6 +31,25 @@ export interface BootstrapScriptDescriptor {
|
|
|
31
31
|
crossOrigin?: string | undefined;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The header content passed to `onHeaders` by `renderToPipeableStream`.
|
|
36
|
+
* Other server rendering APIs pass a `Headers` instance instead.
|
|
37
|
+
* React passes an empty object when there are no resource hints to send.
|
|
38
|
+
*/
|
|
39
|
+
export interface HeadersDescriptor {
|
|
40
|
+
Link?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A nonce string, or an object with separate nonces for scripts and styles.
|
|
45
|
+
*/
|
|
46
|
+
export type NonceOption =
|
|
47
|
+
| string
|
|
48
|
+
| {
|
|
49
|
+
script?: string | undefined;
|
|
50
|
+
style?: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
34
53
|
/**
|
|
35
54
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
|
36
55
|
*/
|
|
@@ -62,7 +81,7 @@ export interface ReactImportMap {
|
|
|
62
81
|
export interface RenderToPipeableStreamOptions {
|
|
63
82
|
identifierPrefix?: string;
|
|
64
83
|
namespaceURI?: string;
|
|
65
|
-
nonce?:
|
|
84
|
+
nonce?: NonceOption | undefined;
|
|
66
85
|
bootstrapScriptContent?: string;
|
|
67
86
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
68
87
|
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
|
@@ -71,10 +90,10 @@ export interface RenderToPipeableStreamOptions {
|
|
|
71
90
|
* Must be a positive integer if specified.
|
|
72
91
|
* @default 2000
|
|
73
92
|
*/
|
|
74
|
-
|
|
93
|
+
maxHeadersLength?: number | undefined;
|
|
75
94
|
importMap?: ReactImportMap | undefined;
|
|
76
95
|
progressiveChunkSize?: number;
|
|
77
|
-
onHeaders?: ((headers:
|
|
96
|
+
onHeaders?: ((headers: HeadersDescriptor) => void) | undefined;
|
|
78
97
|
onShellReady?: () => void;
|
|
79
98
|
onShellError?: (error: unknown) => void;
|
|
80
99
|
onAllReady?: () => void;
|
|
@@ -125,7 +144,7 @@ export interface RenderToReadableStreamOptions {
|
|
|
125
144
|
identifierPrefix?: string;
|
|
126
145
|
importMap?: ReactImportMap | undefined;
|
|
127
146
|
namespaceURI?: string;
|
|
128
|
-
nonce?:
|
|
147
|
+
nonce?: NonceOption | undefined;
|
|
129
148
|
bootstrapScriptContent?: string;
|
|
130
149
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
131
150
|
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
|
@@ -134,7 +153,7 @@ export interface RenderToReadableStreamOptions {
|
|
|
134
153
|
* Must be a positive integer if specified.
|
|
135
154
|
* @default 2000
|
|
136
155
|
*/
|
|
137
|
-
|
|
156
|
+
maxHeadersLength?: number | undefined;
|
|
138
157
|
progressiveChunkSize?: number;
|
|
139
158
|
signal?: AbortSignal;
|
|
140
159
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
@@ -158,6 +177,14 @@ export function renderToReadableStream(
|
|
|
158
177
|
|
|
159
178
|
export { ResumeOptions };
|
|
160
179
|
|
|
180
|
+
export interface ResumeToPipeableStreamOptions {
|
|
181
|
+
nonce?: NonceOption | undefined;
|
|
182
|
+
onShellReady?: (() => void) | undefined;
|
|
183
|
+
onShellError?: ((error: unknown) => void) | undefined;
|
|
184
|
+
onAllReady?: (() => void) | undefined;
|
|
185
|
+
onError?: ((error: unknown, errorInfo: ErrorInfo) => string | void) | undefined;
|
|
186
|
+
}
|
|
187
|
+
|
|
161
188
|
/**
|
|
162
189
|
* @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation}
|
|
163
190
|
* @version 19.2
|
|
@@ -175,7 +202,7 @@ export function resume(
|
|
|
175
202
|
export function resumeToPipeableStream(
|
|
176
203
|
children: React.ReactNode,
|
|
177
204
|
postponedState: PostponedState,
|
|
178
|
-
options?:
|
|
205
|
+
options?: ResumeToPipeableStreamOptions,
|
|
179
206
|
): Promise<PipeableStream>;
|
|
180
207
|
|
|
181
208
|
export const version: string;
|
react-dom/server.edge.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server";
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume, version } from "./server";
|
react-dom/server.node.d.ts
CHANGED
react-dom/static.browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { prerender, version } from "./static";
|
|
1
|
+
export { prerender, resumeAndPrerender, version } from "./static";
|
react-dom/static.d.ts
CHANGED
|
@@ -72,6 +72,16 @@ export interface BootstrapScriptDescriptor {
|
|
|
72
72
|
crossOrigin?: string | undefined;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* A nonce string, or an object with separate nonces for scripts and styles.
|
|
77
|
+
*/
|
|
78
|
+
export type NonceOption =
|
|
79
|
+
| string
|
|
80
|
+
| {
|
|
81
|
+
script?: string | undefined;
|
|
82
|
+
style?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
|
|
75
85
|
export interface PrerenderOptions {
|
|
76
86
|
bootstrapScriptContent?: string;
|
|
77
87
|
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
|
@@ -81,12 +91,12 @@ export interface PrerenderOptions {
|
|
|
81
91
|
* Must be a positive integer if specified.
|
|
82
92
|
* @default 2000
|
|
83
93
|
*/
|
|
84
|
-
|
|
94
|
+
maxHeadersLength?: number | undefined;
|
|
85
95
|
identifierPrefix?: string;
|
|
86
96
|
importMap?: ReactImportMap | undefined;
|
|
87
97
|
namespaceURI?: string;
|
|
88
98
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
89
|
-
onHeaders?: (headers: Headers) => void | undefined;
|
|
99
|
+
onHeaders?: ((headers: Headers) => void) | undefined;
|
|
90
100
|
progressiveChunkSize?: number;
|
|
91
101
|
signal?: AbortSignal;
|
|
92
102
|
}
|
|
@@ -125,7 +135,7 @@ export function prerenderToNodeStream(
|
|
|
125
135
|
): Promise<PrerenderToNodeStreamResult>;
|
|
126
136
|
|
|
127
137
|
export interface ResumeOptions {
|
|
128
|
-
nonce?:
|
|
138
|
+
nonce?: NonceOption | undefined;
|
|
129
139
|
signal?: AbortSignal;
|
|
130
140
|
onError?: (error: unknown) => string | undefined | void;
|
|
131
141
|
}
|