@types/react-dom 16.8.4 → 16.9.2
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 +3 -3
- react-dom/index.d.ts +31 -1
- react-dom/package.json +2 -2
- react-dom/test-utils/index.d.ts +4 -7
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) (
|
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:
|
11
|
+
* Last updated: Mon, 14 Oct 2019 20:17:00 GMT
|
12
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>, 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>.
|
react-dom/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Type definitions for React (react-dom) 16.
|
1
|
+
// Type definitions for React (react-dom) 16.9
|
2
2
|
// Project: http://facebook.github.io/react/
|
3
3
|
// Definitions by: Asana <https://asana.com>
|
4
4
|
// AssureSign <http://www.assuresign.com>
|
@@ -92,3 +92,33 @@ export interface Renderer {
|
|
92
92
|
callback?: () => void
|
93
93
|
): Component<any, ComponentState> | Element | void;
|
94
94
|
}
|
95
|
+
|
96
|
+
export interface Work {
|
97
|
+
then(onCommit?: () => void): void;
|
98
|
+
}
|
99
|
+
|
100
|
+
export interface Batch {
|
101
|
+
commit(): void;
|
102
|
+
render(children: React.ReactNode): Work;
|
103
|
+
then(onComplete?: () => void): void;
|
104
|
+
}
|
105
|
+
|
106
|
+
export interface RootOptions {
|
107
|
+
hydrate?: boolean;
|
108
|
+
}
|
109
|
+
|
110
|
+
export interface SyncRoot {
|
111
|
+
render(children: React.ReactNode, callback?: () => void): Work;
|
112
|
+
unmount(callback?: () => void): void;
|
113
|
+
}
|
114
|
+
|
115
|
+
export function unstable_createSyncRoot(container: Element, options?: RootOptions): SyncRoot;
|
116
|
+
|
117
|
+
export interface Root extends SyncRoot {
|
118
|
+
createBatch(): Batch;
|
119
|
+
}
|
120
|
+
|
121
|
+
export function unstable_createRoot(
|
122
|
+
container: Element,
|
123
|
+
options?: RootOptions
|
124
|
+
): Root;
|
react-dom/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react-dom",
|
3
|
-
"version": "16.
|
3
|
+
"version": "16.9.2",
|
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": "
|
46
|
+
"typesPublisherContentHash": "897ba71f8211baa5df942d6e63bea8ce5f8ed8e500763b5cca5416b832fcb11c",
|
47
47
|
"typeScriptVersion": "2.8"
|
48
48
|
}
|
react-dom/test-utils/index.d.ts
CHANGED
@@ -67,10 +67,6 @@ export interface ShallowRenderer {
|
|
67
67
|
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
68
68
|
*/
|
69
69
|
getRenderOutput<E extends ReactElement>(): E;
|
70
|
-
/**
|
71
|
-
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
72
|
-
*/
|
73
|
-
getRenderOutput(): ReactElement;
|
74
70
|
/**
|
75
71
|
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
76
72
|
*/
|
@@ -291,9 +287,10 @@ export function createRenderer(): ShallowRenderer;
|
|
291
287
|
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
|
292
288
|
*/
|
293
289
|
// the "void | undefined" is here to forbid any sneaky "Promise" returns.
|
294
|
-
|
295
|
-
//
|
296
|
-
|
290
|
+
export function act(callback: () => void | undefined): DebugPromiseLike;
|
291
|
+
// the "void | undefined" is here to forbid any sneaky return values
|
292
|
+
// tslint:disable-next-line: void-return
|
293
|
+
export function act(callback: () => Promise<void | undefined>): Promise<undefined>;
|
297
294
|
|
298
295
|
// Intentionally doesn't extend PromiseLike<never>.
|
299
296
|
// Ideally this should be as hard to accidentally use as possible.
|