Skip to content

Commit

Permalink
fix(RouterStore): Match RouterAction type parameters (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
livthomas authored and brandonroberts committed Nov 15, 2017
1 parent ab5ad56 commit 980a653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ __build__/**

# IDE #
.idea/
*.iml
*.swp
!/typings/custom.d.ts
.vscode/
Expand Down
4 changes: 2 additions & 2 deletions modules/router-store/src/router_store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export type RouterErrorAction<T, V = RouterStateSnapshot> = {
* An union type of router actions.
*/
export type RouterAction<T, V = RouterStateSnapshot> =
| RouterNavigationAction<T>
| RouterNavigationAction<V>
| RouterCancelAction<T, V>
| RouterErrorAction<T, V>;

Expand All @@ -97,7 +97,7 @@ export type RouterReducerState<T = RouterStateSnapshot> = {

export function routerReducer<T = RouterStateSnapshot>(
state: RouterReducerState<T>,
action: RouterAction<any>
action: RouterAction<any, T>
): RouterReducerState<T> {
switch (action.type) {
case ROUTER_NAVIGATION:
Expand Down

0 comments on commit 980a653

Please sign in to comment.