Когда я использую withRouter из react-router-dom v4.3.2, он передает три реквизита компоненту, history, match и location. Где я могу найти определение типа для этих трех объектов для TypeScript?
withRouter
react-router-dom
history
match
location
Я проверил эту ссылку https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router/v3/lib, но у нее нет версии 4. Кроме того, определенный здесь тип не включает History location and match.
History location and match
import { History, Location } from 'history'; import {match} from 'react-router';
Вы можете проверить @types/react-router.Там вы можете увидеть все типы, определенные и импортированные из @types/history.
@types/react-router
@types/history