mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
add generatePath function export introduced in react-router 4.3.0 (#26876)
This commit is contained in:
committed by
Mohamed Hegazy
parent
d336ec7181
commit
bc2502ba54
Vendored
+2
@@ -117,6 +117,8 @@ export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||
|
||||
export function matchPath<P>(pathname: string, props: RouteProps): match<P> | 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
|
||||
|
||||
Reference in New Issue
Block a user