@types/react 16.14.22 → 16.14.25
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 +6 -14
- 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: Thu,
|
11
|
+
* Last updated: Thu, 14 Apr 2022 07:01:23 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
@@ -1107,18 +1107,6 @@ declare namespace React {
|
|
1107
1107
|
/**
|
1108
1108
|
* `useMemo` will only recompute the memoized value when one of the `deps` has changed.
|
1109
1109
|
*
|
1110
|
-
* Usage note: if calling `useMemo` with a referentially stable function, also give it as the input in
|
1111
|
-
* the second argument.
|
1112
|
-
*
|
1113
|
-
* ```ts
|
1114
|
-
* function expensive () { ... }
|
1115
|
-
*
|
1116
|
-
* function Component () {
|
1117
|
-
* const expensiveResult = useMemo(expensive, [expensive])
|
1118
|
-
* return ...
|
1119
|
-
* }
|
1120
|
-
* ```
|
1121
|
-
*
|
1122
1110
|
* @version 16.8.0
|
1123
1111
|
* @see https://reactjs.org/docs/hooks-reference.html#usememo
|
1124
1112
|
*/
|
@@ -1400,7 +1388,9 @@ declare namespace React {
|
|
1400
1388
|
// Keyboard Events
|
1401
1389
|
onKeyDown?: KeyboardEventHandler<T> | undefined;
|
1402
1390
|
onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
|
1391
|
+
/** @deprecated */
|
1403
1392
|
onKeyPress?: KeyboardEventHandler<T> | undefined;
|
1393
|
+
/** @deprecated */
|
1404
1394
|
onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
|
1405
1395
|
onKeyUp?: KeyboardEventHandler<T> | undefined;
|
1406
1396
|
onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
|
@@ -3060,6 +3050,8 @@ type MergePropTypes<P, T> =
|
|
3060
3050
|
& Pick<P, Exclude<keyof P, keyof T>>
|
3061
3051
|
: never;
|
3062
3052
|
|
3053
|
+
type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
|
3054
|
+
|
3063
3055
|
// Any prop that has a default prop becomes optional, but its type is unchanged
|
3064
3056
|
// Undeclared default props are augmented into the resulting allowable attributes
|
3065
3057
|
// If declared props have indexed properties, ignore default props entirely as keyof gets widened
|
@@ -3067,8 +3059,8 @@ type MergePropTypes<P, T> =
|
|
3067
3059
|
type Defaultize<P, D> = P extends any
|
3068
3060
|
? string extends keyof P ? P :
|
3069
3061
|
& Pick<P, Exclude<keyof P, keyof D>>
|
3070
|
-
&
|
3071
|
-
&
|
3062
|
+
& InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
|
3063
|
+
& InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
|
3072
3064
|
: never;
|
3073
3065
|
|
3074
3066
|
type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
|
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.25",
|
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": "918da6a3d1987104bdd4cc436eadd7e2a98d5a2b4791ed9b200a239b09848834",
|
150
|
+
"typeScriptVersion": "3.9"
|
151
151
|
}
|