From bc9057bf1dbe7df6d9eec924d1e09530221a2329 Mon Sep 17 00:00:00 2001 From: Aaron Ross Date: Wed, 7 Nov 2018 02:30:55 -0500 Subject: [PATCH] accept string as second argument for matchPath (#30334) --- types/react-router/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 2e1cfb902b..f62fc44b18 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -117,7 +117,7 @@ export interface match { // Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html export type Omit = Pick>; -export function matchPath(pathname: string, props: RouteProps, parent?: match | null): match | null; +export function matchPath(pathname: string, props: string | RouteProps, parent?: match | null): match | null; export function generatePath(pattern: string, params?: { [paramName: string]: string | number | boolean }): string;