@types/react-dom 19.1.11 → 19.2.1
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 +28 -62
- react-dom/experimental.d.ts +0 -33
- react-dom/index.d.ts +5 -0
- react-dom/package.json +3 -3
- react-dom/server.d.ts +23 -0
- react-dom/server.edge.d.ts +1 -1
- react-dom/server.node.d.ts +8 -1
- react-dom/static.d.ts +40 -1
- react-dom/static.edge.d.ts +1 -1
- react-dom/static.node.d.ts +7 -1
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:
|
|
11
|
+
* Last updated: Tue, 07 Oct 2025 05:34:23 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
|
@@ -34,71 +34,37 @@ import ReactDOM = require(".");
|
|
|
34
34
|
export {};
|
|
35
35
|
|
|
36
36
|
declare module "react" {
|
|
37
|
-
//
|
|
38
|
-
interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
declare const POSTPONED_STATE_SIGIL: unique symbol;
|
|
42
|
-
declare module "react-dom/static" {
|
|
43
|
-
/**
|
|
44
|
-
* This is an opaque type i.e. users should not make any assumptions about its structure.
|
|
45
|
-
* 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`}.
|
|
46
|
-
*/
|
|
47
|
-
interface PostponedState {
|
|
48
|
-
[POSTPONED_STATE_SIGIL]: never;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface ResumeOptions {
|
|
52
|
-
nonce?: string;
|
|
53
|
-
signal?: AbortSignal;
|
|
54
|
-
onError?: (error: unknown) => string | undefined | void;
|
|
37
|
+
// @enableViewTransition
|
|
38
|
+
interface ViewTransitionPseudoElement extends Animatable {
|
|
39
|
+
getComputedStyle: () => CSSStyleDeclaration;
|
|
55
40
|
}
|
|
56
41
|
|
|
57
|
-
interface
|
|
58
|
-
|
|
42
|
+
interface ViewTransitionInstance {
|
|
43
|
+
group: ViewTransitionPseudoElement;
|
|
44
|
+
imagePair: ViewTransitionPseudoElement;
|
|
45
|
+
old: ViewTransitionPseudoElement;
|
|
46
|
+
new: ViewTransitionPseudoElement;
|
|
59
47
|
}
|
|
60
|
-
/**
|
|
61
|
-
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation}
|
|
62
|
-
* @version 19.2
|
|
63
|
-
*/
|
|
64
|
-
function resumeAndPrerender(
|
|
65
|
-
children: React.ReactNode,
|
|
66
|
-
postponedState: PostponedState,
|
|
67
|
-
options?: Omit<ResumeOptions, "nonce">,
|
|
68
|
-
): Promise<PrerenderResult>;
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
|
|
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
|
+
scrollIntoView(alignToTop?: boolean): void;
|
|
72
69
|
}
|
|
73
|
-
/**
|
|
74
|
-
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation}
|
|
75
|
-
* @version 19.2
|
|
76
|
-
*/
|
|
77
|
-
function resumeAndPrerenderToNodeStream(
|
|
78
|
-
children: React.ReactNode,
|
|
79
|
-
postponedState: PostponedState,
|
|
80
|
-
options?: Omit<ResumeOptions, "nonce">,
|
|
81
|
-
): Promise<PrerenderToNodeStreamResult>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
import { PostponedState, ResumeOptions } from "react-dom/static";
|
|
85
|
-
declare module "react-dom/server" {
|
|
86
|
-
/**
|
|
87
|
-
* @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation}
|
|
88
|
-
* @version 19.2
|
|
89
|
-
*/
|
|
90
|
-
function resume(
|
|
91
|
-
children: React.ReactNode,
|
|
92
|
-
postponedState: PostponedState,
|
|
93
|
-
options?: ResumeOptions,
|
|
94
|
-
): Promise<ReactDOMServerReadableStream>;
|
|
95
|
-
/**
|
|
96
|
-
* @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation}
|
|
97
|
-
* @version 19.2
|
|
98
|
-
*/
|
|
99
|
-
function resumeToPipeableStream(
|
|
100
|
-
children: React.ReactNode,
|
|
101
|
-
postponedState: PostponedState,
|
|
102
|
-
options?: ResumeOptions,
|
|
103
|
-
): Promise<PipeableStream>;
|
|
104
70
|
}
|
react-dom/experimental.d.ts
CHANGED
|
@@ -39,41 +39,8 @@ declare module "." {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
declare module "react" {
|
|
42
|
-
interface ViewTransitionPseudoElement extends Animatable {
|
|
43
|
-
getComputedStyle: () => CSSStyleDeclaration;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
interface ViewTransitionInstance {
|
|
47
|
-
group: ViewTransitionPseudoElement;
|
|
48
|
-
imagePair: ViewTransitionPseudoElement;
|
|
49
|
-
old: ViewTransitionPseudoElement;
|
|
50
|
-
new: ViewTransitionPseudoElement;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
42
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
54
43
|
interface GestureProvider extends AnimationTimeline {}
|
|
55
|
-
|
|
56
|
-
// @enableFragmentRefs
|
|
57
|
-
interface FragmentInstance {
|
|
58
|
-
blur: () => void;
|
|
59
|
-
focus: (focusOptions?: FocusOptions | undefined) => void;
|
|
60
|
-
focusLast: (focusOptions?: FocusOptions | undefined) => void;
|
|
61
|
-
observeUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
62
|
-
unobserveUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
63
|
-
getClientRects(): Array<DOMRect>;
|
|
64
|
-
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
|
65
|
-
addEventListener(
|
|
66
|
-
type: string,
|
|
67
|
-
listener: EventListener,
|
|
68
|
-
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
|
69
|
-
): void;
|
|
70
|
-
removeEventListener(
|
|
71
|
-
type: string,
|
|
72
|
-
listener: EventListener,
|
|
73
|
-
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
|
74
|
-
): void;
|
|
75
|
-
experimental_scrollIntoView(alignToTop?: boolean): void;
|
|
76
|
-
}
|
|
77
44
|
}
|
|
78
45
|
|
|
79
46
|
declare module "./client" {
|
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,
|
react-dom/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react-dom",
|
|
3
|
-
"version": "19.1
|
|
3
|
+
"version": "19.2.1",
|
|
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",
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
"scripts": {},
|
|
122
122
|
"dependencies": {},
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"@types/react": "^19.
|
|
124
|
+
"@types/react": "^19.2.0"
|
|
125
125
|
},
|
|
126
|
-
"typesPublisherContentHash": "
|
|
126
|
+
"typesPublisherContentHash": "68266be9b96ace4d6eb696cfbf2788d803369c334bed806fb83a2414f592d872",
|
|
127
127
|
"typeScriptVersion": "5.2"
|
|
128
128
|
}
|
react-dom/server.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ declare global {
|
|
|
23
23
|
|
|
24
24
|
import { ReactNode } from "react";
|
|
25
25
|
import { ErrorInfo, ReactFormState } from "./client";
|
|
26
|
+
import { PostponedState, ResumeOptions } from "./static";
|
|
26
27
|
|
|
27
28
|
export interface BootstrapScriptDescriptor {
|
|
28
29
|
src: string;
|
|
@@ -155,6 +156,28 @@ export function renderToReadableStream(
|
|
|
155
156
|
options?: RenderToReadableStreamOptions,
|
|
156
157
|
): Promise<ReactDOMServerReadableStream>;
|
|
157
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
|
+
|
|
158
181
|
export const version: string;
|
|
159
182
|
|
|
160
183
|
export as namespace ReactDOMServer;
|
react-dom/server.edge.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
|
1
|
+
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server";
|
react-dom/server.node.d.ts
CHANGED
react-dom/static.d.ts
CHANGED
|
@@ -26,6 +26,17 @@ declare global {
|
|
|
26
26
|
|
|
27
27
|
import { ReactNode } from "react";
|
|
28
28
|
import { ErrorInfo } from "./client";
|
|
29
|
+
export {};
|
|
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
|
+
}
|
|
29
40
|
|
|
30
41
|
/**
|
|
31
42
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
|
@@ -72,7 +83,7 @@ export interface PrerenderOptions {
|
|
|
72
83
|
*/
|
|
73
84
|
headersLengthHint?: number | undefined;
|
|
74
85
|
identifierPrefix?: string;
|
|
75
|
-
importMap?:
|
|
86
|
+
importMap?: ReactImportMap | undefined;
|
|
76
87
|
namespaceURI?: string;
|
|
77
88
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
78
89
|
onHeaders?: (headers: Headers) => void | undefined;
|
|
@@ -81,6 +92,7 @@ export interface PrerenderOptions {
|
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
export interface PrerenderResult {
|
|
95
|
+
postponed: null | PostponedState;
|
|
84
96
|
prelude: ReadableStream<Uint8Array>;
|
|
85
97
|
}
|
|
86
98
|
|
|
@@ -96,6 +108,7 @@ export function prerender(
|
|
|
96
108
|
|
|
97
109
|
export interface PrerenderToNodeStreamResult {
|
|
98
110
|
prelude: NodeJS.ReadableStream;
|
|
111
|
+
postponed: null | PostponedState;
|
|
99
112
|
}
|
|
100
113
|
|
|
101
114
|
/**
|
|
@@ -111,4 +124,30 @@ export function prerenderToNodeStream(
|
|
|
111
124
|
options?: PrerenderOptions,
|
|
112
125
|
): Promise<PrerenderToNodeStreamResult>;
|
|
113
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
|
+
|
|
114
153
|
export const version: string;
|
react-dom/static.edge.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { prerender, version } from "./static";
|
|
1
|
+
export { prerender, resumeAndPrerender, version } from "./static";
|