mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-26 22:39:39 +08:00
[react-redux] Improve connect type
This commit is contained in:
2
types/react-redux/index.d.ts
vendored
2
types/react-redux/index.d.ts
vendored
@@ -25,7 +25,7 @@ interface ComponentDecorator<TOwnProps, TMergedProps> {
|
||||
* Can't use the above decorator because it would default the type to {}
|
||||
*/
|
||||
export interface InferableComponentDecorator<TOwnProps> {
|
||||
<T extends Component<TOwnProps>>(component: T): T;
|
||||
<T>(component: Component<T & TOwnProps>): Component<TOwnProps>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user