@types/react-dom 17.0.11 → 17.0.14

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 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: Wed, 03 Nov 2021 07:01:20 GMT
11
+ * Last updated: Sat, 19 Mar 2022 07:31:42 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
14
14
 
react-dom/client.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ /**
2
+ * WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1`
3
+ */
4
+
5
+ // See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
6
+
7
+ import React = require('react');
8
+ export interface HydrationOptions {
9
+ /**
10
+ * Prefix for `useId`.
11
+ */
12
+ identifierPrefix?: string;
13
+ onRecoverableError?: (error: unknown) => void;
14
+ }
15
+
16
+ export interface RootOptions {
17
+ /**
18
+ * Prefix for `useId`.
19
+ */
20
+ identifierPrefix?: string;
21
+ onRecoverableError?: (error: unknown) => void;
22
+ }
23
+
24
+ export interface Root {
25
+ render(children: React.ReactChild | Iterable<React.ReactNode>): void;
26
+ unmount(): void;
27
+ }
28
+
29
+ /**
30
+ * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
31
+ *
32
+ * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
33
+ */
34
+ export function createRoot(container: Element | DocumentFragment, options?: RootOptions): Root;
35
+
36
+ export function hydrateRoot(
37
+ container: Element | Document,
38
+ initialChildren: React.ReactChild | Iterable<React.ReactNode>,
39
+ options?: HydrationOptions,
40
+ ): Root;
react-dom/next.d.ts CHANGED
@@ -30,38 +30,4 @@ import ReactDOM = require('.');
30
30
 
31
31
  export {};
32
32
 
33
- declare module '.' {
34
- interface HydrationOptions {
35
- onHydrated?(suspenseInstance: Comment): void;
36
- onDeleted?(suspenseInstance: Comment): void;
37
- }
38
-
39
- interface RootOptions {
40
- /**
41
- * @deprecated Use `hydrateRoot(container)` instead
42
- */
43
- hydrate?: boolean | undefined;
44
- /**
45
- * @deprecated Use `hydrateRoot(container, hydrateOptions)` instead
46
- */
47
- hydrationOptions?: HydrationOptions | undefined;
48
- }
49
-
50
- interface Root {
51
- render(children: React.ReactChild | Iterable<React.ReactNode>): void;
52
- unmount(): void;
53
- }
54
-
55
- /**
56
- * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
57
- *
58
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
59
- */
60
- function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
61
-
62
- function hydrateRoot(
63
- container: Element | Document | DocumentFragment | Comment,
64
- initialChildren: React.ReactChild | Iterable<React.ReactNode>,
65
- options?: HydrationOptions,
66
- ): Root;
67
- }
33
+ declare module '.' {}
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.11",
3
+ "version": "17.0.14",
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,6 +49,6 @@
49
49
  "dependencies": {
50
50
  "@types/react": "*"
51
51
  },
52
- "typesPublisherContentHash": "c2047268b79bc6da2c7f1916f66a3a23657cdb47b42eada605c1ce645e863099",
53
- "typeScriptVersion": "3.7"
52
+ "typesPublisherContentHash": "bb6ccdfb4be52f5b94a8ea67684c63c29d57b4ff383a3f33fd7e1a81e35f264f",
53
+ "typeScriptVersion": "3.9"
54
54
  }