[react-router-config] Add render key in route config. (#35805)

* Add render key in route config.

* Update with proper type directly from @types/react-router

* And update for nested routes.
This commit is contained in:
Mathieu TUDISCO
2019-05-30 10:57:26 -07:00
committed by Sheetal Nandi
parent bb632389a0
commit bcfb1a08a8
+3 -1
View File
@@ -1,8 +1,9 @@
// Type definitions for react-router-config 1.1
// Type definitions for react-router-config 5.0
// Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config, https://github.com/reacttraining/react-router
// Definitions by: François Nguyen <https://github.com/lith-light-g>
// John Reilly <https://github.com/johnnyreilly>
// Phoenix He <https://github.com/NullMDR>
// Mathieu TUDISCO <https://github.com/mathieutu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -22,6 +23,7 @@ export interface RouteConfig {
exact?: boolean;
strict?: boolean;
routes?: RouteConfig[];
render?: (props: RouteConfigComponentProps<any>) => React.ReactNode;
[propName: string]: any;
}