@types/react-dom 16.9.5 → 16.9.9

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
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
react-dom/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
  > `npm install --save @types/react-dom`
3
3
 
4
4
  # Summary
5
- This package contains type definitions for React (react-dom) (http://facebook.github.io/react/).
5
+ This package contains type definitions for React (react-dom) (https://reactjs.org).
6
6
 
7
7
  # Details
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: Tue, 21 Jan 2020 01:00:06 GMT
11
+ * Last updated: Tue, 27 Oct 2020 19:31:41 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), and [Jessica Franco](https://github.com/Jessidhia).
@@ -64,7 +64,7 @@ declare module '.' {
64
64
  * @see https://reactjs.org/docs/concurrent-mode-adoption.html#migration-step-blocking-mode
65
65
  * @see https://reactjs.org/docs/concurrent-mode-reference.html#createblockingroot
66
66
  */
67
- function createBlockingRoot(
67
+ function unstable_createBlockingRoot(
68
68
  container: Element | Document | DocumentFragment | Comment,
69
69
  options?: RootOptions,
70
70
  ): Root;
@@ -74,22 +74,7 @@ declare module '.' {
74
74
  *
75
75
  * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
76
76
  */
77
- function createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
78
-
79
- function unstable_discreteUpdates<R>(callback: () => R): R;
80
-
81
- function unstable_discreteUpdates<R, A1>(callback: (a1: A1) => R, a1: A1): R;
82
-
83
- function unstable_discreteUpdates<R, A1, A2>(callback: (a1: A1, a2: A2) => R, a1: A1, a2: A2): R;
84
-
85
- function unstable_discreteUpdates<R, A1, A2, A3>(
86
- callback: (a1: A1, a2: A2, a3: A3) => R,
87
- a1: A1,
88
- a2: A2,
89
- a3: A3,
90
- ): R;
91
-
92
- function unstable_flushDiscreteUpdates(): void;
77
+ function unstable_createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root;
93
78
 
94
79
  function unstable_flushControlled(callback: () => void): void;
95
80
 
react-dom/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Type definitions for React (react-dom) 16.9
2
- // Project: http://facebook.github.io/react/
2
+ // Project: https://reactjs.org
3
3
  // Definitions by: Asana <https://asana.com>
4
4
  // AssureSign <http://www.assuresign.com>
5
5
  // Microsoft <https://microsoft.com>
@@ -22,7 +22,7 @@ import {
22
22
  } from 'react';
23
23
 
24
24
  export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text;
25
- export function unmountComponentAtNode(container: Element): boolean;
25
+ export function unmountComponentAtNode(container: Element | DocumentFragment): boolean;
26
26
 
27
27
  export function createPortal(children: ReactNode, container: Element, key?: null | string): ReactPortal;
28
28
 
@@ -56,43 +56,43 @@ export interface Renderer {
56
56
 
57
57
  <T extends Element>(
58
58
  element: DOMElement<DOMAttributes<T>, T>,
59
- container: Element | null,
59
+ container: Element | DocumentFragment | null,
60
60
  callback?: () => void
61
61
  ): T;
62
62
 
63
63
  (
64
64
  element: Array<DOMElement<DOMAttributes<any>, any>>,
65
- container: Element | null,
65
+ container: Element | DocumentFragment | null,
66
66
  callback?: () => void
67
67
  ): Element;
68
68
 
69
69
  (
70
70
  element: SFCElement<any> | Array<SFCElement<any>>,
71
- container: Element | null,
71
+ container: Element | DocumentFragment | null,
72
72
  callback?: () => void
73
73
  ): void;
74
74
 
75
75
  <P, T extends Component<P, ComponentState>>(
76
76
  element: CElement<P, T>,
77
- container: Element | null,
77
+ container: Element | DocumentFragment | null,
78
78
  callback?: () => void
79
79
  ): T;
80
80
 
81
81
  (
82
82
  element: Array<CElement<any, Component<any, ComponentState>>>,
83
- container: Element | null,
83
+ container: Element | DocumentFragment | null,
84
84
  callback?: () => void
85
85
  ): Component<any, ComponentState>;
86
86
 
87
87
  <P>(
88
88
  element: ReactElement<P>,
89
- container: Element | null,
89
+ container: Element | DocumentFragment | null,
90
90
  callback?: () => void
91
91
  ): Component<P, ComponentState> | Element | void;
92
92
 
93
93
  (
94
94
  element: ReactElement[],
95
- container: Element | null,
95
+ container: Element | DocumentFragment | null,
96
96
  callback?: () => void
97
97
  ): Component<any, ComponentState> | Element | void;
98
98
  }
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "16.9.5",
3
+ "version": "16.9.9",
4
4
  "description": "TypeScript definitions for React (react-dom)",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -43,6 +43,6 @@
43
43
  "dependencies": {
44
44
  "@types/react": "*"
45
45
  },
46
- "typesPublisherContentHash": "95b46fb1847145bfcb046057714e66ded61e37e1450785bb1310899d6c94ecfc",
47
- "typeScriptVersion": "2.8"
46
+ "typesPublisherContentHash": "36f6fc0b0ee5b2e0826c141030cd74633e4cac4a6733196f4a946011e286f4bd",
47
+ "typeScriptVersion": "3.2"
48
48
  }
@@ -286,11 +286,14 @@ export function createRenderer(): ShallowRenderer;
286
286
  *
287
287
  * @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
288
288
  */
289
- // the "void | undefined" is here to forbid any sneaky "Promise" returns.
290
- export function act(callback: () => void | undefined): void;
291
- // the "void | undefined" is here to forbid any sneaky return values
289
+ // NOTES
290
+ // - the order of these signatures matters - typescript will check the signatures in source order.
291
+ // If the `() => void` signature is first, it'll erroneously match a Promise returning function for users with
292
+ // `strictNullChecks: false`.
293
+ // - the "void | undefined" types are there to forbid any non-void return values for users with `strictNullChecks: true`
292
294
  // tslint:disable-next-line: void-return
293
295
  export function act(callback: () => Promise<void | undefined>): Promise<undefined>;
296
+ export function act(callback: () => void | undefined): void;
294
297
 
295
298
  // Intentionally doesn't extend PromiseLike<never>.
296
299
  // Ideally this should be as hard to accidentally use as possible.