// 20190224 make State to any import { MetaReducer, ActionReducer } from '@ngrx/store'; import { Err } from 'meng-common'; export function logger(reducer: ActionReducer): ActionReducer { return (state, action) => { console.log('state', state); console.log('action', action); return reducer(state, action); }; } export function storeStateGuard(reducer: ActionReducer): ActionReducer { return (state, action) => { if (action.type === '[Auth] Logout') { // Logout.type === '[Auth] Logout' return reducer( undefined, action); } return reducer(state, action); }; } // export const metaReducers: MetaReducer[] = !environment.production // ? [ // logger, storeStateGuard, // ] // : [storeStateGuard];