@types/react-dom 17.0.13 → 18.0.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 CHANGED
@@ -8,9 +8,9 @@ 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, 02 Mar 2022 17:31:50 GMT
11
+ * Last updated: Thu, 07 Apr 2022 17:31:23 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
- * Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
13
+ * Global values: `ReactDOM`, `ReactDOMServer`
14
14
 
15
15
  # Credits
16
16
  These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
react-dom/client.d.ts CHANGED
@@ -6,8 +6,6 @@
6
6
 
7
7
  import React = require('react');
8
8
  export interface HydrationOptions {
9
- onHydrated?(suspenseInstance: Comment): void;
10
- onDeleted?(suspenseInstance: Comment): void;
11
9
  /**
12
10
  * Prefix for `useId`.
13
11
  */
@@ -33,10 +31,10 @@ export interface Root {
33
31
  *
34
32
  * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
35
33
  */
36
- export function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
34
+ export function createRoot(container: Element | DocumentFragment, options?: RootOptions): Root;
37
35
 
38
36
  export function hydrateRoot(
39
- container: Element | Document | DocumentFragment | Comment,
37
+ container: Element | Document,
40
38
  initialChildren: React.ReactChild | Iterable<React.ReactNode>,
41
39
  options?: HydrationOptions,
42
40
  ): Root;
react-dom/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for React (react-dom) 17.0
1
+ // Type definitions for React (react-dom) 18.0
2
2
  // Project: https://reactjs.org
3
3
  // Definitions by: Asana <https://asana.com>
4
4
  // AssureSign <http://www.assuresign.com>
@@ -10,10 +10,6 @@
10
10
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
11
11
  // TypeScript Version: 2.8
12
12
 
13
- // NOTE: Users of the upcoming React 18 release should add a reference
14
- // to 'react-dom/next' in their project. See next.d.ts's top comment
15
- // for reference and documentation on how exactly to do it.
16
-
17
13
  // NOTE: Users of the `experimental` builds of React should add a reference
18
14
  // to 'react-dom/experimental' in their project. See experimental.d.ts's top comment
19
15
  // for reference and documentation on how exactly to do it.
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.13",
3
+ "version": "18.0.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,6 +49,6 @@
49
49
  "dependencies": {
50
50
  "@types/react": "*"
51
51
  },
52
- "typesPublisherContentHash": "9f236d9f702478c35871d7dcccc813fde4bde453f13b533e8aea63c02839c874",
52
+ "typesPublisherContentHash": "9cea04e66af8b05388781f9a22be0a7fda3c5d386d03fe4bdde26a442e6e4672",
53
53
  "typeScriptVersion": "3.9"
54
54
  }
@@ -2,7 +2,7 @@ import {
2
2
  AbstractView, Component, ComponentClass,
3
3
  ReactElement, ReactInstance, ClassType,
4
4
  DOMElement, FunctionComponentElement, CElement,
5
- ReactHTMLElement, DOMAttributes, SFC
5
+ ReactHTMLElement, DOMAttributes, FC
6
6
  } from 'react';
7
7
 
8
8
  import * as ReactTestUtils from ".";
@@ -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 FunctionComponentElement<P>;
197
+ element: ReactElement, type: FC<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
  */
@@ -1,18 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /**
4
- * Render a ReactElement to its initial HTML. This should only be used on the
5
- * server.
6
- * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostream
7
- */
8
- export function renderToStream(element: ReactElement): any;
9
-
10
- /**
11
- * Similar to renderToStream, except this doesn't create extra DOM attributes
12
- * such as data-react-id that React uses internally.
13
- * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostaticstream
14
- */
15
- export function renderToStaticStream(element: ReactElement): any;
16
- export const version: string;
17
-
18
- export as namespace ReactDOMNodeStream;