@types/react 17.0.37 → 17.0.40

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/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, 24 Nov 2021 21:01:04 GMT
11
+ * Last updated: Thu, 10 Mar 2022 06:01:44 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/experimental.d.ts CHANGED
@@ -93,12 +93,4 @@ declare module '.' {
93
93
  * @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
94
94
  */
95
95
  export const SuspenseList: ExoticComponent<SuspenseListProps>;
96
-
97
- /**
98
- * @param effect Imperative function that can return a cleanup function
99
- * @param deps If present, effect will only activate if the values in the list change.
100
- *
101
- * @see https://github.com/facebook/react/pull/21913
102
- */
103
- export function unstable_useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void;
104
96
  }
react/index.d.ts CHANGED
@@ -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/next.d.ts CHANGED
@@ -125,6 +125,14 @@ declare module '.' {
125
125
  */
126
126
  export function unstable_useMutableSource<T, TResult extends unknown>(MutableSource: MutableSource<T>, getSnapshot: (source: T) => TResult, subscribe: MutableSourceSubscribe<T>): TResult;
127
127
 
128
+ /**
129
+ * @param effect Imperative function that can return a cleanup function
130
+ * @param deps If present, effect will only activate if the values in the list change.
131
+ *
132
+ * @see https://github.com/facebook/react/pull/21913
133
+ */
134
+ export function useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void;
135
+
128
136
  /**
129
137
  * @param subscribe
130
138
  * @param getSnapshot
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "17.0.37",
3
+ "version": "17.0.40",
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": "91aa69834e615fe0e64009b964243f620503bdaf0c74f0a35b07b7f35b0f8de4",
150
- "typeScriptVersion": "3.8"
149
+ "typesPublisherContentHash": "41af2d2aecf23e961c474c9ea078372f475aab83799fd8155ad7447b68ecaca6",
150
+ "typeScriptVersion": "3.9"
151
151
  }