@types/react-dom 17.0.13 → 17.0.16

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.
File without changes
@@ -5,12 +5,12 @@
5
5
  This package contains type definitions for React (react-dom) (https://reactjs.org).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom/v17.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 02 Mar 2022 17:31:50 GMT
11
+ * Last updated: Mon, 25 Apr 2022 17:31:39 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).
@@ -10,14 +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
- // NOTE: Users of the `experimental` builds of React should add a reference
18
- // to 'react-dom/experimental' in their project. See experimental.d.ts's top comment
19
- // for reference and documentation on how exactly to do it.
20
-
21
13
  export as namespace ReactDOM;
22
14
 
23
15
  import {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.13",
3
+ "version": "17.0.16",
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",
@@ -47,8 +47,8 @@
47
47
  },
48
48
  "scripts": {},
49
49
  "dependencies": {
50
- "@types/react": "*"
50
+ "@types/react": "^17"
51
51
  },
52
- "typesPublisherContentHash": "9f236d9f702478c35871d7dcccc813fde4bde453f13b533e8aea63c02839c874",
52
+ "typesPublisherContentHash": "01def40e11decb890e1f5efb47277a78dbfcd39f8170057a2f95021e09745004",
53
53
  "typeScriptVersion": "3.9"
54
54
  }
File without changes
@@ -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
  */
react-dom/client.d.ts DELETED
@@ -1,42 +0,0 @@
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
- onHydrated?(suspenseInstance: Comment): void;
10
- onDeleted?(suspenseInstance: Comment): void;
11
- /**
12
- * Prefix for `useId`.
13
- */
14
- identifierPrefix?: string;
15
- onRecoverableError?: (error: unknown) => void;
16
- }
17
-
18
- export interface RootOptions {
19
- /**
20
- * Prefix for `useId`.
21
- */
22
- identifierPrefix?: string;
23
- onRecoverableError?: (error: unknown) => void;
24
- }
25
-
26
- export interface Root {
27
- render(children: React.ReactChild | Iterable<React.ReactNode>): void;
28
- unmount(): void;
29
- }
30
-
31
- /**
32
- * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
33
- *
34
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
35
- */
36
- export function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
37
-
38
- export function hydrateRoot(
39
- container: Element | Document | DocumentFragment | Comment,
40
- initialChildren: React.ReactChild | Iterable<React.ReactNode>,
41
- options?: HydrationOptions,
42
- ): Root;
@@ -1,45 +0,0 @@
1
- /**
2
- * These are types for things that are present in the `experimental` builds of React but not yet
3
- * on a stable build.
4
- *
5
- * Once they are promoted to stable they can just be moved to the main index file.
6
- *
7
- * To load the types declared here in an actual project, there are three ways. The easiest one,
8
- * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
9
- * is to add `"react-dom/experimental"` to the `"types"` array.
10
- *
11
- * Alternatively, a specific import syntax can to be used from a typescript file.
12
- * This module does not exist in reality, which is why the {} is important:
13
- *
14
- * ```ts
15
- * import {} from 'react-dom/experimental'
16
- * ```
17
- *
18
- * It is also possible to include it through a triple-slash reference:
19
- *
20
- * ```ts
21
- * /// <reference types="react-dom/experimental" />
22
- * ```
23
- *
24
- * Either the import or the reference only needs to appear once, anywhere in the project.
25
- */
26
-
27
- // See https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOM.js to see how the exports are declared,
28
- // and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
29
- // flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
30
-
31
- import React = require('react');
32
- import ReactDOM = require('./next');
33
-
34
- export {};
35
-
36
- declare module '.' {
37
- function unstable_flushControlled(callback: () => void): void;
38
-
39
- // enableSelectiveHydration feature
40
-
41
- /**
42
- * @see https://github.com/facebook/react/commit/3a2b5f148d450c69aab67f055fc441d294c23518
43
- */
44
- function unstable_scheduleHydration(target: Element | Document | DocumentFragment | Comment): void;
45
- }
react-dom/next.d.ts DELETED
@@ -1,33 +0,0 @@
1
- /**
2
- * These are types for things that are present in the upcoming React 18 release.
3
- *
4
- * Once React 18 is released they can just be moved to the main index file.
5
- *
6
- * To load the types declared here in an actual project, there are three ways. The easiest one,
7
- * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
8
- * is to add `"react-dom/next"` to the `"types"` array.
9
- *
10
- * Alternatively, a specific import syntax can to be used from a typescript file.
11
- * This module does not exist in reality, which is why the {} is important:
12
- *
13
- * ```ts
14
- * import {} from 'react-dom/next'
15
- * ```
16
- *
17
- * It is also possible to include it through a triple-slash reference:
18
- *
19
- * ```ts
20
- * /// <reference types="react-dom/next" />
21
- * ```
22
- *
23
- * Either the import or the reference only needs to appear once, anywhere in the project.
24
- */
25
-
26
- // See https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOM.js to see how the exports are declared,
27
-
28
- import React = require('react');
29
- import ReactDOM = require('.');
30
-
31
- export {};
32
-
33
- declare module '.' {}
@@ -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;