@types/react-dom 17.0.0 → 17.0.4
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 +0 -0
- react-dom/README.md +1 -1
- react-dom/experimental.d.ts +0 -17
- react-dom/index.d.ts +3 -0
- react-dom/node-stream/index.d.ts +0 -0
- react-dom/package.json +3 -3
- react-dom/{server/index.d.ts → server.d.ts} +0 -0
- react-dom/test-utils/index.d.ts +8 -4
react-dom/LICENSE
CHANGED
File without changes
|
react-dom/README.md
CHANGED
@@ -8,7 +8,7 @@ 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:
|
11
|
+
* Last updated: Mon, 10 May 2021 22:31:25 GMT
|
12
12
|
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
13
13
|
* Global values: `ReactDOM`, `ReactDOMNodeStream`, `ReactDOMServer`
|
14
14
|
|
react-dom/experimental.d.ts
CHANGED
@@ -52,23 +52,6 @@ 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
|
*
|
react-dom/index.d.ts
CHANGED
@@ -30,6 +30,9 @@ export const version: string;
|
|
30
30
|
export const render: Renderer;
|
31
31
|
export const hydrate: Renderer;
|
32
32
|
|
33
|
+
export function flushSync<R>(fn: () => R): R;
|
34
|
+
export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
|
35
|
+
|
33
36
|
export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
|
34
37
|
export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
|
35
38
|
export function unstable_batchedUpdates(callback: () => any): void;
|
react-dom/node-stream/index.d.ts
CHANGED
File without changes
|
react-dom/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react-dom",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.4",
|
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": "
|
47
|
-
"typeScriptVersion": "3.
|
46
|
+
"typesPublisherContentHash": "f6ef2f5cdf9e3adf7cc9fe9efc08259a2712408862af5d62dbfe1ac1dad2162d",
|
47
|
+
"typeScriptVersion": "3.5"
|
48
48
|
}
|
File without changes
|
react-dom/test-utils/index.d.ts
CHANGED
@@ -7,6 +7,8 @@ import {
|
|
7
7
|
|
8
8
|
import * as ReactTestUtils from ".";
|
9
9
|
|
10
|
+
export {};
|
11
|
+
|
10
12
|
export interface OptionalEventProperties {
|
11
13
|
bubbles?: boolean;
|
12
14
|
cancelable?: boolean;
|
@@ -288,12 +290,14 @@ export function createRenderer(): ShallowRenderer;
|
|
288
290
|
*/
|
289
291
|
// NOTES
|
290
292
|
// - the order of these signatures matters - typescript will check the signatures in source order.
|
291
|
-
// If the `() =>
|
293
|
+
// If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with
|
292
294
|
// `strictNullChecks: false`.
|
293
|
-
// -
|
295
|
+
// - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true`
|
296
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
294
297
|
// tslint:disable-next-line: void-return
|
295
|
-
|
296
|
-
export function act(callback: () => void
|
298
|
+
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
299
|
+
export function act(callback: () => Promise<void>): Promise<undefined>;
|
300
|
+
export function act(callback: () => VoidOrUndefinedOnly): void;
|
297
301
|
|
298
302
|
// Intentionally doesn't extend PromiseLike<never>.
|
299
303
|
// Ideally this should be as hard to accidentally use as possible.
|