@types/react 16.8.5 → 16.8.6
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 +7 -3
- react/package.json +2 -2
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React ( http://facebook.github.io/rea
|
|
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, 28 Feb 2019 18:34:58 GMT
|
12
12
|
* Dependencies: @types/csstype, @types/prop-types
|
13
13
|
* Global values: React
|
14
14
|
|
react/index.d.ts
CHANGED
@@ -51,11 +51,15 @@ declare namespace React {
|
|
51
51
|
// React Elements
|
52
52
|
// ----------------------------------------------------------------------
|
53
53
|
|
54
|
-
type
|
54
|
+
type ElementType<P = any> =
|
55
55
|
{
|
56
56
|
[K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never
|
57
57
|
}[keyof JSX.IntrinsicElements] |
|
58
58
|
ComponentType<P>;
|
59
|
+
/**
|
60
|
+
* @deprecated Please use `ElementType`
|
61
|
+
*/
|
62
|
+
type ReactType<P = any> = ElementType<P>;
|
59
63
|
type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
|
60
64
|
|
61
65
|
type JSXElementConstructor<P> =
|
@@ -734,11 +738,11 @@ declare namespace React {
|
|
734
738
|
: T extends keyof JSX.IntrinsicElements
|
735
739
|
? JSX.IntrinsicElements[T]
|
736
740
|
: {};
|
737
|
-
type ComponentPropsWithRef<T extends
|
741
|
+
type ComponentPropsWithRef<T extends ElementType> =
|
738
742
|
T extends ComponentClass<infer P>
|
739
743
|
? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
|
740
744
|
: PropsWithRef<ComponentProps<T>>;
|
741
|
-
type ComponentPropsWithoutRef<T extends
|
745
|
+
type ComponentPropsWithoutRef<T extends ElementType> =
|
742
746
|
PropsWithoutRef<ComponentProps<T>>;
|
743
747
|
|
744
748
|
// will show `Memo(${Component.displayName || Component.name})` in devtools by default,
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "16.8.
|
3
|
+
"version": "16.8.6",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -119,6 +119,6 @@
|
|
119
119
|
"@types/prop-types": "*",
|
120
120
|
"csstype": "^2.2.0"
|
121
121
|
},
|
122
|
-
"typesPublisherContentHash": "
|
122
|
+
"typesPublisherContentHash": "e0bac5fa4fa2eda491c0e39dee87312b3907670d76b8d32168002822578bfaa1",
|
123
123
|
"typeScriptVersion": "2.8"
|
124
124
|
}
|