@types/react-dom 17.0.12 → 17.0.15

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,10 +5,10 @@
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: Tue, 01 Mar 2022 21:01:57 GMT
11
+ * Last updated: Thu, 07 Apr 2022 17:31:23 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
14
14
 
@@ -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 {
File without changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.12",
3
+ "version": "17.0.15",
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": "fc946accda3e64332162436943cb68c5ac37f9e9bff0c3b25bf706e0e5ab2b4a",
52
+ "typesPublisherContentHash": "2ba4656eb0610592a703a57ffab398587d12daf639cd9f7abf43c67440cef43b",
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
  */
@@ -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,69 +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 '.' {
34
- interface HydrationOptions {
35
- onHydrated?(suspenseInstance: Comment): void;
36
- onDeleted?(suspenseInstance: Comment): void;
37
- /**
38
- * Prefix for `useId`.
39
- */
40
- identifierPrefix?: string;
41
- onRecoverableError?: (error: unknown) => void;
42
- }
43
-
44
- interface RootOptions {
45
- /**
46
- * Prefix for `useId`.
47
- */
48
- identifierPrefix?: string;
49
- onRecoverableError?: (error: unknown) => void;
50
- }
51
-
52
- interface Root {
53
- render(children: React.ReactChild | Iterable<React.ReactNode>): void;
54
- unmount(): void;
55
- }
56
-
57
- /**
58
- * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
59
- *
60
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
61
- */
62
- function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
63
-
64
- function hydrateRoot(
65
- container: Element | Document | DocumentFragment | Comment,
66
- initialChildren: React.ReactChild | Iterable<React.ReactNode>,
67
- options?: HydrationOptions,
68
- ): Root;
69
- }