@types/react-dom 17.0.2 → 17.0.6

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/LICENSE CHANGED
File without changes
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: Mon, 08 Mar 2021 19:47:03 GMT
11
+ * Last updated: Wed, 02 Jun 2021 02:01:32 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
14
14
 
15
15
  # Credits
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), and [Jessica Franco](https://github.com/Jessidhia).
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).
@@ -52,29 +52,12 @@ declare module '.' {
52
52
  unmount(callback?: () => void): void;
53
53
  }
54
54
 
55
- /**
56
- * Replaces `ReactDOM.render` when the `.render` method is called and enables Blocking Mode.
57
- *
58
- * Opting into Concurrent Mode introduces semantic changes to how React works.
59
- * This means that you can’t use Concurrent Mode in just a few components.
60
- * Because of this, some apps may not be able to migrate directly to Concurrent Mode.
61
- * Blocking Mode only contains a small subset of Concurrent Mode features and is intended
62
- * as an intermediary migration step for apps that are unable to migrate directly.
63
- *
64
- * @see https://reactjs.org/docs/concurrent-mode-adoption.html#migration-step-blocking-mode
65
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#createblockingroot
66
- */
67
- function unstable_createBlockingRoot(
68
- container: Element | Document | DocumentFragment | Comment,
69
- options?: RootOptions,
70
- ): Root;
71
-
72
55
  /**
73
56
  * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
74
57
  *
75
58
  * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
76
59
  */
77
- function unstable_createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
60
+ function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
78
61
 
79
62
  function unstable_flushControlled(callback: () => void): void;
80
63
 
react-dom/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  // MartynasZilinskas <https://github.com/MartynasZilinskas>
7
7
  // Josh Rutherford <https://github.com/theruther4d>
8
8
  // Jessica Franco <https://github.com/Jessidhia>
9
+ // Sebastian Silbermann <https://github.com/eps1lon>
9
10
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
10
11
  // TypeScript Version: 2.8
11
12
 
@@ -30,6 +31,9 @@ export const version: string;
30
31
  export const render: Renderer;
31
32
  export const hydrate: Renderer;
32
33
 
34
+ export function flushSync<R>(fn: () => R): R;
35
+ export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
36
+
33
37
  export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
34
38
  export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
35
39
  export function unstable_batchedUpdates(callback: () => any): void;
@@ -50,49 +54,51 @@ export function unstable_renderSubtreeIntoContainer<P>(
50
54
  container: Element,
51
55
  callback?: (component?: Component<P, ComponentState> | Element) => any): Component<P, ComponentState> | Element | void;
52
56
 
57
+ export type Container = Element | Document | DocumentFragment;
58
+
53
59
  export interface Renderer {
54
60
  // Deprecated(render): The return value is deprecated.
55
61
  // In future releases the render function's return type will be void.
56
62
 
57
63
  <T extends Element>(
58
64
  element: DOMElement<DOMAttributes<T>, T>,
59
- container: Element | DocumentFragment | null,
65
+ container: Container| null,
60
66
  callback?: () => void
61
67
  ): T;
62
68
 
63
69
  (
64
70
  element: Array<DOMElement<DOMAttributes<any>, any>>,
65
- container: Element | DocumentFragment | null,
71
+ container: Container| null,
66
72
  callback?: () => void
67
73
  ): Element;
68
74
 
69
75
  (
70
76
  element: SFCElement<any> | Array<SFCElement<any>>,
71
- container: Element | DocumentFragment | null,
77
+ container: Container| null,
72
78
  callback?: () => void
73
79
  ): void;
74
80
 
75
81
  <P, T extends Component<P, ComponentState>>(
76
82
  element: CElement<P, T>,
77
- container: Element | DocumentFragment | null,
83
+ container: Container| null,
78
84
  callback?: () => void
79
85
  ): T;
80
86
 
81
87
  (
82
88
  element: Array<CElement<any, Component<any, ComponentState>>>,
83
- container: Element | DocumentFragment | null,
89
+ container: Container| null,
84
90
  callback?: () => void
85
91
  ): Component<any, ComponentState>;
86
92
 
87
93
  <P>(
88
94
  element: ReactElement<P>,
89
- container: Element | DocumentFragment | null,
95
+ container: Container| null,
90
96
  callback?: () => void
91
97
  ): Component<P, ComponentState> | Element | void;
92
98
 
93
99
  (
94
100
  element: ReactElement[],
95
- container: Element | DocumentFragment | null,
101
+ container: Container| null,
96
102
  callback?: () => void
97
103
  ): Component<any, ComponentState> | Element | void;
98
104
  }
File without changes
react-dom/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "17.0.2",
3
+ "version": "17.0.6",
4
4
  "description": "TypeScript definitions for React (react-dom)",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
5
6
  "license": "MIT",
6
7
  "contributors": [
7
8
  {
@@ -30,6 +31,11 @@
30
31
  "name": "Jessica Franco",
31
32
  "url": "https://github.com/Jessidhia",
32
33
  "githubUsername": "Jessidhia"
34
+ },
35
+ {
36
+ "name": "Sebastian Silbermann",
37
+ "url": "https://github.com/eps1lon",
38
+ "githubUsername": "eps1lon"
33
39
  }
34
40
  ],
35
41
  "main": "",
@@ -43,6 +49,6 @@
43
49
  "dependencies": {
44
50
  "@types/react": "*"
45
51
  },
46
- "typesPublisherContentHash": "5fecd821be85b1561f4b320c1586a334ea19a9e923621ae9d9c17c3fd87e3b06",
47
- "typeScriptVersion": "3.5"
52
+ "typesPublisherContentHash": "1dbc158b9cb83219a5df159ce18ad4fe94875e43b492e97065474e63882d1fe6",
53
+ "typeScriptVersion": "3.6"
48
54
  }
react-dom/server.d.ts CHANGED
File without changes
File without changes