diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 2b1e2f97c1..34092d84b7 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -117,6 +117,8 @@ export type Omit = Pick>; export function matchPath

(pathname: string, props: RouteProps): match

| null; +export function generatePath(pattern: string, params?: { [paramName: string]: string | number | boolean }): string; + // There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes // they are decorating. Due to this, if you are using @withRouter decorator in your code, // you will see a bunch of errors from TypeScript. The current workaround is to use withRouter() as a function call