Skip to content

Commit

Permalink
TypeScript: Be more specific on action creators' return type (@lazarl…
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarfany committed Apr 30, 2019
1 parent 913901a commit dac52a2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.d.ts
Expand Up @@ -35,13 +35,13 @@ declare module 'connected-react-router' {

export type RouterAction = LocationChangeAction | CallHistoryMethodAction;

export function push(path: Path, state?: LocationState): RouterAction;
export function push(location: LocationDescriptorObject): RouterAction;
export function replace(path: Path, state?: LocationState): RouterAction;
export function replace(location: LocationDescriptorObject): RouterAction;
export function go(n: number): RouterAction;
export function goBack(): RouterAction;
export function goForward(): RouterAction;
export function push(path: Path, state?: LocationState): CallHistoryMethodAction;
export function push(location: LocationDescriptorObject): CallHistoryMethodAction;
export function replace(path: Path, state?: LocationState): CallHistoryMethodAction;
export function replace(location: LocationDescriptorObject): CallHistoryMethodAction;
export function go(n: number): CallHistoryMethodAction;
export function goBack(): CallHistoryMethodAction;
export function goForward(): CallHistoryMethodAction;

export const routerActions: {
push: typeof push;
Expand Down

0 comments on commit dac52a2

Please sign in to comment.