@types/react 17.0.38 → 17.0.41

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 +3 -13
  3. react/package.json +3 -3
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: Thu, 23 Dec 2021 09:01:24 GMT
11
+ * Last updated: Sat, 19 Mar 2022 07:31:41 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
@@ -88,7 +88,7 @@ declare namespace React {
88
88
  interface RefObject<T> {
89
89
  readonly current: T | null;
90
90
  }
91
- type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
91
+ type RefCallback<T> = (instance: T | null) => void;
92
92
  type Ref<T> = RefCallback<T> | RefObject<T> | null;
93
93
  type LegacyRef<T> = string | Ref<T>;
94
94
  /**
@@ -1113,18 +1113,6 @@ declare namespace React {
1113
1113
  /**
1114
1114
  * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1115
1115
  *
1116
- * Usage note: if calling `useMemo` with a referentially stable function, also give it as the input in
1117
- * the second argument.
1118
- *
1119
- * ```ts
1120
- * function expensive () { ... }
1121
- *
1122
- * function Component () {
1123
- * const expensiveResult = useMemo(expensive, [expensive])
1124
- * return ...
1125
- * }
1126
- * ```
1127
- *
1128
1116
  * @version 16.8.0
1129
1117
  * @see https://reactjs.org/docs/hooks-reference.html#usememo
1130
1118
  */
@@ -1406,7 +1394,9 @@ declare namespace React {
1406
1394
  // Keyboard Events
1407
1395
  onKeyDown?: KeyboardEventHandler<T> | undefined;
1408
1396
  onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
1397
+ /** @deprecated */
1409
1398
  onKeyPress?: KeyboardEventHandler<T> | undefined;
1399
+ /** @deprecated */
1410
1400
  onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
1411
1401
  onKeyUp?: KeyboardEventHandler<T> | undefined;
1412
1402
  onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "17.0.38",
3
+ "version": "17.0.41",
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": "1015b508f5c5489fee390a311f2806cc4363420c3aa9b2e66226ce23c4b0c9d9",
150
- "typeScriptVersion": "3.8"
149
+ "typesPublisherContentHash": "3fe0b970275e3e20681098696740b1d560c44b5a38a62bcb14a909650b93e0b5",
150
+ "typeScriptVersion": "3.9"
151
151
  }