mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Adds tslint ignore rule
This commit is contained in:
8
types/next/router.d.ts
vendored
8
types/next/router.d.ts
vendored
@@ -90,8 +90,12 @@ export interface WithRouterProps<Q = DefaultQuery> {
|
||||
router: SingletonRouter<Q>;
|
||||
}
|
||||
|
||||
export function withRouter<T extends {}>(
|
||||
Component: React.ComponentType<T & WithRouterProps>,
|
||||
// Manually disabling the no-unnecessary-generics rule so users can
|
||||
// retain type inference if they warp their component in withRouter
|
||||
// without defining props explicitly
|
||||
export function withRouter<T extends {}, Q = DefaultQuery>(
|
||||
// tslint:disable-next-line:no-unnecessary-generics
|
||||
Component: React.ComponentType<T & WithRouterProps<Q>>,
|
||||
): React.ComponentType<T>;
|
||||
|
||||
declare const Router: SingletonRouter;
|
||||
|
||||
Reference in New Issue
Block a user