@types/react-router
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -134,2 +134,10 @@ // Type definitions for React Router 5.0 | ||
export type WithRouterProps<C extends React.ComponentType<any>> = C extends React.ComponentClass | ||
? { wrappedComponentRef?: React.Ref<InstanceType<C>> } | ||
: {}; | ||
export interface WithRouterStatics<C extends React.ComponentType<any>> { | ||
WrappedComponent: C; | ||
} | ||
// There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes | ||
@@ -139,4 +147,6 @@ // they are decorating. Due to this, if you are using @withRouter decorator in your code, | ||
// on a separate line instead of as a decorator. | ||
export function withRouter<P extends RouteComponentProps<any>>(component: React.ComponentType<P>): React.ComponentClass<Omit<P, keyof RouteComponentProps<any>>>; | ||
export function withRouter<P extends RouteComponentProps<any>, C extends React.ComponentType<P>>( | ||
component: C & React.ComponentType<P>, | ||
): React.ComponentClass<Omit<P, keyof RouteComponentProps<any>> & WithRouterProps<C>> & WithRouterStatics<C>; | ||
export const __RouterContext: React.Context<RouteComponentProps>; |
{ | ||
"name": "@types/react-router", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "TypeScript definitions for React Router", | ||
@@ -120,4 +120,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "c3a2c384a6913d72cbd3fd9a47b1d2b5b13380f6c1c19d16ba4e311cbb77ceb6", | ||
"typesPublisherContentHash": "19f730605bd4be1fb2e9ee4458985cd6db2abfe6901d0b544759380e00994d01", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for React Router ( https://github.com/ReactTraining/react-router ). | ||
This package contains type definitions for React Router (https://github.com/ReactTraining/react-router). | ||
@@ -12,3 +12,3 @@ # Details | ||
Additional Details | ||
* Last updated: Thu, 13 Jun 2019 19:24:37 GMT | ||
* Last updated: Tue, 02 Jul 2019 16:46:12 GMT | ||
* Dependencies: @types/react, @types/history | ||
@@ -18,2 +18,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Sergey Buturlakin <https://github.com/sergey-buturlakin>, Yuichi Murata <https://github.com/mrk21>, Václav Ostrožlík <https://github.com/vasek17>, Nathan Brown <https://github.com/ngbrown>, Alex Wendland <https://github.com/awendland>, Kostya Esmukov <https://github.com/KostyaEsmukov>, John Reilly <https://github.com/johnnyreilly>, Karol Janyst <https://github.com/LKay>, Dovydas Navickas <https://github.com/DovydasNavickas>, Huy Nguyen <https://github.com/huy-nguyen>, Jérémy Fauvel <https://github.com/grmiade>, Daniel Roth <https://github.com/DaIgeb>, Egor Shulga <https://github.com/egorshulga>, Rahul Raina <https://github.com/rraina>, Maksim Sharipov <https://github.com/pret-a-porter>, Duong Tran <https://github.com/t49tran>, Ben Smith <https://github.com/8enSmith>, Wesley Tsai <https://github.com/wezleytsai>, Sebastian Silbermann <https://github.com/eps1lon>, Nicholas Hehr <https://github.com/HipsterBrown>. | ||
These definitions were written by Sergey Buturlakin <https://github.com/sergey-buturlakin>, Yuichi Murata <https://github.com/mrk21>, Václav Ostrožlík <https://github.com/vasek17>, Nathan Brown <https://github.com/ngbrown>, Alex Wendland <https://github.com/awendland>, Kostya Esmukov <https://github.com/KostyaEsmukov>, John Reilly <https://github.com/johnnyreilly>, Karol Janyst <https://github.com/LKay>, Dovydas Navickas <https://github.com/DovydasNavickas>, Huy Nguyen <https://github.com/huy-nguyen>, Jérémy Fauvel <https://github.com/grmiade>, Daniel Roth <https://github.com/DaIgeb>, Egor Shulga <https://github.com/egorshulga>, Rahul Raina <https://github.com/rraina>, Maksim Sharipov <https://github.com/pret-a-porter>, Duong Tran <https://github.com/t49tran>, Ben Smith <https://github.com/8enSmith>, Wesley Tsai <https://github.com/wezleytsai>, Sebastian Silbermann <https://github.com/eps1lon>, and Nicholas Hehr <https://github.com/HipsterBrown>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12013
130