@types/react 18.0.27 → 18.0.28

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.
Files changed (3) hide show
  1. react/README.md +1 -1
  2. react/index.d.ts +2 -2
  3. react/package.json +2 -2
react/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (http://facebook.github.io/reac
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 18 Jan 2023 19:02:49 GMT
11
+ * Last updated: Sat, 11 Feb 2023 11:32:31 GMT
12
12
  * Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
13
13
  * Global values: `React`
14
14
 
react/index.d.ts CHANGED
@@ -782,10 +782,10 @@ declare namespace React {
782
782
 
783
783
  /** Ensures that the props do not include ref at all */
784
784
  type PropsWithoutRef<P> =
785
- // Pick would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
785
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
786
786
  // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
787
787
  // https://github.com/Microsoft/TypeScript/issues/28339
788
- P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;
788
+ P extends any ? ('ref' extends keyof P ? Omit<P, 'ref'> : P) : P;
789
789
  /** Ensures that the props do not include string ref, which cannot be forwarded */
790
790
  type PropsWithRef<P> =
791
791
  // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.0.27",
3
+ "version": "18.0.28",
4
4
  "description": "TypeScript definitions for React",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -151,7 +151,7 @@
151
151
  "@types/scheduler": "*",
152
152
  "csstype": "^3.0.2"
153
153
  },
154
- "typesPublisherContentHash": "9fe92d5e956ab2c31da7ffe14998f63a047b60ad3535ea9d4c629616fe5f512d",
154
+ "typesPublisherContentHash": "e076890b68b7d34ef2996e940b3e58ca0dcc845e64518f22023dbdd3b6f6a8bd",
155
155
  "typeScriptVersion": "4.2",
156
156
  "exports": {
157
157
  ".": {