Skip to content

Instantly share code, notes, and snippets.

@gsans
Created July 15, 2018 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsans/fb76065a1ed484505410d3153eb9520a to your computer and use it in GitHub Desktop.
Save gsans/fb76065a1ed484505410d3153eb9520a to your computer and use it in GitHub Desktop.
import { Action } from '@ngrx/store';
export enum CounterActionTypes {
Increment = '[Counter] Increment',
Decrement = '[Counter] Decrement',
Reset = '[Counter] Reset'
}
export class CounterIncrement implements Action {
readonly type = CounterActionTypes.Increment;
}
export class CounterDecrement implements Action {
readonly type = CounterActionTypes.Decrement;
}
export class CounterReset implements Action {
readonly type = CounterActionTypes.Reset;
constructor(public payload: { value: number }) { }
}
export type CounterActions = CounterIncrement | CounterDecrement | CounterReset;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment