@types/react 18.0.4 → 18.0.5
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 +1 -1
- react/index.d.ts +4 -2
- react/package.json +2 -2
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:
|
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/index.d.ts
CHANGED
@@ -3088,6 +3088,8 @@ type MergePropTypes<P, T> =
|
|
3088
3088
|
& Pick<P, Exclude<keyof P, keyof T>>
|
3089
3089
|
: never;
|
3090
3090
|
|
3091
|
+
type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
|
3092
|
+
|
3091
3093
|
// Any prop that has a default prop becomes optional, but its type is unchanged
|
3092
3094
|
// Undeclared default props are augmented into the resulting allowable attributes
|
3093
3095
|
// If declared props have indexed properties, ignore default props entirely as keyof gets widened
|
@@ -3095,8 +3097,8 @@ type MergePropTypes<P, T> =
|
|
3095
3097
|
type Defaultize<P, D> = P extends any
|
3096
3098
|
? string extends keyof P ? P :
|
3097
3099
|
& Pick<P, Exclude<keyof P, keyof D>>
|
3098
|
-
&
|
3099
|
-
&
|
3100
|
+
& InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
|
3101
|
+
& InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
|
3100
3102
|
: never;
|
3101
3103
|
|
3102
3104
|
type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.0.
|
3
|
+
"version": "18.0.5",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,7 +146,7 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
149
|
+
"typesPublisherContentHash": "7a47bc7effee7ef102e1fab4d1b9150cf19fde731dec26d7af2c1b3395c51d7b",
|
150
150
|
"typeScriptVersion": "3.9",
|
151
151
|
"exports": {
|
152
152
|
".": {
|