@types/react-dom 18.0.10 → 18.2.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/client.d.ts +7 -2
- react-dom/index.d.ts +3 -4
- react-dom/package.json +3 -3
- react-dom/server.d.ts +3 -2
react-dom/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (react-dom) (https://reactjs.or
|
|
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, 25 Apr 2023 10:32:40 GMT
|
12
12
|
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
13
13
|
* Global values: `ReactDOM`, `ReactDOMServer`
|
14
14
|
|
react-dom/client.d.ts
CHANGED
@@ -10,7 +10,7 @@ export interface HydrationOptions {
|
|
10
10
|
* Prefix for `useId`.
|
11
11
|
*/
|
12
12
|
identifierPrefix?: string;
|
13
|
-
onRecoverableError?: (error: unknown) => void;
|
13
|
+
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
14
14
|
}
|
15
15
|
|
16
16
|
export interface RootOptions {
|
@@ -18,7 +18,12 @@ export interface RootOptions {
|
|
18
18
|
* Prefix for `useId`.
|
19
19
|
*/
|
20
20
|
identifierPrefix?: string;
|
21
|
-
onRecoverableError?: (error: unknown) => void;
|
21
|
+
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
22
|
+
}
|
23
|
+
|
24
|
+
export interface ErrorInfo {
|
25
|
+
digest?: string;
|
26
|
+
componentStack?: string;
|
22
27
|
}
|
23
28
|
|
24
29
|
export interface Root {
|
react-dom/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Type definitions for React (react-dom) 18.
|
1
|
+
// Type definitions for React (react-dom) 18.2
|
2
2
|
// Project: https://reactjs.org
|
3
3
|
// Definitions by: Asana <https://asana.com>
|
4
4
|
// AssureSign <http://www.assuresign.com>
|
@@ -34,9 +34,8 @@ export const hydrate: Renderer;
|
|
34
34
|
export function flushSync<R>(fn: () => R): R;
|
35
35
|
export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
|
36
36
|
|
37
|
-
export function unstable_batchedUpdates<A,
|
38
|
-
export function unstable_batchedUpdates<
|
39
|
-
export function unstable_batchedUpdates(callback: () => any): void;
|
37
|
+
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
|
38
|
+
export function unstable_batchedUpdates<R>(callback: () => R): R;
|
40
39
|
|
41
40
|
export function unstable_renderSubtreeIntoContainer<T extends Element>(
|
42
41
|
parentComponent: Component<any>,
|
react-dom/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react-dom",
|
3
|
-
"version": "18.0
|
3
|
+
"version": "18.2.0",
|
4
4
|
"description": "TypeScript definitions for React (react-dom)",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
|
6
6
|
"license": "MIT",
|
@@ -49,8 +49,8 @@
|
|
49
49
|
"dependencies": {
|
50
50
|
"@types/react": "*"
|
51
51
|
},
|
52
|
-
"typesPublisherContentHash": "
|
53
|
-
"typeScriptVersion": "4.
|
52
|
+
"typesPublisherContentHash": "5e97835c5f797f15b00550a16adf5138b78305420c2d916f6070801cb92e9cbd",
|
53
|
+
"typeScriptVersion": "4.3",
|
54
54
|
"exports": {
|
55
55
|
".": {
|
56
56
|
"types": {
|
react-dom/server.d.ts
CHANGED
@@ -22,6 +22,7 @@ declare global {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
import { ReactElement, ReactNode } from 'react';
|
25
|
+
import { ErrorInfo } from './client';
|
25
26
|
|
26
27
|
export interface RenderToPipeableStreamOptions {
|
27
28
|
identifierPrefix?: string;
|
@@ -34,7 +35,7 @@ export interface RenderToPipeableStreamOptions {
|
|
34
35
|
onShellReady?: () => void;
|
35
36
|
onShellError?: (error: unknown) => void;
|
36
37
|
onAllReady?: () => void;
|
37
|
-
onError?: (error: unknown) => void;
|
38
|
+
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
38
39
|
}
|
39
40
|
|
40
41
|
export interface PipeableStream {
|
@@ -97,7 +98,7 @@ export interface RenderToReadableStreamOptions {
|
|
97
98
|
bootstrapModules?: string[];
|
98
99
|
progressiveChunkSize?: number;
|
99
100
|
signal?: AbortSignal;
|
100
|
-
onError?: (error: unknown) => void;
|
101
|
+
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
101
102
|
}
|
102
103
|
|
103
104
|
export interface ReactDOMServerReadableStream extends ReadableStream {
|