@types/react 16.9.35 → 16.9.36
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 +10 -13
- react/package.json +3 -3
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: Wed, 10 Jun 2020 09:08:56 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types)
|
13
13
|
* Global values: `React`
|
14
14
|
|
react/index.d.ts
CHANGED
@@ -113,19 +113,16 @@ declare namespace React {
|
|
113
113
|
| { new (props: any): Component<any> }
|
114
114
|
| ((props: any, context?: any) => ReactElement | null)
|
115
115
|
| keyof JSX.IntrinsicElements
|
116
|
-
> =
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
? E
|
127
|
-
: never
|
128
|
-
: never;
|
116
|
+
> =
|
117
|
+
// need to check first if `ref` is a valid prop for ts@3.0
|
118
|
+
// otherwise it will infer `{}` instead of `never`
|
119
|
+
"ref" extends keyof ComponentPropsWithRef<C>
|
120
|
+
? NonNullable<ComponentPropsWithRef<C>["ref"]> extends Ref<
|
121
|
+
infer Instance
|
122
|
+
>
|
123
|
+
? Instance
|
124
|
+
: never
|
125
|
+
: never;
|
129
126
|
|
130
127
|
type ComponentState = any;
|
131
128
|
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "16.9.
|
3
|
+
"version": "16.9.36",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -139,6 +139,6 @@
|
|
139
139
|
"@types/prop-types": "*",
|
140
140
|
"csstype": "^2.2.0"
|
141
141
|
},
|
142
|
-
"typesPublisherContentHash": "
|
143
|
-
"typeScriptVersion": "
|
142
|
+
"typesPublisherContentHash": "a9a771c9ca1959d5f2d2aad48302b48ee78d517dcbe73e31674304f9ed986e0f",
|
143
|
+
"typeScriptVersion": "3.0"
|
144
144
|
}
|