Skip to content

Commit

Permalink
Merge pull request #189 from afholderman/master
Browse files Browse the repository at this point in the history
create and export types for routerActions so they can be imported and used in definitions
  • Loading branch information
supasate committed Nov 22, 2018
2 parents b197430 + a08f07d commit ce79c76
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions index.d.ts
Expand Up @@ -12,7 +12,7 @@ declare module 'connected-react-router' {
interface ConnectedRouterProps {
history: History;
}

export type RouterActionType = 'POP' | 'PUSH' | 'REPLACE';

export interface RouterState {
Expand Down 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 ce79c76

Please sign in to comment.