Skip to content

Commit

Permalink
TypeScript: Create and export types for routerActions so they can be …
Browse files Browse the repository at this point in the history
…imported and used in definitions (@afholderman in supasate#189)
  • Loading branch information
pmarfany committed Apr 30, 2019
1 parent dac52a2 commit 76be4cb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions index.d.ts
Expand Up @@ -43,12 +43,18 @@ declare module 'connected-react-router' {
export function goBack(): CallHistoryMethodAction;
export function goForward(): CallHistoryMethodAction;

export type Push = typeof push;
export type Replace = typeof replace;
export type Go = typeof go;
export type GoBack = typeof goBack;
export type GoForward = typeof goForward;

export const routerActions: {
push: typeof push;
replace: typeof replace;
go: typeof go;
goBack: typeof goBack;
goForward: typeof goForward;
push: Push;
replace: Replace;
go: Go;
goBack: GoBack;
goForward: GoForward;
};

export interface LocationActionPayload {
Expand Down

0 comments on commit 76be4cb

Please sign in to comment.