@@ -5,11 +5,6 @@ interface ComponentDecorator<TOriginalProps, TOuterProps> {
55 ( component : React . ComponentClass < TOriginalProps > | React . StatelessComponent < TOriginalProps > ) : React . ComponentClass < TOuterProps > ;
66}
77
8- interface MapStateToProps < Store , TOuterProps , TMappedProps > {
9- ( state : Store , ownProps ?: TOuterProps ) : TMappedProps ;
10- }
11-
12-
138export class SharedStore < State = { } > {
149 state : State
1510
@@ -23,15 +18,19 @@ export class EnhancedComponent<Store extends SharedStore, P = any, S = any> exte
2318 sharedStore : Store
2419}
2520
21+ interface MapStateToProps < Store , TInnerProps , TOuterProps , > {
22+ ( state : Store , ownProps : TOuterProps ) : TInnerProps ;
23+ }
24+
2625export function getProvider < Store extends SharedStore > (
2726 name : string ,
2827 StoreClass ?: new ( storeName : string , initialState ?: any ) => Store
2928) : {
3029 new ( ) : EnhancedComponent < Store >
31- connect < TOuterProps , TInnerProps > ( mapStoreToProps : MapStateToProps < Store , TOuterProps , TInnerProps > ) : ComponentDecorator < TInnerProps , TOuterProps >
30+ connect < TInnerProps , TOuterProps > ( mapStoreToProps : MapStateToProps < Store , TInnerProps , TOuterProps > ) : ComponentDecorator < TInnerProps , TOuterProps >
3231}
3332
34- export function connect < Store , TOuterProps , TInnerProps > (
33+ export function connect < Store , TInnerProps , TOuterProps > (
3534 name : string ,
3635 mapStateToProps ?: MapStateToProps < Store , TOuterProps , TInnerProps > ,
3736) : ComponentDecorator < TInnerProps , TOuterProps > ;
0 commit comments