Skip to content

Commit 980a653

Browse files
livthomasbrandonroberts
authored andcommitted
fix(RouterStore): Match RouterAction type parameters (#562)
1 parent ab5ad56 commit 980a653

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ __build__/**
5151

5252
# IDE #
5353
.idea/
54+
*.iml
5455
*.swp
5556
!/typings/custom.d.ts
5657
.vscode/

modules/router-store/src/router_store_module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export type RouterErrorAction<T, V = RouterStateSnapshot> = {
8686
* An union type of router actions.
8787
*/
8888
export type RouterAction<T, V = RouterStateSnapshot> =
89-
| RouterNavigationAction<T>
89+
| RouterNavigationAction<V>
9090
| RouterCancelAction<T, V>
9191
| RouterErrorAction<T, V>;
9292

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

9898
export function routerReducer<T = RouterStateSnapshot>(
9999
state: RouterReducerState<T>,
100-
action: RouterAction<any>
100+
action: RouterAction<any, T>
101101
): RouterReducerState<T> {
102102
switch (action.type) {
103103
case ROUTER_NAVIGATION:

0 commit comments

Comments
 (0)