Skip to content

Commit

Permalink
fix #60
Browse files Browse the repository at this point in the history
  • Loading branch information
salvoravida committed Dec 13, 2021
1 parent 6ace38e commit 9e3a688
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-first-history",
"version": "5.0.5",
"version": "5.0.8",
"description": "Redux First History - Redux history binding support react-router - @reach/router - wouter",
"main": "build/es5/index.js",
"module": "build/es6/index.js",
Expand Down
15 changes: 8 additions & 7 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ function updateLocation<T extends HistoryMethods>(method: T) {
});
}

export const push = updateLocation('push');
export const replace = updateLocation('replace');
export const go = updateLocation('go');
export const goBack = updateLocation('goBack');
export const goForward = updateLocation('goForward');
export const back = updateLocation('back');
export const forward = updateLocation('forward');
export const push: (...args: Parameters<History['push']>) => ReduxAction = updateLocation('push');
export const replace: (...args: Parameters<History['replace']>) => ReduxAction =
updateLocation('replace');
export const go: (...args: Parameters<History['go']>) => ReduxAction = updateLocation('go');
export const goBack: () => ReduxAction = updateLocation('goBack');
export const goForward: () => ReduxAction = updateLocation('goForward');
export const back: () => ReduxAction = updateLocation('back');
export const forward: () => ReduxAction = updateLocation('forward');
1 change: 1 addition & 0 deletions src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export const createReduxHistoryContext = ({
goBack: (...args: Parameters<History['goBack']>) => store.dispatch(goBack(...args)),
// @ts-ignore
goForward: (...args: Parameters<History['goForward']>) =>
// @ts-ignore
store.dispatch(goForward(...args)),
// @ts-ignore
back: (...args: Parameters<History['back']>) => store.dispatch(back(...args)),
Expand Down

0 comments on commit 9e3a688

Please sign in to comment.