import { Action } from '@ngrx/store' ; import { Hero } from '../../core' ; export const LOAD_HEROES = '[Heroes] Load Heroes' ; export const LOAD_HEROES_SUCCESS = '[Heroes] Load Heroes Success' ; export const LOAD_HEROES_ERROR = '[Heroes] Load Heroes Error' ; export class LoadHeroes implements Action { readonly type = LOAD_HEROES ; } export class LoadHeroesSuccess implements Action { readonly type = LOAD_HEROES_SUCCESS ; constructor ( public payload ) { } } export class LoadHeroesError implements Action { readonly type = LOAD_HEROES_ERROR ; constructor ( public payload ) { } } /** Union type of all Hero Action Creator classes */ export type HeroActions = LoadHeroes | LoadHeroesSuccess | LoadHeroesError ;