@types/react-dom 17.0.9 → 17.0.12

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, 07 Jul 2021 17:33:41 GMT
11
+ * Last updated: Tue, 01 Mar 2022 21:01:57 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
14
14
 
react-dom/index.d.ts CHANGED
@@ -22,7 +22,7 @@ export as namespace ReactDOM;
22
22
 
23
23
  import {
24
24
  ReactInstance, Component, ComponentState,
25
- ReactElement, SFCElement, CElement,
25
+ ReactElement, FunctionComponentElement, CElement,
26
26
  DOMAttributes, DOMElement, ReactNode, ReactPortal
27
27
  } from 'react';
28
28
 
@@ -77,7 +77,7 @@ export interface Renderer {
77
77
  ): Element;
78
78
 
79
79
  (
80
- element: SFCElement<any> | Array<SFCElement<any>>,
80
+ element: FunctionComponentElement<any> | Array<FunctionComponentElement<any>>,
81
81
  container: Container| null,
82
82
  callback?: () => void
83
83
  ): void;
react-dom/next.d.ts CHANGED
@@ -34,21 +34,23 @@ declare module '.' {
34
34
  interface HydrationOptions {
35
35
  onHydrated?(suspenseInstance: Comment): void;
36
36
  onDeleted?(suspenseInstance: Comment): void;
37
+ /**
38
+ * Prefix for `useId`.
39
+ */
40
+ identifierPrefix?: string;
41
+ onRecoverableError?: (error: unknown) => void;
37
42
  }
38
43
 
39
44
  interface RootOptions {
40
45
  /**
41
- * @deprecated Use `hydrateRoot(container)` instead
42
- */
43
- hydrate?: boolean | undefined;
44
- /**
45
- * @deprecated Use `hydrateRoot(container, hydrateOptions)` instead
46
+ * Prefix for `useId`.
46
47
  */
47
- hydrationOptions?: HydrationOptions | undefined;
48
+ identifierPrefix?: string;
49
+ onRecoverableError?: (error: unknown) => void;
48
50
  }
49
51
 
50
52
  interface Root {
51
- render(children: React.ReactChild | React.ReactNodeArray): void;
53
+ render(children: React.ReactChild | Iterable<React.ReactNode>): void;
52
54
  unmount(): void;
53
55
  }
54
56
 
@@ -59,5 +61,9 @@ declare module '.' {
59
61
  */
60
62
  function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
61
63
 
62
- function hydrateRoot(container: Element | Document | DocumentFragment | Comment, options?: HydrationOptions): Root;
64
+ function hydrateRoot(
65
+ container: Element | Document | DocumentFragment | Comment,
66
+ initialChildren: React.ReactChild | Iterable<React.ReactNode>,
67
+ options?: HydrationOptions,
68
+ ): Root;
63
69
  }
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.9",
3
+ "version": "17.0.12",
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": "e186af0c24782790d3143b55e1b197a3d699d977458e37175756b95d0aaa4750",
53
- "typeScriptVersion": "3.6"
52
+ "typesPublisherContentHash": "fc946accda3e64332162436943cb68c5ac37f9e9bff0c3b25bf706e0e5ab2b4a",
53
+ "typeScriptVersion": "3.9"
54
54
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AbstractView, Component, ComponentClass,
3
3
  ReactElement, ReactInstance, ClassType,
4
- DOMElement, SFCElement, CElement,
4
+ DOMElement, FunctionComponentElement, CElement,
5
5
  ReactHTMLElement, DOMAttributes, SFC
6
6
  } from 'react';
7
7
 
@@ -157,7 +157,7 @@ export namespace Simulate {
157
157
  export function renderIntoDocument<T extends Element>(
158
158
  element: DOMElement<any, T>): T;
159
159
  export function renderIntoDocument(
160
- element: SFCElement<any>): void;
160
+ element: FunctionComponentElement<any>): void;
161
161
  // If we replace `P` with `any` in this overload, then some tests fail because
162
162
  // calls to `renderIntoDocument` choose the last overload on the
163
163
  // subtype-relation pass and get an undesirably broad return type. Using `P`
@@ -194,7 +194,7 @@ export function isElementOfType<P extends DOMAttributes<{}>, T extends Element>(
194
194
  * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
195
195
  */
196
196
  export function isElementOfType<P>(
197
- element: ReactElement, type: SFC<P>): element is SFCElement<P>;
197
+ element: ReactElement, type: SFC<P>): element is FunctionComponentElement<P>;
198
198
  /**
199
199
  * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
200
200
  */