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:
Marcin Kral
2016-09-14 13:39:53 +02:00
committed by Masahiro Wakame
parent 2fc5063371
commit 874a60bc68

View File

@@ -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 */