From 08c1929c9f3612e4a8b22b12c3908973679e876f Mon Sep 17 00:00:00 2001 From: hiluluke Date: Tue, 9 Apr 2019 20:12:23 +0800 Subject: [PATCH] Enable router config pass data or function --- types/react-router-config/index.d.ts | 1 + types/react-router-config/react-router-config-tests.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts index bf719c5760..916b8293f4 100644 --- a/types/react-router-config/index.d.ts +++ b/types/react-router-config/index.d.ts @@ -22,6 +22,7 @@ export interface RouteConfig { exact?: boolean; strict?: boolean; routes?: RouteConfig[]; + [propName: string]: any; } export interface MatchedRoute { diff --git a/types/react-router-config/react-router-config-tests.tsx b/types/react-router-config/react-router-config-tests.tsx index 56f309ad67..c21a24d67b 100644 --- a/types/react-router-config/react-router-config-tests.tsx +++ b/types/react-router-config/react-router-config-tests.tsx @@ -46,7 +46,8 @@ const routes: RouteConfig[] = [ routes: [{ path: "/child/:id/grand-child", component: GrandChild - }] + }], + loadData: () => Promise.resolve({}) } ] }