@types/react 16.14.24 → 16.14.27
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/global.d.ts +2 -0
- react v16.14/index.d.ts +9 -3
- 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, 16 Jun 2022 09:31:35 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/global.d.ts
CHANGED
react v16.14/index.d.ts
CHANGED
@@ -1340,7 +1340,9 @@ declare namespace React {
|
|
1340
1340
|
interface DOMAttributes<T> {
|
1341
1341
|
children?: ReactNode | undefined;
|
1342
1342
|
dangerouslySetInnerHTML?: {
|
1343
|
-
|
1343
|
+
// Should be InnerHTML['innerHTML'].
|
1344
|
+
// But unfortunately we're mixing renderer-specific type declarations.
|
1345
|
+
__html: string | TrustedHTML;
|
1344
1346
|
} | undefined;
|
1345
1347
|
|
1346
1348
|
// Clipboard Events
|
@@ -2084,6 +2086,8 @@ declare namespace React {
|
|
2084
2086
|
}
|
2085
2087
|
|
2086
2088
|
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
2089
|
+
onCancel?: ReactEventHandler<T> | undefined;
|
2090
|
+
onClose?: ReactEventHandler<T> | undefined;
|
2087
2091
|
open?: boolean | undefined;
|
2088
2092
|
}
|
2089
2093
|
|
@@ -3050,6 +3054,8 @@ type MergePropTypes<P, T> =
|
|
3050
3054
|
& Pick<P, Exclude<keyof P, keyof T>>
|
3051
3055
|
: never;
|
3052
3056
|
|
3057
|
+
type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
|
3058
|
+
|
3053
3059
|
// Any prop that has a default prop becomes optional, but its type is unchanged
|
3054
3060
|
// Undeclared default props are augmented into the resulting allowable attributes
|
3055
3061
|
// If declared props have indexed properties, ignore default props entirely as keyof gets widened
|
@@ -3057,8 +3063,8 @@ type MergePropTypes<P, T> =
|
|
3057
3063
|
type Defaultize<P, D> = P extends any
|
3058
3064
|
? string extends keyof P ? P :
|
3059
3065
|
& Pick<P, Exclude<keyof P, keyof D>>
|
3060
|
-
&
|
3061
|
-
&
|
3066
|
+
& InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
|
3067
|
+
& InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
|
3062
3068
|
: never;
|
3063
3069
|
|
3064
3070
|
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.27",
|
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": "
|
149
|
+
"typesPublisherContentHash": "8e79f37f18ad90fa09417755c57d90d2729abd3a19a2d183cf021d9647fbf524",
|
150
|
+
"typeScriptVersion": "4.0"
|
151
151
|
}
|