@cloudflare/types
Advanced tools
Comparing version 1.0.46 to 1.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.1.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/types@1.0.46...@cloudflare/types@1.1.0) (2019-07-29) | ||
### Features | ||
* **types:** TSX-133 Add ReduxConnectedProps type and connected componen ([d18e7f3](http://stash.cfops.it:7999/fe/stratus/commits/d18e7f3)) | ||
## [1.0.46](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/types@1.0.45...@cloudflare/types@1.0.46) (2019-07-21) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@cloudflare/types", | ||
"description": "", | ||
"version": "1.0.46", | ||
"version": "1.1.0", | ||
"types": "./src", | ||
@@ -26,3 +26,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "c165810271847c2386421fd297c5f6f75d28fe54" | ||
"gitHead": "28727d59d09a64dabcb4cedc1af446af5201f8c1" | ||
} |
import * as React from 'react'; | ||
import { InferableComponentEnhancerWithProps } from 'react-redux'; | ||
// (A - keys of B) | ||
@@ -19,2 +20,24 @@ // In set theory, this would be the set complement A ∖ B (https://en.wikipedia.org/wiki/Complement_(set_theory)#Relative_complement) | ||
/** | ||
* Get mapped PropTypes of selectors and action creators from `connect` HOC. | ||
* | ||
* @example | ||
* const connector = connect(mapDispatchToProps, actions); | ||
* | ||
* type TReduxProps = ConnectedProps<typeof connector> | ||
* | ||
* export default connector(Component); | ||
* | ||
* // in your prop types | ||
* interface ComponentProps extends TReduxProps { | ||
* ... other props | ||
* } | ||
* class Component extends React.Component<ComponentProps> {...} | ||
*/ | ||
export type ConnectedProps< | ||
Connect | ||
> = Connect extends InferableComponentEnhancerWithProps<infer P, infer C> | ||
? P | ||
: never; | ||
/** | ||
* ValueOf: similar to keyof, but picks a value. | ||
@@ -21,0 +44,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41374
1275