import { Action , AnyAction , Reducer } from 'redux' ; enum CreateInitialStructureActionTypes { SET_CREATE_INITIAL_STRUCTURE = 'set-create-initial-structure' } export type CreateInitialStructureReducerType = boolean | null ; interface SetCreateInitialStructureActionType extends Action { type : CreateInitialStructureActionTypes . SET_CREATE_INITIAL_STRUCTURE ; create : CreateInitialStructureReducerType ; } export function setCreateInitialStructureAction ( create ) { return { type : CreateInitialStructureActionTypes . SET_CREATE_INITIAL_STRUCTURE , create } ; } const createInitialStructureReducer = ( state = null , action ) => { switch ( action . type ) { case CreateInitialStructureActionTypes . SET_CREATE_INITIAL_STRUCTURE : return action . create ; default : return state ; } } ; export default createInitialStructureReducer ;