import { Action , Reducer } from '@ngrx/store' ; var merge = < any > require ( 'lodash/merge' ) ; import { IEntities } from '../interfaces/IEntities' ; let initialState = { people : { } } ; export const entities = ( state = initialState , action ) => { if ( action . payload && action . payload . entities ) { return merge ( { } , state , action . payload . entities ) ; } return state ; } ;