Set better return type of route handlers ActionCreator 14653-refactor-route-change-handlers
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Mon, 31 Dec 2018 08:16:50 +0000 (09:16 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Mon, 31 Dec 2018 08:16:50 +0000 (09:16 +0100)
Feature #14653

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/routes/route-change-handlers.ts

index ee48e6da6ab255503ec91bcf4cc0259fc17099d9..72b26539fb18925979561f05d6596c5e81886ae8 100644 (file)
@@ -31,7 +31,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
 };
 
 type MatchRoute<Params> = (route: string) => match<Params> | null;
-type ActionCreator<Params> = (params: Params) => void;
+type ActionCreator<Params> = (params: Params) => ThunkAction<any, any, any, any>;
 
 const handle = <Params>(matchRoute: MatchRoute<Params>, actionCreator: ActionCreator<Params>) =>
     (dispatch: Dispatch, route: string) => {