import { Reducer } from 'redux' ; import { EventsSection } from '../../state/events' ; import { IEventsClear } from '../actions/actionTypes' ; export const EventsClear = ( state , action ) : EventsSection => { if ( state [ action . entity ] ) { delete state [ action . entity ] ; } return { ... state , } ; } ;