diff --git a/redux-router/redux-router-tests.ts b/redux-router/redux-router-tests.ts index 081f94d71..24274f4cd 100644 --- a/redux-router/redux-router-tests.ts +++ b/redux-router/redux-router-tests.ts @@ -1,2 +1,8 @@ /// -import { reduxReactRouter, routerStateReducer, ReduxRouter } from 'redux-router'; +import { reduxReactRouter, routerStateReducer, ReduxRouter, pushState } from 'redux-router'; + +export function someAsyncReduxAction(someArg: Object) { + return function(dispatch: (action: Object) => void) { + dispatch(pushState(null, someArg)); + }; +} \ No newline at end of file diff --git a/redux-router/redux-router.d.ts b/redux-router/redux-router.d.ts index 82f4e58d6..757f5f80b 100644 --- a/redux-router/redux-router.d.ts +++ b/redux-router/redux-router.d.ts @@ -34,7 +34,7 @@ declare namespace __ReduxRouter { export function routerDidChange(state: any): ReduxRouterAction; export function initRoutes(routes: any): ReduxRouterAction; export function replaceRoutes(routes: any): ReduxRouterAction; - export function historyAPI(method: any): ReduxRouterAction; + export function historyAPI(method: any): (...args: Object[]) => ReduxRouterAction; } declare module "redux-router/lib/routerStateReducer" { @@ -59,14 +59,14 @@ declare module "redux-router/lib/actionCreators" { export const initRoutes: typeof __ReduxRouter.initRoutes; export const replaceRoutes: typeof __ReduxRouter.replaceRoutes; export const historyAPI: typeof __ReduxRouter.historyAPI; - export const pushState: __ReduxRouter.ReduxRouterAction; - export const push: __ReduxRouter.ReduxRouterAction; - export const replaceState: __ReduxRouter.ReduxRouterAction; - export const replace: __ReduxRouter.ReduxRouterAction; - export const setState: __ReduxRouter.ReduxRouterAction; - export const go: __ReduxRouter.ReduxRouterAction; - export const goBack: __ReduxRouter.ReduxRouterAction; - export const goForward: __ReduxRouter.ReduxRouterAction; + export const pushState: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const push: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const replaceState: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const replace: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const setState: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const go: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const goBack: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; + export const goForward: (...args: Object[]) => __ReduxRouter.ReduxRouterAction; } declare module "redux-router" {