mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
accept string as second argument for matchPath (#30334)
This commit is contained in:
Vendored
+1
-1
@@ -117,7 +117,7 @@ export interface match<Params extends { [K in keyof Params]?: string } = {}> {
|
||||
// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
|
||||
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||
|
||||
export function matchPath<Params extends { [K in keyof Params]?: string }>(pathname: string, props: RouteProps, parent?: match<Params> | null): match<Params> | null;
|
||||
export function matchPath<Params extends { [K in keyof Params]?: string }>(pathname: string, props: string | RouteProps, parent?: match<Params> | null): match<Params> | null;
|
||||
|
||||
export function generatePath(pattern: string, params?: { [paramName: string]: string | number | boolean }): string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user