@cerebral/react
Advanced tools
Comparing version 3.2.2 to 3.2.3-1524554116963
@@ -20,28 +20,30 @@ import * as React from 'react' | ||
export function connect<P, EP = {}>( | ||
propsMap: PropsMap, | ||
propsMap: P | ||
): ( | ||
component: React.ComponentClass<P & EP> | React.SFC<P & EP> | ||
): React.ComponentClass<EP> | ||
) => React.ComponentClass<EP> | ||
export function connect<P, EP = {}>( | ||
propsMap: PropsMap, | ||
propsMap: P, | ||
overrideProps: ( | ||
dependencyProps: any, | ||
dependencyProps: P, | ||
ownProps: EP, | ||
resolve: IResolve | ||
) => Partial<P & EP>, | ||
) => Partial<P & EP> | ||
): ( | ||
component: React.ComponentClass<P & EP> | React.SFC<P & EP> | ||
): React.ComponentClass<EP> | ||
) => React.ComponentClass<EP> | ||
export function connect( | ||
propsMap: PropsMap, | ||
propsMap: PropsMap | ||
): ( | ||
component: React.ComponentClass<any> | React.SFC<any> | ||
): React.ComponentClass<any> | ||
) => React.ComponentClass<any> | ||
export function connect( | ||
propsMap: PropsMap, | ||
overrideProps: ( | ||
dependencyProps: any, | ||
ownProps: any, | ||
resolve: IResolve | ||
) => any, | ||
overrideProps: (dependencyProps: any, ownProps: any, resolve: IResolve) => any | ||
): ( | ||
component: React.ComponentClass<any> | React.SFC<any> | ||
): React.ComponentClass<any> | ||
) => React.ComponentClass<any> | ||
@@ -48,0 +50,0 @@ declare type ComponentDecorator = < |
@@ -6,12 +6,12 @@ "use strict"; | ||
}); | ||
function connect(HOC, dependencies, mergeProps, passedComponent) { | ||
var component = passedComponent; | ||
function connect(HOC, dependencies, mergeProps) { | ||
var props = mergeProps; | ||
if (arguments.length === 3) { | ||
component = props; | ||
if (arguments.length === 2) { | ||
props = null; | ||
} | ||
return HOC(dependencies, props, component); | ||
return function (component) { | ||
return HOC(dependencies, props, component); | ||
}; | ||
} | ||
@@ -36,3 +36,3 @@ | ||
return function (component) { | ||
return connect.apply(undefined, [HOC].concat(args, [component])); | ||
return connect.apply(undefined, [HOC].concat(args))(component); | ||
}; | ||
@@ -39,0 +39,0 @@ }; |
{ | ||
"name": "@cerebral/react", | ||
"version": "3.2.2", | ||
"version": "3.2.3-1524554116963", | ||
"description": "React view for Cerebral", | ||
@@ -19,10 +19,4 @@ "main": "index.js", | ||
"homepage": "http://cerebral.github.io/cerebral-website", | ||
"devDependencies": { | ||
"@types/react": "^16.0.40", | ||
"@types/react-dom": "^16.0.4", | ||
"jest": "^22.1.1", | ||
"prop-types": "^15.6.1" | ||
}, | ||
"dependencies": { | ||
"cerebral": "^4.2.2" | ||
"cerebral": "^4.2.3-1524554116963" | ||
}, | ||
@@ -33,2 +27,3 @@ "scripts": { | ||
"prepublish": "npm run build", | ||
"setup": "npm install --only=dev", | ||
"test": "mocha -r test/setup --require babel-register \"src/**/*.test.js\" \"test/**/*.test.js\"", | ||
@@ -45,3 +40,6 @@ "test:watch": "npm run test -- --watch" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.3.11" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
27300
2
+ Addedcerebral@4.2.3-1524554116963(transitive)
- Removedcerebral@4.2.2(transitive)