Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create and export types for routerActions so they can be imported and used in definitions #189

Merged
merged 1 commit into from Nov 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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