@@ -91,7 +91,7 @@ function exposeDecorated<P extends Record<string, any>>(
9191 } ;
9292}
9393
94- function getDecorated < P > ( parent : React . ComponentType < P > , name : string ) : React . ComponentClass < P > {
94+ function getDecorated < P extends Record < string , any > > ( parent : React . ComponentType < P > , name : string ) : React . ComponentClass < P > {
9595 if ( ! decorated [ name ] ) {
9696 let class_ = exposeDecorated ( parent ) ;
9797 ( class_ as any ) . displayName = `_exposeDecorated(${ name } )` ;
@@ -136,7 +136,7 @@ function getDecorated<P>(parent: React.ComponentType<P>, name: string): React.Co
136136// for each component, we return a higher-order component
137137// that wraps with the higher-order components
138138// exposed by plugins
139- export function decorate < P > (
139+ export function decorate < P extends Record < string , any > > (
140140 Component_ : React . ComponentType < P > ,
141141 name : string
142142) : React . ComponentClass < P , { hasError : boolean } > {
@@ -450,7 +450,7 @@ export function getTabProps<T extends Assignable<TabProps, T>>(tab: any, parentP
450450// connects + decorates a class
451451// plugins can override mapToState, dispatchToProps
452452// and the class gets decorated (proxied)
453- export function connect < stateProps , dispatchProps > (
453+ export function connect < stateProps extends { } , dispatchProps > (
454454 stateFn : ( state : HyperState ) => stateProps ,
455455 dispatchFn : ( dispatch : HyperDispatch ) => dispatchProps ,
456456 c : any ,
0 commit comments