mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 09:10:09 +00:00
Merge pull request #34580 from wszgxa/fix-react-router-config
[@types/react-router-config]Enable router config pass data or function
This commit is contained in:
1
types/react-router-config/index.d.ts
vendored
1
types/react-router-config/index.d.ts
vendored
@@ -22,6 +22,7 @@ export interface RouteConfig {
|
||||
exact?: boolean;
|
||||
strict?: boolean;
|
||||
routes?: RouteConfig[];
|
||||
[propName: string]: any;
|
||||
}
|
||||
|
||||
export interface MatchedRoute<Params extends { [K in keyof Params]?: string }> {
|
||||
|
||||
@@ -46,7 +46,8 @@ const routes: RouteConfig[] = [
|
||||
routes: [{
|
||||
path: "/child/:id/grand-child",
|
||||
component: GrandChild
|
||||
}]
|
||||
}],
|
||||
loadData: () => Promise.resolve({})
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user