@types/react-dom 18.0.9 → 18.0.11

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 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: Mon, 14 Nov 2022 19:02:54 GMT
11
+ * Last updated: Wed, 15 Feb 2023 00:32:43 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMServer`
14
14
 
react-dom/index.d.ts CHANGED
@@ -34,9 +34,8 @@ export const hydrate: Renderer;
34
34
  export function flushSync<R>(fn: () => R): R;
35
35
  export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
36
36
 
37
- export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
38
- export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
39
- export function unstable_batchedUpdates(callback: () => any): void;
37
+ export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
38
+ export function unstable_batchedUpdates<R>(callback: () => R): R;
40
39
 
41
40
  export function unstable_renderSubtreeIntoContainer<T extends Element>(
42
41
  parentComponent: Component<any>,
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "18.0.9",
3
+ "version": "18.0.11",
4
4
  "description": "TypeScript definitions for React (react-dom)",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
6
6
  "license": "MIT",
@@ -49,8 +49,8 @@
49
49
  "dependencies": {
50
50
  "@types/react": "*"
51
51
  },
52
- "typesPublisherContentHash": "cd6b929df8ab56cee31a0dbc7754005b8e59121ffc6cb470717c0feff49d2ece",
53
- "typeScriptVersion": "4.1",
52
+ "typesPublisherContentHash": "27673d88deb3e7d51dc603fbb3668e21b0cc902c4ff84b6a84de98fd74ad8ce0",
53
+ "typeScriptVersion": "4.2",
54
54
  "exports": {
55
55
  ".": {
56
56
  "types": {
@@ -298,8 +298,9 @@ export function createRenderer(): ShallowRenderer;
298
298
  declare const UNDEFINED_VOID_ONLY: unique symbol;
299
299
  // tslint:disable-next-line: void-return
300
300
  type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
301
+ // While act does always return Thenable, if a void function is passed, we pretend the return value is also void to not trigger dangling Promise lint rules.
302
+ export function act(callback: () => VoidOrUndefinedOnly): void;
301
303
  export function act<T>(callback: () => T | Promise<T>): Promise<T>;
302
- export function act(callback: () => VoidOrUndefinedOnly): Promise<void>;
303
304
 
304
305
  // Intentionally doesn't extend PromiseLike<never>.
305
306
  // Ideally this should be as hard to accidentally use as possible.