@types/react-dom 19.2.7 → 19.3.0
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 +0 -104
- react-dom/index.d.ts +56 -0
- react-dom/package.json +3 -3
- react-dom/server.d.ts +15 -0
- react-dom/static.d.ts +10 -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:
|
|
11
|
+
* Last updated: Wed, 09 Sep 2026 18:05:03 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,5 +1,3 @@
|
|
|
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 */
|
|
3
1
|
/**
|
|
4
2
|
* These are types for things that are present in the upcoming React 18 release.
|
|
5
3
|
*
|
|
@@ -33,105 +31,3 @@ import ReactDOM = require(".");
|
|
|
33
31
|
import { ErrorInfo } from "./client";
|
|
34
32
|
|
|
35
33
|
export {};
|
|
36
|
-
|
|
37
|
-
declare const browserUsable: unique symbol;
|
|
38
|
-
|
|
39
|
-
export interface BrowserUsable {
|
|
40
|
-
readonly [browserUsable]: never;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare module "." {
|
|
44
|
-
/**
|
|
45
|
-
* Creates an opaque Usable that opts a subtree into browser-only rendering.
|
|
46
|
-
* `reason` is diagnostic metadata: an SSR renderer uses it as the `cause` of
|
|
47
|
-
* the recoverable error it reports when deferring the subtree to the browser.
|
|
48
|
-
* A function is called lazily by that renderer; in the browser the reason is
|
|
49
|
-
* never observed.
|
|
50
|
-
*/
|
|
51
|
-
function browser(reason?: string | (() => unknown)): BrowserUsable;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
declare module "./server" {
|
|
55
|
-
interface RenderToPipeableStreamOptions {
|
|
56
|
-
/**
|
|
57
|
-
* A callback React calls when it recovers from `browser()` by leaving a
|
|
58
|
-
* Suspense fallback for the browser to replace.
|
|
59
|
-
*/
|
|
60
|
-
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface RenderToReadableStreamOptions {
|
|
64
|
-
/**
|
|
65
|
-
* A callback React calls when it recovers from `browser()` by leaving a
|
|
66
|
-
* Suspense fallback for the browser to replace.
|
|
67
|
-
*/
|
|
68
|
-
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
interface ResumeToPipeableStreamOptions {
|
|
72
|
-
/**
|
|
73
|
-
* A callback React calls when it recovers from `browser()` by leaving a
|
|
74
|
-
* Suspense fallback for the browser to replace.
|
|
75
|
-
*/
|
|
76
|
-
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
declare module "./static" {
|
|
81
|
-
interface PrerenderOptions {
|
|
82
|
-
/**
|
|
83
|
-
* A callback React calls when it recovers from `browser()` by leaving a
|
|
84
|
-
* Suspense fallback for the browser to replace.
|
|
85
|
-
*/
|
|
86
|
-
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
interface ResumeOptions {
|
|
90
|
-
/**
|
|
91
|
-
* A callback React calls when it recovers from `browser()` by leaving a
|
|
92
|
-
* Suspense fallback for the browser to replace.
|
|
93
|
-
*/
|
|
94
|
-
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
declare module "react" {
|
|
99
|
-
interface RendererUsable<T> {
|
|
100
|
-
"react-dom/browser": BrowserUsable;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// @enableViewTransition
|
|
104
|
-
interface ViewTransitionPseudoElement extends Animatable {
|
|
105
|
-
getComputedStyle: () => CSSStyleDeclaration;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface ViewTransitionInstance {
|
|
109
|
-
group: ViewTransitionPseudoElement;
|
|
110
|
-
imagePair: ViewTransitionPseudoElement;
|
|
111
|
-
old: ViewTransitionPseudoElement;
|
|
112
|
-
new: ViewTransitionPseudoElement;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// @enableFragmentRefs
|
|
116
|
-
interface FragmentInstance {
|
|
117
|
-
blur: () => void;
|
|
118
|
-
focus: (focusOptions?: FocusOptions | undefined) => void;
|
|
119
|
-
focusLast: (focusOptions?: FocusOptions | undefined) => void;
|
|
120
|
-
observeUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
121
|
-
unobserveUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
122
|
-
getClientRects(): Array<DOMRect>;
|
|
123
|
-
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
|
124
|
-
addEventListener(
|
|
125
|
-
type: string,
|
|
126
|
-
listener: EventListener,
|
|
127
|
-
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
|
128
|
-
): void;
|
|
129
|
-
removeEventListener(
|
|
130
|
-
type: string,
|
|
131
|
-
listener: EventListener,
|
|
132
|
-
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
|
133
|
-
): void;
|
|
134
|
-
dispatchEvent(event: Event): boolean;
|
|
135
|
-
scrollIntoView(alignToTop?: boolean): void;
|
|
136
|
-
}
|
|
137
|
-
}
|
react-dom/index.d.ts
CHANGED
|
@@ -6,9 +6,48 @@ export as namespace ReactDOM;
|
|
|
6
6
|
|
|
7
7
|
import { Key, ReactNode, ReactPortal } from "react";
|
|
8
8
|
|
|
9
|
+
export {};
|
|
10
|
+
|
|
9
11
|
declare module "react" {
|
|
10
12
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
11
13
|
interface CacheSignal extends AbortSignal {}
|
|
14
|
+
|
|
15
|
+
interface RendererUsable<T> {
|
|
16
|
+
"react-dom/browser": BrowserUsable;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface ViewTransitionPseudoElement extends Animatable {
|
|
20
|
+
getComputedStyle: () => CSSStyleDeclaration;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ViewTransitionInstance {
|
|
24
|
+
group: ViewTransitionPseudoElement;
|
|
25
|
+
imagePair: ViewTransitionPseudoElement;
|
|
26
|
+
old: ViewTransitionPseudoElement;
|
|
27
|
+
new: ViewTransitionPseudoElement;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface FragmentInstance {
|
|
31
|
+
blur: () => void;
|
|
32
|
+
focus: (focusOptions?: FocusOptions | undefined) => void;
|
|
33
|
+
focusLast: (focusOptions?: FocusOptions | undefined) => void;
|
|
34
|
+
observeUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
35
|
+
unobserveUsing(observer: IntersectionObserver | ResizeObserver): void;
|
|
36
|
+
getClientRects(): Array<DOMRect>;
|
|
37
|
+
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
|
38
|
+
addEventListener(
|
|
39
|
+
type: string,
|
|
40
|
+
listener: EventListener,
|
|
41
|
+
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
|
42
|
+
): void;
|
|
43
|
+
removeEventListener(
|
|
44
|
+
type: string,
|
|
45
|
+
listener: EventListener,
|
|
46
|
+
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
|
47
|
+
): void;
|
|
48
|
+
dispatchEvent(event: Event): boolean;
|
|
49
|
+
scrollIntoView(alignToTop?: boolean): void;
|
|
50
|
+
}
|
|
12
51
|
}
|
|
13
52
|
|
|
14
53
|
export function createPortal(
|
|
@@ -131,3 +170,20 @@ export interface PreinitModuleOptions {
|
|
|
131
170
|
export function preinitModule(href: string, options?: PreinitModuleOptions): void;
|
|
132
171
|
|
|
133
172
|
export function requestFormReset(form: HTMLFormElement): void;
|
|
173
|
+
|
|
174
|
+
declare const browserUsable: unique symbol;
|
|
175
|
+
|
|
176
|
+
export interface BrowserUsable {
|
|
177
|
+
readonly [browserUsable]: never;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Creates an opaque Usable that opts a subtree into browser-only rendering.
|
|
182
|
+
* `reason` is diagnostic metadata: an SSR renderer uses it as the `cause` of
|
|
183
|
+
* the recoverable error it reports when deferring the subtree to the browser.
|
|
184
|
+
* A function is called lazily by that renderer; in the browser the reason is
|
|
185
|
+
* never observed.
|
|
186
|
+
*
|
|
187
|
+
* @version 19.3.0
|
|
188
|
+
*/
|
|
189
|
+
export function browser(reason?: string | (() => unknown)): BrowserUsable;
|
react-dom/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react-dom",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
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.3.0"
|
|
125
125
|
},
|
|
126
|
-
"typesPublisherContentHash": "
|
|
126
|
+
"typesPublisherContentHash": "345e361651b67ba93e5757949902dbca94f299c8328b8d01937dc05b5e487d8f",
|
|
127
127
|
"typeScriptVersion": "5.6"
|
|
128
128
|
}
|
react-dom/server.d.ts
CHANGED
|
@@ -97,6 +97,11 @@ export interface RenderToPipeableStreamOptions {
|
|
|
97
97
|
onShellReady?: () => void;
|
|
98
98
|
onShellError?: (error: unknown) => void;
|
|
99
99
|
onAllReady?: () => void;
|
|
100
|
+
/**
|
|
101
|
+
* A callback React calls when it recovers from `browser()` by leaving a
|
|
102
|
+
* Suspense fallback for the browser to replace.
|
|
103
|
+
*/
|
|
104
|
+
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
100
105
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
101
106
|
formState?: ReactFormState | null;
|
|
102
107
|
}
|
|
@@ -156,6 +161,11 @@ export interface RenderToReadableStreamOptions {
|
|
|
156
161
|
maxHeadersLength?: number | undefined;
|
|
157
162
|
progressiveChunkSize?: number;
|
|
158
163
|
signal?: AbortSignal;
|
|
164
|
+
/**
|
|
165
|
+
* A callback React calls when it recovers from `browser()` by leaving a
|
|
166
|
+
* Suspense fallback for the browser to replace.
|
|
167
|
+
*/
|
|
168
|
+
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
159
169
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
160
170
|
onHeaders?: ((headers: Headers) => void) | undefined;
|
|
161
171
|
formState?: ReactFormState | null;
|
|
@@ -182,6 +192,11 @@ export interface ResumeToPipeableStreamOptions {
|
|
|
182
192
|
onShellReady?: (() => void) | undefined;
|
|
183
193
|
onShellError?: ((error: unknown) => void) | undefined;
|
|
184
194
|
onAllReady?: (() => void) | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* A callback React calls when it recovers from `browser()` by leaving a
|
|
197
|
+
* Suspense fallback for the browser to replace.
|
|
198
|
+
*/
|
|
199
|
+
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
185
200
|
onError?: ((error: unknown, errorInfo: ErrorInfo) => string | void) | undefined;
|
|
186
201
|
}
|
|
187
202
|
|
react-dom/static.d.ts
CHANGED
|
@@ -95,6 +95,11 @@ export interface PrerenderOptions {
|
|
|
95
95
|
identifierPrefix?: string;
|
|
96
96
|
importMap?: ReactImportMap | undefined;
|
|
97
97
|
namespaceURI?: string;
|
|
98
|
+
/**
|
|
99
|
+
* A callback React calls when it recovers from `browser()` by leaving a
|
|
100
|
+
* Suspense fallback for the browser to replace.
|
|
101
|
+
*/
|
|
102
|
+
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
98
103
|
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
|
99
104
|
onHeaders?: ((headers: Headers) => void) | undefined;
|
|
100
105
|
progressiveChunkSize?: number;
|
|
@@ -137,6 +142,11 @@ export function prerenderToNodeStream(
|
|
|
137
142
|
export interface ResumeOptions {
|
|
138
143
|
nonce?: NonceOption | undefined;
|
|
139
144
|
signal?: AbortSignal;
|
|
145
|
+
/**
|
|
146
|
+
* A callback React calls when it recovers from `browser()` by leaving a
|
|
147
|
+
* Suspense fallback for the browser to replace.
|
|
148
|
+
*/
|
|
149
|
+
onBrowserBailout?: ((error: unknown, errorInfo: ErrorInfo) => void) | undefined;
|
|
140
150
|
onError?: (error: unknown) => string | undefined | void;
|
|
141
151
|
}
|
|
142
152
|
|