Skip to content

Commit

Permalink
make router actions abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Feb 8, 2018
1 parent f592336 commit 92646fc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/router-store/src/router_store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export type RouterNavigationPayload<T> = {
* An action dispatched when the router navigates.
*/

export class RouterNavigationAction<T = RouterStateSnapshot> implements Action {
export abstract class RouterNavigationAction<T = RouterStateSnapshot>
implements Action {
readonly type = ROUTER_NAVIGATION;
constructor(public payload: RouterNavigationPayload<T>) {}
}
Expand All @@ -55,7 +56,8 @@ export type RouterCancelPayload<T, V> = {
/**
* An action dispatched when the router cancel navigation.
*/
export class RouterCancelAction<T, V = RouterStateSnapshot> implements Action {
export abstract class RouterCancelAction<T, V = RouterStateSnapshot>
implements Action {
readonly type = ROUTER_CANCEL;
constructor(public payload: RouterCancelPayload<T, V>) {}
}
Expand All @@ -77,7 +79,8 @@ export type RouterErrorPayload<T, V> = {
/**
* An action dispatched when the router errors.
*/
export class RouterErrorAction<T, V = RouterStateSnapshot> implements Action {
export abstract class RouterErrorAction<T, V = RouterStateSnapshot>
implements Action {
readonly type = ROUTER_ERROR;
constructor(public payload: RouterErrorPayload<T, V>) {}
}
Expand Down

0 comments on commit 92646fc

Please sign in to comment.