mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Add Pure and Stateless components to withRouter definition (#10959)
* Add Pure and Stateless components to withRouter definition * Add missing type parameter
This commit is contained in:
committed by
Masahiro Wakame
parent
2fc5063371
commit
874a60bc68
2
react-router/react-router.d.ts
vendored
2
react-router/react-router.d.ts
vendored
@@ -247,7 +247,7 @@ declare namespace ReactRouter {
|
||||
isActive: (pathOrLoc: H.LocationDescriptor, indexOnly?: boolean) => boolean
|
||||
}
|
||||
|
||||
function withRouter<C extends React.ComponentClass<any>>(component: C): C
|
||||
function withRouter<C extends React.ComponentClass<any> | React.StatelessComponent<any> | React.PureComponent<any, any>>(component: C): C
|
||||
|
||||
/* utils */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user