[@reach/router] added hook types 1.3.1 (#42088)

* reach__router

Add @reach/router hook types

* fix type error

* fixed typo

* tweak useParams

* useParams return any
This commit is contained in:
William Corry 2020-02-12 18:58:32 +00:00 committed by GitHub
parent 0668834cf4
commit 007ea3c8be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,9 @@
// Type definitions for @reach/router 1.2
// Type definitions for @reach/router 1.3
// Project: https://github.com/reach/router
// Definitions by: Kingdaro <https://github.com/kingdaro>,
// A.Mokhtar <https://github.com/xMokAx>,
// Awwit <https://github.com/awwit>
// wroughtec <https://github.com/wroughtec>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@ -153,3 +154,11 @@ export function isRedirect(error: any): error is RedirectRequest;
export function redirectTo(uri: string): void;
export const globalHistory: History;
export function useLocation(): WindowLocation;
export function useNavigate(): NavigateFn;
export function useParams(): any;
export function useMatch(pathname: string): null | { uri: string; path: string };