How to override non-generic types such as @types/History for useHitory()?
问题 My goal is to override 'History' type, so I can use pass eventKey props for (eventKey) => history.push(eventKey) , I could not override History type from useHistory() , it said "Type History is not generic". The current solution I did is const history: any = useHistory() but I believe it defeat the purpose of types. import { RouteConfigProps } from "app/routes/config"; import { RenderRoutes } from "app/routes/RenderRoutes"; import React from "react"; import { Nav, Navbar } from "react