@types/react-dom 16.0.11 → 16.8.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 +4 -4
- react-dom/index.d.ts +2 -1
- react-dom/package.json +7 -2
- react-dom/test-utils/index.d.ts +23 -0
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) ( http://facebook.github.io/react/ ).
|
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:
|
12
|
-
* Dependencies: react
|
11
|
+
* Last updated: Wed, 06 Feb 2019 12:44:09 GMT
|
12
|
+
* Dependencies: @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>.
|
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>.
|
react-dom/index.d.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
// Type definitions for React (react-dom) 16.
|
1
|
+
// Type definitions for React (react-dom) 16.8
|
2
2
|
// Project: http://facebook.github.io/react/
|
3
3
|
// Definitions by: Asana <https://asana.com>
|
4
4
|
// AssureSign <http://www.assuresign.com>
|
5
5
|
// Microsoft <https://microsoft.com>
|
6
6
|
// MartynasZilinskas <https://github.com/MartynasZilinskas>
|
7
7
|
// Josh Rutherford <https://github.com/theruther4d>
|
8
|
+
// Jessica Franco <https://github.com/Jessidhia>
|
8
9
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
9
10
|
// TypeScript Version: 2.8
|
10
11
|
|
react-dom/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react-dom",
|
3
|
-
"version": "16.0
|
3
|
+
"version": "16.8.0",
|
4
4
|
"description": "TypeScript definitions for React (react-dom)",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -25,6 +25,11 @@
|
|
25
25
|
"name": "Josh Rutherford",
|
26
26
|
"url": "https://github.com/theruther4d",
|
27
27
|
"githubUsername": "theruther4d"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"name": "Jessica Franco",
|
31
|
+
"url": "https://github.com/Jessidhia",
|
32
|
+
"githubUsername": "Jessidhia"
|
28
33
|
}
|
29
34
|
],
|
30
35
|
"main": "",
|
@@ -37,6 +42,6 @@
|
|
37
42
|
"dependencies": {
|
38
43
|
"@types/react": "*"
|
39
44
|
},
|
40
|
-
"typesPublisherContentHash": "
|
45
|
+
"typesPublisherContentHash": "b994ac5eaa6eee18cef16c10c5734b4831ad0c2a141f32fa1bbffef28edd6bc0",
|
41
46
|
"typeScriptVersion": "2.8"
|
42
47
|
}
|
react-dom/test-utils/index.d.ts
CHANGED
@@ -278,3 +278,26 @@ export function findRenderedComponentWithType<T extends Component<any>, C extend
|
|
278
278
|
* Call this in your tests to create a shallow renderer.
|
279
279
|
*/
|
280
280
|
export function createRenderer(): ShallowRenderer;
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Wrap any code rendering and triggering updates to your components into `act()` calls.
|
284
|
+
*
|
285
|
+
* Ensures that the behavior in your tests matches what happens in the browser
|
286
|
+
* more closely by executing pending `useEffect`s before returning. This also
|
287
|
+
* reduces the amount of re-renders done.
|
288
|
+
*
|
289
|
+
* @param callback A synchronous, void callback that will execute as a single, complete React commit.
|
290
|
+
*
|
291
|
+
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
|
292
|
+
*/
|
293
|
+
// the "void | undefined" is here to forbid any sneaky "Promise" returns.
|
294
|
+
// the actual return value is always a "DebugPromiseLike",
|
295
|
+
// but having an "| {}" makes it harder to accidentally use.
|
296
|
+
export function act(callback: () => void | undefined): DebugPromiseLike | {};
|
297
|
+
|
298
|
+
// Intentionally doesn't extend PromiseLike<never>.
|
299
|
+
// Ideally this should be as hard to accidentally use as possible.
|
300
|
+
export interface DebugPromiseLike {
|
301
|
+
// the actual then() in here is 0-ary, but that doesn't count as a PromiseLike.
|
302
|
+
then(onfulfilled: (value: never) => never, onrejected: (reason: never) => never): never;
|
303
|
+
}
|