import { Action } from '@ngrx/store' ; export enum SearchActionTypes { Search = '[Product] search' , SearchSuccess = '[Product] search success' , SearchFailure = '[Product] search failure' } export class SearchAction implements Action { readonly type = SearchActionTypes . Search ; constructor ( public payload ) { } } export class SearchSuccessAction implements Action { readonly type = SearchActionTypes . SearchSuccess ; constructor ( public payload ) { } } export class SearchFailureAction implements Action { readonly type = SearchActionTypes . SearchFailure ; constructor ( public payload ) { } } export type SearchActions = SearchAction | SearchSuccessAction | SearchFailureAction ;