@types/react 16.14.13 → 16.14.14

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 v16.14/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 11 Aug 2021 02:31:26 GMT
11
+ * Last updated: Thu, 19 Aug 2021 05:01:20 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 v16.14/index.d.ts CHANGED
@@ -837,6 +837,14 @@ declare namespace React {
837
837
  type ComponentPropsWithoutRef<T extends ElementType> =
838
838
  PropsWithoutRef<ComponentProps<T>>;
839
839
 
840
+ type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<
841
+ ComponentPropsWithoutRef<T> & RefAttributes<infer Method>
842
+ >
843
+ ? Method
844
+ : ComponentPropsWithRef<T> extends RefAttributes<infer Method>
845
+ ? Method
846
+ : never;
847
+
840
848
  // will show `Memo(${Component.displayName || Component.name})` in devtools by default,
841
849
  // but can be given its own specific name
842
850
  type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "16.14.13",
3
+ "version": "16.14.14",
4
4
  "description": "TypeScript definitions for React",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -146,6 +146,6 @@
146
146
  "@types/scheduler": "*",
147
147
  "csstype": "^3.0.2"
148
148
  },
149
- "typesPublisherContentHash": "b0b4db789c3cd1509ed29a45ccc5747be294126653c986aa6221194973e309e9",
149
+ "typesPublisherContentHash": "4adb71c817bf881c0d107ac591ff08689f4d02eeab3c0ae94d504117d6a54f45",
150
150
  "typeScriptVersion": "3.6"
151
151
  }