@types/react 16.14.21 → 16.14.24
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 +1 -1
- react v16.14/index.d.ts +5 -13
- react v16.14/package.json +3 -3
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:
|
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 v16.14/index.d.ts
CHANGED
@@ -557,8 +557,10 @@ declare namespace React {
|
|
557
557
|
displayName?: string | undefined;
|
558
558
|
}
|
559
559
|
|
560
|
+
type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;
|
561
|
+
|
560
562
|
interface ForwardRefRenderFunction<T, P = {}> {
|
561
|
-
(props: PropsWithChildren<P>, ref:
|
563
|
+
(props: PropsWithChildren<P>, ref: ForwardedRef<T>): ReactElement | null;
|
562
564
|
displayName?: string | undefined;
|
563
565
|
// explicit rejected with `never` required due to
|
564
566
|
// https://github.com/microsoft/TypeScript/issues/36826
|
@@ -1105,18 +1107,6 @@ declare namespace React {
|
|
1105
1107
|
/**
|
1106
1108
|
* `useMemo` will only recompute the memoized value when one of the `deps` has changed.
|
1107
1109
|
*
|
1108
|
-
* Usage note: if calling `useMemo` with a referentially stable function, also give it as the input in
|
1109
|
-
* the second argument.
|
1110
|
-
*
|
1111
|
-
* ```ts
|
1112
|
-
* function expensive () { ... }
|
1113
|
-
*
|
1114
|
-
* function Component () {
|
1115
|
-
* const expensiveResult = useMemo(expensive, [expensive])
|
1116
|
-
* return ...
|
1117
|
-
* }
|
1118
|
-
* ```
|
1119
|
-
*
|
1120
1110
|
* @version 16.8.0
|
1121
1111
|
* @see https://reactjs.org/docs/hooks-reference.html#usememo
|
1122
1112
|
*/
|
@@ -1398,7 +1388,9 @@ declare namespace React {
|
|
1398
1388
|
// Keyboard Events
|
1399
1389
|
onKeyDown?: KeyboardEventHandler<T> | undefined;
|
1400
1390
|
onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
|
1391
|
+
/** @deprecated */
|
1401
1392
|
onKeyPress?: KeyboardEventHandler<T> | undefined;
|
1393
|
+
/** @deprecated */
|
1402
1394
|
onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
|
1403
1395
|
onKeyUp?: KeyboardEventHandler<T> | undefined;
|
1404
1396
|
onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
|
react v16.14/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "16.14.
|
3
|
+
"version": "16.14.24",
|
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": "
|
150
|
-
"typeScriptVersion": "3.
|
149
|
+
"typesPublisherContentHash": "b4ab2b34ee2fcd2358cef81a04a4ced6e35dfacb16f3c73e414ebdc0e40dd6b7",
|
150
|
+
"typeScriptVersion": "3.9"
|
151
151
|
}
|